/* =====================================================================
   VeriKit console. Design language: security print.
   Operations is a paper room, Developer is an ink room. Same components, two sets of variables.
   Sections: tokens, base, shell, primitives, data display, pages, overlays, responsive.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #F1EEE6;
  --sheet: #FBF9F4;
  --sheet-2: #F6F3EB;
  --sunk: #EAE6DA;

  --ink: #121512;
  --ink-2: #3A3F3A;
  --ink-3: #6B706A;
  --ink-4: #9A9E97;

  --line: rgba(18, 21, 18, .11);
  --line-2: rgba(18, 21, 18, .20);

  --brand: #2233DD;
  --brand-ink: #141F8F;
  --brand-tint: #E2E5FB;

  --pass: #0B7B52;
  --pass-tint: #DCEFE5;
  --review: #A86400;
  --review-tint: #F7E6C4;
  --fail: #BE331C;
  --fail-tint: #F7DAD3;

  --pop: 0 24px 60px -20px rgba(18, 21, 18, .38);
  --r1: 8px;
  --r2: 14px;
  --r3: 22px;

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Geist', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --side-w: 236px;
  --top-h: 58px;
  color-scheme: light;
}

html[data-room="dev"] {
  --paper: #0D100E;
  --sheet: #141814;
  --sheet-2: #191E19;
  --sunk: #0A0C0B;

  --ink: #EAEDE6;
  --ink-2: #C2C7BE;
  --ink-3: #8A9086;
  --ink-4: #5F655C;

  --line: rgba(234, 237, 230, .11);
  --line-2: rgba(234, 237, 230, .22);

  --brand: #94A3FF;
  --brand-ink: #BAC4FF;
  --brand-tint: rgba(148, 163, 255, .14);

  --pass: #46CF8D;
  --pass-tint: rgba(70, 207, 141, .14);
  --review: #F2AE45;
  --review-tint: rgba(242, 174, 69, .14);
  --fail: #FF7B62;
  --fail-tint: rgba(255, 123, 98, .14);

  --pop: 0 24px 60px -20px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 400 14px/1.5 var(--f-body); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "ss01" 1;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
kbd {
  font: 500 10.5px/1 var(--f-mono); padding: 3px 5px; border-radius: 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--ink-3); background: var(--sheet);
}
::selection { background: var(--brand); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--f-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 2000; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 10px; }
.ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Shell ---------- */
.vk-top {
  position: sticky; top: 0; z-index: 100; height: var(--top-h);
  display: flex; align-items: center; gap: 16px; padding: 0 20px 0 16px;
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.vk-iconbtn.vk-menu { display: none; }
.vk-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding-right: 16px; border-right: 1px solid var(--line); height: 34px; }
.vk-mark { position: relative; width: 34px; height: 34px; color: var(--brand); flex: none; }
.vk-mark svg { width: 100%; height: 100%; display: block; }
.vk-mark .core { fill: var(--paper); }
.vk-mark .tick { fill: none; stroke: var(--ink); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.vk-brandword { display: flex; flex-direction: column; line-height: 1.1; }
.vk-brandword b { font: 700 17px/1.1 var(--f-display); letter-spacing: -.02em; }
.vk-brandword span { font: 400 10.5px/1.2 var(--f-mono); color: var(--ink-3); margin-top: 2px; }
html.wl .vk-mark { color: #8A1F2D; }
html.wl .vk-brandword span { visibility: hidden; }

.vk-org { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.vk-org .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pass); }
.vk-env { font: 500 10px/1 var(--f-mono); padding: 3px 6px; border-radius: 5px; background: var(--brand-tint); color: var(--brand-ink); }

.vk-cmd {
  min-width: 0; display: flex; align-items: center; gap: 10px; width: min(380px, 34vw); height: 36px; padding: 0 8px 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--sheet); color: var(--ink-3); text-align: left;
  transition: border-color .15s ease, color .15s ease;
}
.vk-cmd:hover { border-color: var(--ink-3); color: var(--ink-2); }
.vk-cmd span { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vk-top-spacer { flex: 1; }
.vk-iconbtn {
  position: relative; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-3);
  transition: background-color .15s ease, color .15s ease;
}
.vk-iconbtn:hover { background: var(--sheet); color: var(--ink); border-color: var(--line); }
.dot-alert { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--fail); box-shadow: 0 0 0 2px var(--paper); }
.vk-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); font: 600 12px/1 var(--f-display); letter-spacing: .02em;
}

.vk-shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.vk-side {
  width: var(--side-w); flex: none; padding: 18px 12px 16px; display: flex; flex-direction: column;
  position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto;
  border-right: 1px solid var(--line);
}
.vk-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin-bottom: 20px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--sheet); }
.vk-room { text-align: center; text-decoration: none; padding: 8px 6px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); transition: background-color .15s ease, color .15s ease; }
.vk-room:hover { color: var(--ink); }
.vk-room.is-on { background: var(--ink); color: var(--paper); }
.vk-sidelabel { font: 500 11px/1 var(--f-mono); color: var(--ink-4); padding: 0 10px; margin: 2px 0 8px; }
.vk-navlist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 22px; }
.vk-nav {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px;
  text-decoration: none; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  transition: background-color .15s ease, color .15s ease;
}
.vk-nav .ico { color: var(--ink-3); transition: color .15s ease; }
.vk-nav:hover { background: var(--sheet); color: var(--ink); }
.vk-nav.is-on { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.vk-nav.is-on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.vk-nav.is-on .ico { color: var(--brand); }
.vk-count { margin-left: auto; font: 600 11px/1 var(--f-mono); padding: 3px 7px; border-radius: 999px; background: var(--review-tint); color: var(--review); }
.vk-foot { margin-top: auto; padding: 14px 12px; border: 1px dashed var(--line-2); border-radius: var(--r2); font-size: 12px; color: var(--ink-3); }
.vk-foot b { display: block; color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
.vk-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); }

.vk-main { flex: 1; min-width: 0; padding: 30px 36px 72px; animation: vk-in .38s ease both; }
@keyframes vk-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font: 700 32px/1.05 var(--f-display); letter-spacing: -.025em; }
.page-head p { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 14px; font: 600 19px/1.2 var(--f-display); letter-spacing: -.015em; }
.h2 small { font: 400 12px/1.2 var(--f-mono); color: var(--ink-3); letter-spacing: 0; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 9px 16px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: transform .1s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); }
.btn-line { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { background: var(--sheet); border-color: var(--ink-3); }
.btn-quiet { background: transparent; color: var(--ink-3); }
.btn-quiet:hover { background: var(--sheet); color: var(--ink); }
.btn-pass { background: var(--pass-tint); color: var(--pass); }
.btn-pass:hover { background: color-mix(in srgb, var(--pass) 22%, transparent); }
.btn-fail { background: var(--fail-tint); color: var(--fail); }
.btn-fail:hover { background: color-mix(in srgb, var(--fail) 22%, transparent); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn kbd { margin-left: 2px; background: transparent; border-color: currentColor; color: inherit; opacity: .6; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.badge .ico { width: 12px; height: 12px; stroke-width: 2.6; }
.badge.is-passed, .badge.is-pass { background: var(--pass-tint); color: var(--pass); }
.badge.is-manual_review, .badge.is-review { background: var(--review-tint); color: var(--review); }
.badge.is-failed, .badge.is-fail { background: var(--fail-tint); color: var(--fail); }
.badge.is-info { background: var(--brand-tint); color: var(--brand-ink); }
.badge.is-plain { background: transparent; border: 1px solid var(--line-2); color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-size: 12.5px; font-weight: 600; color: var(--ink-3); transition: all .15s ease; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { margin-left: 5px; font: 500 11px var(--f-mono); opacity: .65; }

.search { display: flex; align-items: center; gap: 8px; min-width: 300px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--sheet); color: var(--ink-3); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .grow { flex: 1; }

.switch { position: relative; display: inline-block; width: 36px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background-color .2s ease; }
.switch .slider::before { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; border-radius: 50%; background: var(--sheet); transition: transform .2s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(15px); background: #fff; }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Data display ---------- */
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r2); }
.pad { padding: 22px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Ledger: a row of figures divided by hairlines */
.ledger { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r2); background: var(--line); }
.ledger > div { padding: 20px 22px 18px; background: var(--sheet); }
.ledger .k { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.ledger .v { margin-top: 10px; font: 700 34px/1 var(--f-display); letter-spacing: -.03em; }
.ledger .v small { font: 400 14px var(--f-mono); color: var(--ink-3); letter-spacing: 0; }
.ledger .n { margin-top: 9px; font-size: 12px; color: var(--ink-3); }
.ledger .n.up { color: var(--pass); }
.ledger .n.down { color: var(--fail); }
.meter { height: 6px; margin-top: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--w, 0%); border-radius: 999px; background: var(--brand); transition: width .6s ease; }

/* Table */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); }
.vk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vk-table th { padding: 12px 18px; text-align: left; white-space: nowrap; font: 500 12px/1 var(--f-mono); color: var(--ink-3); background: var(--sheet-2); border-bottom: 1px solid var(--line); }
.vk-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vk-table tbody tr:last-child td { border-bottom: 0; }
.vk-table tbody tr { transition: background-color .12s ease; }
.vk-table tbody tr:hover { background: var(--sheet-2); }
.vk-table tr[data-case] { cursor: pointer; }
.vk-table .sub, .sub { font-size: 12.5px; color: var(--ink-3); }
.vk-table .go { width: 1%; color: var(--ink-4); }
.vk-table tr[data-case]:hover .go { color: var(--brand); }
.vk-table .m { font: 500 12.5px var(--f-mono); color: var(--ink-2); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.initials { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--sunk); color: var(--ink-2); font: 600 11.5px var(--f-display); letter-spacing: .02em; }
.who b { display: block; font-weight: 600; color: var(--ink); line-height: 1.25; }
.who .mono { display: block; font-size: 11.5px; color: var(--ink-4); }
.who-btn { all: unset; cursor: pointer; }
.who-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
[hidden] { display: none !important; }

/* The Trace: five bars, one per check, in pipeline order. Height of the fill = confidence. */
.pips { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.pip { --c: var(--pass); display: block; width: 6px; height: 100%; border-radius: 2px; background: linear-gradient(to top, var(--c) var(--fill, 100%), var(--line-2) 0); }
.pip.is-weak { --c: var(--review); }
.pip.is-bad { --c: var(--fail); }

/* Seal: guilloche bezel with a verdict at the centre */
.seal { --c: var(--pass); position: relative; display: inline-block; width: 64px; height: 64px; color: var(--c); flex: none; }
.seal.is-manual_review { --c: var(--review); }
.seal.is-failed { --c: var(--fail); }
.seal > svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.seal-core { position: absolute; inset: 22%; display: grid; place-items: center; border-radius: 50%; background: var(--sheet); color: var(--c); box-shadow: 0 0 0 1px var(--line); }
.seal-core .ico { width: 52%; height: 52%; stroke-width: 2.6; }
.seal-lg { width: 148px; height: 148px; }
.seal-sm { width: 52px; height: 52px; }

/* Day tape */
.tape { position: relative; }
.tape svg { display: block; width: 100%; height: 76px; overflow: visible; }
.tape .t { stroke-linecap: butt; }
.tape .t-p { stroke: var(--ink-4); stroke-opacity: .55; }
.tape .t-r { stroke: var(--review); }
.tape .t-f { stroke: var(--fail); }
.tape .base { stroke: var(--line-2); }
.tape-axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 11.5px var(--f-mono); color: var(--ink-3); }
.tape-key { display: flex; gap: 16px; font-size: 12px; color: var(--ink-3); }
.tape-key i { display: inline-block; width: 3px; height: 12px; margin-right: 6px; vertical-align: -2px; border-radius: 1px; }

/* Month bars */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; margin-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.bar { width: 100%; max-width: 54px; height: calc((100% - 26px) * var(--k, .5)); border-radius: 6px 6px 2px 2px; background: var(--ink); opacity: .16; transition: opacity .15s ease; }
.bar-col:hover .bar { opacity: .35; }
.bar.is-now { background: var(--brand); opacity: 1; }
.bar-col span { font: 400 11.5px var(--f-mono); color: var(--ink-3); }
.bar-col em { font: 500 11.5px var(--f-mono); color: var(--ink-2); font-style: normal; min-height: 1em; }

/* ---------- Pages ---------- */
.hero { position: relative; overflow: hidden; padding: 34px 38px 26px; border: 1px solid var(--line); border-radius: var(--r3); background: var(--sheet); }
.hero-rosette { position: absolute; right: -150px; top: -190px; width: 560px; height: 560px; color: var(--brand); opacity: .13; pointer-events: none; }
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-date { font: 400 12.5px var(--f-mono); color: var(--ink-3); }
.hero-title { margin-top: 14px; font: 700 clamp(34px, 4.4vw, 58px)/1 var(--f-display); letter-spacing: -.035em; max-width: 14ch; text-wrap: balance; }
.hero-sub { margin-top: 16px; max-width: 34rem; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.hero-sub b { font-weight: 600; color: var(--ink); }
.hero-sub a { text-decoration-color: var(--review); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-seal { position: relative; flex: none; width: 214px; height: 214px; color: var(--brand); }
.hero-seal > svg.rose { position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px); opacity: .6; }
.hero-seal svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-seal .ring-track { fill: none; stroke: var(--line); stroke-width: 5; }
.hero-seal .ring-val { fill: none; stroke: var(--pass); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0 100; animation: vk-ring 1.4s cubic-bezier(.3, .8, .4, 1) .25s forwards; }
@keyframes vk-ring { to { stroke-dasharray: var(--pr) 100; } }
.hero-seal .core { position: absolute; inset: 56px; display: grid; place-content: center; text-align: center; border-radius: 50%; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.hero-seal .core b { font: 700 28px/1 var(--f-display); letter-spacing: -.03em; color: var(--ink); }
.hero-seal .core span { margin-top: 4px; font: 400 11px var(--f-mono); color: var(--ink-3); }
.hero-tape { position: relative; margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--line-2); }
.hero-tape-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); font-weight: 500; }

.jump { display: block; padding: 22px; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.jump:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.jump .big { font: 700 36px/1 var(--f-display); letter-spacing: -.03em; }
.jump b { display: block; margin-top: 14px; font: 600 16px var(--f-display); }
.jump p { margin-top: 4px; font-size: 13px; color: var(--ink-3); }

/* Review queue */
.keys { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; font-size: 12.5px; color: var(--ink-3); }
.keys span { display: inline-flex; align-items: center; gap: 6px; }
.cases { overflow: hidden; }
.case { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 14px 24px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--sheet); transition: opacity .35s ease, transform .35s ease, max-height .35s ease, padding .35s ease; outline-offset: -3px; }
.case:last-child { border-bottom: 0; }
.case:focus-visible, .case.is-focus { outline: 2px solid var(--brand); background: var(--sheet-2); }
.case.is-leaving { opacity: 0; transform: translateX(14px); max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; border: 0; }
.case-main { min-width: 0; }
.case-reason { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--review); }
.case-reason .ico { width: 14px; height: 14px; }
.case-trace { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.case-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-3); }
.case-checks i { font-style: normal; }
.case-checks .is-weak, .case-checks .is-bad { color: var(--review); font-weight: 600; }
.case-checks .is-bad { color: var(--fail); }
.case-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Reports: documents */
.doc { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.doc::after { content: ""; position: absolute; right: -52px; top: -52px; width: 150px; height: 150px; border-radius: 50%; border: 1px dashed var(--line-2); pointer-events: none; }
.doc-rose { position: absolute; right: -48px; top: -48px; width: 140px; height: 140px; color: var(--brand); opacity: .22; pointer-events: none; }
.doc-serial { font: 400 11.5px var(--f-mono); color: var(--ink-3); }
.doc h3 { font: 600 19px/1.2 var(--f-display); letter-spacing: -.015em; }
.doc dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc dt { font-size: 12px; color: var(--ink-3); }
.doc dd { margin-top: 2px; font: 700 22px/1.1 var(--f-display); letter-spacing: -.02em; }
.doc-actions { display: flex; gap: 8px; margin-top: 2px; }

.tier { padding: 22px; }
.tier-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tier-head b { font: 600 18px var(--f-display); letter-spacing: -.01em; }
.tier-head p { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.tier .meter { height: 8px; margin: 18px 0 8px; }
.tier .meter i { background: linear-gradient(90deg, var(--pass), var(--brand)); }
.tier small { font: 400 12px var(--f-mono); color: var(--ink-3); }
.tier-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.row-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 500; }
.row-switch:last-child { border-bottom: 0; }
.row-switch small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* Developer room */
.keyrow { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--sunk); }
.keyrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px var(--f-mono); color: var(--ink); }
.keytag { font: 600 10.5px/1 var(--f-mono); padding: 4px 7px; border-radius: 5px; }
.keytag.live { background: var(--fail-tint); color: var(--fail); }
.keytag.test { background: var(--brand-tint); color: var(--brand-ink); }
.card h4, .pad h4 { font: 600 15px var(--f-display); letter-spacing: -.01em; }
.card h4 + p { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.method { font: 600 11.5px var(--f-mono); color: var(--ink-3); }

.line-chart svg { display: block; width: 100%; height: auto; max-height: 340px; }
.line-chart .ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.line-chart .ar { fill: url(#vk-area); }
.line-chart .dt { fill: var(--sheet); stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; }
.line-chart .er { fill: var(--fail); }
.line-chart .gl { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.legend { display: flex; gap: 18px; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }

.errs details { border-bottom: 1px solid var(--line); }
.errs details:last-child { border-bottom: 0; }
.errs summary { display: flex; align-items: center; gap: 16px; padding: 16px 22px; cursor: pointer; list-style: none; }
.errs summary::-webkit-details-marker { display: none; }
.errs summary:hover { background: var(--sheet-2); }
.errs summary b { flex: 1; font-weight: 600; font-size: 13.5px; }
.errs summary .chev { color: var(--ink-4); transition: transform .2s ease; }
.errs details[open] summary .chev { transform: rotate(180deg); }
.errcode { font: 600 12.5px var(--f-mono); padding: 3px 8px; border-radius: 6px; }
.errcode.c4 { background: var(--review-tint); color: var(--review); }
.errcode.c2 { background: var(--pass-tint); color: var(--pass); }
.errs dl { padding: 4px 22px 18px; background: var(--sheet-2); }
.errs dl > div { display: flex; justify-content: space-between; gap: 24px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.errs dl > div:last-child { border-bottom: 0; }
.errs dt { color: var(--ink-3); flex: none; }
.errs dd { text-align: right; font-family: var(--f-mono); font-size: 12.5px; }
.errs dd.prose { font-family: var(--f-body); max-width: 34rem; }

.scenarios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scenario { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-align: left; border: 1px solid var(--line); border-radius: var(--r2); background: var(--sheet); transition: border-color .15s ease, background-color .15s ease; }
.scenario:hover { border-color: var(--ink-3); }
.scenario[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-tint); }
.scenario b { font: 600 15px var(--f-display); }
.scenario span { font-size: 12.5px; color: var(--ink-3); }
.output { margin-top: 16px; }
.output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
pre.code { margin: 0; padding: 18px 20px; overflow-x: auto; background: var(--sunk); font: 400 12.5px/1.7 var(--f-mono); color: var(--ink-2); border-radius: 0 0 var(--r2) var(--r2); min-height: 120px; }
.testids { display: grid; gap: 8px; }
.testids div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); font: 400 12.5px var(--f-mono); }
.testids span:last-child { color: var(--ink-3); }

.plan { position: relative; overflow: hidden; padding: 28px; border-radius: var(--r3); background: var(--brand); color: #0D100E; border: 0; }
html[data-room="ops"] .plan { color: #fff; }
.plan-rose { position: absolute; right: -90px; top: -110px; width: 360px; height: 360px; color: currentColor; opacity: .22; pointer-events: none; }
.plan > * { position: relative; }
.plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.plan-name { font: 700 26px/1.1 var(--f-display); letter-spacing: -.025em; }
.plan-price { margin-top: 4px; font: 500 14px var(--f-mono); opacity: .85; }
.plan .btn { background: rgba(255, 255, 255, .18); color: inherit; }
.plan-meter { margin-top: 28px; }
.plan-meter .row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; opacity: .9; margin-bottom: 8px; }
.plan-meter .bar2 { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.plan-meter .bar2 i { display: block; height: 100%; border-radius: 999px; background: currentColor; }
.plan-note { margin-top: 16px; font-size: 12.5px; opacity: .85; }
.pay { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.pay-card { width: 40px; height: 27px; border-radius: 5px; background: var(--ink); flex: none; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--ink-3); }
.kv b { color: var(--ink); font-weight: 600; }


/* ---------- Empty states ---------- */
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 52px 24px 56px; text-align: center; }
.empty-state .art { width: 230px; height: auto; margin-bottom: 12px; color: var(--ink-3); }
.empty-state h3 { font: 600 21px/1.2 var(--f-display); letter-spacing: -.02em; }
.empty-state p { max-width: 46ch; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.empty-state .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.empty-state.is-compact { padding: 32px 24px 36px; }
.empty-state.is-compact .art { width: 168px; margin-bottom: 6px; }
.empty-state.is-compact h3 { font-size: 18px; }

/* Overview hero with nothing in it yet */
.hero.is-empty .hero-title { max-width: 12ch; }
.hero-seal.is-empty .rose { opacity: .32; }
.hero-seal.is-empty .core b { color: var(--ink-4); }
.tape-empty { display: block; width: 100%; height: 70px; overflow: visible; }
.tape-empty .flat { fill: none; stroke: var(--ink-4); stroke-width: 1.5; stroke-dasharray: 2 7; vector-effect: non-scaling-stroke; }
.tape-empty .blip { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .75; }

.jump .jicon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-tint); color: var(--brand-ink); }
.jump .jicon .ico { width: 20px; height: 20px; }
.jump b { margin-top: 16px; }

.event-list { margin-top: 8px; }
.event-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.event-list li:last-child { border-bottom: 0; }

/* ---------- Overlays ---------- */
.vk-overlay { position: fixed; inset: 0; z-index: 998; background: rgba(8, 10, 8, .5); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.vk-overlay.is-on { opacity: 1; pointer-events: auto; }
.vk-slide { position: fixed; top: 0; right: 0; bottom: 0; z-index: 999; width: 480px; max-width: 94vw; display: flex; flex-direction: column; background: var(--sheet); border-left: 1px solid var(--line-2); box-shadow: var(--pop); transform: translateX(102%); transition: transform .34s cubic-bezier(.3, .8, .4, 1); }
.vk-slide.is-on { transform: none; }
.case-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.case-panel > [data-case-panel] { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.case-head { display: flex; flex: none; align-items: center; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.case-head > div { flex: 1; min-width: 0; }
.case-head h3 { font: 700 21px/1.15 var(--f-display); letter-spacing: -.02em; }
.case-head .mono { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.case-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px; }
.case-verdict { font: 600 17px/1.3 var(--f-display); letter-spacing: -.01em; }
.case-note { margin-top: 6px; font-size: 13.5px; color: var(--review); font-weight: 600; }
.case-foot { display: flex; flex: none; flex-wrap: wrap; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--sheet); }
.case-foot .push { margin-left: auto; }

.trace { margin-top: 22px; }
.station { position: relative; padding: 0 0 22px 34px; }
.station:last-child { padding-bottom: 0; }
.station::before { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 1.5px; background: var(--line-2); }
.station:last-child::before { display: none; }
.station .node { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--pass); background: var(--pass-tint); }
.station.is-weak .node { border-color: var(--review); background: var(--review-tint); }
.station.is-bad .node { border-color: var(--fail); background: var(--fail-tint); }
.station.is-ok .node::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid var(--pass); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.station.is-bad .node::after, .station.is-bad .node::before { content: ""; position: absolute; left: 7px; top: 3px; width: 2px; height: 10px; background: var(--fail); transform: rotate(45deg); }
.station.is-bad .node::before { transform: rotate(-45deg); }
.station.is-weak .node::after { content: ""; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border-radius: 0 0 8px 8px; background: var(--review); }
.st-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-head b { font: 600 15px var(--f-display); }
.st-val { font-size: 13px; font-weight: 600; color: var(--pass); }
.station.is-weak .st-val { color: var(--review); }
.station.is-bad .st-val { color: var(--fail); }
.st-sum { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.gauge { position: relative; height: 8px; margin-top: 12px; border-radius: 999px; background: var(--line); }
.gauge-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v); border-radius: 999px; background: var(--pass); }
.station.is-weak .gauge-fill { background: var(--review); }
.station.is-bad .gauge-fill { background: var(--fail); }
.gauge-min { position: absolute; left: var(--min); top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 1px; }
.gauge-cap { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.st-rows { margin-top: 10px; }
.st-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.st-rows > div:last-child { border-bottom: 0; }
.st-rows dt { color: var(--ink-3); }
.st-rows dd { font: 500 12.5px var(--f-mono); text-align: right; }

.vk-pal { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: center; align-items: flex-start; padding-top: 13vh; }
.vk-pal-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 8, .5); }
.vk-pal-box { position: relative; width: min(600px, 92vw); border: 1px solid var(--line-2); border-radius: var(--r3); background: var(--sheet); box-shadow: var(--pop); overflow: hidden; }
.vk-pal-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.vk-pal-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.vk-pal-list { max-height: 52vh; overflow-y: auto; padding: 8px; }
.vk-pal-group { padding: 10px 12px 4px; font: 500 11px var(--f-mono); color: var(--ink-4); }
.vk-pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.vk-pal-item.is-on { background: var(--brand-tint); color: var(--brand-ink); }
.vk-pal-item small { margin-left: auto; font: 400 11.5px var(--f-mono); color: var(--ink-3); }
.vk-pal-empty { padding: 28px 16px; text-align: center; color: var(--ink-3); }

.toasts { position: fixed; right: 22px; bottom: 22px; z-index: 1300; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 360px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 500; box-shadow: var(--pop); animation: vk-toast .28s cubic-bezier(.3, .8, .4, 1); }
.toast .ico { color: var(--pass); }
html[data-room="dev"] .toast .ico { color: #0B7B52; }
.toast.is-out { animation: vk-toast-out .25s ease forwards; }
@keyframes vk-toast { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes vk-toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger { --cols: 2 !important; }
  .scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .vk-iconbtn.vk-menu { display: inline-flex; }
  .vk-side { position: fixed; left: 0; top: var(--top-h); z-index: 600; height: calc(100vh - var(--top-h)); background: var(--paper); transform: translateX(-102%); transition: transform .26s ease; box-shadow: var(--pop); }
  .vk-side.is-on { transform: none; }
  .vk-main { padding: 22px 18px 60px; }
  .vk-org { display: none; }
  .hero { padding: 26px 22px 20px; }
  .hero-rosette { opacity: .08; right: -230px; top: -250px; }
  .hero-top { flex-direction: column; align-items: flex-start; gap: 24px; }
}
@media (max-width: 720px) {
  .g2, .g3, .scenarios { grid-template-columns: minmax(0, 1fr); }
  .vk-cmd { width: 36px; height: 36px; padding: 0; justify-content: center; margin-left: auto; border-color: transparent; background: transparent; flex: none; }
  .vk-cmd span, .vk-cmd kbd { display: none; }
  .vk-top-spacer { display: none; }
  .vk-brandword span { display: none; }
  .page-head h1 { font-size: 27px; }
  .hero-seal { width: 170px; height: 170px; }
  .hero-seal .core { inset: 44px; }
  .hero-seal .core b { font-size: 22px; }
  .case { padding: 16px; grid-template-columns: minmax(0, 1fr); }
  .case-actions .btn { flex: 1; }
  .toasts { left: 14px; right: 14px; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero-seal .ring-val { stroke-dasharray: var(--pr) 100; }
}
