/* SaidSpec clickable prototype. Premium pro tool, Graphite + Signal (from design/hifi/hifi.css).
   Signal (#ff6b4a family) means "needs you" and nothing else.
   Radius rule: 6px controls, 10px panels and cards, full pill for status pills and kbd-free chips. */

/* ---------- Tokens ---------- */
:root {
  --deep: #24262d;
  --paper: #f7f7f6;
  --white: #ffffff;
  --signal: #ff6b4a;
  --signal-soft: #ffe0d8;
  --signal-ink: #a3321a;

  --bg: var(--paper);
  --surface: var(--white);
  --border: #e6e5e2;
  --sunken: #f0f0ee;
  --hover: color-mix(in oklab, var(--deep) 5%, var(--white));
  --selected: color-mix(in oklab, var(--deep) 7%, var(--white));
  --line: var(--border);
  --line-soft: #eeedea;
  --line-strong: #d2d1cd;
  --text: var(--deep);
  --text-2: #666872;
  --text-3: #6e707a; /* brief proposed #858791 (3.4:1 on paper); darkened to pass 4.5:1 */
  --strong: var(--deep);
  --on-strong: var(--white);
  --sig-bg: var(--signal-soft);
  --sig-bg-2: color-mix(in oklab, var(--signal-soft) 45%, var(--white));
  --sig-text: var(--signal-ink);
  --sig-line: color-mix(in oklab, var(--signal) 42%, var(--paper));
  --mark: color-mix(in oklab, var(--deep) 9%, var(--white));
  --avatar-1: var(--deep);
  --avatar-2: color-mix(in oklab, var(--deep) 78%, var(--paper));
  --avatar-3: color-mix(in oklab, var(--deep) 34%, var(--paper));
  --avatar-4: color-mix(in oklab, var(--deep) 22%, var(--paper));
  --avatar-5: color-mix(in oklab, var(--deep) 13%, var(--paper));
  --shadow-sm: 0 2px 8px rgb(36 38 45 / 0.04);
  --shadow-md: 0 1px 2px rgb(36 38 45 / 0.06), 0 8px 24px -8px rgb(36 38 45 / 0.12);
  --shadow-lg: 0 2px 4px rgb(36 38 45 / 0.06), 0 32px 80px -20px rgb(36 38 45 / 0.35);
  --scrim: rgb(36 38 45 / 0.48);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--signal-ink);
  --primary-hover: #f2603f; /* graphite text keeps 4.7:1 */
  --primary-active: #e85b3d;
  /* Status: colour plus a label and glyph, never colour alone */
  --ok: #237a52; --ok-bg: #e5f3ea; --ok-line: #bfdfca;
  --warn: #8a5a00; --warn-bg: #fff1cc;
  --bad: #b42318; --bad-bg: #fde8e7; --bad-line: #f5c2be;
  --info: #425466; --info-bg: #eaf0f5;

  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px;
  --r-ctl: 6px; --r-panel: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: color-mix(in oklab, var(--deep) 66%, black);
    --surface: color-mix(in oklab, var(--deep) 82%, black);
    --sunken: color-mix(in oklab, var(--deep) 58%, black);
    --hover: color-mix(in oklab, var(--deep) 92%, var(--paper) 8%);
    --selected: color-mix(in oklab, var(--deep) 86%, var(--paper) 14%);
    --line: rgb(247 247 246 / 0.08);
    --line-soft: rgb(247 247 246 / 0.05);
    --line-strong: rgb(247 247 246 / 0.15);
    --text: var(--paper);
    --text-2: color-mix(in oklab, var(--paper) 72%, var(--deep));
    --text-3: color-mix(in oklab, var(--paper) 52%, var(--deep));
    --strong: var(--paper);
    --on-strong: var(--deep);
    --sig-bg: color-mix(in oklab, var(--signal) 15%, var(--surface));
    --sig-bg-2: color-mix(in oklab, var(--signal) 8%, var(--surface));
    --sig-text: color-mix(in oklab, var(--signal) 74%, var(--paper));
    --sig-line: color-mix(in oklab, var(--signal) 45%, var(--surface));
    --mark: rgb(247 247 246 / 0.1);
    --avatar-1: var(--paper);
    --avatar-2: color-mix(in oklab, var(--paper) 78%, var(--deep));
    --avatar-3: color-mix(in oklab, var(--paper) 30%, var(--deep));
    --avatar-4: color-mix(in oklab, var(--paper) 22%, var(--deep));
    --avatar-5: color-mix(in oklab, var(--paper) 15%, var(--deep));
    --shadow-sm: 0 0 0 1px rgb(0 0 0 / 0.2);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 0 0 1px rgb(247 247 246 / 0.08), 0 32px 80px -16px rgb(0 0 0 / 0.7);
    --scrim: rgb(8 9 11 / 0.6);
    --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--sig-text);
    --primary-hover: #f2603f; --primary-active: #e85b3d;
    --ok: #6fcf97; --ok-bg: color-mix(in oklab, #237a52 28%, var(--surface)); --ok-line: color-mix(in oklab, #6fcf97 35%, var(--surface));
    --warn: #f0be5a; --warn-bg: color-mix(in oklab, #8a5a00 30%, var(--surface));
    --bad: #f4867c; --bad-bg: color-mix(in oklab, #b42318 26%, var(--surface)); --bad-line: color-mix(in oklab, #f4867c 35%, var(--surface));
    --info: #a9b8c8; --info-bg: color-mix(in oklab, #425466 35%, var(--surface));
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: color-mix(in oklab, var(--deep) 66%, black);
  --surface: color-mix(in oklab, var(--deep) 82%, black);
  --sunken: color-mix(in oklab, var(--deep) 58%, black);
  --hover: color-mix(in oklab, var(--deep) 92%, var(--paper) 8%);
  --selected: color-mix(in oklab, var(--deep) 86%, var(--paper) 14%);
  --line: rgb(247 247 246 / 0.08);
  --line-soft: rgb(247 247 246 / 0.05);
  --line-strong: rgb(247 247 246 / 0.15);
  --text: var(--paper);
  --text-2: color-mix(in oklab, var(--paper) 72%, var(--deep));
  --text-3: color-mix(in oklab, var(--paper) 52%, var(--deep));
  --strong: var(--paper);
  --on-strong: var(--deep);
  --sig-bg: color-mix(in oklab, var(--signal) 15%, var(--surface));
  --sig-bg-2: color-mix(in oklab, var(--signal) 8%, var(--surface));
  --sig-text: color-mix(in oklab, var(--signal) 74%, var(--paper));
  --sig-line: color-mix(in oklab, var(--signal) 45%, var(--surface));
  --mark: rgb(247 247 246 / 0.1);
  --avatar-1: var(--paper);
  --avatar-2: color-mix(in oklab, var(--paper) 78%, var(--deep));
  --avatar-3: color-mix(in oklab, var(--paper) 30%, var(--deep));
  --avatar-4: color-mix(in oklab, var(--paper) 22%, var(--deep));
  --avatar-5: color-mix(in oklab, var(--paper) 15%, var(--deep));
  --shadow-sm: 0 0 0 1px rgb(0 0 0 / 0.2);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -8px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 0 0 1px rgb(247 247 246 / 0.08), 0 32px 80px -16px rgb(0 0 0 / 0.7);
  --scrim: rgb(8 9 11 / 0.6);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--sig-text);
  --primary-hover: #f2603f; --primary-active: #e85b3d;
  --ok: #6fcf97; --ok-bg: color-mix(in oklab, #237a52 28%, var(--surface)); --ok-line: color-mix(in oklab, #6fcf97 35%, var(--surface));
  --warn: #f0be5a; --warn-bg: color-mix(in oklab, #8a5a00 30%, var(--surface));
  --bad: #f4867c; --bad-bg: color-mix(in oklab, #b42318 26%, var(--surface)); --bad-line: color-mix(in oklab, #f4867c 35%, var(--surface));
  --info: #a9b8c8; --info-bg: color-mix(in oklab, #425466 35%, var(--surface));
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.5 var(--font); letter-spacing: -0.005em; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  
}
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-ctl); }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
b, strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i.lg { width: 20px; height: 20px; stroke-width: 1.75; }
svg.i.sm { width: 14px; height: 14px; }

/* ---------- Logo ---------- */
.logo { color: var(--text); flex: none; display: block; }
.logo .dot { fill: var(--signal); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; letter-spacing: 0.06em; }


::selection { background: color-mix(in oklab, var(--text) 18%, transparent); color: var(--text); }
textarea, input { caret-color: var(--signal); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.h1, .h2, .d-title { text-wrap: balance; }
.d-statement, .ask p, .quote blockquote { text-wrap: pretty; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 13px; border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-sm);
  font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background 0.15s var(--ease), transform 0.1s var(--ease);
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn.strong { background: var(--strong); color: var(--on-strong); box-shadow: none; }
.btn.primary { background: var(--signal); color: var(--deep); box-shadow: inset 0 0 0 1px rgb(36 38 45 / 0.08), 0 1px 2px rgb(163 50 26 / 0.25); font-weight: 600; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.primary:active { background: var(--primary-active); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn[disabled], .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.btn.lg { height: 42px; padding: 0 16px; font-size: 14.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn .kbd { margin-left: 2px; }

.kbd {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 4px; font: 500 11.5px/1 var(--mono); color: var(--text-2);
  background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line), inset 0 -1px 0 var(--line);
}
.btn.strong .kbd { background: rgb(255 255 255 / 0.14); color: rgb(255 255 255 / 0.75); box-shadow: none; }
:root[data-theme="dark"] .btn.strong .kbd { background: rgb(36 38 45 / 0.12); color: rgb(36 38 45 / 0.7); }
.btn.primary .kbd { background: rgb(36 38 45 / 0.12); color: rgb(36 38 45 / 0.72); box-shadow: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--sunken); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line);
}
.pill.signal { background: var(--sig-bg); color: var(--sig-text); box-shadow: inset 0 0 0 1px var(--sig-line); }
.pill.solid-signal { background: var(--signal); color: var(--deep); box-shadow: none; font-weight: 600; }
.pill.done { color: var(--ok); background: var(--ok-bg); box-shadow: inset 0 0 0 1px var(--ok-line); }
.pill.rejected { color: var(--bad); background: var(--bad-bg); box-shadow: inset 0 0 0 1px var(--bad-line); }
.pill svg.i { width: 12px; height: 12px; stroke-width: 2; }

.type { font-size: 12.5px; color: var(--text-2); font-weight: 500; white-space: nowrap; }

/* Review glyph: the state, at a glance */
.glyph { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 999px; }
.glyph.pending { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.glyph.needs { box-shadow: inset 0 0 0 1.5px var(--signal); position: relative; }
.glyph.needs::after { content: ""; width: 6px; height: 6px; border-radius: 99px; background: var(--signal); }
.glyph.done { background: var(--ok); color: var(--surface); }
.glyph.done svg { width: 11px; height: 11px; stroke-width: 3; }
.glyph.rejected { box-shadow: inset 0 0 0 1.5px var(--bad); color: var(--bad); }
.glyph.rejected svg { width: 10px; height: 10px; stroke-width: 2.6; }

.avatar {
  width: 24px; height: 24px; border-radius: 999px; flex: none; display: grid; place-items: center;
  font: 600 11px/1 var(--mono); letter-spacing: -0.02em; color: var(--surface); background: var(--avatar-1);
}
.avatar.a2 { background: var(--avatar-2); } .avatar.a3 { background: var(--avatar-3); color: var(--text); }
.avatar.a4 { background: var(--avatar-4); color: var(--text); } .avatar.a5 { background: var(--avatar-5); color: var(--text); }
.avatar.lg { width: 30px; height: 30px; font-size: 11.5px; }
.stack-av { display: inline-flex; }
.stack-av .avatar { box-shadow: 0 0 0 2px var(--bg); }
.stack-av .avatar + .avatar { margin-left: -2px; }

.chip-time {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 5px; border-radius: 5px;
  background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2);
  font: 500 12px/1 var(--mono); font-variant-numeric: tabular-nums;
}
.chip-time svg { width: 10px; height: 10px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.field { display: grid; gap: 6px; }
.field label, .label { font-size: 13px; font-weight: 500; color: var(--text); }
.input, .textarea {
  width: 100%; border: 0; border-radius: var(--r-ctl); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); padding: 9px 11px; font-size: 14.5px; color: var(--text);
  transition: box-shadow 0.15s var(--ease);
}
.input { height: 40px; }
.textarea { resize: none; line-height: 1.55; min-height: 80px; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .input.is-focus, .textarea.is-focus { outline: none; box-shadow: inset 0 0 0 1px var(--text-2), 0 0 0 3px var(--line); }
.help { font-size: 13px; line-height: 1.5; color: var(--text-2); }

.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { height: 28px; padding: 0 11px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.seg .n { font-size: 11.5px; color: var(--text-3); font-family: var(--mono); }
.seg .n.sig { color: var(--sig-text); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.box { width: 16px; height: 16px; border-radius: 4px; flex: none; margin-top: 1px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); }
.box.on { background: var(--strong); box-shadow: none; color: var(--on-strong); }
.box svg { width: 12px; height: 12px; stroke-width: 3; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: var(--s5);
  padding: 14px 12px 12px; border-right: 1px solid var(--line); background: var(--bg);
}
.side .brand { padding: 2px 6px; }
.proj {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.proj .proj-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--strong); color: var(--on-strong); display: grid; place-items: center; font: 600 11.5px/1 var(--font); letter-spacing: 0.02em; flex: none; }
.proj b { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.proj span { display: block; font-size: 12.5px; color: var(--text-2); line-height: 1.3; }
.proj .i { margin-left: auto; color: var(--text-3); }
.nav { display: grid; gap: 1px; }
.nav-h { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 0 8px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: var(--r-ctl); color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a[aria-current="page"] { background: var(--selected); color: var(--text); }
.nav a .count { margin-left: auto; font: 500 12px var(--mono); color: var(--text-3); }
.nav a .count.sig { color: var(--sig-text); }
.nav a .date { margin-left: auto; font: 500 11.5px var(--mono); color: var(--text-3); }
.nav a .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; border-top: 1px solid var(--line); padding-top: 12px; }
.side-foot .who { line-height: 1.25; min-width: 0; }
.side-foot .who b { display: block; font-weight: 500; font-size: 13.5px; }
.side-foot .who span { font-size: 12.5px; color: var(--text-2); }
.side-foot .btn { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.bar {
  height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
}
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; min-width: 0; }
.crumbs .sep { color: var(--text-3); }
.crumbs b { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; height: 30px; width: 240px; padding: 0 6px 0 10px; border-radius: var(--r-ctl);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); font-size: 13px;
}
.search .kbd { margin-left: auto; }
.mbar { display: none; }

.page { padding: 28px 32px 48px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; justify-content: space-between; }
.h1 { font-size: 27px; line-height: 1.15; font-weight: 600; letter-spacing: -0.024em; }
.h2 { font-size: 18px; line-height: 1.3; font-weight: 600; letter-spacing: -0.016em; }
.sub { margin-top: 6px; color: var(--text-2); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }

/* Story line: one sentence, numbers carry the weight */
.story { display: block; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.story b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.story .sig { color: var(--sig-text); }
.story .dotsep { display: inline-block; vertical-align: middle; margin: 0 10px; width: 3px; height: 3px; border-radius: 9px; background: var(--line-strong); }

/* ---------- Meetings ---------- */
.overview { margin-top: 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.needs-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px;
  background: var(--sig-bg); color: var(--sig-text); box-shadow: inset 0 0 0 1px var(--sig-line); font-weight: 500; font-size: 13.5px;
}
.needs-pill .n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--signal); color: var(--deep); font: 600 11px/1 var(--mono); }
.needs-pill .i { width: 14px; height: 14px; }

.mtable { margin-top: 20px; border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); overflow: hidden; }
.mrow, .mhead {
  display: grid; align-items: center; gap: 16px; padding: 0 18px;
  grid-template-columns: minmax(0, 1.7fr) 64px 92px 60px 92px minmax(130px, 1fr) 96px 16px;
}
.mhead { height: 36px; font-size: 12.5px; color: var(--text-3); font-weight: 500; border-bottom: 1px solid var(--line); background: var(--sunken); }
.mhead .r, .mrow .r { text-align: right; justify-self: end; }
.mrow { min-height: 68px; border-bottom: 1px solid var(--line-soft); transition: background 0.15s var(--ease); }
.mrow:last-child { border-bottom: 0; }
.mrow:hover, .mrow.is-hover { background: var(--hover); }
.mrow .t b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -0.012em; }
.mrow .t span { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.mrow .cell-n { font-size: 14px; font-variant-numeric: tabular-nums; }
.mrow .zero { color: var(--text-3); }
.need-n { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--sig-text); font-variant-numeric: tabular-nums; }
.need-n::before { content: ""; width: 6px; height: 6px; border-radius: 9px; background: var(--signal); }
.prog { display: flex; align-items: center; gap: 10px; }
.prog .bars { flex: 1; display: flex; height: 6px; gap: 2px; min-width: 60px; }
.prog .bars i { display: block; height: 100%; border-radius: 2px; }
.prog .bars .b-done { background: var(--ok); }
.prog .bars .b-need { background: var(--signal); }
.prog .bars .b-pend { background: var(--line-strong); }
.prog .pct { font: 500 12px var(--mono); color: var(--text-2); min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.mrow .chev { color: var(--text-3); }
.mrow.is-new { background: var(--sunken); }
.legend { margin-top: 12px; display: flex; gap: 16px; align-items: center; color: var(--text-3); font-size: 12.5px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 6px; border-radius: 2px; display: inline-block; }
.legend .kbds { margin-left: auto; display: inline-flex; gap: 12px; }

.empty-hint { margin-top: 32px; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--r-panel); border: 1px dashed var(--line-strong); color: var(--text-2); }
.empty-hint .ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.empty-hint b { color: var(--text); font-weight: 500; display: block; }

/* ---------- Report ---------- */
.report { display: grid; grid-template-columns: minmax(0, 1fr) 520px; min-height: calc(100dvh - 52px); }
.report-main { min-width: 0; padding: 24px 28px 48px; }
.meta-row { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); font-size: 13.5px; }
.meta-row .item { display: inline-flex; align-items: center; gap: 6px; }

.tiles { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile {
  position: relative; padding: 12px 14px 12px; border-radius: var(--r-panel); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); overflow: hidden;
}
.tile .t-label { font-size: 13px; color: var(--text-2); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.tile .t-num { display: block; margin-top: 8px; font-size: 30px; line-height: 1; font-weight: 600; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.tile .t-sub { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: var(--text-3); font-weight: 500; min-height: 16px; }
.tile.sig { box-shadow: inset 0 0 0 1px var(--sig-line), var(--shadow-sm); }
.tile.sig .t-sub { color: var(--sig-text); font-weight: 500; }
.tile .minibar { display: flex; gap: 2px; margin-top: 10px; height: 4px; }
.tile .minibar i { flex: 1; border-radius: 2px; background: var(--line); }
.tile .minibar i.d { background: var(--ok); }
.tile .minibar i.n { background: var(--signal); }

.story-row { margin-top: 18px; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.filters { margin-top: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters .spacer { flex: 1; }
.filters .hint { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; }

.groups { margin-top: 14px; display: grid; gap: 18px; }
.group-h { display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 4px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.group-h .n { font: 500 12px var(--mono); color: var(--text-3); }
.group-h.sig { color: var(--sig-text); }
.group-h.sig .n { color: var(--sig-text); }
.list { margin-top: 4px; border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); overflow: hidden; }
.list.sig { box-shadow: inset 0 0 0 1px var(--sig-line), var(--shadow-sm); }
.row {
  position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  min-height: 46px; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--hover); }
.row .title { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.005em; }
.row .rmeta { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.row .rmeta .type { color: var(--text-2); }
.row .conf { font: 500 12px var(--mono); color: var(--text-3); width: 34px; text-align: right; }
.row.selected { background: var(--selected); }
.row.selected { box-shadow: inset 0 0 0 1px var(--line-strong); z-index: 1; }
.row.is-rejected .title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.row .edited { font-size: 12px; color: var(--text-3); }

/* Detail pane */
.detail { border-left: 1px solid var(--line); background: var(--surface); position: sticky; top: 52px; height: calc(100dvh - 52px); display: flex; flex-direction: column; min-width: 0; }
.d-top { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.d-top .spacer { flex: 1; }
.d-top .navk { display: inline-flex; gap: 4px; align-items: center; color: var(--text-3); font-size: 12.5px; margin-right: 4px; }
.d-scroll { flex: 1; overflow: auto; padding: 22px 24px 28px; display: grid; gap: 24px; align-content: start; scrollbar-width: thin; }
.d-title { font-size: 21px; line-height: 1.28; font-weight: 600; letter-spacing: -0.02em; }
.d-statement { margin-top: 10px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); max-width: 62ch; }
.ai-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--text-3); margin-top: 14px; }
.ai-note svg { margin-top: 2px; }
.ai-note .conf { font: 500 12px var(--mono); color: var(--text-2); }
.sec-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 10px; }
.sec-h .n { font: 500 12px var(--mono); color: var(--text-3); }

.evid { display: grid; gap: 10px; }
.quote {
  border-radius: var(--r-panel); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px 12px;
}
.quote-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.quote-h b { font-weight: 500; color: var(--text); }
.quote-h .seg-id { margin-left: auto; color: var(--text-3); }
.quote blockquote, .was blockquote, .now blockquote { position: relative; margin-top: 10px; font-size: 15.5px; line-height: 1.65; color: var(--text-2); padding-left: 18px; }
.quote blockquote::before, .was blockquote::before, .now blockquote::before { content: "“"; position: absolute; left: -1px; top: -3px; font-size: 30px; line-height: 1; font-weight: 600; color: var(--text-3); top: -4px; }
.quote blockquote mark { background: var(--mark); color: var(--text); font-weight: 500; border-radius: 3px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.ask { border-radius: var(--r-panel); background: var(--sig-bg-2); box-shadow: inset 0 0 0 1px var(--sig-line); padding: 12px 14px; }
.ask .sec-h { color: var(--sig-text); margin-bottom: 6px; }
.ask p { font-size: 15.5px; line-height: 1.6; color: var(--text); }
.ask .btn { height: 26px; font-size: 12px; padding: 0 8px; }
.answered { border-radius: var(--r-panel); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; }
.answered p { font-size: 15.5px; line-height: 1.6; }

.d-foot { flex: none; border-top: 1px solid var(--line); padding: 14px 20px 16px; display: grid; gap: 12px; background: var(--surface); }
.d-foot .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-foot .acts .spacer { flex: 1; }
.d-foot .lock { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 10px; border-radius: 10px;
  background: var(--strong); color: var(--on-strong); font-weight: 500; box-shadow: var(--shadow-lg); pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .glyph.done { background: var(--on-strong); color: var(--strong); }

/* ---------- Processing modal ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; backdrop-filter: blur(2px); }
.modal {
  position: fixed; z-index: 21; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.m-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 14px 20px; border-bottom: 1px solid var(--line); }
.m-head .h2 { font-size: 16px; }
.m-head .spacer { flex: 1; }
.m-body { padding: 18px 20px; display: grid; gap: 16px; overflow: auto; }
.file { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-panel); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.file .ico { width: 34px; height: 34px; border-radius: 8px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--text-2); }
.file b { display: block; font-weight: 500; font-size: 14px; }
.file span { font-size: 12.5px; color: var(--text-2); }
.wave { display: flex; gap: 2px; align-items: center; height: 22px; }
.wave i { width: 2px; border-radius: 2px; background: var(--line-strong); }
.consent { padding: 2px 2px 0; }
.consent .help { margin-top: 2px; margin-left: 26px; }

.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: center; height: 40px; position: relative; }
.step + .step::before { content: ""; position: absolute; left: 9.5px; top: -10px; height: 20px; width: 1px; background: var(--line-strong); }
.step .st { width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); position: relative; z-index: 1; }
.step .st svg { width: 12px; height: 12px; stroke-width: 3; }
.step.done .st { background: var(--strong); color: var(--on-strong); box-shadow: none; }
.step.active .st { box-shadow: inset 0 0 0 1.5px var(--text); }
.step.active .st::after { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--text); }
.step.active .lbl { color: var(--text); }
.step .lbl { font-weight: 500; }
.step.todo .lbl { color: var(--text-3); }
.step .tm { font: 500 12px var(--mono); color: var(--text-3); }
.step .det { color: var(--text-3); font-weight: 400; margin-left: 8px; font-size: 13px; }

.arrive { border-radius: var(--r-panel); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.arrive-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--sunken); border-bottom: 1px solid var(--line); }
.arrive-h .spacer { flex: 1; }
.arrive-h .sig { color: var(--sig-text); }
.arrive ul { display: grid; }
.arrive li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 40px; padding: 6px 12px; border-bottom: 1px solid var(--line-soft); }
.arrive li:last-child { border-bottom: 0; }
.arrive li .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrive li.ghost .sk { height: 8px; border-radius: 4px; background: var(--line); width: 60%; }
.m-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg); }
.m-foot .spacer { flex: 1; }
.m-foot .note { font-size: 13px; color: var(--text-2); }

/* ---------- Register ---------- */
.banner { margin-top: 20px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-panel); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 13.5px; }
.banner b { color: var(--text); font-weight: 600; }
.change { margin-top: 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md); overflow: hidden; }
.change-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.change-h .h2 { font-size: 16px; }
.change-h .when { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); }
.side-c { padding: 16px 18px 18px; display: grid; gap: 10px; align-content: start; }
.side-c .top { display: flex; align-items: center; gap: 8px; }
.side-c .top .mono { margin-left: auto; color: var(--text-3); }
.side-c h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.was h3 { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.was blockquote, .now blockquote { margin-top: 0; font-size: 15px; }
.now blockquote { color: var(--text); }
.was { background: var(--bg); }
.src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.link-col { display: grid; place-items: center; position: relative; background: linear-gradient(90deg, var(--bg) 50%, var(--surface) 50%); }
.link-col::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: var(--line); }
.link-node { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow-sm); display: grid; place-items: center; color: var(--text); }
.link-node .i { width: 14px; height: 14px; }
.added-by { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }

.reg-tools { margin-top: 28px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reg-tools .spacer { flex: 1; }
.reg-group { margin-top: 20px; }
.reg-group .group-h { padding: 0 2px; }
.reg-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) 230px 104px; gap: 12px; align-items: center; min-height: 44px; padding: 6px 14px; border-bottom: 1px solid var(--line-soft); }
.reg-row:last-child { border-bottom: 0; }
.reg-row .title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-row .from { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); overflow: hidden; white-space: nowrap; }
.reg-row .from .mono { color: var(--text-3); }
.reg-row .st { justify-self: end; }
.reg-row.superseded .title { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100dvh; }
.login-form { display: flex; flex-direction: column; padding: 28px 40px; }
.login-form .inner { margin: auto; width: 100%; max-width: 360px; display: grid; gap: 24px; }
.login-form .h1 { font-size: 30px; letter-spacing: -0.026em; }
.login-form .foot { display: flex; justify-content: space-between; color: var(--text-3); font-size: 13px; }
.sent { display: none; gap: 10px; padding: 14px; border-radius: var(--r-panel); background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.sent b { font-weight: 600; }
.login.is-sent .sent { display: grid; }
.login.is-sent form { display: none; }
.promise { position: relative; background: var(--deep); color: var(--paper); padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; gap: 28px; overflow: hidden; border-left: 1px solid var(--line); }
:root[data-theme="dark"] .promise { background: color-mix(in oklab, var(--deep) 82%, black); }
.promise .ph { font-size: 36px; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; max-width: 20ch; text-wrap: balance; }
.promise .pp { font-size: 16px; line-height: 1.6; color: color-mix(in oklab, var(--paper) 70%, var(--deep)); max-width: 42ch; }
.promise .card { --bg: #1b1d22; color-scheme: dark; border-radius: 12px; background: #2b2d35; box-shadow: 0 0 0 1px rgb(247 247 246 / 0.08), 0 40px 80px -20px rgb(0 0 0 / 0.6); padding: 16px 18px; display: grid; gap: 12px; max-width: 460px; color: var(--paper); }
.promise .card .type, .promise .card .quote-h { color: color-mix(in oklab, var(--paper) 70%, var(--deep)); }
.promise .card .quote-h b { color: var(--paper); }
.promise .card .quote { background: #24262d; box-shadow: inset 0 0 0 1px rgb(247 247 246 / 0.08); }
.promise .card .quote blockquote { color: color-mix(in oklab, var(--paper) 70%, var(--deep)); }
.promise .card .quote blockquote mark { background: rgb(247 247 246 / 0.12); color: var(--paper); }
.promise .card .chip-time { background: rgb(247 247 246 / 0.06); box-shadow: inset 0 0 0 1px rgb(247 247 246 / 0.1); color: color-mix(in oklab, var(--paper) 75%, var(--deep)); }
.promise .card .pill.signal { background: color-mix(in oklab, var(--signal) 18%, #2b2d35); color: color-mix(in oklab, var(--signal) 74%, var(--paper)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--signal) 45%, #2b2d35); }
.promise .card .avatar { background: var(--paper); color: var(--deep); }
.promise .card .avatar.a3 { background: color-mix(in oklab, var(--paper) 60%, var(--deep)); }
.promise .card .who-confirms { display: flex; align-items: center; gap: 8px; font-size: 13px; color: color-mix(in oklab, var(--paper) 62%, var(--deep)); padding-top: 10px; border-top: 1px solid rgb(247 247 246 / 0.08); }
.promise .card .mono { color: color-mix(in oklab, var(--paper) 55%, var(--deep)); }
.promise .card .glyph.needs { box-shadow: inset 0 0 0 1.5px var(--signal); }
.promise .ptitle { font-size: 16px; font-weight: 600; color: var(--paper); letter-spacing: -0.01em; }
.promise .pts { display: grid; gap: 10px; max-width: 460px; }
.promise .pts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: color-mix(in oklab, var(--paper) 72%, var(--deep)); font-size: 13.5px; }
.promise .pts li b { color: var(--paper); font-weight: 600; }
.promise .pts .k { font: 500 11px/20px var(--mono); color: color-mix(in oklab, var(--paper) 45%, var(--deep)); }

/* ---------- Motion ----------
   Motion only when data changes (motion.js: count-up, FLIP, arrivals). Nothing plays on a plain re-render. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.detail-scrim { display: none; }

/* ---------- Responsive (390px target) ---------- */
@media (max-width: 1180px) {
  .report { grid-template-columns: minmax(0, 1fr) 440px; }
  .mrow, .mhead { grid-template-columns: minmax(0, 1.6fr) 56px 84px 52px 84px minmax(110px, 1fr) 90px 16px; gap: 12px; }
}
@media (max-width: 860px) {
  body { font-size: 14px; }
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .bar { display: none; }
  .mbar {
    display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; position: sticky; top: 0; z-index: 5;
    border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 90%, transparent); backdrop-filter: blur(10px);
  }
  .mbar .ttl { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mbar .spacer { flex: 1; }
  .page { padding: 20px 16px 40px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .btn.desk { display: none; }
  .h1 { font-size: 22px; }
  .overview { grid-template-columns: 1fr; padding: 14px; }
  .mtable { background: transparent; box-shadow: none; overflow: visible; }
  #mrows { display: grid; gap: 10px; }
  .overview .needs-pill { justify-self: start; }
  .mhead { display: none; }
  .mrow {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t st" "p p" "n n"; gap: 10px 12px; padding: 14px;
    border-radius: var(--r-panel); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); border: 0;
  }
  .mrow .t { grid-area: t; } .mrow .st { grid-area: st; align-self: start; }
  .mrow .prog { grid-area: p; }
  .mrow .mob-nums { grid-area: n; display: flex !important; gap: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
  .mrow .mob-nums b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
  .mrow .c-dur, .mrow .c-sp, .mrow .c-items, .mrow .c-need, .mrow .chev { display: none; }
  .legend .kbds { display: none; }
  .empty-hint { grid-template-columns: auto 1fr; }
  .empty-hint .btn { grid-column: 1 / -1; }

  .report { grid-template-columns: 1fr; }
  .report-main { padding: 18px 16px 40px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .t-num { font-size: 26px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .filters .hint { display: none; }
  .row .rmeta .type { display: none; }
  .detail {
    position: fixed; inset: auto 0 0 0; top: 72px; height: auto; z-index: 30; border-left: 0;
    border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg);
  }
  .detail::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 9px; background: var(--line-strong); }
  .detail-scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 29; }
  .d-top { padding: 8px 12px 0 16px; height: 52px; }
  .d-top .navk { display: none; }
  .d-scroll { padding: 16px; }
  .d-foot { padding: 12px 16px 16px; }
  .d-foot .kbd, .btn .kbd { display: none; }

  .modal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: calc(100dvh - 40px); border-radius: 16px 16px 0 0; }
  .m-body { padding: 16px; }
  .file { grid-template-columns: auto 1fr; }
  .file .wave { display: none; }
  .m-foot { padding: 12px 16px 16px; flex-wrap: wrap; }
  .m-foot .note { flex-basis: 100%; }

  .pair { grid-template-columns: 1fr; }
  .link-col { height: 36px; background: linear-gradient(var(--bg) 50%, var(--surface) 50%); }
  .link-col::before { top: 50%; bottom: auto; left: 0; right: 0; width: auto; height: 1px; }
  .change-h .when { margin-left: 0; }
  .change-h .glyph { display: none; }
  .reg-row { grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-areas: "g t st" ". f f"; row-gap: 2px; padding: 10px 14px; }
  .reg-row .glyph { grid-area: g; } .reg-row .title { grid-area: t; } .reg-row .from { grid-area: f; } .reg-row .st { grid-area: st; }
  .reg-tools .seg { overflow-x: auto; max-width: 100%; }

  .login { grid-template-columns: 1fr; }
  .login-form { padding: 20px 16px 28px; min-height: auto; }
  .login-form .inner { margin: 48px auto 32px; }
  .promise { padding: 32px 16px 36px; border-left: 0; }
  .promise .ph { font-size: 24px; }
}
.mob-nums { display: none; }
@media (max-width: 420px) {
  .search { display: none; }
  .tile { padding: 10px 12px; }
  .seg button { padding: 0 8px; }
}

/* Waiting on the client (meetings home) */
.waiting { margin-top: 28px; }
.waiting .wq { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.waiting .wq:last-child { border-bottom: 0; }
.waiting .wq p { font-size: 15px; line-height: 1.55; }
.waiting .wq .src { margin-top: 4px; }
.waiting .glyph { margin-top: 2px; }
@media (max-width: 860px) { .waiting .wq { grid-template-columns: 16px minmax(0, 1fr); } .waiting .wq .btn { display: none; } }

/* ---------- Prototype additions (interactive states the static mockups did not need) ---------- */
.brand .word { line-height: 1; }
.side-note { padding: 0 6px; font-size: 12px; line-height: 1.45; color: var(--text-3); }
.side-note .link { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.mbar nav { display: flex; gap: 2px; }
.mbar a[aria-current="page"] { background: var(--selected); color: var(--text); }
.mfoot, .mob-copy { display: none; }

/* Rows are buttons so the list works with a keyboard */
button.row { width: 100%; text-align: left; font: inherit; }
button.row:focus-visible { border-radius: 0; box-shadow: inset 0 0 0 2px var(--text-2); z-index: 2; }
.row.selected { background: var(--selected); box-shadow: inset 0 0 0 1px var(--line-strong); z-index: 1; }
.reg-row .title a:hover, .mrow:hover .t b { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.list .empty { padding: 18px 14px; color: var(--text-3); }
.groups > .empty { padding: 28px 4px; color: var(--text-3); }

/* Detail pane states */
.d-empty { margin: auto; display: grid; gap: 10px; justify-items: center; text-align: center; padding: 40px 32px; color: var(--text-3); max-width: 32ch; }
.d-empty .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.d-empty b { color: var(--text); font-weight: 500; }
.d-empty .keys { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; }
.orig { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.orig summary { cursor: pointer; width: max-content; }
.orig p { margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.reason { margin-top: 12px; font-size: 14px; color: var(--text-2); }
.d-foot .field label { font-size: 13px; }

/* Upload */
.drop { position: relative; grid-template-columns: auto minmax(0, 1fr); border: 1px dashed var(--line-strong); box-shadow: none; cursor: pointer; transition: background 0.15s var(--ease); }
.drop:hover, .drop.is-over { background: var(--hover); }
.drop:focus-within { box-shadow: var(--focus); }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop.has-file { border-style: solid; border-color: var(--line); }
select.input { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.check { position: relative; cursor: pointer; }
.check input { position: absolute; left: 0; top: 1px; width: 16px; height: 16px; margin: 0; opacity: 0; cursor: pointer; }
.check .box svg { opacity: 0; }
.check input:checked + .box { background: var(--strong); box-shadow: none; color: var(--on-strong); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--focus); }
.step .st svg { display: none; }
.step.done .st svg { display: block; }
.arrive li .type { font-size: 12.5px; }
.arrive .empty { padding: 12px; color: var(--text-3); font-size: 13px; }
.m-foot .note { min-height: 1.5em; }
.sample-btn { justify-self: start; height: 28px; margin-top: -8px; font-size: 13px; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.consent { border-radius: var(--r-panel); padding: 10px 12px; margin: 0 -12px; transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.consent.next { background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Toast doubles as the live region: always in the DOM, only visible while it has something to say */
.toast { height: auto; min-height: 38px; padding: 9px 14px; max-width: calc(100% - 32px); }
.copy-fallback { position: fixed; left: 16px; right: 16px; bottom: 80px; height: 140px; z-index: 40; }

@media (max-width: 860px) {
  .report:not(.has-detail) .detail, .report:not(.has-detail) .detail-scrim { display: none; }
  .mob-copy { display: block; }
  .mfoot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12.5px; }
  .waiting li:nth-child(n + 4) { display: none; }
}

/* ---------- Graphite sidebar ---------- */
.side {
  --bg: var(--deep); --surface: rgb(255 255 255 / 0.06); --sunken: rgb(255 255 255 / 0.05);
  --hover: rgb(255 255 255 / 0.07); --selected: rgb(255 255 255 / 0.11);
  --line: rgb(255 255 255 / 0.09); --line-strong: rgb(255 255 255 / 0.16);
  --text: var(--white); --text-2: rgb(255 255 255 / 0.74); --text-3: rgb(255 255 255 / 0.58);
  --strong: var(--paper); --on-strong: var(--deep); --sig-text: #ff9478;
  --shadow-sm: none; --focus: 0 0 0 2px var(--deep), 0 0 0 4px var(--signal);
  color: var(--text); border-right-color: var(--deep); color-scheme: dark;
}
.side .avatar { background: var(--paper); color: var(--deep); }
.side .nav a[aria-current="page"] svg { color: var(--signal); }
.side ::selection { background: rgb(255 255 255 / 0.2); color: var(--white); }
