/* Owner app stylesheet (spec §8.4). muse-v1 tokens, as in public/lead/index.html, plus --white and the two
   font stacks used here: Neue Kabel 700 for headings/buttons/eyebrows, Atkinson Hyperlegible for everything
   else (self-hosted under /o/brand/fonts/, OFL licence alongside). Classes below are the contract for the
   later tasks that fill /o with actual content — this task only ships the shell. */
@font-face{font-family:"Neue Kabel";font-style:normal;font-weight:700;font-display:swap;src:url(/o/brand/fonts/NeueKabel-Bold.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(/o/brand/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(/o/brand/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2")}
:root{
  --orange:#E8491F;--orange-600:#C93C16;--orange-700:#A2300F;--orange-50:#FEF4F0;--orange-100:#FBE0D5;
  --navy:#033A53;--navy-600:#022D41;--navy-50:#E7EEF2;--navy-100:#C3D4DD;
  --sand-50:#FBF8F4;--sand-100:#F4EFE8;--white:#FFFFFF;
  --ink:#033A53;--ink-muted:#4A6473;--ink-subtle:#5C7380;
  --border:#EAE3D8;--border-strong:#D8CCBC;
  --danger:#B42A17;--danger-tint:#FBE3DD;--ok:#1F6B45;--ok-tint:#E2F2E9;
  /* I6 fix: the old translucent ring (rgba(232,73,31,.8)) blended to 2.72-3.05:1 depending on the ground it was
     drawn on - below the spec's 3:1. An opaque orange ring plus a 2px inner white ring keeps it visible against
     white AND separates it from an orange/selected tile's own border (spec §8.4: visible focus ring). */
  --focus-ring:0 0 0 2px var(--white),0 0 0 5px var(--orange);
  --shadow-sm:0 2px 8px rgba(3,58,83,.08);--shadow-md:0 8px 24px rgba(3,58,83,.10);
  --r-card:20px;--r-md:12px;--r-tile:14px;--r-pill:999px;
  --font-head:"Neue Kabel",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --font-body:"Atkinson Hyperlegible",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:72px}
/* M6 fix: the fixed status pill (bottom:16px, ~40px tall) sat on top of whatever the page's last row was - a
   submit button or the back/next links could be covered instead of tapped. This leaves room to scroll clear. */
body{margin:0;background:var(--sand-50);color:var(--ink);font:400 16px/1.55 var(--font-body);-webkit-font-smoothing:antialiased;overflow-wrap:anywhere;padding-bottom:72px}
h1,h2,h3,.btn,.eyebrow{font-family:var(--font-head);font-weight:700}
h1{font-size:28px;line-height:1.2;margin:0 0 8px}h2{font-size:22px;line-height:1.25;margin:32px 0 12px}h3{font-size:18px;margin:24px 0 8px}
.eyebrow{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--orange-700);margin:0 0 4px}
p{margin:0 0 12px}.muted{color:var(--ink-muted)}.sprite{position:absolute;width:0;height:0;overflow:hidden}
.ico{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
a{color:var(--navy);text-underline-offset:2px}
:focus-visible{outline:none;box-shadow:var(--focus-ring);border-radius:6px}
.boot{padding:48px 16px;text-align:center;color:var(--ink-muted)}

/* Header: logo, property name, language switch. Sticky so it stays reachable while a section scrolls. */
.top{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:12px;background:var(--white);border-bottom:1px solid var(--border);padding:8px 16px}
.top img{height:28px;width:auto;flex:none}
.top .name{flex:1;min-width:0;font-family:var(--font-head);font-weight:700;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top .lang{display:flex;gap:2px;padding:3px;border-radius:var(--r-pill);background:var(--sand-100);flex:none}
.top .lang button{min-width:44px;min-height:44px;padding:0 8px;border:0;border-radius:var(--r-pill);background:transparent;color:var(--ink-muted);font:700 13px/1 var(--font-head);cursor:pointer}
.top .lang button[aria-pressed="true"]{background:var(--white);color:var(--navy);box-shadow:var(--shadow-sm)}

/* Sidebar + content: one column on phones, two from 900px. A grid track's own content otherwise sets its
   minimum width (the section strip, an unbroken URL, ...), which is how a narrow phone ended up scrolling the
   whole document sideways (V1 fix) - min-width:0 lets every direct child shrink to the column instead. */
.shell{max-width:1080px;margin:0 auto;padding:16px;display:grid;gap:24px}
.shell > *{min-width:0}
@media(min-width:900px){.shell{grid-template-columns:260px 1fr}}
/* The countersign notice sits above the shell (same width and gutter); the on-hold screen is one narrow column. */
.shell-notice{max-width:1080px;margin:16px auto 0;padding:0 16px}
.hold{max-width:640px;margin:0 auto;padding:16px;display:grid;gap:16px}
.hold .card > :first-child{margin-top:0}

/* Section navigation. overflow-x:auto lives on the base rule (not only the phone media query, V1 fix) so the
   strip always scrolls inside itself rather than the page, however it is laid out. */
.nav{display:flex;flex-direction:column;gap:4px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.nav-item{min-height:48px;display:flex;flex-wrap:wrap;align-items:center;gap:2px 10px;overflow-wrap:normal;padding:8px 12px;border-radius:var(--r-md);color:var(--ink);text-decoration:none;background:transparent;border:0;font:inherit;cursor:pointer;text-align:left}
.nav-item[aria-current="page"]{background:var(--navy-50);color:var(--navy);font-weight:700}
/* Fix round 3 (accessibility): a phone-width strip this long always overflows, and nothing on a plain thin
   native scrollbar tells someone unfamiliar with swipeable tab strips that "Dokumente" isn't the last section.
   A soft fade at the trailing edge is a static, JS-free hint that there is more to scroll to. */
@media(max-width:899px){.nav{flex-direction:row;gap:8px;padding-bottom:4px;-webkit-mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent);mask-image:linear-gradient(to right,#000 calc(100% - 28px),transparent)}.nav-item{flex:none}}

/* Section state as text, never colour alone. */
.badge{display:inline-flex;align-items:center;min-height:24px;padding:2px 10px;border-radius:var(--r-pill);font-size:14px;font-weight:700}
.badge.done{background:var(--ok-tint);color:var(--ok)}
.badge.open{background:var(--orange-50);color:var(--orange-700)}
.badge.na{background:var(--sand-100);color:var(--ink-muted)}
label .badge{margin-left:6px}

/* Cards group related content. */
.card{background:var(--white);border-radius:var(--r-card);padding:20px;box-shadow:var(--shadow-sm)}

/* One field: label, hint, input, error. */
.field{display:grid;gap:6px;margin:0 0 20px}
.field>label,.field>.legend{font-weight:700}
.field .req{color:var(--danger)}
/* Fix round 3: hints carry real instructions, not decoration - shrinking them below body text is exactly the
   wrong place to save space for anyone who already finds small, light-grey text hard to read. */
.field .hint{color:var(--ink-muted);font-size:16px}
.field .origin{font-size:14px;color:var(--ink-muted)}

/* I7 fix: .err is used outside .field too (review.ts's "fehlt noch" rows), so it must not depend on that
   ancestor — a bare rule covers both. .missing marks a whole review row as still open, with its own left border
   so it reads as a row, not just coloured text. */
.err{color:var(--danger);font-weight:700}
.missing{border-left:3px solid var(--danger);padding:4px 0 4px 10px}
/* Fix round 3: the plain-text "Bearbeiten" link here measured 82×20px, well under the 44px targets used
   everywhere else in this app - padding grows the tap area without changing how the line of text looks
   (the matching negative margin cancels it back out for layout purposes). */
.edit-link{display:inline-block;padding:12px 8px;margin:-12px -8px}

/* Staff layout for the answer cards (opt-in `renderAnswerCards({ staff })`, design 2026-09-27 §9.2, Task 2): the
   owner app itself never sets `opts.staff`, so these classes never actually render here - but review.ts is an
   owner-app file, and design-rules.test.ts requires every class literal under src/web/o/**/*.ts to be defined in
   this file. The real, `.answers`-scoped layout (card head, count, rows) lives in public/staff/staff.css, loaded
   after this file on the staff pages that actually use these classes. */
.chip{display:inline-flex;align-items:center;min-height:24px;padding:2px 10px;border-radius:999px;font-size:14px;font-weight:700}
.answers .card-head{display:flex;flex-wrap:wrap;gap:8px}
.answer-rows{display:flex;flex-direction:column}
.answer-row{display:flex;justify-content:space-between;gap:12px}

/* Text-like inputs and selects. */
.input{font-size:16px;min-height:48px;width:100%;padding:10px 12px;border:1.5px solid var(--border-strong);border-radius:var(--r-md);background:var(--white);color:var(--ink);font-family:var(--font-body)}
.input:focus{border-color:var(--orange)}
textarea.input{min-height:120px}
.input[aria-invalid="true"]{border-color:var(--danger)}

/* Choice tiles: radio semantics via aria-checked, on/off tiles (bath fittings, a room's own bath) via aria-pressed. */
.tiles{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.tile{display:flex;align-items:center;gap:10px;min-height:56px;padding:11px 14px;border:1.5px solid var(--border-strong);border-radius:var(--r-tile);background:var(--white);text-align:left;font:inherit;color:var(--ink);cursor:pointer}
.tile[aria-checked="true"],.tile[aria-pressed="true"]{border-color:var(--orange);background:var(--orange-50)}

/* Tri-state feature: label left, three buttons (Ja / Nein / Keine Angabe as text) right. */
.tri{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--border)}
.tri .tri-label{flex:1;min-width:0}
.tri .tri-group{display:flex;gap:6px}
.tri button{min-height:44px;min-width:64px;padding:0 12px;border:1.5px solid var(--border-strong);border-radius:var(--r-md);background:var(--white);color:var(--ink);font:inherit;cursor:pointer}
.tri button[aria-pressed="true"]{border-color:var(--orange);background:var(--orange-50);color:var(--orange-700);font-weight:700}

/* Number stepper. */
.stepper{display:inline-flex;align-items:stretch;border:1.5px solid var(--border-strong);border-radius:var(--r-md);overflow:hidden;background:var(--white)}
.stepper button{min-height:44px;min-width:44px;border:0;background:var(--white);color:var(--navy);display:grid;place-items:center;cursor:pointer}
.stepper button:hover{background:var(--orange-50);color:var(--orange)}
.stepper output{min-width:44px;min-height:44px;display:grid;place-items:center;font-weight:700;border-left:1.5px solid var(--border);border-right:1.5px solid var(--border)}

/* One bed type per room: a full-width row (label left, the +/- pill right), not the pill itself carrying the
   label - nine of those side by side used to wrap into an uneven two-column jumble (fix round 2). */
.bed-stepper{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--border)}
.bed-stepper-label{flex:1;min-width:0}

/* Buttons. White on --orange-600 clears 4.5:1 (measures 5.1:1). */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:var(--r-pill);border:0;background:var(--orange-600);color:var(--white);font-size:16px;cursor:pointer}
.btn:hover{background:var(--orange-700)}
.btn.secondary{background:var(--white);color:var(--navy);border:1.5px solid var(--navy)}
.btn.danger{background:var(--danger)}
.btn[disabled]{opacity:.55;cursor:default}

/* Autosave line: fixed bottom pill, hidden when empty. */
.status{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:20;background:var(--navy);color:var(--white);padding:8px 16px;border-radius:var(--r-pill);font-size:14px;box-shadow:var(--shadow-md)}
.status:empty{display:none}
.status.warn{background:var(--orange-700)}

/* Progress ring (dashboard). */
.ring{width:96px;height:96px}
.ring circle{fill:none;stroke-width:8}
.ring .track{stroke:var(--navy-100)}
.ring .fill{stroke:var(--orange);stroke-linecap:round}

/* Dashboard hero card: ring + continue button. Previously reused .list's .row (a 56px-tall list-row border and
   a tight 12px gap meant for text rows), which cropped a 96px ring against a stray bottom border and squeezed
   the button right up against it (fix round 2, aesthetics). */
.progress{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}

/* List rows (units, documents, review). */
.list{display:flex;flex-direction:column}
.row{display:flex;align-items:center;gap:12px;min-height:56px;padding:10px 0;border-bottom:1px solid var(--border)}
.row:last-child{border-bottom:0}

/* Uploads: dashed drop area with a real, visually-hidden-but-focusable file input. */
.upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:120px;padding:20px;border:1.5px dashed var(--border-strong);border-radius:var(--r-md);text-align:center;color:var(--ink-muted)}
.upload input[type="file"]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.upload input[type="file"]:focus-visible+*{outline:none;box-shadow:var(--focus-ring)}

/* Visually hidden but still reachable by a screen reader (I5 fix: #announce, the autosave live region). */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Inline messages. */
.notice{padding:12px 14px;border-radius:var(--r-md);background:var(--sand-100);color:var(--ink)}
.notice.warn{background:var(--orange-50);color:var(--orange-700)}
.notice.err{background:var(--danger-tint);color:var(--danger)}
.notice.ok{background:var(--ok-tint);color:var(--ok)}

@media (prefers-reduced-motion: reduce){*{animation:none!important;transition:none!important}}
