/* Mithrandir product type (same Geist files as the vault console) */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("vault/fonts/geist-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("vault/fonts/geist-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("vault/fonts/geist-mono-latin.woff2") format("woff2"); }
/* Mithrandir: insurance demo. Brand: white ground, ink #14171c, one gold accent #a8782f, Helvetica Neue. */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F7F5;
  --sunken: #F0F0ED;
  --ink: #14171C;
  --ink-2: #3D424A;
  --ink-3: #676C75;
  --line: #E7E7E3;
  --line-2: #D4D4CF;
  --navy: #14171C;
  --navy-2: #2A2E35;
  --on-navy: #FFFFFF;
  --on-navy-2: #B9BCC2;
  --accent: #A8782F;
  --accent-ink: #86601F;
  --accent-soft: #F6F0E4;
  --ok: #2E6A49; --ok-soft: #EDF3EF;
  --warn: #86601F; --warn-soft: #F6F0E4;
  --risk: #A3342B; --risk-soft: #F8ECEA;
  --lock: #14171C; --lock-soft: #F0F1F3;
  --shadow-1: none;
  --shadow-2: 0 12px 32px -16px rgba(20,23,28,.22), 0 2px 6px rgba(20,23,28,.05);
  --r-sm: 6px; --r: 8px; --r-lg: 12px;
  --f-display: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --f-sans: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  --gutter: clamp(16px, 3vw, 40px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111317; --surface: #16191E; --surface-2: #1B1F25; --sunken: #13161A;
  --ink: #F2F2EF; --ink-2: #C9CBCF; --ink-3: #9A9EA6;
  --line: #262A31; --line-2: #333842;
  --navy: #F2F2EF; --navy-2: #D9D9D5; --on-navy: #14171C; --on-navy-2: #3D424A;
  --accent: #C99A52; --accent-ink: #D8AE6C; --accent-soft: #2A2317;
  --ok: #7DBB98; --ok-soft: #15241C; --warn: #D8AE6C; --warn-soft: #2A2317; --risk: #E58C83; --risk-soft: #2E1A18;
  --lock: #E4E6EA; --lock-soft: #1E2228;
  --shadow-1: none; --shadow-2: 0 14px 34px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.mono { font-family: var(--f-mono); font-size: .88em; }
.muted { color: var(--ink-3); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-3); }
.display { font-family: var(--f-display); font-weight: 500; letter-spacing: -.022em; line-height: 1.1; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter); height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; color: var(--ink); }
.brand-name { font-family: var(--f-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.brand-sub { font-size: 13px; color: var(--ink-3); border-left: 1px solid var(--line-2); padding-left: 10px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 8px 12px; border-radius: 8px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--sunken); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-1), inset 0 -2px 0 var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); transition: background .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.pill svg.lucide { width: 14px; height: 14px; }
.pill-mock { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.settings { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px; z-index: 40; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border-radius: 8px; cursor: pointer; }
.menu-row:hover { background: var(--surface-2); }
.menu-row strong { display: block; font-size: 15px; font-weight: 600; }
.menu-row small { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }

/* ---------- layout ---------- */
main { max-width: 1760px; margin: 0 auto; padding: 0 var(--gutter) 64px; outline: none; }
.view { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.section { padding-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { margin: 6px 0 0; font-size: clamp(26px, 2.4vw, 34px); }
.section-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 60ch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 15px; text-decoration: none; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--navy-2); }
:root[data-theme="dark"] .btn-primary { background: var(--accent); color: #1a0f06; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--surface-2); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding-top: clamp(40px, 6vw, 88px); }
.hero h1 { font-size: clamp(36px, 4.4vw, 64px); margin: 14px 0 18px; max-width: 18ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero .lede { font-size: clamp(17px, 1.3vw, 20px); color: var(--ink-2); max-width: 48ch; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; border-top: 1px solid var(--line); }
.fact { padding: 16px 16px 0 0; }
.fact + .fact { padding-left: 16px; border-left: 1px solid var(--line); }
.fact-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.fact-label svg.lucide { width: 15px; height: 15px; }
.fact-value { font-size: 18px; font-weight: 600; margin-top: 4px; line-height: 1.3; }
.fact-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

/* hero still: a framed slice of the run screen */
.stage { position: relative; border-radius: var(--r-lg); background: var(--navy); padding: 28px 0 0 28px; overflow: hidden; min-height: 540px; box-shadow: var(--shadow-2); }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 100% 0%, rgba(180,97,42,.28), transparent 55%); pointer-events: none; }
.stage-window { position: relative; background: var(--surface); border-radius: 14px 0 0 0; border: 1px solid rgba(255,255,255,.08); border-right: 0; border-bottom: 0; padding: 18px 0 0 18px; min-height: 512px; }
.stage-bar { display: flex; align-items: center; gap: 8px; padding-right: 18px; margin-bottom: 14px; font-size: 13px; color: var(--ink-3); }
.stage-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.stage-stack { display: grid; gap: 10px; padding-right: 0; }
.stage-stack .ev { margin-right: -1px; border-right: 0; border-radius: 10px 0 0 10px; }
.stage-satellite { position: absolute; right: 24px; bottom: 24px; width: min(300px, 70%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2); border: 1px solid var(--line); padding: 16px; }

.wf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wf-card { display: flex; flex-direction: column; padding: 24px; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.wf-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.wf-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.wf-icon svg.lucide { width: 22px; height: 22px; }
.wf-card h3 { font-family: var(--f-display); font-size: 23px; font-weight: 600; margin: 18px 0 8px; line-height: 1.2; }
.wf-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.wf-why { display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.wf-why svg.lucide { color: var(--accent-ink); margin-top: 1px; width: 17px; height: 17px; }
.wf-why b { color: var(--ink); font-weight: 600; }
.wf-time { margin-top: auto; padding-top: 20px; display: flex; align-items: center; gap: 12px; }
.time-before { font-size: 15px; color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-2); }
.time-after { font-family: var(--f-display); font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1; }
.wf-time .arrow { color: var(--ink-3); }
.wf-time .who { margin-left: auto; font-size: 13px; color: var(--ink-3); text-align: right; }
.wf-open { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--accent-ink); margin-top: 16px; }

/* how it works */
.how { padding: clamp(24px, 3vw, 40px); background: var(--navy); color: var(--on-navy); border-radius: var(--r-lg); position: relative; overflow: hidden; }
.how .eyebrow { color: var(--on-navy-2); }
.how h2 { color: var(--on-navy); }
.how .section-head p { color: var(--on-navy-2); }
.how-boundary { position: relative; border: 1.5px dashed var(--accent); border-radius: 16px; padding: 44px 20px 20px; }
.how-boundary-label { position: absolute; top: -13px; left: 20px; background: var(--navy); color: var(--accent); font-size: 13px; font-weight: 600; padding: 2px 10px; display: flex; align-items: center; gap: 6px; }
.how-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.how-step { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 20px; }
.how-step .n { font-family: var(--f-mono); font-size: 13px; color: var(--accent); }
.how-step h3 { margin: 8px 0 6px; font-family: var(--f-display); font-size: 22px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.how-step p { margin: 0; color: var(--on-navy-2); font-size: 15px; }
.how-step ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--on-navy); }
.how-step li { display: flex; gap: 8px; align-items: flex-start; }
.how-step li svg.lucide { width: 16px; height: 16px; color: var(--accent); margin-top: 3px; }
.how-arrow { display: grid; place-items: center; color: var(--on-navy-2); }
.how-out { margin-top: 18px; display: flex; gap: 10px; align-items: center; color: var(--on-navy-2); font-size: 14px; }
.how-out svg.lucide { color: var(--accent); }
.datasets { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.datasets span + span::before { content: " · "; }

/* ---------- run screen ---------- */
.run-head { display: flex; align-items: center; gap: 16px; padding: 24px 0 18px; flex-wrap: wrap; }
.run-head h1 { margin: 0; font-size: clamp(24px, 2.2vw, 32px); }
.wf-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.wf-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; font-size: 14px; text-decoration: none; color: var(--ink-2); }
.wf-tab[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.run-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) minmax(360px, 460px); gap: 20px; align-items: start; }
.col { min-width: 0; }
.col-sticky { position: sticky; top: 84px; }
.side-block { padding: 16px; }
.side-block + .side-block { border-top: 1px solid var(--line); }
.side-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.persona-list, .case-list { display: grid; gap: 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-2); background: var(--surface-2); }
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.choice .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: block; }
.choice .s { font-size: 13px; color: var(--ink-3); line-height: 1.35; display: block; margin-top: 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; color: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunken); color: var(--ink-2); line-height: 1.5; }
.badge.b-risk { background: var(--risk-soft); color: var(--risk); }
.badge.b-warn { background: var(--warn-soft); color: var(--warn); }
.badge.b-ok { background: var(--ok-soft); color: var(--ok); }
.can-see { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { font-size: 12px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.run-start { padding: 16px; border-top: 1px solid var(--line); }
.run-start .btn { width: 100%; }
.run-start small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 8px; text-align: center; }

.timeline-panel { min-height: 560px; display: flex; flex-direction: column; }
.tl-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tl-head .title { font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.status.running .dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
.status.done .dot { background: var(--ok); }
.status.error .dot { background: var(--risk); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(168,120,47,.45); } 50% { box-shadow: 0 0 0 6px rgba(168,120,47,0); } }
.counters { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.counter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.counter b { font-weight: 700; }
.counter svg.lucide { width: 14px; height: 14px; }
.counter.c-pii { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.counter.c-lock { background: var(--lock-soft); border-color: transparent; color: var(--lock); }
.counter.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

.stepper { display: flex; gap: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.stepper li { list-style: none; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-3); white-space: nowrap; padding-right: 14px; }
.stepper li + li::before { content: ""; width: 22px; height: 1px; background: var(--line-2); margin-right: 6px; }
.stepper .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; border: 1.5px solid var(--line-2); background: var(--surface); }
.stepper li.active { color: var(--ink); font-weight: 600; }
.stepper li.active .num { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper li.done { color: var(--ink-2); }
.stepper li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper ol { display: contents; }

.timeline { padding: 20px; display: grid; gap: 12px; flex: 1; align-content: start; }
.tl-empty { display: grid; place-items: center; text-align: center; padding: 64px 20px; color: var(--ink-3); }
.tl-empty .big { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); margin: 0 auto 14px; color: var(--ink-2); }
.tl-empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 18px; }
.tl-empty p { margin: 0 auto; max-width: 42ch; }
.step-label { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.step-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.step-label:first-child { margin-top: 0; }

.ev { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; animation: evIn .38s var(--ease) both; }
@keyframes evIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ev-row { display: flex; gap: 12px; align-items: flex-start; }
.ev-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--sunken); color: var(--ink-2); }
.ev-main { min-width: 0; flex: 1; }
.ev-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.35; }
.ev-args { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3); margin-top: 3px; overflow-wrap: anywhere; }
.ev-text { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.ev .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ev.tool .ev-icon { background: var(--accent-soft); color: var(--accent-ink); }
.ev-meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.mini { font-size: 12.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 5px; }
.mini svg.lucide { width: 14px; height: 14px; }
.mini.pii { color: var(--ok); font-weight: 600; }
.expand-btn { border: 0; background: none; padding: 4px 0; font-size: 13.5px; font-weight: 600; color: var(--accent-ink); display: inline-flex; align-items: center; gap: 4px; }
.expand-btn svg.lucide { width: 16px; height: 16px; transition: transform .2s; }
.expand-btn[aria-expanded="true"] svg.lucide { transform: rotate(180deg); }
.raw { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 320px; background: var(--surface-2); }
.raw table { border-collapse: collapse; width: 100%; font-size: 13px; }
.raw th, .raw td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.raw th { font-weight: 600; color: var(--ink-3); background: var(--sunken); position: sticky; top: 0; }
.raw tr:last-child td { border-bottom: 0; }
.snip { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.snip:last-child { border-bottom: 0; }
.snip .src { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; margin-bottom: 3px; }
.masked, mark.masked { background: var(--ok-soft); color: var(--ok); border-radius: 4px; padding: 0 4px; font-family: var(--f-mono); font-size: .86em; font-weight: 500; }

.ev.thinking { background: transparent; border-style: dashed; }
.ev.thinking .ev-text { margin: 0; font-style: italic; }
.ev.thinking .ev-icon { background: transparent; border: 1px dashed var(--line-2); }

.ev.denied { background: var(--lock-soft); border: 1.5px solid var(--lock); position: relative; overflow: hidden; }
.ev.denied .ev-icon { background: var(--lock); color: var(--on-navy); }
:root[data-theme="dark"] .ev.denied .ev-icon { color: var(--navy); }
.ev.denied .ev-title { color: var(--lock); font-size: 16px; }
.ev.denied .ev-text { color: var(--ink); }
.ev.denied .denied-ref { margin-top: 8px; font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; }
.ev.err { background: var(--risk-soft); border-color: var(--risk); }
.ev.err .ev-icon { background: var(--risk); color: #fff; }

/* result */
.result-panel { overflow: hidden; }
.result-empty { padding: 28px 22px; color: var(--ink-3); font-size: 15px; }
.result-empty h3 { margin: 0 0 8px; color: var(--ink); font-size: 17px; }
.result-skel { display: grid; gap: 10px; margin-top: 18px; }
.result-skel span { height: 10px; border-radius: 6px; background: var(--sunken); }
.result-top { padding: 22px; border-bottom: 1px solid var(--line); }
.decision { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 14.5px; }
.decision.ok { background: var(--ok-soft); color: var(--ok); }
.decision.warn { background: var(--warn-soft); color: var(--warn); }
.decision.risk { background: var(--risk-soft); color: var(--risk); }
.headline { font-family: var(--f-display); font-size: clamp(21px, 1.6vw, 25px); font-weight: 600; line-height: 1.25; margin: 14px 0 12px; text-wrap: pretty; }
.confidence { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.confidence .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; max-width: 180px; }
.confidence .bar i { display: block; height: 100%; background: var(--ink-2); border-radius: 6px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.metric { padding: 14px 12px; text-align: left; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.metric .l { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.3; }
.r-sec { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.r-sec:last-child { border-bottom: 0; }
.r-sec h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.finding { padding: 12px 0; border-top: 1px solid var(--line); }
.finding:first-of-type { border-top: 0; padding-top: 0; }
.finding .ft { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.finding .fd { font-size: 14.5px; color: var(--ink-2); margin-top: 4px; }
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cite { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); max-width: 100%; transition: border-color .15s, background .15s; }
.cite:hover { border-color: var(--accent); color: var(--ink); }
.cite svg.lucide { width: 13px; height: 13px; color: var(--accent-ink); }
.cite span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.actions li { display: flex; gap: 10px; font-size: 15px; }
.actions li svg.lucide { color: var(--ok); margin-top: 2px; }
.draft { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; max-height: 300px; overflow: auto; }
.draft-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.draft-head strong { font-size: 15px; }
.extra { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.extra dt { color: var(--ink-3); }
.extra dd { margin: 0; font-weight: 600; }
.result-in > * { animation: evIn .45s var(--ease) both; }
.result-in > *:nth-child(2) { animation-delay: .08s; }
.result-in > *:nth-child(3) { animation-delay: .16s; }
.result-in > *:nth-child(4) { animation-delay: .24s; }
.result-in > *:nth-child(5) { animation-delay: .32s; }

/* drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(20,23,28,.32); z-index: 50; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); z-index: 51; box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform .28s var(--ease); display: flex; flex-direction: column; visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-title { font-family: var(--f-display); font-size: 22px; font-weight: 600; margin-top: 4px; line-height: 1.25; }
.drawer-body { padding: 22px; overflow: auto; }
.quote { font-family: var(--f-display); font-size: 20px; line-height: 1.5; margin: 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 14.5px; margin-top: 22px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.note { margin-top: 22px; display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.note svg.lucide { color: var(--ok); margin-top: 2px; }

/* vault */
.vault-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.stat { padding: 18px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat .v { font-family: var(--f-display); font-size: clamp(28px, 2.6vw, 40px); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; }
.src-list { list-style: none; margin: 0; padding: 0; }
.src { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.src .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--sunken); color: var(--ink-2); }
.src .n { font-weight: 600; font-size: 15px; line-height: 1.3; }
.src .who { font-size: 13px; color: var(--ink-3); margin-top: 2px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.src .c { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.src.locked .n, .src.locked .c { color: var(--ink-3); }
.src.locked .ic { background: var(--lock-soft); color: var(--lock); }
.ent-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--line); }
.ent-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.ent-chip b { font-variant-numeric: tabular-nums; }
.ent-dot { width: 10px; height: 10px; border-radius: 3px; }
.search { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.search .field { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; background: var(--surface); min-height: 44px; }
.search .field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { border: 0; outline: 0; background: none; flex: 1; min-width: 0; font-size: 15px; padding: 10px 0; }
.search select { border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); min-height: 44px; padding: 0 12px; font-size: 14.5px; }
.hits { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.hit { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; }
.hit:hover { background: var(--surface-2); }
.hit[aria-pressed="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.hit .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.hit .ic svg.lucide { width: 16px; height: 16px; }
.hit .t, .hit .s, .hit .m { display: block; }
.hit .m { display: flex; }
.hit .t { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.hit .s { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.hit .m { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hit.locked { cursor: not-allowed; }
.hit.locked .t, .hit.locked .s { color: var(--ink-3); }
.hit.locked .ic { background: var(--lock) !important; }
.hit .lockline { color: var(--lock); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.entity { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0; }
.graph-wrap { border-right: 1px solid var(--line); padding: 12px; min-height: 340px; }
.graph { width: 100%; height: auto; display: block; }
.graph .edge { stroke: var(--line-2); stroke-width: 1.5; }
.graph .edge-label { font-size: 12.5px; fill: var(--ink-3); font-family: var(--f-sans); }
.graph .node { cursor: pointer; }
.graph .node circle { stroke: var(--surface); stroke-width: 3; transition: r .2s; }
.graph .node:hover circle, .graph .node:focus circle { stroke: var(--accent); }
.graph .node text { font-size: 14px; fill: var(--ink); font-family: var(--f-sans); font-weight: 500; }
.graph .center text { font-weight: 700; font-size: 15px; }
.graph .node-in { animation: nodeIn .45s var(--ease) both; transform-box: fill-box; transform-origin: center; }
@keyframes nodeIn { from { opacity: 0; transform: scale(.6); } }
.entity-side { padding: 18px 20px; }
.entity-side h3 { font-family: var(--f-display); font-size: 21px; margin: 6px 0 12px; line-height: 1.25; }
.fields { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.fields dt { color: var(--ink-3); }
.fields dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.vault-hint { padding: 40px 20px; text-align: center; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--on-navy); padding: 10px 16px; border-radius: 10px; font-size: 14.5px; box-shadow: var(--shadow-2); z-index: 60; display: flex; gap: 8px; align-items: center; }

/* ---------- responsive ---------- */
@media (max-width: 1360px) {
  .run-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .run-grid .col-result { grid-column: 1 / -1; }
  .col-result .col-sticky { position: static; }
}
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .wf-grid { grid-template-columns: 1fr; }
  .vault-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .how-arrow { transform: rotate(90deg); padding: 2px 0; }
  .nav a { padding: 8px 8px; }
}
@media (max-width: 860px) {
  .run-grid { grid-template-columns: 1fr; }
  .col-sticky { position: static; }
  .topbar-inner { height: auto; flex-wrap: wrap; gap: 8px 16px; padding-top: 10px; padding-bottom: 6px; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .nav a { white-space: nowrap; font-size: 14px; }
  .brand-sub { display: none; }
  .entity { grid-template-columns: 1fr; }
  .graph-wrap { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 12px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .stage { min-height: 360px; padding: 18px 0 0 18px; }
  .stage-satellite { position: relative; right: auto; bottom: auto; margin: 12px 18px 18px 0; width: auto; }
  .counters { margin-left: 0; width: 100%; }
  .wf-tabs { margin-left: 0; }
  .timeline { padding: 14px; }
  .tl-head, .stepper { padding-left: 14px; padding-right: 14px; }
  .src { padding: 12px 14px; }
  .menu { width: min(320px, calc(100vw - 32px)); }
}

.graph text { paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }

/* run-screen: columns stretch so sticky children can stick; left column scrolls on its own */
.run-grid { align-items: stretch; }
#leftCol { max-height: calc(100vh - 180px); overflow: auto; overscroll-behavior: contain; }
#leftCol .run-start { position: sticky; bottom: 0; background: var(--surface); z-index: 1; }
.col-result .col-sticky { max-height: calc(100vh - 100px); overflow: auto; border-radius: var(--r-lg); }
.choice[aria-pressed="false"] .can-see { display: none; }
.stepper { flex-wrap: wrap; row-gap: 8px; }
@media (max-width: 1360px) { .col-result .col-sticky { max-height: none; overflow: visible; } }
@media (max-width: 860px) { #leftCol { max-height: none; overflow: visible; } #leftCol .run-start { position: static; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   v2 brand pass: sparse white surfaces, ink type, gold only where the eye should land
   ===================================================================== */
.topbar { background: var(--bg); backdrop-filter: none; }
.nav a[aria-current="page"] { background: none; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav a:hover { background: var(--surface-2); }
.panel { box-shadow: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--navy-2); }
:root[data-theme="dark"] .btn-primary { background: var(--ink); color: var(--bg); }
.wf-tab[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.hero h1 { font-weight: 500; }
.hero h1 em { color: var(--accent); }
.wf-card h3, .how-step h3, .headline, .drawer-title, .entity-side h3 { font-weight: 500; letter-spacing: -.015em; }
.time-after { font-weight: 500; letter-spacing: -.02em; }
.wf-icon { background: none; border: 1px solid var(--line); color: var(--ink); }
.wf-why svg.lucide { color: var(--accent); }
.wf-card:hover { border-color: var(--ink); box-shadow: none; }
.wf-open { color: var(--ink); }
.wf-open svg.lucide { color: var(--accent); }

/* hero still: a slice of the run screen on the white page, no plate */
.stage { background: none; box-shadow: none; padding: 0; min-height: 0; overflow: visible; }
.stage::before { display: none; }
.stage-window { border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-height: 0; }
.stage-stack .ev { margin-right: 0; border-right: 1px solid var(--line); border-radius: 10px; }
.stage-stack .ev.denied { border-color: var(--ink); }
.stage-satellite { position: relative; right: auto; bottom: auto; margin: -28px 0 0 auto; width: min(320px, 80%); }
.stage-bar .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* proof line */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 56px; border-top: 1px solid var(--ink); }
.proof-item { padding: 18px 20px 0 0; }
.proof-item + .proof-item { padding-left: 20px; border-left: 1px solid var(--line); }
.proof-item b { display: block; font-size: clamp(26px, 2.4vw, 36px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.proof-item span { display: block; color: var(--ink-3); font-size: 14.5px; margin-top: 4px; }

/* how it works: light, the company boundary drawn in gold */
.how { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.how .eyebrow { color: var(--ink-3); }
.how h2 { color: var(--ink); }
.how .section-head p { color: var(--ink-2); }
.how-boundary { border: 1.5px dashed var(--accent); }
.how-boundary-label { background: var(--surface-2); color: var(--accent-ink); }
.how-step { background: var(--surface); border: 1px solid var(--line); }
.how-step p { color: var(--ink-2); }
.how-step ul { color: var(--ink); }
.how-arrow { color: var(--ink-3); }
.how-out { color: var(--ink-2); }
.how-out + .how-out { margin-top: 8px; }

/* persistent legend under the top bar */
.legend { border-top: 1px solid var(--line); }
.legend-inner { max-width: 1760px; margin: 0 auto; padding: 7px var(--gutter); display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; font-size: 13px; color: var(--ink-2); }
.legend-inner > span { display: inline-flex; align-items: center; gap: 7px; }
.legend-inner svg.lucide { width: 15px; height: 15px; color: var(--accent); }
.legend-note { margin-left: auto; color: var(--ink-3); font-size: 12.5px; }
.present-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.present-btn:hover { border-color: var(--ink); color: var(--ink); }
.present-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.present-btn[aria-pressed="true"] svg.lucide { color: var(--accent); }
.pill-mock { background: var(--accent-soft); color: var(--accent-ink); }
.col-sticky { top: 112px; }

/* timeline cards */
.ev { border-radius: 10px; }
.ev-icon { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.ev.tool .ev-icon { background: var(--surface); color: var(--ink); }
.ev-what, .ev-src { display: flex; gap: 10px; margin-top: 6px; font-size: 15px; color: var(--ink); line-height: 1.45; }
.ev-src { margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.ev-what .k, .ev-src .k, .raw-args .k { flex: none; width: 74px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; font-weight: 600; }
.ev .spinner { border-top-color: var(--accent); }
.expand-btn { color: var(--ink-2); font-weight: 500; }
.expand-btn:hover { color: var(--ink); }
.raw-args { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.raw-args code { font-family: var(--f-mono); overflow-wrap: anywhere; color: var(--ink-2); }
.mini.pii { color: var(--ok); }
.masked, mark.masked { background: var(--sunken); color: var(--ink); border: 1px dashed var(--line-2); }
.counter.c-pii { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.counter.c-pii svg.lucide { color: var(--accent); }
.counter.c-lock { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.ev.denied { background: var(--surface); border: 1.5px solid var(--ink); }
.ev.denied .ev-icon { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ev.denied .ev-title { color: var(--ink); }
.ev.approval { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.ev.approval .ev-icon { background: var(--accent); color: #fff; border-color: var(--accent); }
.step-label { letter-spacing: .06em; }
.stepper li.done .num { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.stepper li.active .num { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.status.done .dot { background: var(--ink); }
.choice[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.badge { background: var(--surface-2); border: 1px solid var(--line); }
.badge.b-warn { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.b-risk, .badge.b-ok { border-color: transparent; }

/* result */
.decision { border-radius: 8px; }
.confidence .bar i { background: var(--ink); }
.actions li svg.lucide { color: var(--accent); }
.cite { background: var(--surface); }
.cite svg.lucide { color: var(--accent); }
.draft-sec { background: var(--surface-2); }
.draft { background: var(--surface); max-height: 260px; }
.approve { margin-top: 14px; }
.approve-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.approve-row .btn { min-height: 48px; padding: 12px 22px; font-size: 16px; }
.approve-row .btn svg.lucide { color: var(--accent); }
.approve-who { font-size: 13.5px; color: var(--ink-3); }
.approve-note { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.approve-note svg.lucide { color: var(--accent); width: 16px; height: 16px; }
.approved { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--accent); background: var(--surface); font-size: 15px; }
.approved svg.lucide { color: var(--accent); margin-top: 2px; }
.approved small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.verified { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ok); margin: 12px 0 0; }
.note svg.lucide { color: var(--accent); }

/* extras */
.x-sec h4 { margin-bottom: 14px; }
.x-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.xchip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.xchip.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.xchip.warn { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.xchip.risk { color: var(--risk); background: var(--risk-soft); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cov { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 15.5px; }
.score-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.big-num { font-size: 48px; font-weight: 500; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-num.risk { color: var(--risk); }
.big-num.warn { color: var(--accent-ink); }
.score-side { flex: 1; min-width: 200px; display: grid; gap: 8px; justify-items: start; }
.meter { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; width: 100%; }
.meter i { height: 10px; border-radius: 2px; background: var(--sunken); }
.meter i.cut { margin-right: 5px; }
.meter i.on { background: var(--ink); }
.meter i.on.warn { background: var(--accent); }
.meter i.on.risk { background: var(--risk); }
.meter-scale { display: flex; justify-content: space-between; width: 100%; font-size: 11.5px; color: var(--ink-3); }
.flags { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.flags li, .drivers li { display: flex; gap: 10px; align-items: flex-start; }
.fl-w, .dv { flex: none; min-width: 34px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-ink); font-size: 14px; padding-top: 1px; }
.fl-t { font-weight: 600; font-size: 14.5px; display: block; }
.fl-d { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.flags .xchip { margin-top: 5px; }
.sim, .drivers, .deadlines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sim li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sim .mono { min-width: 86px; }
.sim-bar { flex: 1; height: 6px; background: var(--sunken); border-radius: 4px; overflow: hidden; max-width: 140px; }
.sim-bar i { display: block; height: 100%; background: var(--ink); }
.sim-v { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 13px; min-width: 36px; }
.tier { font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line-2); }
.tier small { display: block; font-size: 12px; letter-spacing: 0; color: var(--ink-3); margin-top: 4px; font-weight: 400; }
.tier.risk { border-color: var(--risk); color: var(--risk); }
.tier.warn { border-color: var(--accent); color: var(--accent-ink); }
.tier.ok { border-color: var(--ok); color: var(--ok); }
.pct { flex: 1; min-width: 200px; }
.pct-l { font-size: 14px; }
.pct-track { position: relative; height: 8px; border-radius: 4px; margin: 10px 0 4px; background: linear-gradient(90deg, var(--sunken), var(--line-2)); }
.pct-track i { position: absolute; top: -5px; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); }
.pct-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }
.bars { display: grid; gap: 8px; margin-top: 16px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .bl { color: var(--ink-2); }
.bar-row .bt { height: 14px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: var(--line-2); border-radius: 3px; }
.bar-row.focus .bt i { background: var(--accent); }
.bar-row.focus .bl, .bar-row.focus .bv { color: var(--ink); font-weight: 600; }
.bar-row.base .bt i { background: var(--ink-3); }
.bar-row .bv { font-variant-numeric: tabular-nums; min-width: 60px; text-align: right; }
.xlist { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 14.5px; }
.xlist.excl { list-style: none; padding: 0; gap: 8px; }
.xl-h { margin: 10px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.xl-h:first-of-type { margin-top: 0; }
.deadlines li { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); }
.dl-n { flex: none; min-width: 64px; text-align: center; font-size: 30px; font-weight: 500; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.dl-n small { display: block; font-size: 11.5px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-top: 4px; }
.dl.risk { border-color: var(--risk); }
.dl.risk .dl-n { color: var(--risk); }
.dl.warn { border-color: var(--accent); }
.dl.warn .dl-n { color: var(--accent-ink); }
.stack { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--sunken); margin-top: 4px; }
.stack i { display: block; height: 100%; }
.legend-l { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.legend-l li { display: inline-flex; align-items: center; gap: 6px; }
.legend-l .sw { width: 10px; height: 10px; border-radius: 2px; }
.xtable { overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 4px; }
.xtable table { border-collapse: collapse; width: 100%; font-size: 13px; }
.xtable th, .xtable td { text-align: left; padding: 6px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
.xtable th { color: var(--ink-3); font-weight: 600; background: var(--surface-2); }
.extra dd .extra { font-weight: 400; }
.x-lock { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.x-lock svg.lucide { color: var(--ink); margin-top: 2px; }
.vault-hint svg.lucide { color: var(--ink); }
.graph .center circle { fill: var(--accent); }
.toast { background: var(--ink); color: var(--bg); }
.toast svg.lucide { color: var(--accent); }

/* Sunum modu: everything larger for a projector */
:root[data-present="1"] body { zoom: 1.22; }
:root[data-present="1"] .legend-note { display: none; }
@media (max-width: 1500px) { :root[data-present="1"] body { zoom: 1.12; } }
@media (max-width: 860px) {
  :root[data-present="1"] body { zoom: 1; }
  .present-btn span { display: none; }
  .legend-note { margin-left: 0; }
}
@media (max-width: 600px) {
  .proof { grid-template-columns: 1fr; }
  .proof-item + .proof-item { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .stage-satellite { margin: 12px 0 0; width: auto; }
}

/* QA pass: time row wraps cleanly when the backend sends a sentence, not a number */
.wf-time { flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 8px; }
.wf-time .time-before { flex: 1 1 100%; font-size: 13.5px; line-height: 1.45; }
.wf-time .arrow { align-self: center; }
.wf-time .time-after { flex: 1 1 0; min-width: 0; font-size: 21px; line-height: 1.2; }
.wf-time .who { flex: 1 1 100%; margin-left: 0; text-align: left; font-size: 12.5px; }
/* QA pass: wide raw tables scroll inside their card instead of widening the timeline */
.timeline { grid-template-columns: minmax(0, 1fr); }
.timeline > *, .ev-row, .ev-main { min-width: 0; }
.raw { max-width: 100%; }
/* QA pass: stepper wraps into a tidy grid; connector lines no longer dangle at the start of a row */
.stepper { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 16px; row-gap: 8px; }
.stepper li { white-space: normal; padding-right: 0; line-height: 1.3; }
.stepper li + li::before { display: none; }
.stepper .num { flex: none; }
.graph .node-locked { cursor: not-allowed; }
.graph .node-locked text { fill: var(--ink-3); font-weight: 400; }
/* QA pass: repeated denials by the same rule collapse to one card + compact lines */
.denied-count { margin-left: 8px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); vertical-align: 2px; }
.ev.denied-mini { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); }
.ev.denied-mini svg.lucide { width: 15px; height: 15px; flex: none; color: var(--ink); }

.tl-explain { margin: 0 0 12px; color: var(--ink-3); font-size: 13.5px; line-height: 1.45; }
.quote br { display: block; margin-bottom: 2px; }

/* ---- v3: language switch, persona note */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 32px; }
.lang-switch button { border: 0; background: var(--surface); padding: 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.persona-note { margin: 8px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--ink-3); }

/* ---- v3: Company Memory, Mithrandir Vault visual language */
.mem { --m-canvas: #f3f3f5; --m-surface: #fff; --m-control: #f1f1f3; --m-hover: #e9e9ec; --m-graph: #eef0f3; --m-line: #e4e4e8; --m-line-2: #cfcfd6;
  --m-t1: #18181b; --m-t2: #46464e; --m-t3: #64646d; --m-accent: #6b5734; --m-accent-soft: rgba(107,87,52,.1); --m-edge: rgba(70,70,84,.2); --m-edge-focus: rgba(107,87,52,.9);
  display: grid; grid-template-columns: 280px minmax(0, 1fr) 360px; height: calc(100vh - 100px); min-height: 560px; background: var(--m-canvas); color: var(--m-t1);
  font-size: 13.5px; }
:root[data-theme="dark"] .mem { --m-canvas: #131316; --m-surface: #131316; --m-control: #232328; --m-hover: #2a2a30; --m-graph: #050507; --m-line: #26262c; --m-line-2: #34343c;
  --m-t1: #ededef; --m-t2: #b0b0b8; --m-t3: #8e8e98; --m-accent: #cdbfa6; --m-accent-soft: rgba(205,191,166,.14); --m-edge: rgba(200,200,215,.18); --m-edge-focus: rgba(205,191,166,.9); }
.mem button { font: inherit; color: inherit; background: none; border: 0; text-align: left; }
.m-side, .m-detail { background: var(--m-surface); overflow: auto; padding: 14px 10px 18px; }
.m-side { border-right: 1px solid var(--m-line); }
.m-detail { border-left: 1px solid var(--m-line); padding: 18px 18px 24px; }
.m-head { display: flex; align-items: center; gap: 8px; padding: 2px 8px 10px; font-weight: 600; font-size: 13px; }
.m-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--m-control); color: var(--m-t2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.m-sub { padding: 14px 8px 6px; margin-top: 8px; border-top: 1px solid var(--m-line); color: var(--m-t3); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.m-list, .m-links, .m-items { list-style: none; margin: 0; padding: 0; }
.m-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; cursor: pointer; min-height: 34px; }
.m-row:hover { background: var(--m-hover); }
.m-row[aria-pressed="true"] { background: var(--m-accent-soft); color: var(--m-accent); font-weight: 600; }
.m-row.locked { color: var(--m-t3); }
.m-ic { display: inline-grid; place-items: center; color: var(--m-t2); }
.m-ic svg.lucide { width: 15px; height: 15px; }
.m-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.m-n svg.lucide { width: 13px; height: 13px; }
.m-c { color: var(--m-t3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.m-sw { width: 9px; height: 9px; border-radius: 2px; flex: none; display: inline-block; }
.m-persona { display: grid; gap: 6px; margin: 16px 8px 0; padding-top: 14px; border-top: 1px solid var(--m-line); color: var(--m-t3); font-size: 12.5px; }
.m-persona select { width: 100%; min-width: 0; padding: 7px 8px; border-radius: 6px; border: 1px solid var(--m-line-2); background: var(--m-surface); color: var(--m-t1); font-size: 13px; }
.m-main { display: flex; flex-direction: column; min-width: 0; }
.m-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--m-surface); border-bottom: 1px solid var(--m-line); flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--m-control); }
.seg button { padding: 5px 13px; border-radius: 6px; font-size: 13px; color: var(--m-t2); }
.seg button[aria-pressed="true"] { background: var(--m-surface); color: var(--m-t1); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 .5px rgba(0,0,0,.06); }
.m-search { flex: 1; min-width: 200px; max-width: 460px; display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 34px; border-radius: 8px; background: var(--m-control); color: var(--m-t3); }
.m-search svg.lucide { width: 15px; height: 15px; }
.m-search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13.5px; color: var(--m-t1); }
.mem .m-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: var(--m-accent-soft); color: var(--m-accent); font-size: 12.5px; font-weight: 600; }
.m-chip svg.lucide { width: 13px; height: 13px; }
.m-count { margin-left: auto; color: var(--m-t3); font-size: 12.5px; }
.m-count b { color: var(--m-t1); font-weight: 600; }
.m-body { position: relative; flex: 1; min-height: 0; }
.m-graph { position: absolute; inset: 0; background: var(--m-graph); overflow: hidden; }
.m-svg { width: 100%; height: 100%; display: block; cursor: grab; }
.m-svg:active { cursor: grabbing; }
.m-edge { stroke: var(--m-edge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-edge.focus { stroke: var(--m-edge-focus); stroke-width: 1.6; }
.m-node { cursor: pointer; transition: opacity .2s; }
.m-label { fill: var(--m-t1); paint-order: stroke; stroke: var(--m-graph); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; font-family: var(--f-sans); }
.m-loading { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; gap: 8px; align-items: center; color: var(--m-t2); }
.m-loading svg.lucide { width: 15px; height: 15px; animation: mspin 1s linear infinite; }
@keyframes mspin { to { transform: rotate(360deg); } }
.m-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; background: var(--m-surface); border-radius: 8px; box-shadow: 0 0 0 1px rgba(24,24,27,.08), 0 6px 16px -6px rgba(24,24,27,.18); }
.m-zoom button { width: 34px; height: 32px; display: grid; place-items: center; color: var(--m-t2); }
.m-zoom button:hover { background: var(--m-hover); }
.m-zoom svg.lucide { width: 15px; height: 15px; }
.m-items { position: absolute; inset: 0; overflow: auto; padding: 8px 12px; background: var(--m-canvas); }
.mem .m-item { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 6px; background: var(--m-surface); margin-bottom: 4px; box-shadow: 0 0 0 1px rgba(24,24,27,.05); cursor: pointer; }
.mem .m-item:hover { background: var(--m-hover); }
.m-item[aria-pressed="true"] { box-shadow: 0 0 0 1.5px var(--m-accent); }
.m-item.locked { color: var(--m-t3); }
.m-it { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.m-it svg.lucide { width: 13px; height: 13px; }
.m-ty { color: var(--m-t3); font-size: 12px; }
.m-empty { color: var(--m-t3); padding: 24px 8px; text-align: center; }
.m-dh { display: flex; align-items: center; gap: 8px; color: var(--m-t3); font-size: 12.5px; }
.m-dt { margin: 6px 0 14px; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.005em; }
.m-fields { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 6px 14px; margin: 0; }
.m-fields dt { color: var(--m-t3); }
.m-fields dd { margin: 0; color: var(--m-t1); overflow-wrap: anywhere; }
.m-detail .m-sub { padding-left: 0; padding-right: 0; }
.m-links .m-row { padding: 6px 6px; }
.m-rel { color: var(--m-t3); font-size: 12px; white-space: nowrap; }
.m-src { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--m-line); color: var(--m-t3); font-size: 12.5px; display: flex; gap: 6px; align-items: flex-start; }
.m-src svg.lucide { width: 13px; height: 13px; margin-top: 3px; flex: none; }
.m-locked { display: grid; gap: 8px; justify-items: start; padding: 18px; border-radius: 8px; background: var(--m-control); color: var(--m-t2); }
@media (max-width: 1100px) { .mem { grid-template-columns: 240px minmax(0, 1fr); } .m-detail { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--m-line); } }
@media (max-width: 720px) { .mem { grid-template-columns: 1fr; height: auto; } .m-body { height: 70vh; } .m-side { border-right: 0; } }
