/* BankOS Management Console. Tokens first; light by default, dark by preference or [data-theme]. */
:root {
  --bg: #f5f6f8; --surface: #ffffff; --raised: #fbfbfc; --sunken: #eef0f4; --line: #e3e6ec; --line-strong: #cfd4de;
  --ink: #141729; --ink-2: #3a4058; --muted: #6b7189; --faint: #9aa0b4;
  --accent: #3d4fe0; --accent-ink: #ffffff; --accent-soft: #e9ecff; --accent-line: #c5ccff;
  --ok: #138a5e; --ok-soft: #e3f5ed; --warn: #b4640a; --warn-soft: #fdf1e1; --info: #2a6fd6; --info-soft: #e5effd;
  --stale: #7a4bd1; --stale-soft: #f0eafc; --bad: #c4323f; --bad-soft: #fbe9eb; --pending: #9aa0b4;
  --brand: #1b1f3b; --brand-2: #2b3170; --brand-glow: #5ee0b0;
  --shadow-1: 0 1px 2px rgba(20, 23, 41, .06), 0 1px 1px rgba(20, 23, 41, .04);
  --shadow-2: 0 8px 24px -8px rgba(20, 23, 41, .18), 0 2px 6px rgba(20, 23, 41, .06);
  --shadow-3: 0 24px 64px -16px rgba(20, 23, 41, .32);
  --r-1: 6px; --r-2: 10px; --r-3: 14px;
  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --top: 60px; --side: 340px; --rail: 380px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1020; --surface: #15182b; --raised: #191d33; --sunken: #0b0d1a; --line: #262b45; --line-strong: #353b5c;
    --ink: #eceefa; --ink-2: #c3c7dc; --muted: #9096b4; --faint: #646a8a;
    --accent: #8d9bff; --accent-ink: #0e1020; --accent-soft: #232a57; --accent-line: #3a4390;
    --ok: #4cd29a; --ok-soft: #12332a; --warn: #f0a54a; --warn-soft: #3a2a14; --info: #6fa8ff; --info-soft: #172a4a;
    --stale: #b393ff; --stale-soft: #2c2150; --bad: #ff7a85; --bad-soft: #3d1c22; --pending: #646a8a;
    --brand: #0b0d1a; --brand-2: #1d2250;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 10px 30px -10px rgba(0, 0, 0, .6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1020; --surface: #15182b; --raised: #191d33; --sunken: #0b0d1a; --line: #262b45; --line-strong: #353b5c;
  --ink: #eceefa; --ink-2: #c3c7dc; --muted: #9096b4; --faint: #646a8a;
  --accent: #8d9bff; --accent-ink: #0e1020; --accent-soft: #232a57; --accent-line: #3a4390;
  --ok: #4cd29a; --ok-soft: #12332a; --warn: #f0a54a; --warn-soft: #3a2a14; --info: #6fa8ff; --info-soft: #172a4a;
  --stale: #b393ff; --stale-soft: #2c2150; --bad: #ff7a85; --bad-soft: #3d1c22; --pending: #646a8a;
  --brand: #0b0d1a; --brand-2: #1d2250;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 10px 30px -10px rgba(0, 0, 0, .6); --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box }
html, body, #root { height: 100% }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility }
button, input, textarea, select { font: inherit; color: inherit }
button { cursor: pointer }
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px }
.mono { font-family: var(--f-mono); font-size: .86em }
.muted { color: var(--muted) }
.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.8; stroke-linecap: round; stroke-linejoin: round }

/* ---------------------------------------------------------------- buttons, fields, pills */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-1); border: 1px solid var(--line-strong);
  background: var(--surface); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s }
.btn:hover { background: var(--raised); border-color: var(--faint) }
.btn:active { transform: translateY(1px) }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, var(--shadow-1) }
.btn.primary:hover { filter: brightness(1.06) }
.btn.ghost { border-color: transparent; background: transparent }
.btn.ghost:hover { background: var(--sunken) }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none }
.btn kbd, kbd { font: 500 11px var(--f-mono); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--sunken); color: var(--muted) }
.btn.primary kbd { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .3); color: inherit }
.field { display: grid; gap: 6px; margin-bottom: 14px }
.field label { font-weight: 600; font-size: 13px; color: var(--ink-2) }
.input, textarea.input, select.input { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-1); border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color .15s, box-shadow .15s }
textarea.input { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5 }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.hint { font-size: 12.5px; color: var(--muted) }
.error { color: var(--bad); font-size: 13px; font-weight: 500 }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--sunken); color: var(--ink-2) }
.pill .d { width: 7px; height: 7px; border-radius: 50% }
.st-pending { --c: var(--pending); --s: var(--sunken) }
.st-accepted { --c: var(--ok); --s: var(--ok-soft) }
.st-changes_requested { --c: var(--warn); --s: var(--warn-soft) }
.st-question { --c: var(--info); --s: var(--info-soft) }
.st-stale { --c: var(--stale); --s: var(--stale-soft) }
.pill[class*="st-"] { background: var(--s); color: var(--c) }
.pill[class*="st-"] .d { background: var(--c) }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; font: 500 11.5px var(--f-mono); background: var(--sunken); color: var(--ink-2);
  border: 1px solid var(--line) }
.tag.b-built { color: var(--ok); background: var(--ok-soft); border-color: transparent }
.tag.b-partial { color: var(--warn); background: var(--warn-soft); border-color: transparent }
.tag.b-not { color: var(--bad); background: var(--bad-soft); border-color: transparent }
.tag.b-planned { color: var(--stale); background: var(--stale-soft); border-color: transparent }

/* ---------------------------------------------------------------- sign-in */
.auth { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr) }
.auth-brand { position: relative; overflow: hidden; color: #eef0ff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 10% 110%, #3b3fd1 0%, transparent 55%), radial-gradient(900px 500px at 100% 0%, #1f8f74 0%, transparent 50%), linear-gradient(160deg, #141734, #0b0d1f) }
.auth-brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent) }
.auth-brand > * { position: relative; z-index: 1 }
.logo { display: flex; align-items: center; gap: 10px; font: 650 17px var(--f-display); letter-spacing: -.01em }
.logo img { width: 28px; height: 28px }
.logo small { font: 500 12px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .7 }
.auth-brand h1 { font: 650 clamp(32px, 4vw, 52px)/1.05 var(--f-display); letter-spacing: -.025em; margin: 0 0 18px; max-width: 14ch }
.auth-brand p { font-size: 16px; line-height: 1.6; max-width: 46ch; color: rgba(238, 240, 255, .78); margin: 0 }
.auth-stats { display: flex; gap: 36px; flex-wrap: wrap }
.auth-stats b { display: block; font: 650 30px var(--f-display); letter-spacing: -.02em }
.auth-stats span { font-size: 12.5px; color: rgba(238, 240, 255, .66) }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface) }
.auth-form form { width: min(380px, 100%) }
.auth-form h2 { font: 650 26px var(--f-display); letter-spacing: -.02em; margin: 0 0 6px }
.auth-form .lede { color: var(--muted); margin: 0 0 28px }
.auth-form .btn.primary { width: 100%; justify-content: center; height: 42px; margin-top: 6px }
.auth-foot { margin-top: 28px; font-size: 12.5px; color: var(--faint) }

/* ---------------------------------------------------------------- shell */
.shell { height: 100%; display: grid; grid-template-rows: var(--top) minmax(0, 1fr) }
.top { display: flex; align-items: center; gap: 14px; padding: 0 16px 0 18px; background: var(--brand); color: #eef0ff; position: relative; z-index: 5 }
.top .logo { min-width: calc(var(--side) - 34px) }
.nav { display: flex; gap: 2px; height: 100% }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: rgba(238, 240, 255, .7); font-weight: 600; font-size: 13.5px; position: relative; text-decoration: none }
.nav a:hover { color: #fff }
.nav a[aria-current="page"] { color: #fff }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--brand-glow) }
.nav a.soon { opacity: .55; cursor: default }
.nav a .badge { font: 600 10px var(--f-mono); letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, .12); text-transform: uppercase }
.top .grow { flex: 1 }
.release { display: flex; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1) }
.ring { --p: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand-glow) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0) }
.ring::before { content: attr(data-v); width: 26px; height: 26px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font: 600 9.5px var(--f-mono) }
.release .t { line-height: 1.2 } .release .t b { display: block; font-size: 12.5px } .release .t span { font: 500 11px var(--f-mono); opacity: .66 }
.top .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #eef0ff; height: 34px }
.top .btn:hover { background: rgba(255, 255, 255, .14) }
.top .btn.primary { background: var(--brand-glow); border-color: var(--brand-glow); color: #0b2a20 }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 650 12.5px var(--f-body); color: #0e1020; background: linear-gradient(135deg, #b9c3ff, #7fe3c0); border: 0 }
.menu { position: absolute; right: 12px; top: calc(var(--top) - 4px); width: 260px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow-3); padding: 6px; z-index: 20 }
.menu .who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px }
.menu .who b { display: block } .menu .who span { font-size: 12.5px; color: var(--muted) }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: var(--r-1); text-align: left; font-weight: 500 }
.menu button:hover { background: var(--sunken) }

.work { display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--rail); min-height: 0 }
.work.wide { grid-template-columns: var(--side) minmax(0, 1fr) }
.work.full { grid-template-columns: minmax(0, 1fr) }

/* ---------------------------------------------------------------- tree */
.side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line) }
.side-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); display: grid; gap: 10px }
.search { position: relative }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint) }
.search .input { padding-left: 34px; padding-right: 36px; height: 38px; background: var(--raised) }
.search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%) }
.filters { display: flex; gap: 4px; flex-wrap: wrap }
.filters button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--ink-2) }
.filters button .d { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--faint)) }
.filters button b { font: 500 11px var(--f-mono); color: var(--muted) }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg) }
.filters button[aria-pressed="true"] b { color: inherit; opacity: .7 }
.tree { flex: 1; overflow: auto; padding: 6px 6px 24px; scrollbar-gutter: stable }
.tree ul { list-style: none; margin: 0; padding: 0 }
.tree .sec { margin-top: 10px }
.tree .sec > .row { font: 600 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); height: 30px }
.tree .sec > .row:hover { color: var(--ink) }
.row { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 calc(6px + var(--lvl, 0) * 16px); border-radius: var(--r-1); cursor: pointer; user-select: none;
  position: relative; color: var(--ink-2) }
.row:hover { background: var(--sunken); color: var(--ink) }
.row[aria-selected="true"] { background: var(--accent-soft); color: var(--ink) }
.row[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 2px; background: var(--accent) }
.row.echo { background: color-mix(in srgb, var(--accent-soft) 45%, transparent) }
.row:focus-visible { outline-offset: -2px }
.row .tw { width: 16px; height: 16px; display: grid; place-items: center; color: var(--faint); flex: none; transition: transform .15s }
.row[aria-expanded="true"] > .tw { transform: rotate(90deg) }
.row .glyph { width: 16px; height: 16px; flex: none; display: grid; place-items: center }
.row .glyph i { width: 9px; height: 9px; border-radius: 50%; border: 1.8px solid var(--c); background: var(--fill, transparent) }
.row .glyph.st-accepted i, .row .glyph.st-changes_requested i, .row .glyph.st-question i, .row .glyph.st-stale i { --fill: var(--c) }
.row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px }
.row .nm .k { font: 500 11px var(--f-mono); color: var(--muted); margin-right: 6px }
.row .cnt { font: 500 11px var(--f-mono); color: var(--faint) }
.row .cnt.has { color: var(--warn) }
.row .mini { width: 34px; height: 4px; border-radius: 2px; background: var(--sunken); overflow: hidden; display: flex; flex: none }
.row .mini i { display: block; height: 100% }
.row mark { background: color-mix(in srgb, var(--warn) 30%, transparent); color: inherit; border-radius: 2px }
.tree-empty { padding: 24px 14px; color: var(--muted); text-align: center }
.side-foot { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted) }
.side-foot span { display: inline-flex; align-items: center; gap: 5px }
.side-foot i { width: 8px; height: 8px; border-radius: 50%; border: 1.6px solid var(--c); background: var(--fill, transparent) }

/* ---------------------------------------------------------------- main */
.main { overflow: auto; min-width: 0; scroll-behavior: smooth }
.page { max-width: 980px; margin: 0 auto; padding: 28px 36px 64px }
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 14px }
.crumbs a { color: var(--muted) } .crumbs a:hover { color: var(--accent) }
.crumbs svg { width: 12px; height: 12px; color: var(--faint) }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 11.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px }
h1.title { font: 650 34px/1.12 var(--f-display); letter-spacing: -.022em; margin: 0 0 12px }
.summary { font-size: 16.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 22px; max-width: 70ch }
.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 26px }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; margin: 0 0 28px }
.fact { padding: 14px 16px; min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line) }
.fact dt { font: 600 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px }
.fact dd { margin: 0; font-size: 14px; overflow-wrap: anywhere }
.fact.span { grid-column: 1 / -1 }
.chips { display: flex; flex-wrap: wrap; gap: 6px }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: var(--sunken); font-size: 12.5px; color: var(--ink-2); border: 1px solid transparent }
a.chip:hover { border-color: var(--accent-line); color: var(--accent); text-decoration: none; background: var(--accent-soft) }
a.chip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--faint)) }
h2.sh { display: flex; align-items: baseline; gap: 10px; font: 650 18px var(--f-display); letter-spacing: -.01em; margin: 30px 0 12px }
h2.sh small { font: 500 12px var(--f-body); color: var(--muted) }
.list { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); overflow: hidden }
.list a.li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none }
.list a.li:first-child { border-top: 0 }
.list a.li:hover { background: var(--raised) }
.list a.li .glyph i { display: block; width: 9px; height: 9px; border-radius: 50%; border: 1.8px solid var(--c); background: var(--fill, transparent) }
.list a.li .glyph.st-accepted i, .list a.li .glyph.st-changes_requested i, .list a.li .glyph.st-question i, .list a.li .glyph.st-stale i { --fill: var(--c) }
.list .li b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.list .li span.s { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line) }

/* overview */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; margin-bottom: 26px }
.hero h1 { font: 650 38px/1.08 var(--f-display); letter-spacing: -.025em; margin: 0 0 10px }
.hero p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 62ch }
.bigbar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--sunken); margin: 8px 0 12px }
.bigbar i { display: block; height: 100%; transition: flex-grow .4s }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2) }
.legend span { display: inline-flex; align-items: center; gap: 7px } .legend .d { width: 9px; height: 9px; border-radius: 50%; background: var(--c) }
.legend b { font-family: var(--f-mono); font-weight: 500 }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 26px }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 16px 16px 14px; box-shadow: var(--shadow-1); text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s }
button.card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); transform: translateY(-1px) }
.card .k { font: 600 11px var(--f-mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted) }
.card b.n { display: block; font: 650 26px var(--f-display); letter-spacing: -.02em; margin: 6px 0 2px }
.card .bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--sunken); margin-top: 12px }
.card .bar i { display: block }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 18px 20px; box-shadow: var(--shadow-1) }
.signoff { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line) }
.signoff:first-of-type { border-top: 0 }

/* ---------------------------------------------------------------- review rail */
.rail { display: flex; flex-direction: column; min-height: 0; background: var(--raised); border-left: 1px solid var(--line) }
.rail-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line) }
.rail-head h3 { font: 650 15px var(--f-display); margin: 0 0 2px }
.decide { padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--surface) }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px }
.choice { display: grid; justify-items: center; gap: 5px; padding: 11px 6px 9px; border-radius: var(--r-2); border: 1px solid var(--line-strong); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: all .15s }
.choice svg { width: 18px; height: 18px }
.choice kbd { font-size: 10px }
.choice:hover { border-color: var(--c); color: var(--c) }
.choice[aria-pressed="true"] { background: var(--s); border-color: var(--c); color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent) }
.decide .actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px }
.thread { flex: 1; overflow: auto; padding: 14px 18px 24px }
.entry { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 0 }
.entry .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 650 11px var(--f-body); background: var(--sunken); color: var(--ink-2) }
.entry .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px }
.entry .meta b { font-size: 13px }
.entry .meta time { color: var(--faint) }
.entry .body { margin-top: 6px; padding: 10px 12px; border-radius: 4px var(--r-2) var(--r-2) var(--r-2); background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px }
.entry .old { font-size: 11.5px; color: var(--stale); margin-top: 4px }
.empty-thread { text-align: center; color: var(--muted); padding: 34px 10px }
.empty-thread svg { width: 30px; height: 30px; color: var(--faint); margin-bottom: 6px }

/* ---------------------------------------------------------------- admin pages */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden }
.table th { text-align: left; font: 600 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; background: var(--raised); border-bottom: 1px solid var(--line) }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle }
.table tr:first-child td { border-top: 0 }
.person { display: flex; align-items: center; gap: 10px } .person .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 650 12px var(--f-body); background: var(--accent-soft); color: var(--accent) }
.secret { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r-2); background: var(--sunken); border: 1px dashed var(--line-strong); font: 500 16px var(--f-mono); letter-spacing: .04em; margin: 8px 0 4px }
.secret .grow { flex: 1 }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 20px }
.ev { position: relative; padding: 8px 0 }
.ev::before { content: ""; position: absolute; left: -26px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--c, var(--faint)) }
.ev .a { font-weight: 600 } .ev time { font-size: 12px; color: var(--faint); margin-left: 6px }

/* dialog, toast */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 26, .5); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 40; padding: 16px; animation: fade .15s }
.dialog { width: min(520px, 100%); background: var(--surface); border-radius: var(--r-3); box-shadow: var(--shadow-3); padding: 24px; animation: rise .18s ease-out; max-height: calc(100vh - 32px); overflow: auto }
.dialog h2 { font: 650 22px var(--f-display); letter-spacing: -.015em; margin: 0 0 6px }
.dialog .lede { color: var(--muted); margin: 0 0 20px }
.dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; pointer-events: none }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-3); font-weight: 600; font-size: 13.5px; animation: rise .2s ease-out }
.toast svg { color: var(--brand-glow) }
@keyframes fade { from { opacity: 0 } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } }
.skeleton { height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.2s infinite }
@keyframes shimmer { to { background-position: -200% 0 } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

/* ---------------------------------------------------------------- responsive */
.only-narrow { display: none }
@media (max-width: 1280px) { :root { --side: 300px; --rail: 340px } .release .t { display: none } }
@media (max-width: 1080px) {
  .work { grid-template-columns: var(--side) minmax(0, 1fr) }
  .work .rail { grid-column: 2; border-left: 0; border-top: 1px solid var(--line) }
  .work { grid-template-rows: minmax(0, 1fr) auto; overflow: auto }
  .main { overflow: visible }
  .thread { overflow: visible }
}
@media (max-width: 820px) {
  :root { --top: 56px }
  .auth { grid-template-columns: 1fr } .auth-brand { padding: 32px 24px; min-height: 280px } .auth-stats { display: none }
  .top .logo { min-width: 0 } .top .logo small, .nav, .release, .top .hide-narrow { display: none }
  .only-narrow { display: inline-flex }
  .work, .work.wide { display: block; overflow: auto }
  .side { position: fixed; top: var(--top); bottom: 0; left: 0; width: min(88vw, 360px); z-index: 30; box-shadow: var(--shadow-3); transform: translateX(-102%); transition: transform .2s }
  .side.open { transform: none }
  .page { padding: 20px 16px 48px }
  h1.title { font-size: 28px } .hero { grid-template-columns: 1fr } .hero h1 { font-size: 30px }
  .rail { border-top: 1px solid var(--line) }
}
.done { margin: 2px 0 0; padding-left: 18px; display: grid; gap: 6px } .done li { line-height: 1.5 } .done li::marker { color: var(--ok) }
.views { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px }
.views button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px }
.views button:hover:not([disabled]) { color: var(--ink) }
.views button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent) }
.views button[disabled] { opacity: .4; cursor: default }
.views kbd { font-size: 10px }
.waves { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 26px }
.wcol { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px; min-width: 0 }
.wcol .wh { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 13px }
.wcol .wh a { color: var(--ink) } .wcol .wh b { color: var(--accent); font-family: var(--f-mono); margin-right: 4px }
.nav .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand-glow); color: #0b2a20; font: 700 10.5px var(--f-mono) }
.tag.v-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent } .tag.v-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent }
.tag.v-bad { color: var(--bad); background: var(--bad-soft); border-color: transparent }

/* ---------------------------------------------------------------- workflow pages */
.page.wide { max-width: 1240px }
.empty { text-align: center; padding: 34px 20px }
.sub { font: 650 15px var(--f-display); margin: 18px 0 10px }
h2.dt { font: 650 24px/1.2 var(--f-display); letter-spacing: -.015em; margin: 0 0 10px }
.pre, .body.pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-1); padding: 10px 12px }
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start }
.dlist { display: grid; gap: 8px; position: sticky; top: 0 }
.dcard { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); text-decoration: none }
.dcard:hover { border-color: var(--accent-line); text-decoration: none } .dcard.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft) }
.dcard > span:first-child { display: flex; justify-content: space-between } .dcard .muted { font-size: 12.5px }
.dcard { grid-template-columns: 1fr auto } .dcard b, .dcard .muted:not(.mono) { grid-column: 1 / -1 }
.callout { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 0 var(--r-1) var(--r-1) 0; margin: 14px 0 }
.callout.ok { border-color: var(--ok); background: var(--ok-soft) } .callout p { margin: 4px 0 0 }
.options { display: grid; gap: 8px }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-2); cursor: pointer; background: var(--surface) }
.option:hover { border-color: var(--accent-line) } .option.on, .option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft) }
.option input { margin-top: 3px; accent-color: var(--accent) } .option span { display: grid; gap: 2px } .option .muted { font-size: 13px }
.row-form { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; flex-wrap: wrap } .row-form .input { flex: 1; min-width: 160px } .row-form textarea.input { min-height: 44px }
.stepper { display: flex; gap: 0; list-style: none; padding: 0; margin: 0 0 18px; flex-wrap: wrap }
.stepper li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 0; font-size: 13px; color: var(--muted); font-weight: 600 }
.stepper li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); font: 600 11px var(--f-mono) }
.stepper li.done { color: var(--ok) } .stepper li.done span { background: var(--ok-soft); color: var(--ok) }
.stepper li.now { color: var(--ink) } .stepper li.now span { background: var(--accent); color: var(--accent-ink) }
.stepper li + li::before { content: ""; width: 18px; height: 2px; background: var(--line); margin-right: 6px }
.views a { display: inline-flex; align-items: center; padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none }
.views a[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent) }
.lic { margin-bottom: 10px } .lw { display: flex; gap: 12px; align-items: flex-start; cursor: pointer } .lw span { display: grid } .lw .muted { font-size: 13px }
.incs { display: grid; gap: 4px; margin: 10px 0 0 28px }
.li-inc { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--r-1); cursor: pointer } .li-inc:hover { background: var(--sunken) }
.li-inc span:nth-of-type(1) { flex: 1 } .lic input { accent-color: var(--accent); width: 16px; height: 16px }
.cw { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start }
.cw-list { position: sticky; top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: 6px; max-height: calc(100vh - 140px); overflow: auto }
.cw-list summary { display: flex; gap: 6px; align-items: center; padding: 8px; cursor: pointer; font-size: 13px } .cw-list summary .muted { margin-left: auto; font: 500 11px var(--f-mono) }
.cw-item { display: flex; gap: 8px; align-items: center; padding: 7px 8px 7px 16px; border-radius: var(--r-1); color: var(--ink-2); font-size: 13.5px; text-decoration: none }
.cw-item:hover { background: var(--sunken); text-decoration: none } .cw-item.on { background: var(--accent-soft); color: var(--ink) }
.cw-item .glyph i, .glyph i { display: block; width: 9px; height: 9px; border-radius: 50%; border: 1.8px solid var(--c); background: var(--fill, transparent) }
.cw-item .glyph.st-accepted i, .cw-item .glyph.st-changes_requested i, .cw-item .glyph.st-stale i { --fill: var(--c) }
.cw-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start }
.cw-rail { border: 1px solid var(--line); border-radius: var(--r-2); position: sticky; top: 0; max-height: calc(100vh - 140px) }
.choices.two { grid-template-columns: 1fr 1fr }
.upl { margin-top: 8px; cursor: pointer }
.req { padding: 8px 0; border-top: 1px solid var(--line); display: grid; gap: 4px } .req p { margin: 0 }
.reqs { display: grid; gap: 12px } .rh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start }
.rel { margin-bottom: 14px } .rel .actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 12px; flex-wrap: wrap }
.evrow { display: grid; grid-template-columns: 90px 1.4fr 80px 1.4fr 1fr; gap: 6px; margin-bottom: 6px } .evrow .input { height: 34px; font-size: 13px }
.guide { margin-bottom: 18px }
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory }
.shot { margin: 0; flex: none; width: 200px; scroll-snap-align: start }
.shot button { padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--sunken); display: block; width: 100%; box-shadow: var(--shadow-1) }
.shot img { display: block; width: 100%; height: 360px; object-fit: cover; object-position: top }
.shot figcaption { display: grid; gap: 2px; margin-top: 8px; font-size: 12.5px } .shot figcaption span { color: var(--muted) }
.lightbox { margin: 0; text-align: center } .lightbox img { max-width: 100%; max-height: 72vh; border-radius: 12px } .lightbox figcaption { margin-top: 8px; font-weight: 600 }
.table.plain td { vertical-align: top } .gaps { margin: 0 } .vt { margin-bottom: 12px }
.chip.ch-pass { color: var(--ok); background: var(--ok-soft) } .chip.ch-fail { color: var(--bad); background: var(--bad-soft) }
.chip.ch-missing, .chip.ch-not_run { color: var(--warn); background: var(--warn-soft) }
.decision .summary { font-size: 16px }
@media (max-width: 1080px) { .split, .cw, .cw-main { grid-template-columns: 1fr } .dlist, .cw-list, .cw-rail { position: static; max-height: none } }
.option .tag { justify-self: start }
/* sign-in factors */
.enrol .options { margin: 18px 0 8px }
.option.big { width: 100%; text-align: left; padding: 16px 18px; font: inherit; color: inherit }
.option.big:hover { border-color: var(--accent); background: var(--accent-soft) }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-2); margin: 6px 0 12px }
.qr img { image-rendering: pixelated }
.manual { margin-bottom: 14px; font-size: 13px } .manual summary { cursor: pointer; color: var(--accent) }
.secret-key { display: block; margin-top: 8px; padding: 10px 12px; background: var(--sunken); border-radius: var(--r-1); font: 500 14px var(--f-mono); letter-spacing: .06em; word-break: break-all }
.code-input { font: 600 22px var(--f-mono); letter-spacing: .3em; text-align: center; height: 52px }

/* ---- journeys: the screen flow and the screen-by-screen review (journeys.js) */
.jbar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--sunken) }
.jbar i { display: block } .jb-matches { background: var(--ok) } .jb-changes_needed { background: var(--warn) } .jb-question { background: var(--info) }
.jb-stale { background: var(--stale) } .jb-pending { background: var(--sunken) }
.jlist { margin-bottom: 18px } .jl-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px }
.jactions { display: flex; gap: 8px; flex-wrap: wrap }
.jsum { margin-bottom: 8px } .jcounts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 12px }
.jgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 28px; margin-bottom: 8px }
.jcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-3); color: inherit; text-decoration: none; box-shadow: var(--shadow-1) }
.jcard:hover { border-color: var(--accent) }
.jgrid > .jcard:not(:nth-child(5n)):not(:last-child)::after { content: "→"; position: absolute; right: -22px; top: 40%; font-size: 18px; color: var(--muted) }
.jcard.alt { border-style: dashed }
.jcard[data-state="matches"] { border-color: var(--ok) } .jcard[data-state="changes_needed"] { border-color: var(--warn) }
.jcard[data-state="question"] { border-color: var(--info) } .jcard[data-state="stale"] { border-color: var(--stale) }
.jcard img { width: 100%; height: auto; border-radius: var(--r-2); border: 1px solid var(--line); background: #fff }
.jn { position: absolute; top: -9px; left: -9px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font: 700 12px var(--f-body) }
.jc { display: flex; flex-direction: column; gap: 4px } .jc small { color: var(--muted) } .jd { font-size: 13px; color: var(--ink-2) }
.jlane { border: 1px dashed var(--line-strong); border-radius: var(--r-3); padding: 14px; margin-bottom: 16px }
.jlane h3 { margin: 0 } .jlane p { margin: 4px 0 12px }
.jrow { display: flex; gap: 14px; align-items: center; flex-wrap: wrap } .jrow .jcard { width: min(220px, 100%) }
.jarrow { font-size: 20px; color: var(--muted) }
.jfrom { display: flex; flex-direction: column; gap: 4px } .jfrom small, .jmini small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em }
.jmini { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); text-decoration: none; color: var(--ink) }
.jnav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px }
.jstep { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 32px; align-items: start }
.jshot { margin: 0; position: sticky; top: 16px } .jshot img { width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--line); background: #fff }
.jt { font: 650 28px/1.15 var(--f-display); margin: 6px 0 8px }
.jdo { margin: 14px 0 } .jdo p { margin: 6px 0 0 }
.jfacts { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; margin: 0 0 18px } .jfacts dt { color: var(--muted); font-weight: 600 } .jfacts dd { margin: 0 }
.jfacts ul { margin: 0; padding-left: 18px }
.jverdict { border: 0; padding: 0; margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap } .jverdict legend { font-weight: 600; margin-bottom: 8px }
.jverdict .option { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-1); cursor: pointer }
.jverdict .option.on { border-color: var(--accent); background: var(--sunken) } .jverdict input { margin: 0 }
.jform textarea.input { height: auto; padding: 8px 12px } .jformbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap }
.jhist { list-style: none; padding: 0; margin: 0 } .jhist li { padding: 10px 0; border-top: 1px solid var(--line) } .jhist p { margin: 6px 0 0 } .jhist small { color: var(--muted); font-weight: 600 }
@media (max-width: 1100px) { .jgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) } .jgrid > .jcard::after { display: none } .jstep { grid-template-columns: 1fr } .jshot { position: static; max-width: 380px } }
@media (max-width: 640px) { .jgrid { grid-template-columns: 1fr 1fr } .jfacts { grid-template-columns: 1fr } }
.jcounts .grow, .jnav .grow { flex: 1 }

/* evidence rounds and sign-off (rounds.js) */
.jcard.bank { border-style: dashed } a.jcard.bank:not([href]) { cursor: default }
.rnone { aspect-ratio: 9 / 16; display: grid; place-items: center; text-align: center; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-2); color: var(--muted); font-size: 12.5px; background: var(--sunken) }
.rnone.big { aspect-ratio: auto; min-height: 240px; align-content: center; gap: 6px } .rnone p { margin: 0 }
.rwarn { color: var(--warn); font-weight: 600 }
.rlane { display: flex; align-items: center; gap: 10px } .rstep { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 13px }
.rhand { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; color: var(--muted) } .rhand b { color: var(--ink) }
.rfacts { margin-bottom: 8px } .rfacts .jfacts { margin: 0 } .rclose hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0 }
.rgrid { display: grid; grid-template-columns: auto minmax(360px, 1fr); gap: 28px; align-items: start; margin-top: 14px }
.rcompare { display: flex; gap: 16px; align-items: flex-start; position: sticky; top: 16px }
.rshot { margin: 0; width: 280px }
.jlatest { position: static; margin-bottom: 16px; flex-wrap: wrap } .jstep.nofig { grid-template-columns: minmax(0, 1fr) }
.rmore { margin-top: 8px } .rmore summary { cursor: pointer; color: var(--muted); font-size: 13px } .rmore .rshot { width: 100%; margin-top: 8px } .rcompare.n3 .rshot, .rcompare.n4 .rshot { width: 220px }
.rshot figcaption { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px }
.rshot img { width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--line); background: #fff; cursor: zoom-in }
.rside { display: grid; gap: 16px } .rside .jdo { margin: 0 } .rside .jform { margin: 0 }
.cthread { list-style: none; margin: 0 0 12px; padding: 0 } .cthread .cthread { margin: 8px 0 0 18px; padding-left: 12px; border-left: 2px solid var(--line) }
.cm { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); margin-bottom: 8px } .cm p { margin: 6px 0 }
.rthumb { width: 54px; height: auto; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in } .stable td { vertical-align: middle }
@media (max-width: 1000px) { .rgrid { grid-template-columns: 1fr } .rcompare { position: static; flex-wrap: wrap } .rshot { width: min(280px, 100%) } }
.e2e { margin-bottom: 18px; border-color: var(--accent) } .e2e-h { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap }
.rroles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line) }
.rroles .chip { cursor: pointer; border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 12.5px }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent) }
.rclient { color: var(--warn); font-weight: 600 } .cth { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 6px }
.jrowx { padding: 12px 0; border-top: 1px solid var(--line) } .jrowx:first-of-type { border-top: 0 } .jroles { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px }
a.tag { text-decoration: none; color: inherit } a.tag:hover { border-color: var(--accent) }
.swatches { display: flex; flex-wrap: wrap; gap: 8px } .sw { display: grid; grid-template-columns: 22px auto; grid-template-rows: auto auto; column-gap: 6px; align-items: center; min-width: 120px }
.sw i { grid-row: span 2; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong) } .sw small { font-weight: 600 } .sw code { font-size: 11px; color: var(--muted) }
.pcard { display: block; text-decoration: none; color: inherit; margin-bottom: 14px } .pcard:hover { border-color: var(--accent) }
.pinc { border: 1px solid var(--line); border-radius: var(--r-2); padding: 10px 12px; display: grid; gap: 10px; max-height: 320px; overflow: auto }
.pinc .opt { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px }
.rgrid.landscape { grid-template-columns: 1fr } .rgrid.landscape .rcompare { position: static; flex-direction: column; align-items: stretch }
.rgrid.landscape .rshot { width: 100% } .rgrid.landscape .rshot img { max-width: 100% }
.lightbox img { max-width: min(96vw, 1800px); max-height: 86vh; width: auto; height: auto }
.dialog:has(.lightbox) { width: auto; max-width: 96vw }

/* Step review: the screens on top, sized to the window; one feedback bar; the rest folded below (no scrolling needed
   to compare and judge). Wide screens (the bank's portal, the core exchange console) become tabs, one large picture. */
.rhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0 }
.rhead b { font-size: 18px }
.rview { margin: 8px 0 10px }
.rview .rtabs { display: none; gap: 4px; margin-bottom: 8px; flex-wrap: wrap }
.rview .rtab { border: 1px solid var(--line); background: var(--surface, #fff); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted) }
.rview .rtab.on { background: var(--ink, #10243a); color: #fff; border-color: transparent }
.rview .rcompare { position: static; display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px }
.rview .rcompare > .rshot { width: auto; flex: 0 0 auto; max-width: 340px }
.rview .rcompare > .rshot > img { width: auto; max-width: 100%; height: calc(100vh - 300px); min-height: 360px; max-height: 760px; object-fit: contain }
.rview .rcompare > .rshot > p, .rview .rcompare > .rshot .rnone { max-width: 300px }
.rview .rcompare > .rshot .rnone.big { height: calc(100vh - 300px); min-height: 360px; max-height: 760px; width: 260px; overflow: auto }
.rview.wide .rtabs { display: flex }
.rview.wide .rcompare { display: block }
.rview.wide .rcompare > .rshot { display: none; max-width: none }
.rview.wide .rcompare > .rshot.on { display: block }
.rview.wide .rcompare > .rshot > img { width: 100%; height: auto; max-height: calc(100vh - 250px); min-height: 0; object-fit: contain; object-position: left top }
.rbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--r-3); padding: 10px 12px; position: sticky; bottom: 8px; z-index: 2; box-shadow: 0 6px 24px rgba(16, 36, 58, .08) }
.rbar .rverdicts { display: flex; gap: 6px }
.rbar .option { padding: 6px 10px; margin: 0 }
.rbar .rtopic { width: auto; min-width: 150px }
.rbar .rnote { flex: 1 1 200px; min-height: 38px; resize: vertical }
.rview.wide .rcompare > .rshot > figcaption { display: none }
.rbelow { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; align-items: start }
.rbelow > details { margin: 0 } .rbelow summary { cursor: pointer }
.rcom { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; flex-wrap: wrap } .rcom textarea { flex: 1 1 220px; min-height: 38px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
@media (max-width: 760px) { .rview .rcompare > .rshot > img { height: auto; max-height: 70vh } .rbar { position: static } }

/* The two stages of a journey's review: the prototype first, the built evidence after. */
.stages { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 18px }
.stage { text-align: left; border: 1.5px solid var(--line); background: var(--surface, #fff); border-radius: var(--r-3); padding: 14px 16px; cursor: pointer; font: inherit; display: grid; gap: 2px; color: inherit }
.stage small { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-size: 11px }
.stage b { font-size: 18px } .stage span { color: var(--muted); font-size: 13px }
.stage.on { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent) }

/* Full-width pages with a collapsible tree (screens under review use the whole window). */
.work.wide.nav-collapsed { grid-template-columns: minmax(0, 1fr) } .work.nav-collapsed > .side { display: none }
.navtoggle span { margin-left: 4px } .work.nav-collapsed .navtoggle svg { transform: rotate(180deg) }
.page.full { max-width: none; padding: 16px 28px 24px }
.stepwrap { display: grid; grid-template-columns: auto minmax(320px, 1fr); gap: 24px; align-items: start; margin: 10px 0 12px }
.stepwrap .stepshot { margin: 0 }
.stepwrap .stepshot img { height: calc(100vh - 210px); min-height: 420px; width: auto; max-width: 100%; border-radius: var(--r-3); border: 1px solid var(--line); background: #fff; display: block }
/* A wide screen is sized to the window's height like a phone screen, so its details fill the space beside it. */
.stepwrap.land { grid-template-columns: auto minmax(280px, 1fr) }
.stepwrap.land .stepshot img { height: calc(100vh - 210px); width: auto; max-width: min(100%, 74vw); min-height: 0 }
.stepwrap .jinfo { display: flex; flex-direction: column; gap: 12px; min-width: 0 }

.jnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap }

/* ---------------------------------------------------------------- the screen review (review.js) */
.page.rvpage { max-width: none; padding: 0; height: calc(100vh - var(--top)) }
.rv { height: 100%; display: flex; flex-direction: column; min-height: 0 }
.rvbar { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; min-width: 0 }
.rvtitle { font-family: var(--f-display); font-weight: 700; font-size: 17px; white-space: nowrap }
.rvbar .pos { color: var(--muted); font-size: 12px; white-space: nowrap }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap }
.pill.stg { background: var(--accent-soft); color: var(--accent) } .pill.ok { background: var(--ok-soft); color: var(--ok) } .pill.warn { background: var(--warn-soft); color: var(--warn) }
.pill.info { background: var(--info-soft); color: var(--info) } .pill.stale { background: var(--stale-soft); color: var(--stale) }
.rvcrumb { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 0 }
.rvtools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink) }
.icon-btn:hover { border-color: var(--line-strong) } .icon-btn.off { visibility: hidden } .icon-btn[aria-pressed="true"] { background: var(--sunken) }
.rvdock { display: flex; align-items: center; gap: 4px; padding: 3px; background: var(--sunken); border-radius: 12px }
.rvact { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; font-weight: 700; font-size: 13.5px; white-space: nowrap; color: var(--ink) }
.rvact:hover { background: var(--surface) } .rvact.match { background: var(--ok); color: #fff } .rvact.match:hover { filter: brightness(1.06); background: var(--ok) }
.rvact kbd { font: 500 10.5px var(--f-mono); border: 1px solid var(--line-strong); border-radius: 5px; padding: 0 5px; opacity: .8 } .rvact.match kbd { border-color: rgba(255, 255, 255, .5) }
.rvact.note { font-weight: 600; color: var(--muted) } .rvdock .sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 2px }
.rvclosed { font-size: 13px }
.rvwork { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px }
.rvwork.closed { grid-template-columns: minmax(0, 1fr) } .rvwork.closed .rvctx { display: none }
.rvstage { min-height: 0; background: var(--sunken); overflow: auto; padding: 10px 12px }
.rvpanes { height: 100%; display: flex; gap: 14px; justify-content: center; align-items: stretch }
.rvshot { margin: 0; height: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 0 }
.rvshot figcaption { font: 600 11px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap }
.rvshot figcaption .tag { color: var(--accent); background: none; padding: 0 }
.rvshot img { flex: 1; min-height: 0; max-width: 100%; width: auto; height: 100%; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-2); background: var(--surface); cursor: zoom-in }
.rvshot .rnone.big { flex: 1; width: 240px; display: grid; place-content: center; text-align: center; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 12px }
.rvnote { font-size: 12px; color: var(--muted); max-width: 300px; margin: 0; text-align: center }
.rvstage.wide .rvpanes { display: block; height: auto }
.rvstage.wide .rvshot { height: auto; display: block } .rvstage.wide .rvshot img { width: 100%; height: auto; border-radius: 10px }
.rvstage.wide .rvshot figcaption { margin-bottom: 6px }
.rvtabs { display: flex; gap: 6px; margin-bottom: 8px; position: sticky; top: -10px; background: var(--sunken); padding: 4px 0; z-index: 1 }
.rvtabs button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; display: flex; gap: 6px; align-items: center; color: var(--ink) }
.rvtabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.rvtabs .tag { font: 500 11px var(--f-mono); opacity: .75; background: none; padding: 0; color: inherit } .rvtabs kbd { font: 500 10px var(--f-mono); opacity: .6 }
.rvctx { background: var(--surface); border-left: 1px solid var(--line); min-height: 0; display: flex; flex-direction: column; overflow: hidden }
.rvctabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--line); flex: none }
.rvctabs button { border: 0; background: none; padding: 8px 10px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px }
.rvctabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent) } .rvctabs .n { font: 500 11px var(--f-mono); color: var(--faint) }
.rvpane { padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0 }
.rvpane .k { font: 600 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted) } .rvpane p { margin: 4px 0 0 }
.rvbox { background: var(--sunken); border-radius: 10px; padding: 12px } .rvbox ul { margin: 6px 0 0; padding-left: 18px }
.rvframe { margin: 8px 0 0 } .rvframe img { width: 100%; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in } .rvframe figcaption { font-size: 12px; color: var(--muted) }
.rvdialog { display: flex; flex-direction: column; gap: 12px; width: min(560px, 86vw); max-width: 100% }
.rvdialog .input, .rvdialog .field { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0 }
.rvdialog .chips { display: flex; gap: 6px; flex-wrap: wrap }
.rvdialog .chips button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2) }
.rvdialog .chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
.rvdialog .actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end }
@media (max-width: 900px) { .rvwork { grid-template-columns: minmax(0, 1fr) } .rvctx { display: none } .rvcrumb { display: none } .rvact .l { display: none } .rvbar { flex-wrap: wrap } .rvpanes { justify-content: flex-start; overflow-x: auto } }
.rvpane[hidden], .rvshot[hidden] { display: none !important }

/* A journey whose screens all have a verdict: a green tick in the tree. */
.tree .cnt.done { color: var(--ok); background: var(--ok-soft); font-weight: 700; padding: 0 6px; border-radius: 8px }
.cfiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 } .cfiles img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line) }

/* ---------------------------------------------------------------- delivery: stage chips per journey and channel */
.st-dv-not_started { --c: var(--muted); --s: var(--sunken) }
.st-dv-source_implemented, .st-dv-compiled { --c: var(--stale); --s: var(--stale-soft) }
.st-dv-integrated { --c: var(--info); --s: var(--info-soft) }
.st-dv-distributed { --c: var(--ok); --s: var(--ok-soft) }
.st-dv-built_not_enabled { --c: var(--warn); --s: var(--warn-soft) }
.table.dv tr.dv-deferred > td { opacity: .55 } .dv-scope { margin: 4px 0 0 22px } .dv-defs { margin: 4px 0; line-height: 1.9 }
.pill.st-dv-tester_accepted { background: var(--ok); color: var(--surface) } .pill.st-dv-tester_accepted .d { background: var(--surface) }
.pill.st-dv-unknown { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); border: 0 } .pill.st-dv-unknown .d { background: none; box-shadow: inset 0 0 0 1.5px var(--warn) }
.pill sup { font-size: 9px; line-height: 0 }
.dv-na { color: var(--faint); font-weight: 600 } .dv-unk { color: var(--warn); font: 500 11.5px var(--f-mono) }
.dv-legend { gap: 10px 16px } .dv-legend .dv-na { margin-right: 2px }
.dv-wrap { overflow-x: auto } .table.dv { min-width: 900px }
.table.dv th { padding: 10px 6px; white-space: nowrap } .table.dv td { padding: 10px 6px; vertical-align: top } .table.dv .pill { padding: 0 6px; gap: 4px; font-size: 11.5px }
.table.dv tr.dv-more td { background: var(--raised); border-top: 0 }
.dv-tog { display: flex; gap: 6px; align-items: flex-start; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer }
.dv-tog .i { flex: none; width: 16px; height: 16px; margin-top: 2px; transition: transform .15s } .dv-tog[aria-expanded="true"] .i { transform: rotate(90deg) }
.dv-tog span .mono { display: block; font-size: 11px }
.table.dv td[data-l="Journey"] { min-width: 140px } .table.dv td[data-l="Release"] { min-width: 140px }
.dv-builds { display: grid; gap: 2px; margin-top: 6px; font-size: 12px; color: var(--ink-2) } .dv-iss { font-size: 12px; margin-top: 4px }
.dv-detail { display: grid; gap: 4px } .dv-detail .sub:first-child { margin-top: 4px }
.dv-sub { padding: 8px 0; border-top: 1px solid var(--line) } .dv-sub:first-of-type { border-top: 0 } .dv-sub .k { font: 500 11px var(--f-mono); color: var(--muted) }
.dv-steps { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 4px } .dv-steps .chip { font-size: 11.5px; padding: 2px 7px }
.dv-gaps { margin: 0; padding-left: 18px; display: grid; gap: 8px } .dv-gaps .muted { display: block; font-size: 12.5px }
@media (max-width: 900px) {
  .table.dv, .table.dv tbody, .table.dv tr, .table.dv td { display: block; width: 100% }
  .table.dv { min-width: 0 } .table.dv thead { display: none }
  .table.dv tr.dv-j { border-top: 1px solid var(--line); padding: 6px 0 } .table.dv tr.dv-j:first-child { border-top: 0 }
  .table.dv td[data-l] { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; justify-items: start; align-items: baseline; border: 0; padding: 4px 12px }
  .table.dv td[data-l]::before { content: attr(data-l); font: 600 11px var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted) }
  .table.dv td[data-l="Journey"] { grid-template-columns: minmax(0, 1fr) } .table.dv td[data-l="Journey"]::before { content: none }
  .table.dv .dv-ch tr { border-top: 1px solid var(--line); padding: 6px 0 } .table.dv .dv-ch td[data-l] { padding: 3px 10px; grid-template-columns: 80px minmax(0, 1fr) }
  .table.dv .dv-ch td:not([data-l]) { padding: 3px 10px }
}
