/* «Akte daneben» · static preview in the look of the Verity shell (lawyer demo v9 / doctor demo v12.9.4 in the shell).
   Tokens are copied from verity_html_legal2_v9/lib/legal2/mg.ts and verity_html_mobile_v129_shell/lib/doctor/shell.ts
   (light), the two dark palettes from gray_proposals_20261115 live_graphit_fein + live_nacht_violett (style#gray-proposal).
   Fonts are local files (fonts/), nothing is loaded from the network. */
@font-face { font-family:"Geist"; src:url("../fonts/geist-latin.woff2") format("woff2"); font-weight:100 900; font-display:swap }
@font-face { font-family:"Atkinson Digits"; src:url("../fonts/AtkinsonHyperlegibleNext-latin.woff2") format("woff2"); font-weight:200 800; font-display:swap; unicode-range:U+0030-0039 }

/* ---------- tokens: light (default) ---------- */
:root {
  --ui:"Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --digits:"Atkinson Digits", var(--ui);
  --bg:#fcfcfc; --fg:#161616; --card:#fff; --sidebar:#fafafa; --muted-fg:#5f5b6b; --border:#e4e2ec; --hover:#f5f5f5; --rail-ink:#3f3f46;
  --primary:#734bdd; --on-primary:#fff; --primary-ink:#5a34c8; --on:rgb(115 75 221 / .09);
  --glass:rgb(255 255 255 / .6); --gline:rgb(255 255 255 / .8); --blur:blur(26px) saturate(1.35);
  --hair:rgb(34 20 90 / .12); --field-line:rgb(34 20 90 / .42); --fill:rgb(34 20 90 / .045); --fill2:rgb(34 20 90 / .08);
  --card-shadow:inset 0 1px 0 rgb(255 255 255 / .5), 0 16px 36px -24px rgb(34 20 90 / .35);
  --sheet:#fff; --sheet-line:rgb(255 255 255 / .8); --sheet-shadow:0 22px 48px -26px rgb(34 20 90 / .32); --ink:#24222a;
  --canvas:radial-gradient(900px 620px at 88% -8%, rgb(124 92 255 / .26), transparent 62%), radial-gradient(760px 560px at 4% 104%, rgb(56 189 248 / .2), transparent 60%), radial-gradient(520px 420px at 46% 52%, rgb(236 72 153 / .07), transparent 70%);
  --check:#b54708; --green:#079455; --green-ink:#05603f;
  --panel:rgb(255 255 255 / .8); --panel-line:rgb(255 255 255 / .75); --veil:rgb(20 16 40 / .28);
  --panel-shadow:inset 0 1px 0 rgb(255 255 255 / .9), 0 30px 70px -26px rgb(34 20 90 / .5), 0 2px 8px -2px rgb(0 0 0 / .12);
  --call:#221a3d; --callink:#fff; --callmute:#cfc6ee;
  --rail-shadow:1px 0 0 0 rgb(15 15 30 / .05), 2px 0 4px -2px rgb(15 15 30 / .04);
  --bar-bg:var(--bg);
  color-scheme:light;
}
/* ---------- Graphit (live_graphit_fein, on top of the shell's dark values) ---------- */
:root[data-theme=graphit] {
  --bg:#26272b; --fg:#dcdce0; --card:#2a2b30; --sidebar:#222327; --muted-fg:#b0b1b8; --border:#474850; --hover:#34353b; --rail-ink:#c4c5cb;
  --primary:#9d8cf5; --on-primary:#191330; --primary-ink:#c0b5ff; --on:rgb(157 140 245 / .14);
  --canvas:radial-gradient(900px 620px at 88% -8%, rgb(124 92 255 / .16), transparent 62%);
  --glass:rgb(255 255 255 / .02); --gline:rgb(255 255 255 / .1); --hair:rgb(255 255 255 / .15); --field-line:rgb(255 255 255 / .46);
  --fill:rgb(255 255 255 / .04); --fill2:rgb(255 255 255 / .07); --card-shadow:inset 0 1px 0 rgb(255 255 255 / .04);
  --sheet:#2e2f34; --ink:#dcdce0; --sheet-line:rgb(255 255 255 / .08); --sheet-shadow:0 18px 40px -28px rgb(0 0 0 / .6);
  --check:#f5b544; --green:#5ccf8f; --green-ink:#5ccf8f;
  --panel:rgb(48 49 55 / .97); --panel-line:rgb(255 255 255 / .12); --veil:rgb(0 0 0 / .5);
  --panel-shadow:inset 0 1px 0 rgb(255 255 255 / .09), 0 30px 70px -26px rgb(0 0 0 / .75);
  --call:#efeaff; --callink:#1a1530; --callmute:#4b4470; --rail-shadow:1px 0 0 0 rgb(255 255 255 / .06);
  color-scheme:dark;
}
/* ---------- Nacht (live_nacht_violett) ---------- */
:root[data-theme=nacht] {
  --bg:#0f0e15; --fg:#d3cee0; --card:#16141e; --sidebar:#0c0b11; --muted-fg:#a59fb6; --border:#352f4a; --hover:#211e2e; --rail-ink:#b5afc6;
  --primary:#9f8af7; --on-primary:#140e29; --primary-ink:#b4a4ff; --on:rgb(159 138 247 / .14);
  --canvas:radial-gradient(900px 620px at 88% -8%, rgb(124 92 255 / .26), transparent 62%), radial-gradient(700px 460px at 6% -12%, rgb(96 104 240 / .10), transparent 64%);
  --glass:rgb(30 27 44 / .55); --gline:rgb(255 255 255 / .1); --hair:rgb(255 255 255 / .13); --field-line:rgb(255 255 255 / .38);
  --fill:rgb(255 255 255 / .035); --fill2:rgb(255 255 255 / .065); --card-shadow:inset 0 1px 0 rgb(255 255 255 / .05), 0 16px 36px -24px rgb(0 0 0 / .9);
  --sheet:#17151f; --ink:#d3cee0; --sheet-line:rgb(255 255 255 / .07); --sheet-shadow:inset 0 1px 0 rgb(255 255 255 / .04), 0 22px 48px -26px rgb(0 0 0 / .95);
  --check:#ecb34a; --green:#4cc985; --green-ink:#4cc985;
  --panel:rgb(28 25 40 / .92); --panel-line:rgb(255 255 255 / .1); --veil:rgb(0 0 0 / .6);
  --panel-shadow:inset 0 1px 0 rgb(255 255 255 / .09), 0 30px 70px -26px rgb(0 0 0 / .75);
  --call:#efeaff; --callink:#1a1530; --callmute:#4b4470; --rail-shadow:1px 0 0 0 rgb(255 255 255 / .05);
  color-scheme:dark;
}
:root[data-theme=nacht] .btn.primary { box-shadow:0 0 0 1px rgb(159 138 247 / .3), 0 10px 26px -16px rgb(124 92 255 / .7) }

/* ---------- base ---------- */
* { box-sizing:border-box }
html, body { margin:0; height:100% }
body { background:var(--bg); color:var(--fg); font:14px/1.5 var(--ui); -webkit-font-smoothing:antialiased; overflow:hidden }
button, input { font:inherit; color:inherit }
button { cursor:pointer; touch-action:manipulation; background:none; border:0; padding:0 }
:focus-visible { outline:2px solid var(--primary); outline-offset:2px; border-radius:6px }
[hidden] { display:none !important }
svg.i { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round }
svg.i.s { width:14px; height:14px } svg.i.m { width:16px; height:16px }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap }

/* ---------- the frame: rail | list | work ---------- */
.app { display:flex; height:100vh; height:100dvh }
.rail { width:90px; flex:none; display:flex; flex-direction:column; align-items:center; gap:4px; padding:16px 0; background:var(--sidebar); box-shadow:var(--rail-shadow); z-index:3; position:relative }
.rail .logo { display:grid; place-items:center; width:36px; height:36px; margin:4px 0 10px; color:var(--primary); font-size:19px; font-weight:600; letter-spacing:-.02em }
.rail .ri { position:relative; width:100%; display:flex; flex-direction:column; align-items:center; gap:7px; padding:7px 0 5px; font-size:12px; line-height:1; letter-spacing:-.01em; font-weight:500; color:var(--rail-ink); min-height:52px; justify-content:center }
.rail .ri > svg { color:var(--muted-fg); transition:color .15s }
.rail .ri:hover > svg { color:var(--fg) }
.rail .ri[aria-current=page] { color:var(--fg) }
.rail .ri[aria-current=page] > svg { color:var(--primary) }
.rail .ri[aria-current=page]::before { content:""; position:absolute; left:0; top:7px; height:18px; width:3px; border-radius:0 99px 99px 0; background:var(--primary) }
.rail .rec { gap:5px; margin-bottom:12px; color:var(--fg); padding:0 }
.rail .rec .dot { display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--primary); color:var(--on-primary); transition:transform .15s }
.rail .rec:active .dot { transform:scale(.97) }
.rail .badge { position:absolute; right:24px; top:0; min-width:18px; height:18px; padding:0 4px; border-radius:99px; background:var(--primary); color:var(--on-primary); font-size:11px; font-weight:700; line-height:18px; text-align:center }
.rail .grow { flex:1 }

.list { width:300px; flex:none; display:flex; flex-direction:column; background:var(--bg); border-right:1px solid var(--border); min-height:0 }
.list-head { display:flex; align-items:center; gap:8px; padding:20px 16px 10px }
.list-head h2 { margin:0; font-size:15px; font-weight:600; letter-spacing:-.01em }
.list-head .n { color:var(--muted-fg); font-size:13px }
.search { margin:0 16px 10px; display:flex; align-items:center; gap:8px; height:36px; padding:0 12px; border-radius:12px; border:1px solid var(--hair); background:var(--fill); color:var(--muted-fg) }
.search:focus-within { border-color:color-mix(in oklab, var(--primary) 60%, transparent) }
.search input { flex:1; min-width:0; border:0; background:none; outline:none; font-size:13px; color:var(--fg) }
.search input::placeholder { color:var(--muted-fg) }
.pills { display:flex; gap:6px; padding:0 16px 8px }
.pill { height:30px; padding:0 11px; border-radius:99px; border:1px solid var(--hair); background:var(--glass); font-size:12.5px; color:var(--fg) }
.pill[aria-pressed=true] { background:var(--on); border-color:color-mix(in oklab, var(--primary) 45%, transparent); color:var(--primary-ink) }
.sect { padding:12px 16px 4px; font-size:12px; font-weight:500; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-fg) }
.plist { flex:1; overflow:auto; padding:0 8px 8px; min-height:0 }
.pt { position:relative; display:flex; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:12px; align-items:flex-start }
.pt:hover { background:var(--hover) }
.pt[aria-current=true] { background:color-mix(in oklab, var(--primary) 9%, transparent) }
.pt[aria-current=true]::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:0 99px 99px 0; background:var(--primary) }
.av { flex:none; width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-size:12px; font-weight:600; color:var(--primary-ink); background:var(--on); border:1px solid color-mix(in oklab, var(--primary) 30%, transparent) }
.pt .nm { display:block; font-size:14px; font-weight:500; line-height:1.3 }
.pt .mt { display:block; font-size:12.5px; color:var(--muted-fg); line-height:1.4; margin-top:2px }
.pt .tag { display:inline-block; margin-top:4px; font-size:12px; color:var(--primary-ink); font-weight:500 }
.pt .tag.pending { color:var(--muted-fg); font-weight:400 }
.list-foot { border-top:1px solid var(--border); padding:12px 16px 14px; font-size:12px; line-height:1.55; color:var(--muted-fg) }

.work { flex:1; min-width:0; display:flex; flex-direction:column; background:var(--canvas), var(--bg); min-height:0 }
.strip { height:32px; flex:none; display:flex; align-items:center; gap:12px; padding:0 16px; font-size:12px; border-bottom:1px solid var(--hair); background:color-mix(in oklab, var(--glass) 55%, transparent); white-space:nowrap; overflow:hidden }
.strip .go { display:inline-flex; align-items:center; gap:8px; color:var(--muted-fg); min-width:0; overflow:hidden; text-overflow:ellipsis }
.strip .go b { color:var(--fg); font-weight:500 }
.strip .go:hover b { text-decoration:underline }
.strip .sp { flex:1 }
.chip { display:inline-flex; align-items:center; gap:6px; padding:2px 10px; border-radius:999px; font-size:12px; font-weight:500; background:color-mix(in oklab, var(--primary) 12%, transparent); color:var(--fg); white-space:nowrap }
.chip svg { color:var(--primary) }
.tabs { height:39px; flex:none; display:flex; align-items:stretch; border-bottom:1px solid var(--hair); background:color-mix(in oklab, var(--glass) 70%, transparent); overflow-x:auto; scrollbar-width:none }
.tab { position:relative; display:flex; align-items:center; gap:8px; padding:0 16px; font-size:13px; color:var(--muted-fg); border-right:1px solid color-mix(in oklab, var(--border) 60%, transparent); white-space:nowrap }
.tab::before { content:""; width:6px; height:6px; border-radius:50%; background:color-mix(in oklab, var(--muted-fg) 45%, transparent) }
.tab:hover { color:var(--fg) }
.tab[aria-selected=true] { background:var(--glass); color:var(--fg) }
.tab[aria-selected=true]::before { background:var(--primary) }
.tab[aria-selected=true]::after { content:""; position:absolute; left:0; right:0; top:0; height:2px; background:var(--primary) }
.tab.plus { padding:0 16px; border-right:0; color:var(--muted-fg) } .tab.plus::before { content:none }

.scroller { flex:1; min-height:0; overflow:auto; scroll-behavior:auto }
.page { padding:16px 24px 48px }

/* ---------- page head (the doctor's h1 + step row) ---------- */
.phead { display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap; padding:6px 0 14px; border-bottom:1px solid var(--hair) }
.phead .who { flex:1; min-width:240px }
.phead h1 { margin:0; font-size:18px; line-height:28px; font-weight:600; letter-spacing:-.01em }
.phead .sub { margin:2px 0 0; color:var(--muted-fg); font-size:13px }
.local { display:inline-flex; align-items:center; gap:7px; padding:5px 12px; border-radius:999px; font-size:12.5px; font-weight:500; color:var(--green-ink); background:color-mix(in oklab, var(--green) 12%, transparent); white-space:nowrap }
.local i { width:7px; height:7px; border-radius:50%; background:currentColor }
.pbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 0 16px }
.pbar .hint { color:var(--muted-fg); font-size:13px; flex:1; min-width:200px }
.count-chip { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:13px; font-weight:500; background:color-mix(in oklab, var(--primary) 12%, transparent); color:var(--primary-ink); white-space:nowrap }
.count-chip.muted { background:var(--fill2); color:var(--muted-fg) }
/* B3: after the search, a quiet status line instead of a disabled button: coverage | matches | unreadable */
.status { flex:1; min-width:200px; margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:2px 0; font-size:13px; color:var(--muted-fg) }
.status .st { display:inline-flex; align-items:center; gap:5px }
.status { column-gap:20px }
.status .ok { color:var(--fg); font-weight:500 }
.status svg { color:var(--muted-fg) } .status .ok svg { color:var(--fg) }

/* ---------- buttons: frosted with a hairline; one filled action ---------- */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:32px; padding:0 12px; border-radius:12px; border:1px solid var(--hair); background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); font-size:13px; font-weight:500; white-space:nowrap; color:var(--fg) }
.btn:hover:not(:disabled) { background:color-mix(in oklab, var(--glass) 60%, var(--fill2)) }
.btn.primary { background:var(--primary); color:var(--on-primary); border-color:transparent; -webkit-backdrop-filter:none; backdrop-filter:none }
.btn.primary:hover:not(:disabled) { background:var(--primary); filter:brightness(1.07) }
.btn:disabled { opacity:.45; cursor:not-allowed }
.btn.sm { min-height:30px; padding:0 10px; font-size:12.5px; border-radius:12px }
.btn[aria-pressed=true] { background:var(--on); border-color:color-mix(in oklab, var(--primary) 45%, transparent); color:var(--primary-ink) }
.btn.done, .btn.done:disabled { opacity:1; cursor:default; background:color-mix(in oklab, var(--green) 12%, transparent); color:var(--green-ink); border-color:transparent }
.btn.play.on { background:var(--on); color:var(--primary-ink); border-color:color-mix(in oklab, var(--primary) 45%, transparent) }
.btn.play .bar { position:relative; width:44px; height:3px; border-radius:2px; background:color-mix(in oklab, var(--primary) 25%, transparent); overflow:hidden }
.btn.play .bar i { position:absolute; inset:0 auto 0 0; width:0; background:var(--primary); border-radius:2px }
.btn.play.on .bar i { animation:prog 3s linear forwards }
@keyframes prog { to { width:100% } }
.linkbtn { color:var(--primary-ink); font-weight:500; text-decoration:underline; text-underline-offset:.2em; font-size:13px; padding:2px 2px; border-radius:6px }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:center }

/* ---------- glass cards (the review card) and the solid sheet ---------- */
.card { background:var(--glass); -webkit-backdrop-filter:var(--blur); backdrop-filter:var(--blur); border:1px solid var(--gline); border-radius:18px; box-shadow:var(--card-shadow); padding:14px }
.card > h2, .colhead h2 { margin:0; font-size:14px; font-weight:600 }
.csub { margin:2px 0 12px; color:var(--muted-fg); font-size:12.5px; line-height:1.5 }
.sheet { background:var(--sheet); color:var(--ink); border:1px solid var(--sheet-line); border-radius:18px; box-shadow:var(--sheet-shadow); font-size:15px; line-height:28px }
.label { margin:0 0 6px; font-size:12px; font-weight:500; color:var(--muted-fg) }

.grid { display:grid; gap:20px; align-items:start }
.grid.prep { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr) }
.grid.letter { grid-template-columns:minmax(0,1fr) 372px }
@media (min-width:1061px) { .grid.prep > #leftCard { position:sticky; top:12px } }
.colhead { padding:2px 2px 10px }
.colhead .csub { margin-bottom:0 }

/* screen 1, left */
.import { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:12px; border:1px dashed var(--field-line); border-radius:12px; margin:0 0 14px; font-size:13px }
.import span { flex:1 1 160px }
.cover { font-size:13px; padding:12px; border-radius:12px; background:var(--fill); border:1px solid var(--hair); margin:0 0 14px }
.cover p { margin:0 0 4px } .cover b { font-weight:600 }
.cover .warn { color:var(--fg) }
.cover .warn .w { display:inline-flex; align-items:center; gap:4px; color:var(--muted-fg); font-weight:600; vertical-align:-2px }
.tl { display:flex; gap:6px 12px; flex-wrap:wrap; margin-top:8px }
.tl .y { font-size:12px; color:var(--muted-fg); display:flex; align-items:center; gap:3px; font-variant-numeric:tabular-nums }
.tl i { display:inline-block; width:5px; height:14px; border-radius:2px; background:var(--fill2) }
.tl i.hit { background:var(--primary) }
/* B4: unreadable = hollow neutral tick, no warning colour */
.tl i.bad { background:transparent; box-shadow:inset 0 0 0 1.5px var(--muted-fg) }
.tlkey { display:flex; align-items:center; gap:5px; margin:6px 0 0; font-size:12px; color:var(--muted-fg) }
.tlkey i { display:inline-block; width:5px; height:12px; border-radius:2px } .tlkey i.hit { background:var(--primary) }
.tlkey i.bad { margin-left:8px; box-shadow:inset 0 0 0 1.5px var(--muted-fg) }
.ask { padding:18px 22px 20px; margin:0 }
.t { text-decoration:none; border-radius:3px; cursor:text }
.ask.on .t { text-decoration:underline solid var(--primary) 2px; text-underline-offset:.24em; cursor:pointer }
.ask.on .t.sel { box-shadow:0 0 0 1.5px color-mix(in oklab, var(--primary) 55%, transparent); background-color:color-mix(in oklab, var(--primary) 9%, transparent) }
.t sup { display:none }
.ask.on .t sup { display:inline-grid; place-items:center; width:17px; height:17px; border-radius:50%; background:var(--primary); color:var(--on-primary); font:600 11px/1 var(--ui); vertical-align:.45em; margin-left:2px; text-decoration:none }

/* screen 1, left: topic list (C3) */
#topics .label { margin:14px 0 6px }
#topics .label:first-child { margin-top:2px }
.tlist { list-style:none; margin:0; padding:0; display:grid; gap:4px }
.ti { display:flex; gap:10px; align-items:flex-start; width:100%; text-align:left; padding:7px 8px; border-radius:12px; border:1px solid transparent }
.ti:disabled { cursor:default; color:inherit }
.ti:not(:disabled):hover { background:var(--fill) }
.ti.sel { background:color-mix(in oklab, var(--primary) 9%, transparent); border-color:color-mix(in oklab, var(--primary) 45%, transparent) }
.ti .tx b { display:block; font-size:14px; font-weight:600; line-height:1.35 }
.ti .tx .w { display:block; font-size:12.5px; line-height:1.45; color:var(--muted-fg) }
.ti .num { margin-top:1px }
.help { margin:12px 0 0; font-size:12.5px; line-height:1.5; color:var(--muted-fg) }

/* screen 1, right: one glass card per topic */
.empty { color:var(--muted-fg); font-size:13px; padding:26px 12px; text-align:center }
.grp { margin-bottom:12px; scroll-margin:16px }
.grp.sel { box-shadow:var(--card-shadow), inset 3px 0 0 var(--primary) }
.ghead { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:14px; font-weight:600 }
.num { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--primary); color:var(--on-primary); font:600 12px/1 var(--ui); flex:none; transform:translateY(2px) }
/* C1: a topic without hits has the same weight as a hit: same number, same text size and colour, no grey box */
.neg { margin:8px 0 2px 26px; padding:2px 0 0 }
.neg .q b { font-weight:600 }
.neg .searched { margin:6px 0 2px }
.neg .src { margin:2px 0 8px }
.searched .linkbtn { font-size:12px; margin-left:6px }
.wform { margin:6px 0 8px 26px; display:grid; gap:6px }
.wform label { font-size:12.5px; color:var(--muted-fg) }
.wform input { height:36px; padding:0 10px; border-radius:10px; border:1px solid var(--field-line); background:var(--sheet); color:var(--fg); font-size:13.5px; min-width:0 }
.wform input:focus { outline:2px solid var(--primary); outline-offset:1px }
.doc-row .dt { font-weight:500 }
.age { margin:-4px 0 8px; font-size:12.5px; color:var(--muted-fg) }
.count { font-weight:400; color:var(--muted-fg); font-size:12.5px }
.ghead .gt { flex:1; min-width:0 } .ghead .gt .count { margin-left:4px; white-space:nowrap }
.searched { margin:3px 0 4px 26px; font-size:12px; color:var(--muted-fg) }
.searched.after { margin-top:8px }
.pass { padding:10px 2px 12px; border-bottom:1px solid var(--hair) }
.pass:last-child { border-bottom:0; padding-bottom:2px }
.grp .pass, .grp .none, .grp .facts { margin-left:26px }
.q { margin:0; font-size:14.5px; line-height:1.55; color:var(--fg) }
.src { font-size:12.5px; color:var(--muted-fg); margin:3px 0 8px; line-height:1.45 }
.own { color:var(--primary-ink); font-weight:500 }
.tip { margin-top:6px; font-size:12px; color:var(--muted-fg) }
.none { margin-top:8px; font-size:13px; padding:10px 12px; border-radius:12px; background:var(--fill); border:1px solid var(--hair); box-shadow:inset 3px 0 0 var(--field-line) }
.none b { font-weight:600 }
.none .s2 { display:block; margin-top:2px; font-size:12px; color:var(--muted-fg) }

/* the doctor's «Eckdaten» panel: label | value, right-aligned tabular values, hairline rows */
.facts { border-top:1px solid var(--hair); margin-top:6px }
.fact { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; align-items:baseline; padding:7px 8px; border-bottom:1px solid var(--hair) }
.fact .fl { font-size:13px }
.fact .fv { font-weight:600; font-size:13.5px; text-align:right; white-space:nowrap; font-family:var(--digits); font-variant-numeric:tabular-nums lining-nums }
.fact .fs { grid-column:1 / -1; font-size:12.5px; color:var(--muted-fg); margin-top:1px }
.facts + .row { margin-top:10px }
.fact .ft { grid-column:1 / -1; margin-top:6px }
.fhead { display:flex; align-items:center; gap:8px; min-height:28px }
.fhead .t1 { font-size:14px; font-weight:600 }
.npill { display:inline-block; padding:0 8px; border-radius:999px; background:color-mix(in oklab, var(--primary) 10%, transparent); color:var(--primary-ink); font-size:12px; font-weight:500; line-height:20px }

/* screen 2 */
.lsheet { padding:30px clamp(20px, 5%, 52px) 30px }
.lsheet h2 { margin:0; font-size:16px; line-height:24px; font-weight:600; color:var(--ink) }
.lsheet .lsub { margin:2px 0 16px; font-size:13px; line-height:20px; color:color-mix(in oklab, var(--ink) 72%, var(--sheet)) }
.lsheet .lt { margin:0 }
.ins { outline:none; background:color-mix(in oklab, var(--primary) 11%, transparent); border-radius:3px; padding:1px 2px; -webkit-box-decoration-break:clone; box-decoration-break:clone }
.fin .ins { background:transparent; padding:0 }
.ins:focus { box-shadow:0 0 0 1.5px var(--primary) }
.ins.edited { text-decoration:underline dotted var(--muted-fg) 1.5px; text-underline-offset:.22em }
.edflag { margin-left:4px; font:500 12px var(--ui); color:var(--muted-fg); border:1px solid var(--field-line); border-radius:6px; padding:0 5px; white-space:nowrap }
/* C5: check list before finishing */
.review { margin:12px 0 0; padding:12px 14px; border-radius:12px; border:1px solid var(--field-line); background:color-mix(in oklab, var(--ink) 3%, var(--sheet)); font-size:13.5px; line-height:1.5; color:var(--ink) }
.review .rhead { margin:0 0 8px; font-weight:600 }
.rlist { margin:12px 0 0; padding:0; list-style:none; display:grid; gap:10px }
.rlist li { display:flex; gap:10px; padding-top:10px; border-top:1px solid color-mix(in oklab, var(--ink) 12%, transparent) }
.rlist .rn { font:600 12px/20px var(--ui); color:var(--primary-ink); flex:none; width:14px }
.rlist .rq { margin:0; font-size:13.5px; line-height:1.5 }
.rlist .src, .rlist .age, .rlist .edn { margin:2px 0 0; font-size:12.5px; color:color-mix(in oklab, var(--ink) 72%, var(--sheet)) }
.rlist .edn { font-weight:600; color:var(--ink) }
.rlist .btn { margin-top:6px }
.fn { font:600 11px var(--ui); color:var(--primary-ink); vertical-align:super; margin-left:1px }
.undo { display:inline-flex; align-items:center; gap:3px; height:24px; padding:0 7px 0 5px; margin-left:4px; vertical-align:1px; border-radius:8px; border:1px solid var(--field-line); background:var(--glass); font:500 12px/1 var(--ui); color:var(--fg); white-space:nowrap }
.undo span { font:600 14px/1 ui-sans-serif, -apple-system, system-ui, sans-serif }
.undo:hover { background:var(--fill2) }
.fin .undo { display:none }
.foot { margin:16px 0 0; padding-top:10px; border-top:1px solid color-mix(in oklab, var(--ink) 14%, transparent); font-size:12.5px; line-height:1.5; color:color-mix(in oklab, var(--ink) 72%, var(--sheet)) }
.foot p { margin:0 0 2px }
.check { margin:10px 0 0; font-size:12.5px; line-height:1.5; font-weight:500; color:var(--green-ink) }
.done-line { margin:10px 0 0; font-size:12.5px; line-height:1.5; color:color-mix(in oklab, var(--ink) 72%, var(--sheet)) }
.gem { display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600 }
.gem svg { color:var(--primary) }
.side .card { margin-bottom:12px }
.side .pass { margin-left:0 }

/* ---------- start tab ---------- */
.hero { max-width:760px; margin:40px auto 0; padding:0 8px }
.hero .kick { margin:16px 0 0; font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--primary-ink) }
.hero h1 { margin:6px 0 10px; font-size:32px; line-height:1.2; font-weight:600; letter-spacing:-.02em }
.tile .step { display:block; margin:0 0 8px; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--primary-ink) }
.hero p.lead { margin:0 0 22px; font-size:15.5px; line-height:1.6; color:var(--muted-fg); max-width:620px }
.tiles { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; margin:8px 0 18px }
.tile { text-align:left; padding:18px; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; width:100% }
.tile:hover { background:color-mix(in oklab, var(--glass) 60%, var(--fill2)) }
.tile svg { color:var(--primary) }
.tile b { display:block; margin:10px 0 4px; font-size:15px; font-weight:600 }
.tile span { display:block; font-size:13px; line-height:1.55; color:var(--muted-fg) }

/* ---------- dialogs: the lab's panel; the document itself on a solid sheet ---------- */
.veil { position:fixed; inset:0; z-index:100; background:var(--veil); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); display:grid; place-items:center; padding:20px }
.dlg { background:var(--panel); border:1px solid var(--panel-line); -webkit-backdrop-filter:blur(34px) saturate(1.4); backdrop-filter:blur(34px) saturate(1.4); box-shadow:var(--panel-shadow); border-radius:18px; width:min(720px, 100%); max-height:min(88vh, 900px); display:flex; flex-direction:column; overflow:hidden }
.dlg-head { display:flex; align-items:center; gap:10px; padding:14px 16px 12px 20px; border-bottom:1px solid var(--hair) }
.dlg-head .k { flex:1; min-width:0; font-size:12.5px; line-height:1.45; color:var(--muted-fg) }
.dlg-head .k b { color:var(--fg); font-weight:600; font-size:13.5px }
.xbtn { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; color:var(--muted-fg) }
.xbtn:hover { background:var(--hover); color:var(--fg) }
.dlg-body { overflow:auto; padding:16px; min-height:0 }
.doc { padding:30px clamp(20px, 6%, 48px) 34px }
.doc h2 { margin:0; font-size:20px; line-height:28px; font-weight:600 }
.doc .meta { font-size:12.5px; line-height:1.5; color:color-mix(in oklab, var(--ink) 72%, var(--sheet)); margin-bottom:10px }
.doc .pg { margin:18px 0 6px; font-size:12px; letter-spacing:.06em; text-transform:uppercase; color:color-mix(in oklab, var(--ink) 74%, var(--sheet)); border-bottom:1px solid color-mix(in oklab, var(--ink) 14%, transparent); padding-bottom:4px }
.bars i { display:block; height:7px; border-radius:4px; background:color-mix(in oklab, var(--ink) 10%, transparent); margin:11px 0 }
.bars { margin:14px 0 }
.doc p.dq { margin:0 }
.doc mark { color:inherit; background:color-mix(in oklab, var(--primary) 14%, transparent); box-shadow:0 0 0 2px var(--primary); border-radius:3px; padding:0 1px; -webkit-box-decoration-break:clone; box-decoration-break:clone; scroll-margin:80px }
.scan { height:170px; border-radius:10px; background:repeating-linear-gradient(-8deg, color-mix(in oklab, var(--ink) 9%, transparent) 0 3px, transparent 3px 11px); display:grid; place-items:center; color:var(--ink); font-weight:600; margin:14px 0; text-align:center; padding:0 12px; box-shadow:inset 3px 0 0 var(--field-line) }
.set { width:min(440px, 100%); padding:20px }
.set h2 { margin:0; flex:1; font-size:15px; font-weight:600 }
.acct { display:flex; align-items:center; gap:12px; margin-top:12px; padding:12px; border-radius:12px; background:var(--fill) }
.acct b { display:block; font-size:13.5px; font-weight:500 } .acct span span { display:block; font-size:12px; color:var(--muted-fg) }
.set .sect { padding:16px 0 6px }
.seg { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px }
.seg button { min-height:44px; border-radius:12px; border:1px solid var(--hair); background:var(--fill); font-size:13px; font-weight:500; display:inline-flex; align-items:center; justify-content:center; gap:6px }
.seg button:hover { background:var(--fill2) }
.seg button[aria-checked=true] { background:var(--on); border-color:color-mix(in oklab, var(--primary) 75%, transparent) }
.sw { width:14px; height:14px; border-radius:50%; border:1px solid var(--hair) }
.set .linkbtn { align-self:flex-start }
.set p { margin:14px 0 0; font-size:12px; line-height:1.6; color:var(--muted-fg) }

/* ---------- tour (the doctor demo's callout) ---------- */
.tour { position:fixed; z-index:120; width:290px; border-radius:12px; padding:11px 13px 9px; background:var(--call); color:var(--callink); font-size:14px; line-height:1.4; box-shadow:0 14px 34px -12px rgb(0 0 0 / .5) }
.tour::before { content:""; position:absolute; width:12px; height:12px; background:var(--call); transform:rotate(45deg) }
.tour[data-side=above]::before { bottom:-5px; left:var(--ax, 30px) }
.tour[data-side=below]::before { top:-5px; left:var(--ax, 30px) }
.tour[data-side=left]::before { right:-5px; top:var(--ay, 22px) }
.tour[data-side=right]::before { left:-5px; top:var(--ay, 22px) }
.tour[data-side=none]::before, .tour.dock::before { display:none }
.tour .n { display:block; font-size:12px; letter-spacing:.02em; color:var(--callmute) }
.tour .do { display:block; margin-top:5px; font-weight:650 }
.tour .sub { display:block; margin-top:3px; font-size:12px; color:var(--callmute) }
.tour .ft { display:flex; align-items:center; gap:14px; margin-top:8px; font-size:12px; color:var(--callmute) }
.tour .ft .sp { flex:1 }
.tour .ft button { color:inherit; border-radius:6px; padding:2px 4px; margin:-2px -4px; min-height:24px }
.tour .ft button:hover { color:var(--callink) }
.tour .ft .go { color:var(--callink); font-weight:650 }
.tour .ft .back { font-size:15px; padding:0 8px }
.tour :focus-visible { outline-color:var(--callink) }
.tour.dock { left:0; right:0; width:auto; border-radius:0; padding:9px 14px 8px; line-height:1.38 }
.tour.dock.top { top:0; border-radius:0 0 16px 16px }
.tour.dock.bottom { border-radius:16px 16px 0 0 }
.tour.dock .do { margin-top:2px }
.tour.dock .ft { margin-top:3px; gap:6px; font-size:13px }
.tour.dock .ft button { min-height:44px; min-width:44px; padding:0 8px; margin:0 }
.ring { position:fixed; z-index:110; pointer-events:none; border-radius:12px; box-shadow:0 0 0 3px var(--primary), 0 0 0 7px color-mix(in oklab, var(--primary) 22%, transparent); transition:all .18s ease-out }
.toast { position:fixed; z-index:130; left:50%; transform:translateX(-50%); bottom:24px; width:max-content; max-width:calc(100vw - 24px); text-align:center; padding:9px 14px; border-radius:10px; background:var(--call); color:var(--callink); font-size:13.5px; box-shadow:0 14px 34px -12px rgb(0 0 0 / .5); opacity:0; pointer-events:none; transition:opacity .2s ease-out }
.toast.show { opacity:1 }

/* ---------- phone header, bottom bar, drawer (hidden on desktop) ---------- */
.mhead, .mbar, .drawer-x { display:none }

@media (max-width:1180px) { .list { width:256px } }
@media (max-width:1060px) and (min-width:761px) { .list { display:none } .grid.prep, .grid.letter { grid-template-columns:minmax(0,1fr) } }

/* phones: the rail becomes a header + a bottom bar; columns stack; the page scrolls as one */
@media (max-width:760px) {
  html, body { height:auto }
  body { overflow:visible }
  .app { display:block; height:auto }
  .rail, .list { display:none }
  .app.drawer-open .rail, .app.drawer-open .list { display:flex; position:fixed; top:0; bottom:0; z-index:95 }
  .app.drawer-open .rail { left:0 }
  .app.drawer-open .list { left:90px; width:min(280px, calc(100vw - 90px)); box-shadow:0 0 40px rgb(0 0 0 / .25) }
  .drawer-x { display:block; position:fixed; inset:0; z-index:94; background:var(--veil) }
  .app:not(.drawer-open) .drawer-x { display:none }
  .work { display:block; min-height:100vh; background:var(--canvas), var(--bg); background-attachment:fixed }
  .strip, .tabs { display:none }
  .scroller { overflow:visible }
  /* B1: the fixed bottom bar's height (4 + 56 + 1 border) plus the safe area is kept free under every page */
  :root { --mbar-h:61px; --mhead-h:57px }
  html { scroll-padding-top:calc(var(--mhead-h) + 8px); scroll-padding-bottom:calc(var(--mbar-h) + env(safe-area-inset-bottom) + 8px) }
  .page { padding:8px 14px calc(var(--mbar-h) + env(safe-area-inset-bottom) + 16px) }
  .mhead { display:block; position:sticky; top:0; z-index:40; background:var(--bg); border-bottom:1px solid var(--hair); padding:6px 4px 6px 4px }
  .mhead .r1 { display:flex; align-items:center; gap:4px }
  .mhead .ib { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; flex:none; color:var(--fg) }
  .mhead .ib:hover { background:var(--hover) }
  .mhead .tt { flex:1; min-width:0; padding-left:2px }
  .mhead .tt b { display:block; font-size:15px; line-height:20px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
  .mhead .tt .pv { display:flex; align-items:flex-start; gap:5px; font-size:12px; line-height:16px; color:var(--muted-fg) }
  .mhead .tt .pv svg { margin-top:1px }
  .mhead .tt .pv svg { color:var(--primary) }
  /* B10: one-line labels */
  .mbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:40; background:var(--bg); border-top:1px solid var(--hair); padding:4px 4px env(safe-area-inset-bottom) }
  .mbar button { flex:1; min-width:0; min-height:56px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:12px; line-height:1.2; color:var(--muted-fg); border-radius:12px; text-align:center; padding:4px 2px; white-space:nowrap }
  .mbar button svg { color:var(--muted-fg) }
  .mbar button[aria-selected=true] { color:var(--fg); font-weight:600 }
  .mbar button[aria-selected=true] svg { color:var(--primary) }
  /* B2: one line of context: the header names the patient; the page head keeps birth date, count and the local pill */
  .phead { padding:2px 0 8px; gap:8px; align-items:center; flex-wrap:nowrap }
  .phead h1 { position:absolute; width:1px; height:1px; clip-path:inset(50%); white-space:nowrap }
  .phead .who { min-width:0 }
  .phead .sub { margin:0; font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
  .phead .sub .dl { display:none }
  .phead .local { padding:4px 9px; font-size:12px; gap:6px }
  .pbar { padding:8px 0 12px; gap:6px 10px }
  /* after the search: three status lines, the Gemerkt chip at the end of the last one */
  .pbar:has(.status:not([hidden])) { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1px 8px; align-items:center }
  .pbar:has(.status:not([hidden])) .status { display:contents }
  .status .st { grid-column:1 / -1; font-size:12.5px; line-height:19px }
  .status .st:last-child { grid-column:1; grid-row:3 }
  .pbar:has(.status:not([hidden])) .count-chip { grid-column:2; grid-row:3 }
  .status .st + .st::before { content:none }
  .cover .warn .linkbtn, .done-line .linkbtn { display:flex; margin-top:2px }
  .grid.prep, .grid.letter { grid-template-columns:minmax(0,1fr) }
  .grid { gap:14px }
  .card { padding:12px }
  .grp .pass, .grp .none, .grp .facts, .neg, .wform { margin-left:0 }
  .searched { margin-left:0 }
  .ask { padding:14px 14px 16px }
  .lsheet { padding:18px 16px 20px; border-radius:14px }
  .sheet { border-radius:14px }
  .hero { margin-top:14px; padding:0 }
  .hero h1 { font-size:26px }
  .tiles { grid-template-columns:minmax(0,1fr) }
  .veil { padding:0; align-items:end }
  .dlg { width:100%; max-height:92vh; border-radius:18px 18px 0 0 }
  .dlg-body { padding:10px }
  .doc { padding:18px 16px 22px; border-radius:14px }
  .toast { bottom:calc(var(--mbar-h) + env(safe-area-inset-bottom) + 10px) }
}
/* touch: every control at least 44 px */
@media (pointer:coarse), (max-width:760px) {
  .btn, .btn.sm { min-height:44px; padding:0 14px }
  .pill { height:44px }
  .undo { min-width:44px; height:44px }
  .xbtn { width:44px; height:44px }
  .linkbtn { display:inline-flex; align-items:center; min-height:44px; padding:0 4px }
  .tour .ft button { min-height:44px; min-width:44px; padding:0 8px; margin:0 }
  .tab { min-height:44px }
  .ask.on .t { padding:6px 0 }
  .wform input { height:44px }
}
/* ---------- round 3 (16 November, morning) ---------- */
/* the callout and its ring step aside while a dialog, sheet or the phone drawer is open (js: tourSync) */
.tour { transition:opacity .16s ease-out, visibility 0s linear 0s }
.ring { transition:left .18s ease-out, top .18s ease-out, width .18s ease-out, height .18s ease-out, opacity .16s ease-out, visibility 0s linear 0s }
.tour.away, .ring.away { opacity:0; visibility:hidden; pointer-events:none; transition:opacity .16s ease-out, visibility 0s linear .16s }
/* start: «So funktioniert es», the three areas in the order of a working day */
.how { margin:4px 0 18px; padding:16px 18px 10px }
.how > h2 { font-size:15px }
.how .csub { margin:2px 0 6px }
.howlist { list-style:none; margin:0; padding:0 }
.howlist li { display:flex; align-items:center; gap:12px; padding:11px 0; border-top:1px solid var(--hair) }
.howlist .num { transform:none; width:22px; height:22px; font-size:12.5px }
.howlist .htx { flex:1; min-width:0 }
.howlist .htx b { display:block; font-size:14px; font-weight:600; line-height:1.35 }
.howlist .htx span { display:block; font-size:13px; line-height:1.5; color:var(--muted-fg) }
.howlist .btn { flex:none }
/* «Ihre Diktate» */
.dlg.dict { width:min(760px, 100%) }
.dict .dlg-head .btn { flex:none }
.dlink { margin:0 0 12px; padding:10px 12px; border-radius:12px; font-size:13.5px; line-height:1.5; background:color-mix(in oklab, var(--primary) 8%, transparent); color:var(--fg) }
.dgroup { margin:0 0 12px; padding:4px 14px 2px; border-radius:14px; border:1px solid var(--hair); background:var(--fill) }
.dgroup h3 { margin:10px 0 0; font-size:14px; font-weight:600 }
.dgroup h3 span { margin-left:4px; font-size:12.5px; font-weight:400; color:var(--muted-fg) }
.dentry .dk { margin:0 0 3px; font-size:12.5px; line-height:1.45; color:var(--muted-fg) }
.dentry .dk b { color:var(--fg); font-weight:600 }
.dentry .dstate { color:var(--primary-ink); font-weight:500 }
.dentry .q { font-size:14px }
.dentry .src { margin:4px 0 8px }
/* «Neues Diktat» and «Formular erkannt»: short dialogs with readable text */
.set .rtx { margin:12px 0 0; font-size:14px; line-height:1.55; color:var(--fg) }
.set .rtx.muted { font-size:13px; color:var(--muted-fg) }
.set .rtx b { font-weight:600 }
.set.rec .row, .set.drp .row { margin-top:16px }
@media (max-width:760px) {
  .howlist li { flex-wrap:wrap; gap:8px 12px }
  .howlist .btn { margin-left:34px }
  .how { padding:14px 14px 8px }
  .dgroup { padding:2px 12px 2px }
  .dict .dlg-head { flex-wrap:wrap; padding:12px 12px 10px 16px }
  .dict .dlg-head .k { flex:1 1 100% }
}
@media (prefers-reduced-motion:reduce) { * { transition:none !important; animation-duration:.01s !important } }
