/* PMS Kovix — one hand-written stylesheet. No framework, no build step, no CDN.
   Colours, spacing and type come from the :root tokens; components use only tokens.
   The look is "ink and linen" (Slice 10); its reference is docs/design/look-2026-09-30/.
   tests/test_design_tokens.py checks the contrast of every token pair used for text. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter/InterVariable.2bf3d951bf9d.woff2") format("woff2");
}
/* The file holds weight 600 only. Never ask for another weight: the browser would fake it. */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/literata/Literata-SemiBold.b5e650d53a50.ttf") format("truetype");
}

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --bot-trap-display: none;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Literata", Georgia, serif; /* the wordmark and the entrance heading only */

  --color-bg: #f6f1e8; /* linen */
  --color-surface: #fbf8f2; /* paper */
  --color-subtle: #e7e0d4; /* stone: plain chips, icon tiles, the calendar footer */
  --color-text: #1b2a4a; /* ink */
  --color-muted: #5c5a54;
  --color-border: #d4cbba; /* decorative rules and card edges */
  --color-field-border: #8f877a; /* inputs and ghost buttons: 3:1 against the surface */
  --color-primary: #1b2a4a;
  --color-primary-text: #ffffff;
  --color-focus: #c45c3e; /* terracotta ring */
  --color-accent: #c45c3e; /* terracotta where it is not text: today's rule, the active entry */
  --color-accent-text: #a8472b; /* terracotta when it is small text */
  --color-ok: #3f5e46;
  --color-ok-bg: #d7e4d8;
  --color-warn: #7a5406;
  --color-warn-bg: #f6e7c4;
  --color-bad: #9a2f2f;
  --color-bad-bg: #f4d6d4;
  --color-bad-text: #ffffff; /* text on a --color-bad button */

  --color-sidebar-bg: #1b2a4a;
  --color-sidebar-text: #c9c0b2;
  --color-sidebar-active: #2c3d63;
  --color-sidebar-active-text: #f6f1e8;

  --color-today: #f3e0d8; /* calendar: today's column */
  --color-weekend: #efe8dc;

  /* Calendar bars: the text on each is --stay-text. */
  --stay-confirmed: #1b2a4a;
  --stay-in-house: #5b7a62;
  --stay-checked-out: #6e6a62;
  --stay-text: #ffffff;

  /* Status chips: one text/background pair per status that exists. */
  --chip-confirmed-fg: #1b2a4a;
  --chip-confirmed-bg: #d8deea;
  --chip-in-house-fg: #3f5e46;
  --chip-in-house-bg: #d7e4d8;
  --chip-checked-out-fg: #58544d;
  --chip-checked-out-bg: #e4e0d8;
  --chip-cancelled-fg: #9a4a3c;
  --chip-cancelled-bg: #f3e4de;
  --hk-clean-fg: #3f5e46;
  --hk-clean-bg: #d7e4d8;
  --hk-dirty-fg: #9e4028;
  --hk-dirty-bg: #f3e0d8;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2.125rem; /* the public page's section headings */
  --text-xs: 0.75rem; /* Slice F28: a document's tables on A4 (9 pt) */

  /* Slice F28: print is black on white whatever the screen's colour scheme; the dark block
     repeats these with the same values. */
  --print-ink: #000000;
  --print-paper: #ffffff;
  --print-muted: #4a4741;
  --print-rule: #8f877a;
  /* Slice F28: a document's item column is never narrower than its longest usual word
     ("Accommodation,", a date), so a word is never broken inside. */
  --doc-item-min: 8.5em;

  --sidebar-width: 240px;
  --topbar-height: 56px;
  --content-max: 1280px;
  --cell-wrap-min: 16rem; /* a text cell that wraps is never narrower than this */
  --site-max: 1200px; /* the public page's column */
  /* Slice LS: how far below the window's top an in-page link lands on the public page: the
     sticky bar (one row from 1024 px, two below) and a little air. */
  --site-bar-offset: 5.5rem;
  --site-bar-offset-narrow: 7rem;
}

.booking__trap { display: var(--bot-trap-display); }

/* Dark mode follows the operating system; there is no toggle and nothing is stored. */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #161410;
    --color-surface: #1e1b16;
    --color-subtle: #2a261f;
    --color-text: #f4efe6;
    --color-muted: #b8b1a4;
    --color-border: #4a453b;
    --color-field-border: #8a8274;
    --color-primary: #d97a5e;
    --color-primary-text: #161410;
    --color-focus: #e08a70;
    --color-accent: #e08a70;
    --color-accent-text: #e08a70;
    --color-ok: #8fb396;
    --color-ok-bg: #1e2e22;
    --color-warn: #e0c070;
    --color-warn-bg: #3a3018;
    --color-bad: #e07a7a;
    --color-bad-bg: #3a1e1e;
    --color-bad-text: #161410;

    --color-sidebar-bg: #10151f;
    --color-sidebar-text: #c9c0b2;
    --color-sidebar-active: #1f2a40;
    --color-sidebar-active-text: #f4efe6;

    --color-today: #3a2620;
    --color-weekend: #221f19;

    /* Slice F28: paper is the same in both schemes. */
    --print-ink: #000000;
    --print-paper: #ffffff;
    --print-muted: #4a4741;
    --print-rule: #8f877a;

    --stay-confirmed: #34466e;
    --stay-in-house: #4f6f57;
    --stay-checked-out: #5f5b54;
    --stay-text: #ffffff;

    --chip-confirmed-fg: #a9b8d6;
    --chip-confirmed-bg: #243044;
    --chip-in-house-fg: #8fb396;
    --chip-in-house-bg: #1e2e22;
    --chip-checked-out-fg: #b5b0a6;
    --chip-checked-out-bg: #2a261f;
    --chip-cancelled-fg: #d48a7a;
    --chip-cancelled-bg: #3a221c;
    --hk-clean-fg: #8fb396;
    --hk-clean-bg: #1e2e22;
    --hk-dirty-fg: #e08a70;
    --hk-dirty-bg: #3a221c;
  }
}

/* ---- Reset and base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 var(--space-4); }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-4); }
a { color: var(--color-primary); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.sprite { display: none; }
.icon { width: 1.25rem; height: 1.25rem; flex: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-2); top: -3rem; z-index: 10;
  padding: var(--space-2) var(--space-3); background: var(--color-surface);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-2); }

/* The grid mark and the "PMS Kovix" wordmark: in the sidebar corner and on the entrance. */
.brand {
  display: flex; align-items: center; gap: var(--space-2);
  color: var(--color-sidebar-active-text); text-decoration: none;
}
.brand__mark { width: 1.625rem; height: 1.625rem; flex: none; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); white-space: nowrap; }

/* ---- Application shell ---------------------------------------------- */
/* Slice LS: the window scrolls, the bars do not. The brand corner and the top bar stick to the
   top at exactly --topbar-height (a height, not a minimum, so the side menu's offset is exact);
   the side menu sticks under them, as tall as the rest of the window, and scrolls on its own.
   Only the main area moves. No inner scroll container: anchors, find, Page Down, print and
   calendar.js keep the window's scrolling they had. */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) 1fr;
  grid-template-areas: "brand topbar" "sidebar content";
  min-height: 100vh;
}
/* An address with #… lands below the bar, not under it (Home's figures, Skip to content). */
html:has(> body.shell) { scroll-padding-top: calc(var(--topbar-height) + var(--space-4)); }
.shell > .brand, .topbar { position: sticky; top: 0; z-index: 5; height: var(--topbar-height); }
.shell > .brand {
  grid-area: brand;
  padding: 0 var(--space-5);
  background: var(--color-sidebar-bg);
}
.topbar {
  grid-area: topbar;
  display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--space-5);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
/* Two classes, so it wins over .btn's own display further down. */
.topbar .topbar__toggle { display: none; }
.topbar__date { flex: none; color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
/* Slice MP (MP-D7): the property the page works in, first in the bar and never hidden; a long
   name ends in "…" (Slice LS: at every width, so the bar keeps its height). With two or more
   properties it is the link to choose another. */
/* position: the link's screen-reader words (.visually-hidden, position: absolute) stay inside it;
   without it they are placed against the bar and widen a phone's page (Slice LS). */
.topbar__property {
  position: relative;
  color: var(--color-text); font-size: var(--text-md); font-weight: 600;
  white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis;
}
a.topbar__property { text-decoration: underline; text-underline-offset: 0.2em; }

/* Slice LS: the menu under the user's name. A details element: the summary is the button. */
.user-menu { position: relative; margin-left: auto; flex: 0 1 auto; min-width: 0; }
.user-menu__button {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 2.75rem; padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 600; cursor: pointer; list-style: none;
}
.user-menu__button::-webkit-details-marker { display: none; }
.user-menu__button:hover { background: var(--color-subtle); }
.user-menu__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__chevron { width: 1rem; height: 1rem; }
.user-menu[open] .user-menu__chevron { transform: rotate(180deg); }
.user-menu__panel {
  position: absolute; right: 0; top: calc(100% + var(--space-1));
  width: max-content; min-width: 16rem; max-width: calc(100vw - 2 * var(--space-4));
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
.user-menu__header { padding: var(--space-4); border-bottom: 1px solid var(--color-border); }
.user-menu__header p { margin: 0; overflow-wrap: anywhere; }
.user-menu__title { font-weight: 700; }
.user-menu__email, .user-menu__role { color: var(--color-muted); font-size: var(--text-sm); }
.user-menu__role { font-weight: 600; }
.user-menu__list { list-style: none; margin: 0; padding: var(--space-1) 0; }
.user-menu__list form { margin: 0; }
/* A link and the Log out button look the same: a row of the menu. */
.user-menu__item {
  display: flex; align-items: center; gap: var(--space-3); width: 100%;
  min-height: 2.75rem; padding: 0 var(--space-4);
  font: inherit; text-align: left; text-decoration: none;
  color: var(--color-text); background: transparent; border: 0; cursor: pointer;
}
.user-menu__item:hover { background: var(--color-subtle); }
.user-menu__item:focus-visible { outline-offset: -3px; }

.sidebar {
  grid-area: sidebar;
  position: sticky; top: var(--topbar-height); align-self: start;
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  overflow-y: auto;
  background: var(--color-sidebar-bg);
  padding: var(--space-4) var(--space-3);
}
.sidebar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.sidebar__link {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 2.75rem; padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-sidebar-text); text-decoration: none;
}
.sidebar__link:hover { background: var(--color-sidebar-active); color: var(--color-sidebar-active-text); }
.sidebar__link[aria-current="page"] {
  background: var(--color-sidebar-active); color: var(--color-sidebar-active-text);
  font-weight: 600; box-shadow: inset 3px 0 0 var(--color-accent);
}

.content {
  grid-area: content;
  width: 100%; max-width: var(--content-max);
  min-width: 0; /* a wide table scrolls inside .table-wrap instead of widening the page */
  padding: var(--space-6) var(--space-5);
}

/* Below 1024 px the date gives way. */
@media (max-width: 1023px) {
  .topbar__date { display: none; }
}

/* Phone: one ink bar (mark, property, the user menu, the menu button). The open menu covers the
   page under the bar and scrolls on its own: opened far down a page, it is still in view.
   Slice LS (the architect's check, 25 Oct 2026): the mark takes its own width and the bar the
   rest, never the width of its text; the bar may shrink below its content (min-width: 0), so a
   long property name ends in "…" instead of widening the page; the wordmark gives way to the
   property (MP-D7: never hidden), and stays the link's name for screen readers. */
@media (max-width: 767px) {
  .shell {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: var(--topbar-height) 1fr;
    grid-template-areas: "brand topbar" "content content";
  }
  .shell > .brand { padding: 0 var(--space-4); }
  .shell > .brand .brand__name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .topbar {
    min-width: 0;
    gap: var(--space-2); padding: 0 var(--space-3) 0 0;
    background: var(--color-sidebar-bg); color: var(--color-sidebar-active-text);
    border-bottom: 0;
  }
  .topbar .topbar__toggle { display: inline-flex; order: 2; border-color: var(--color-sidebar-text); }
  .topbar__property { color: var(--color-sidebar-active-text); font-size: var(--text-sm); }
  /* The person icon alone; the name stays the button's name for screen readers. */
  .user-menu { flex: none; }
  .user-menu__name {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .user-menu__button:hover { background: var(--color-sidebar-active); }
  .sidebar { display: none; }
  .sidebar.is-open {
    display: block;
    position: fixed; top: var(--topbar-height); left: 0; right: 0; z-index: 5;
    height: auto; max-height: calc(100vh - var(--topbar-height));
    max-height: calc(100dvh - var(--topbar-height));
  }
  .content { padding: var(--space-5) var(--space-4); }
}

/* ---- Entrance (logged-out pages) ------------------------------------ */
.entrance {
  display: grid; place-items: center;
  min-height: 100vh; padding: var(--space-4);
}
.entrance__card {
  width: 100%; max-width: 26rem;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.entrance__brand { color: var(--color-text); margin-bottom: var(--space-5); }
.entrance h1 { font-family: var(--font-display); font-weight: 600; }
.entrance__submit { width: 100%; }

/* ---- Components ------------------------------------------------------ */
.card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.setup-draft__card { margin-bottom: var(--space-5); }

/* Primary is ink; --secondary is the "ghost" button on paper; --danger is brick. */
.btn, .entrance__card button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 2.75rem; padding: var(--space-2) var(--space-4);
  font: inherit; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-primary); color: var(--color-primary-text);
}
a.btn { text-decoration: none; }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-field-border); }
.btn--danger { background: var(--color-bad); color: var(--color-bad-text); }
.btn--icon { min-height: 2.75rem; padding: var(--space-2); background: transparent; color: inherit; }

.table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
.table th, .table td { padding: var(--space-3); border-bottom: 1px solid var(--color-border); text-align: left; }
.table th { font-size: var(--text-sm); color: var(--color-muted); font-weight: 600; }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table caption { padding: var(--space-3); text-align: left; font-weight: 600; }
.table tbody th { color: var(--color-text); font-size: var(--text-md); }
/* Narrow screens: the table scrolls sideways inside its frame; the page itself never does. */
.table-wrap {
  /* position: the screen-reader labels inside buttons (.visually-hidden, position: absolute)
     stay inside this frame; without it they escape it and widen the whole page. */
  position: relative;
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.table-wrap .table th, .table-wrap .table td { white-space: nowrap; }
/* A long column heading ("Expected at check-out") may wrap, so the column is only as wide as
   its values and the table fits its frame at 1280 px. */
.table-wrap .table thead th { white-space: normal; vertical-align: bottom; }
.table-wrap:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.summary { color: var(--color-muted); margin: 0 0 var(--space-4); }
/* Slice 21c: a room type held beyond its rooms (Availability, the calendar's sentence). */
.summary--warn {
  padding: var(--space-2) var(--space-3);
  background: var(--color-warn-bg); color: var(--color-warn);
  border-radius: var(--radius-md); font-weight: 600;
}

/* A chip always carries its word; the colour and the icon only repeat it. */
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: 0 var(--space-2);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap;
  border-radius: 999px;
  background: var(--color-subtle); color: var(--color-text);
}
.chip__icon { width: 0.875rem; height: 0.875rem; flex: none; }
.chip--ok { background: var(--color-ok-bg); color: var(--color-ok); }
.chip--warn { background: var(--color-warn-bg); color: var(--color-warn); }
.chip--bad { background: var(--color-bad-bg); color: var(--color-bad); }
/* Reservation status: the class is the status value itself (templates/_status_chip.html). */
.chip--confirmed { background: var(--chip-confirmed-bg); color: var(--chip-confirmed-fg); }
.chip--checked_in { background: var(--chip-in-house-bg); color: var(--chip-in-house-fg); }
.chip--checked_out { background: var(--chip-checked-out-bg); color: var(--chip-checked-out-fg); }
.chip--held { background: var(--color-warn-bg); color: var(--color-warn); } /* Slice 25a */
/* Slice 45a: a group account, open (as a booking still to come) or settled (as one checked out). */
.chip--open { background: var(--chip-confirmed-bg); color: var(--chip-confirmed-fg); }
.chip--settled { background: var(--chip-checked-out-bg); color: var(--chip-checked-out-fg); }
.chip--cancelled, .chip--no_show {
  background: var(--chip-cancelled-bg); color: var(--chip-cancelled-fg);
}
/* Housekeeping state (templates/_housekeeping_chip.html). */
.chip--clean { background: var(--hk-clean-bg); color: var(--hk-clean-fg); }
.chip--dirty { background: var(--hk-dirty-bg); color: var(--hk-dirty-fg); }

/* Counts at the top of the front desk and the housekeeping board. */
.tiles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3);
  list-style: none; margin: 0 0 var(--space-5); padding: 0;
}
@media (min-width: 768px) {
  .tiles--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Slice LS: the Front desk's five; as many to a row as fit, never a squeezed fifth. */
  .tiles--five { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
}
.tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3); align-items: center;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.tile__icon {
  grid-row: span 2;
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-md);
  background: var(--color-subtle); color: var(--color-text);
}
.tile__icon--confirmed { background: var(--chip-confirmed-bg); color: var(--chip-confirmed-fg); }
.tile__icon--warn { background: var(--color-warn-bg); color: var(--color-warn); }
.tile__icon--in-house { background: var(--chip-in-house-bg); color: var(--chip-in-house-fg); }
.tile__count { font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile__label { font-size: var(--text-sm); color: var(--color-muted); }
.tile--dirty { background: var(--hk-dirty-bg); color: var(--hk-dirty-fg); border-color: transparent; }
.tile--clean { background: var(--hk-clean-bg); color: var(--hk-clean-fg); border-color: transparent; }
.tile--dirty .tile__icon, .tile--clean .tile__icon { background: transparent; color: inherit; }
.tile--dirty .tile__label, .tile--clean .tile__label { color: inherit; font-weight: 600; }

/* Form fields: our own markup and allauth's default elements (label + input inside <p>). */
label { display: block; font-weight: 600; margin-bottom: var(--space-1); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="search"], select, textarea {
  width: 100%; min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  font: inherit; color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
/* A field that cannot be changed looks it (e.g. Setup's currency once the property holds money). */
input:disabled, select:disabled, textarea:disabled {
  color: var(--color-muted); background: var(--color-subtle);
  border-color: var(--color-border); cursor: not-allowed;
}
::placeholder { color: var(--color-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); }
input[type="checkbox"] + label { display: inline; font-weight: 400; margin-left: var(--space-2); }
.errorlist { color: var(--color-bad); padding-left: var(--space-4); margin: 0 0 var(--space-2); }

.messages { list-style: none; padding: 0; margin: 0 0 var(--space-4); }
/* Slice 19: what a posting run could not post, or only reports (Setup → Posting). */
.run-notes { list-style: none; margin: 0; padding: 0; }
.deposits { margin: 0; padding-left: var(--space-5); } /* Slice 26b: a booking's deposits */
/* Slice F6: the VAT rate changes on Setup, each with its Remove button on the same line. */
.vat-changes, .closures { margin: var(--space-2) 0; padding-left: var(--space-5); }
.vat-changes li, .closures li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.inline-form { display: inline; margin: 0; }
.messages__item {
  padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2);
  border-radius: var(--radius-md); background: var(--color-subtle);
}
.messages__item--success { background: var(--color-ok-bg); color: var(--color-ok); }
.messages__item--warning { background: var(--color-warn-bg); color: var(--color-warn); }
.messages__item--error { background: var(--color-bad-bg); color: var(--color-bad); }

/* ---- Page layouts ---------------------------------------------------- */
/* A page title with its main action (e.g. "New guest") on the same line. */
.page-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.page-header h1, .page-header h2 { margin: 0; }
.page-header__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* "Upcoming | All" above a list: plain links, the current one marked. */
.view-switch { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); }
.view-switch [aria-current="page"] { font-weight: 600; text-decoration: none; color: var(--color-text); }

/* Two dates and a button on one line; stacked below 768 px. */
.date-search { margin-bottom: var(--space-4); }
.date-search__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.date-search__row .form__field { flex: 1 1 12rem; margin-bottom: 0; }
.date-search__row .date-search__submit { flex: 0 0 auto; }

.search { max-width: 32rem; margin-bottom: var(--space-4); }
.search__row { display: flex; gap: var(--space-2); }

/* One column of fields at every width; the card keeps lines readable on wide screens. */
.form { max-width: 40rem; }
.form__field { margin-bottom: var(--space-4); }
.form__required { font-weight: 400; color: var(--color-muted); }
.form__hint { margin: 0 0 var(--space-1); font-size: var(--text-sm); color: var(--color-muted); }
.form__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
textarea { min-height: 6rem; resize: vertical; }
[aria-invalid="true"] { border-color: var(--color-bad); }

.error-summary {
  margin-bottom: var(--space-5); padding: var(--space-3) var(--space-4);
  background: var(--color-bad-bg); color: var(--color-bad);
  border: 1px solid var(--color-bad); border-radius: var(--radius-md);
}
.error-summary h2 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.error-summary ul { margin: 0; padding-left: var(--space-5); }
.error-summary a { color: inherit; }

.pager { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }

/* Home (Slice 14): the dashboard. Cards of figures, a strip of seven nights, the months table.
   Tokens only; the words carry the meaning, the type size only makes a figure easy to find. */
.dash { margin-bottom: var(--space-5); }
.dash .page-header { margin-bottom: var(--space-3); }
.dash__lead { font-size: var(--text-lg); font-weight: 600; margin: 0 0 var(--space-3); }
.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--space-4); margin: 0;
}
.figure dt { font-size: var(--text-sm); color: var(--color-muted); }
.figure dd { margin: 0; }
.figure__value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.figure__note { display: block; font-size: var(--text-sm); color: var(--color-muted); }
/* Slice 22: a line under a table cell's text, e.g. the number of guests a price is for. */
.table__note { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
/* Slice 23: a grid of prices (a season's by day of the week) keeps each field wide enough for
   999999.99; the table scrolls sideways inside its .table-wrap on a narrow screen. */
.table--prices input { min-width: 7rem; }
.week {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: var(--space-2); list-style: none; margin: 0 0 var(--space-3); padding: 0;
}
.week__night {
  display: grid; gap: var(--space-1); padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-variant-numeric: tabular-nums;
}
.week__day { font-size: var(--text-sm); color: var(--color-muted); }
.week__held { font-weight: 700; }
.months__past th, .months__past td { color: var(--color-muted); }

/* Front desk: one section per kind of work; small forms for the buttons in a table row. */
.desk-section { margin-bottom: var(--space-5); }
.desk-section h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.row-actions form, .page-header__actions form { margin: 0; }
/* The front-desk table fits its frame at 1280 px (Slice 8): the "still checked in" note may
   wrap; dates, chips and buttons stay on one line. Below 768 px it scrolls in .table-wrap. */
.table-wrap .desk-table .desk-table__note { white-space: normal; display: inline-block; max-width: 16rem; }
.desk-table .chip { margin-left: var(--space-1); vertical-align: middle; }

/* Housekeeping board (Slice 8), phone first: one card per room, one column below 768 px, a
   grid of cards above. No table, so nothing scrolls sideways. A card is positioned so the
   screen-reader text in its button stays inside it (the Slice 7 lesson). */
.hk-board {
  display: grid; grid-template-columns: 1fr; gap: var(--space-3);
  list-style: none; margin: 0; padding: 0;
}
@media (min-width: 768px) {
  .hk-board { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
}
.hk-room {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); min-width: 0;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.hk-room--dirty { border-left: 6px solid var(--color-accent); }
.hk-room__title { font-size: var(--text-lg); margin: 0; }
.hk-room__type { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.hk-room__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.hk-room__occupancy { font-weight: 600; }
.hk-room__facts {
  display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-3);
  margin: 0; font-size: var(--text-sm);
}
.hk-room__facts dt { color: var(--color-muted); }
.hk-room__facts dd { margin: 0; overflow-wrap: anywhere; }
.hk-room form { margin: auto 0 0; }
.hk-room__button { width: 100%; min-height: 2.75rem; }
/* The one large button a housekeeper presses most: sage, like a clean room. */
.hk-room--dirty .hk-room__button {
  min-height: 3.25rem; background: var(--stay-in-house); color: var(--stay-text);
}

/* Planning calendar (Slice 6): rooms × 14 nights. Fixed column widths, so a one-night stay
   and a free night are the same width; the room column stays visible while the table scrolls
   sideways inside .table-wrap. A stay is a bar that fills its cell (the cell's colspan gives
   its length); its status is a word and an icon as well as a colour. */
.cal-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--space-3); margin-bottom: var(--space-4);
}
.cal-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.cal-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: var(--space-2) var(--space-4);
  font-weight: 600; text-decoration: none; color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
.cal-jump { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.cal-jump label { margin: 0; align-self: center; }
.cal-jump input[type="date"] { width: auto; }

.calendar { table-layout: fixed; width: 78rem; }
.calendar__room-col { width: 8rem; }
.calendar__night-col { width: 5rem; }
.table-wrap .calendar th, .table-wrap .calendar td {
  padding: var(--space-1); border-left: 1px solid var(--color-border); vertical-align: middle;
}
.table-wrap .calendar thead th {
  font-size: var(--text-sm); text-transform: none; letter-spacing: 0;
  white-space: nowrap; vertical-align: middle;
}
.calendar .calendar__room {
  position: sticky; left: 0; z-index: 1;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface); border-left: 0; border-right: 1px solid var(--color-border);
  white-space: normal;
}
.calendar__room-name { display: block; font-weight: 600; color: var(--color-text); }
.calendar__note { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.calendar__note--warn { color: var(--color-warn); font-weight: 600; }
/* Cells in a framed table do not wrap (.table-wrap .table th), and that rule outranks
   .calendar .calendar__room. A note such as "Overdue: Nováková" is wider than the room column,
   so the note itself wraps; a very long name may break inside the word. */
.table-wrap .calendar .calendar__note { white-space: normal; overflow-wrap: anywhere; }
.calendar__night { text-align: center; font-weight: 600; border-top: 3px solid transparent; }
.calendar__month { display: block; color: var(--color-text); }
.calendar__day { display: block; }
.calendar__today {
  display: block;
  color: var(--color-accent-text); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.calendar__night--weekend, .calendar__free--weekend { background: var(--color-weekend); }
.calendar .calendar__night--today {
  background: var(--color-today); color: var(--color-text);
  border-top-color: var(--color-accent);
}
.calendar__free--today { background: var(--color-today); }
/* Slice 21b: a free night that offers no Book link although it is in use and not past (its
   room type is fully promised, or an overdue guest is still in the room); the reason is in the
   cell for a screen reader. */
.calendar .calendar__free--full { background: var(--color-subtle); }
/* Slice 29: a room closed for some nights: the word "Closed" says it, the colour only helps. */
.calendar .calendar__closed {
  padding: var(--space-1) var(--space-2);
  background: var(--color-subtle); color: var(--color-muted);
  border-left: 2px solid var(--color-field-border);
  font-size: 0.75rem; line-height: 1.25; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.calendar__closed-word { font-weight: 600; color: var(--color-text); }
/* Slice 21b: the "No room yet" block under the rooms. */
.calendar__lane-head th {
  padding: var(--space-2) var(--space-3);
  background: var(--color-subtle); color: var(--color-text);
  border-top: 2px solid var(--color-field-border);
  font-size: var(--text-sm); font-weight: 600; text-align: left;
}
.calendar__book {
  display: block; padding: var(--space-2) 0;
  text-align: center; font-size: var(--text-sm); color: var(--color-muted); text-decoration: none;
}
.calendar__book:hover { color: var(--color-text); text-decoration: underline; }

.calendar__stay-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-2);
  align-content: center; min-height: 2.75rem;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md); text-decoration: none; color: var(--stay-text);
}
.calendar__icon { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 1rem; height: 1rem; }
.calendar__name, .calendar__status, .calendar__clip {
  grid-column: 2;
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.calendar__name { font-weight: 600; line-height: 1.25; }
.calendar__status, .calendar__clip { font-size: 0.75rem; line-height: 1.25; }
.calendar__stay--confirmed .calendar__stay-link { background: var(--stay-confirmed); }
.calendar__stay--in-house .calendar__stay-link { background: var(--stay-in-house); }
.calendar__stay--checked-out .calendar__stay-link { background: var(--stay-checked-out); }
.calendar__stay--held .calendar__stay-link { background: var(--stay-checked-out); } /* Slice 25a: the word "Held" says it */
/* A one-night stay (colspan 1) is 5rem wide: no icon column, a smaller name so that it can be
   read in full, and the "from ..." / "until ..." line hidden from sight only. It stays in the
   link's text for screen readers. */
.calendar__stay[colspan="1"] .calendar__stay-link { display: block; padding: var(--space-1); }
.calendar__stay[colspan="1"] .calendar__name { font-size: 0.8125rem; }
.calendar__stay[colspan="1"] .calendar__clip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Slice 15: dragging a bar. calendar.js adds and removes these classes and, while a bar is
   held, moves its link with a transform set at run time (never a style attribute in the
   markup). The edges of a bar that can be resized are 0.625rem strips with their own cursor.
   Where the bar would land is outlined: a solid line for a drop that will be proposed, a
   dashed line and a "not allowed" cursor for one the calendar refuses, so never colour alone.
   A touch drag starts after a long press, so the browser's own long-press menu and text
   selection are switched off on the bars. */
.calendar__stay[data-drag] .calendar__stay-link {
  position: relative;
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.calendar__stay[data-drag~="start"] .calendar__stay-link::before,
.calendar__stay[data-drag~="end"] .calendar__stay-link::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 0.625rem; cursor: ew-resize;
}
.calendar__stay[data-drag~="start"] .calendar__stay-link::before { left: 0; }
.calendar__stay[data-drag~="end"] .calendar__stay-link::after { right: 0; }
.calendar__stay.is-dragging .calendar__stay-link { z-index: 2; }
.calendar__stay.is-dragging .calendar__stay-link {
  cursor: grabbing; opacity: 0.85; outline: 2px solid var(--color-focus); outline-offset: 1px;
}
.calendar.is-dragging { cursor: grabbing; }
.calendar.is-dragging .calendar__book { visibility: hidden; }
.calendar__stay.is-refused .calendar__stay-link { cursor: not-allowed; }
.calendar td.is-drop-target { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.calendar td.is-drop-refused { outline: 2px dashed var(--color-bad); outline-offset: -2px; }
.cal-drag-status { min-height: 1.5rem; margin: var(--space-2) 0 0; color: var(--color-bad); font-weight: 600; }
/* The sentence above the Edit or the Move room form when a drag opened the page. */
.drag-summary {
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4);
  background: var(--color-subtle); color: var(--color-text);
  border-radius: var(--radius-md); font-weight: 600;
}
.drag-summary__note { display: block; font-weight: 400; color: var(--color-muted); }
.drag-summary--problem { background: var(--color-bad-bg); color: var(--color-bad); }

.calendar tfoot th, .calendar tfoot td {
  border-top: 2px solid var(--color-field-border); border-bottom: 0;
  background: var(--color-subtle); color: var(--color-text);
}
.calendar tfoot .calendar__room { background: var(--color-subtle); }
.calendar__total { text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Slice 21c: "1 over" under a night's count, in words, on the warning pair of tokens. */
.calendar__over {
  display: block; margin-top: var(--space-1); padding: 0 var(--space-1);
  background: var(--color-warn-bg); color: var(--color-warn);
  border-radius: var(--radius-md); font-size: 0.75rem; white-space: nowrap;
}

/* What the three bar colours mean, in words, under the calendar. */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  list-style: none; margin: var(--space-4) 0; padding: 0;
  font-size: var(--text-sm); color: var(--color-muted);
}
.cal-legend li { display: flex; align-items: center; gap: var(--space-2); }
.cal-legend__swatch {
  display: grid; place-items: center; width: 2rem; height: 1.25rem;
  border-radius: var(--radius-sm); color: var(--stay-text);
}
.cal-legend__swatch .icon { width: 0.875rem; height: 0.875rem; }
.cal-legend__swatch--confirmed { background: var(--stay-confirmed); }
.cal-legend__swatch--in-house { background: var(--stay-in-house); }
.cal-legend__swatch--held { background: var(--stay-checked-out); }
.cal-legend__swatch--checked-out { background: var(--stay-checked-out); }

/* Label/value pairs; one column below 768 px. */
.details {
  display: grid; grid-template-columns: max-content 1fr;
  gap: var(--space-2) var(--space-5); margin: 0;
}
.details dt { font-weight: 600; color: var(--color-muted); }
.details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) {
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: var(--space-3); }
}

/* Slice F26 (the rehearsal of 2 Nov 2026): a document's tables (tax document, guest bill,
   correction, advance document; on the page and in print) fit the page at desktop width: the
   item, the headings and a note wrap; figures and dates never break. A narrower screen still
   scrolls a table inside its frame. */
.bill .table-wrap .table th, .bill .table-wrap .table td { padding: var(--space-2); }
.bill .table-wrap .table tbody th, .bill .table-wrap .table .table__note {
  white-space: normal; overflow-wrap: break-word;
}
/* Slice F28 (the documents in Chromium at 1280 and 1600 px and on A4): Chromium lets a cell
   with break-word shrink below its longest word, so "Accommodation," broke before its comma;
   the item column keeps a minimum instead. A document's figures are a step smaller than the
   page's text, so a nine-column table (a correction, a full tax document) fits 1280 px. */
.bill .table-wrap .table tbody th { min-width: var(--doc-item-min); }
.bill .table, .bill .table tbody th { font-size: var(--text-sm); }
/* A label/value list in a document: the label column takes at most 40 % and wraps, so a
   number or an address beside a long label ("Payment received on (DUZP)") is not broken. Its
   rows keep their own height beside a taller list (they were spread over the pair's height). */
.bill .details { align-content: start; }
/* A document's number ("2026-U-0002") is never broken at its hyphens. */
.doc-number { white-space: nowrap; }
@media (min-width: 768px) {
  .bill .details { grid-template-columns: fit-content(40%) minmax(0, 1fr); }
}

/* Slice 32b: the guest bill: the supplier and the stay side by side on a wide screen. */
.bill-parties { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
@media (min-width: 768px) {
  .bill-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Demo folio (Slice 7). The banner is plain text in a bordered box: it must be read, not
   decorated. Money columns use tabular figures (.num) so the decimals line up. */
.demo-banner {
  padding: var(--space-2) var(--space-3); margin-bottom: var(--space-4);
  background: var(--color-warn-bg); color: var(--color-warn);
  border: 1px solid var(--color-warn); border-radius: var(--radius-md); font-weight: 600;
}
/* The folio fits the page at desktop width: text columns may wrap; dates and amounts
   (.folio__keep, .num) never break. Below 768 px the table scrolls inside .table-wrap. */
.table-wrap .folio th, .table-wrap .folio td { white-space: normal; }
.table-wrap .folio .num, .table-wrap .folio .folio__keep { white-space: nowrap; }
.folio .btn { white-space: nowrap; }
.folio__expected td, .folio__expected th { font-style: italic; color: var(--color-muted); }
/* Setup → History (Slice 18 close-out): the Change column wraps, so a long "Prices" row is read
   in full at desktop width; When, Who and Kind stay on one line. Below 768 px the table still
   scrolls inside .table-wrap, the Change column no narrower than --cell-wrap-min. */
.table-wrap .history-table tbody th {
  white-space: normal; overflow-wrap: break-word; min-width: var(--cell-wrap-min);
}
.folio__totals { margin: var(--space-4) 0 var(--space-5); }
.folio__totals .num { font-variant-numeric: tabular-nums; }
.quick-picks { margin-bottom: var(--space-4); }
.quick-picks h2 { font-size: var(--text-md); margin-bottom: var(--space-2); }
.quick-picks__list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-2); padding: 0; }
.form__fieldset { border: 0; margin: 0 0 var(--space-4); padding: 0; }
.form__fieldset legend { font-weight: 600; margin-bottom: var(--space-1); padding: 0; }
.form__radio { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.form__radio label { display: inline; font-weight: 400; margin: 0; }

/* ---- Public home page (Slice 11) ------------------------------------- */
/* Not the application shell: one column, no sidebar, no script. Literata for its headings.
   The reference is docs/design/look-2026-09-30/mockup/Home-*.html, translated into classes. */
.site h1, .site h2 { font-family: var(--font-display); font-weight: 600; }
.site h3 { font-size: 1.125rem; font-weight: 700; margin: 0 0 var(--space-2); }
.site__inner {
  max-width: var(--site-max); margin: 0 auto;
  padding-left: var(--space-5); padding-right: var(--space-5);
}

/* Slice LS: the bar stays at the top of the window while the page scrolls. The header is a
   direct child of body, so it sticks to the end of the page; its background is full width, its
   column is .site-header__inner. In-page links land below it (scroll-padding on the root, so
   Skip to content and a login field that takes focus on a phone do too). No script. */
html:has(> body.site) { scroll-padding-top: var(--site-bar-offset); }
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-3); padding-bottom: var(--space-3);
}
.site-header__brand { color: var(--color-text); flex: none; }
.site-header__brand .brand__name { font-size: var(--text-xl); }
/* One line; on a narrow screen it scrolls sideways inside itself, never the page. */
.site-nav {
  display: flex; gap: var(--space-5); min-width: 0;
  overflow-x: auto; white-space: nowrap;
}
.site-nav a {
  padding: var(--space-2) var(--space-1);
  color: var(--color-muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.site-nav a:hover { color: var(--color-text); text-decoration: underline; }
.site-nav a:focus-visible { outline-offset: -3px; } /* inside the nav, which clips what overflows */
.site-header__actions { display: flex; align-items: center; gap: var(--space-3); flex: none; }
/* Below 1024 px two rows: the mark with CS/EN and Log in, then the nav. */
@media (max-width: 1023px) {
  html:has(> body.site) { scroll-padding-top: var(--site-bar-offset-narrow); }
  .site-header__inner {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "nav nav";
    gap: 0 var(--space-3); padding-top: var(--space-2); padding-bottom: 0;
  }
  .site-header__brand { grid-area: brand; }
  .site-header__actions { grid-area: actions; }
  .site-nav { grid-area: nav; }
}
/* CS | EN: two plain links; the current language is a marked span. */
.lang-switch {
  display: flex; list-style: none; margin: 0; padding: 0; overflow: hidden;
  border: 1px solid var(--color-field-border); border-radius: var(--radius-md);
}
.lang-switch__item {
  display: block; padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  color: var(--color-text); background: var(--color-surface);
}
.lang-switch__item[aria-current] {
  font-weight: 700; background: var(--color-primary); color: var(--color-primary-text);
}
.lang-switch__item:focus-visible { outline-offset: -3px; }

.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) 4rem;
  padding-top: 3rem; padding-bottom: 4.5rem;
}
.hero__text { flex: 1 1 30rem; min-width: 0; }
.hero__tagline {
  margin: 0; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--color-accent-text);
}
.hero__headline {
  font-size: clamp(2.125rem, 5.2vw, 3.875rem); line-height: 1.08; letter-spacing: -0.015em;
  margin: var(--space-3) 0 0;
}
.hero__headline::after {
  content: ""; display: block; width: 4.5rem; height: 3px; margin: 1.75rem 0;
  background: var(--color-accent);
}
.hero__lead { max-width: 36rem; margin: 0; font-size: 1.1875rem; line-height: 1.55; color: var(--color-muted); }
.hero__points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: var(--space-2); }
.hero__points li { display: flex; align-items: center; gap: var(--space-2); }
.hero__points .icon { color: var(--color-ok); }
.hero__note {
  display: inline-flex; align-items: center; gap: var(--space-2);
  margin: 1.75rem 0 0; padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill); background: var(--color-subtle);
  color: var(--color-muted); font-size: 0.8125rem; font-weight: 600;
}
.hero__note .icon { width: 1rem; height: 1rem; color: var(--color-accent-text); }

/* The login card: the fields of the allauth login form, posted to the allauth login view. */
.login-card {
  flex: 0 1 26rem; min-width: 0;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.login-card__heading {
  display: flex; align-items: center; gap: var(--space-2);
  margin: 0; font-size: var(--text-xl);
}
.login-card__heading .icon { color: var(--color-accent-text); }
.login-card__intro { margin: var(--space-2) 0 var(--space-5); font-size: 0.9375rem; color: var(--color-muted); }
.login-card__submit { width: 100%; }
.login-card__help {
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-sm); color: var(--color-muted);
}
.login-card__help p { margin: 0 0 var(--space-1); }
.login-card__help strong { color: var(--color-text); }
.login-card__help a { font-weight: 600; }

.site-section { padding-top: var(--space-5); padding-bottom: 4.5rem; }
.site-section h2, .contact-band h2 { font-size: var(--text-2xl); line-height: 1.2; margin: 0; }
.site-section__lead {
  max-width: 44rem; margin: var(--space-3) 0 0;
  font-size: 1.0625rem; line-height: 1.55; color: var(--color-muted);
}

/* The planner drawing: a grid of 1 room column and 7 nights; stays lie over the night cells.
   On a narrow screen it scrolls inside its own frame, never the page. */
.planner {
  margin-top: 1.75rem; overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.planner__grid { min-width: 47.5rem; }
.planner__row {
  display: grid; grid-template-columns: 9.375rem repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--color-border);
}
.planner__row--head { border-top: 0; }
.planner__room { grid-column: 1; grid-row: 1; padding: var(--space-2) var(--space-3); }
.planner__number { display: block; font-weight: 700; font-size: 0.9375rem; }
.planner__type { display: block; font-size: 0.8125rem; color: var(--color-muted); }
.planner__night {
  padding: var(--space-2) var(--space-1); text-align: center;
  font-size: 0.8125rem; font-weight: 600; color: var(--color-muted);
  border-top: 3px solid transparent;
}
.planner__night--weekend, .planner__cell--weekend { background: var(--color-weekend); }
.planner__night--today {
  background: var(--color-today); color: var(--color-text);
  border-top-color: var(--color-accent);
}
.planner__today { display: block; font-size: 0.6875rem; color: var(--color-accent-text); }
.planner__cell { grid-row: 1; min-height: 3.625rem; border-left: 1px solid var(--color-border); }
.planner__cell--today { background: var(--color-today); }
/* Each night cell names its column, so a stay lying over it does not push it aside. */
.planner__cell:nth-child(2) { grid-column: 2; }
.planner__cell:nth-child(3) { grid-column: 3; }
.planner__cell:nth-child(4) { grid-column: 4; }
.planner__cell:nth-child(5) { grid-column: 5; }
.planner__cell:nth-child(6) { grid-column: 6; }
.planner__cell:nth-child(7) { grid-column: 7; }
.planner__cell:nth-child(8) { grid-column: 8; }
.planner__stay {
  grid-row: 1; z-index: 1; align-self: center;
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 2.5rem; margin: 0 3px; padding: 0 var(--space-2);
  border-radius: var(--radius-md); color: var(--stay-text);
  overflow: hidden; white-space: nowrap;
}
.planner__stay .icon { width: 1rem; height: 1rem; }
.planner__name { font-weight: 600; font-size: var(--text-sm); }
.planner__status { font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; }
.planner__stay--confirmed { background: var(--stay-confirmed); }
.planner__stay--in-house { background: var(--stay-in-house); }
.planner__stay--c2 { grid-column-start: 2; }
.planner__stay--c3 { grid-column-start: 3; }
.planner__stay--c4 { grid-column-start: 4; }
.planner__stay--c7 { grid-column-start: 7; }
.planner__stay--s1 { grid-column-end: span 1; }
.planner__stay--s2 { grid-column-end: span 2; }
.planner__stay--s3 { grid-column-end: span 3; }
.planner__stay--s4 { grid-column-end: span 4; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: var(--space-5); margin-top: 1.75rem;
}
.feature-grid--wide { grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr)); }
.feature {
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.feature__icon {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md); background: var(--color-subtle);
}
.feature p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--color-muted); }
/* What the demo does not do yet. */
.not-yet {
  display: flex; align-items: flex-start; gap: var(--space-3);
  margin-top: var(--space-5); padding: var(--space-5);
  border-radius: var(--radius-lg); background: var(--color-subtle);
}
.not-yet .icon { margin-top: 2px; color: var(--color-warn); }
.not-yet p { margin: 0; font-size: 0.9375rem; line-height: 1.55; }

.steps {
  list-style: none; padding: 0; margin: 1.75rem 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); gap: 1.75rem;
}
.steps__item { display: flex; align-items: flex-start; gap: var(--space-4); }
.steps__number {
  flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  border: 2px solid var(--color-accent); border-radius: var(--radius-pill);
  color: var(--color-accent-text);
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg);
}
.steps__item h3 { margin-top: var(--space-2); }
.steps__item p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--color-muted); }

/* The contact band takes the ink colours of the sidebar, in light and in dark. */
.contact-band { background: var(--color-sidebar-bg); color: var(--color-sidebar-text); }
.contact-band__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.75rem; padding-top: 4rem; padding-bottom: 4rem;
}
.contact-band__text { flex: 1 1 26rem; min-width: 0; }
.contact-band h2 { color: var(--color-sidebar-active-text); }
.contact-band p { max-width: 36rem; margin: var(--space-3) 0 0; font-size: 1.0625rem; line-height: 1.55; }
.contact-band__mail {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: 3.5rem; padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-sidebar-active-text); color: var(--color-sidebar-bg);
  font-weight: 700; font-size: 1.125rem; text-decoration: none;
}

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5);
  padding-top: 1.75rem; padding-bottom: 2.5rem;
  font-size: var(--text-sm); color: var(--color-muted);
}
.site-footer p { margin: 0; }
.site-footer__operator { flex-basis: 100%; }

/* Print folio: only the page content, in black on white; links print as plain text. */
/* Slice 33: the public booking page, using the same ink and linen tokens. */
.booking { min-height: 100vh; }
.booking__header, .booking__main, .booking__footer {
  width: min(100%, 64rem);
  margin-inline: auto;
  padding: var(--space-5);
}
.booking__header { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); }
.booking__name { font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); text-decoration: none; }
.booking__header nav { display: flex; gap: var(--space-4); }
.booking__header [aria-current] { font-weight: 600; text-decoration-thickness: 2px; }
.booking__main { display: grid; gap: var(--space-5); }
.booking__main h1, .booking__offer h2 { font-family: var(--font-display); font-weight: 600; }
.booking__notice { padding: var(--space-4); border-left: 3px solid var(--color-accent); background: var(--color-subtle); }
.booking__offers { display: grid; gap: var(--space-5); }
.booking__plan { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; align-items: center; padding-block: var(--space-4); border-top: 1px solid var(--color-border); }
.booking__plan p { margin-block: var(--space-2); }
.booking__price { font-weight: 600; font-size: var(--text-lg); }
.booking__footer { border-top: 1px solid var(--color-border); color: var(--color-muted); }

/* Invoice stationery: compact A4 hierarchy, inspired by the owner's Previo sample. */
.document-logo { display: block; max-width: 45mm; max-height: 18mm; width: auto; height: auto; object-fit: contain; }
.document-brand { min-width: 0; margin-bottom: var(--space-3); }
.document-brand p { margin: var(--space-1) 0 0; font-weight: 600; font-size: var(--text-sm); }
.document-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.document-heading h1 { margin: 0; text-align: right; font-size: var(--text-lg); line-height: 1.3; max-width: 62%; }
.invoice-document { max-width: 210mm; margin-inline: auto; padding: var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); }
.invoice-document .demo-banner { font-size: var(--text-xs); padding: var(--space-1) var(--space-2); margin-bottom: var(--space-3); border-radius: 0; font-weight: 400; }
.invoice-document .bill-parties { gap: 0; border: 1px solid var(--color-border); }
.invoice-document .bill-parties > .details { padding: var(--space-3); margin: 0; gap: var(--space-1) var(--space-3); }
.invoice-document .bill-parties > .details + .details { border-top: 1px solid var(--color-border); }
.invoice-document .details dt { font-weight: 400; }
.invoice-document .bill-parties > .details > dd:first-of-type { font-weight: 600; }
.invoice-document .table-wrap { margin-block: var(--space-3); border: 0; border-radius: 0; }
.invoice-document .table caption { text-align: left; font-size: var(--text-sm); margin-bottom: var(--space-1); }
.invoice-document .table thead th { background: var(--color-subtle); letter-spacing: 0; text-transform: none; font-weight: 600; }
.invoice-document .table tbody th { font-weight: 400; }
.invoice-document .summary { margin-block: var(--space-2); }
.invoice-document .settlement { border-top: 1px solid var(--color-border); margin-top: var(--space-4); padding-top: var(--space-2); grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); }
.invoice-document .settlement dd { text-align: right; }
.invoice-document .document-payable { border-top: 2px solid var(--color-text); padding-top: var(--space-2); margin-top: var(--space-2); font-size: var(--text-lg); color: var(--color-text); font-weight: 700; }
@media (min-width: 768px) {
  .invoice-document .bill-parties > .details + .details { border-top: 0; border-left: 1px solid var(--color-border); }
  .invoice-document .bill-parties--invoice > .details:first-child { grid-row: 1 / 3; }
  .invoice-document .bill-parties--invoice > .details:nth-child(3) { grid-column: 2; border-top: 1px solid var(--color-border); }
}
@media (max-width: 767px) {
  .invoice-document { padding: var(--space-3); }
  .document-heading { flex-wrap: wrap; }
  .document-heading h1 { text-align: left; max-width: 100%; }
}

@media print {
  /* Slice F28: paper is white and ink black also when the screen is in dark mode (the dark
     block's text tokens were near-white on white). Every colour token is re-pointed (held by
     tests/test_document_print.py): text, status and chip colours print as ink, their
     backgrounds as paper, so a status box ("it no longer stands") is black on white too. */
  :root {
    --color-bg: var(--print-paper);
    --color-surface: var(--print-paper);
    --color-subtle: var(--print-paper);
    --color-text: var(--print-ink);
    --color-muted: var(--print-muted);
    --color-border: var(--print-rule);
    --color-field-border: var(--print-rule);
    --color-primary: var(--print-ink);
    --color-primary-text: var(--print-paper);
    --color-focus: var(--print-ink);
    --color-accent: var(--print-ink);
    --color-accent-text: var(--print-ink);
    --color-ok: var(--print-ink);
    --color-ok-bg: var(--print-paper);
    --color-warn: var(--print-ink);
    --color-warn-bg: var(--print-paper);
    --color-bad: var(--print-ink);
    --color-bad-bg: var(--print-paper);
    --color-bad-text: var(--print-paper);
    --color-sidebar-bg: var(--print-paper);
    --color-sidebar-text: var(--print-ink);
    --color-sidebar-active: var(--print-paper);
    --color-sidebar-active-text: var(--print-ink);
    --color-today: var(--print-paper);
    --color-weekend: var(--print-paper);
    --stay-confirmed: var(--print-ink);
    --stay-in-house: var(--print-ink);
    --stay-checked-out: var(--print-ink);
    --stay-text: var(--print-paper);
    --chip-confirmed-fg: var(--print-ink);
    --chip-confirmed-bg: var(--print-paper);
    --chip-in-house-fg: var(--print-ink);
    --chip-in-house-bg: var(--print-paper);
    --chip-checked-out-fg: var(--print-ink);
    --chip-checked-out-bg: var(--print-paper);
    --chip-cancelled-fg: var(--print-ink);
    --chip-cancelled-bg: var(--print-paper);
    --hk-clean-fg: var(--print-ink);
    --hk-clean-bg: var(--print-paper);
    --hk-dirty-fg: var(--print-ink);
    --hk-dirty-bg: var(--print-paper);
  }
  .topbar, .sidebar, .shell > .brand, .skip-link, .messages, .no-print { display: none; }
  /* Slice F28: a page printed with the browser's Print prints the document only: no buttons,
     and not "The document and the folio now" (Slice 48: never on the print). */
  .btn, .page-header__actions, .after-issue { display: none; }
  .shell { display: block; min-height: 0; }
  body { background: var(--print-paper); color: var(--print-ink); }
  .content { padding: 0; max-width: none; }
  .card { background: var(--print-paper); border: 0; padding: 0; }
  .table-wrap { overflow: visible; border: 0; }
  .table, .table th, .table td { color: var(--print-ink); background: var(--print-paper); }
  .chip { background: var(--print-paper); color: var(--print-ink); padding: 0; }
  .demo-banner { background: var(--print-paper); color: var(--print-ink); border-color: var(--print-ink); }
  a { color: inherit; text-decoration: none; }
  /* Slice F26: a document prints whole on A4: every column on the page, in a smaller size.
     Slice F28: 9 pt (--text-xs) for its tables, so the widest (nine columns) fits 186 mm
     without the browser shrinking the whole page. */
  @page { size: A4; margin: 12mm; }
  .bill .table, .bill .table tbody th, .bill .table thead th { font-size: var(--text-xs); }
  .bill .table thead th { letter-spacing: 0; text-transform: none; }
  .bill .table-wrap .table th, .bill .table-wrap .table td { padding: var(--space-1); }
  /* Words in a figure column ("outside VAT") may wrap between the words on paper. */
  .bill .table-wrap .table .table__words { white-space: normal; }
  .bill .details, .bill .summary { font-size: var(--text-sm); }
  /* Slice F28: no page break inside a row, a short table or a label/value block, and none
     between a table's caption or a heading and what follows. */
  .bill .table-wrap, .bill-parties, .table tr, .details { break-inside: avoid; }
  .table caption, .bill h2, .bill h3 { break-after: avoid; }
  .invoice-document { max-width: none; margin: 0; padding: 0; border: 0; font-size: 9pt; line-height: 1.3; }
  .invoice-document .bill-parties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-document .bill-parties > .details { grid-template-columns: fit-content(36%) minmax(0, 1fr); font-size: 9pt; padding: 3mm; gap: 1mm 2mm; }
  .invoice-document .bill-parties > .details + .details { border-top: 0; border-left: 1px solid var(--print-rule); }
  .invoice-document .bill-parties--invoice > .details:first-child { grid-row: 1 / 3; }
  .invoice-document .bill-parties--invoice > .details:nth-child(3) { grid-column: 2; border-top: 1px solid var(--print-rule); }
  .invoice-document .details dd { margin-bottom: 0; }
  .invoice-document .details, .invoice-document .summary { font-size: 9pt; }
  .invoice-document .document-heading { flex-wrap: nowrap; }
  .invoice-document .document-heading h1 { max-width: 62%; text-align: right; font-size: 14pt; }
  .invoice-document .table thead th { background: var(--color-subtle); }
  /* Long item lists may cross pages; repeat the headings and keep each item together. */
  .invoice-document .table-wrap { break-inside: auto; }
  .invoice-document .table thead { display: table-header-group; }
  .invoice-document .table tfoot { display: table-row-group; }
  .invoice-document .document-heading, .invoice-document .settlement { break-inside: avoid; }
  .invoice-document .document-payable { font-size: 12pt; }

}

/* Slice 48: an issued bill's or last document's page: what it stated beside the folio now. */
.after-issue { margin-bottom: var(--space-5); }
.after-issue h2 { margin-top: 0; }
.after-issue .details { margin-bottom: var(--space-4); }

.register-signature {
  border-top: 1px solid var(--color-text);
  max-width: 20rem;
  padding-top: var(--space-1);
  margin-top: 3rem;
}
.register-inspection-entry { break-inside: avoid; }
