/* ==========================================================================
   Vaultproof design system
   An inspection bay inside a steel vault: riveted cabinet frames, sealed slabs,
   one coral inspection lamp. Reference: site-contract.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --bg: #1b1e20;            /* page, inset fields */
  --surface: #313538;       /* panels (dominant charcoal) */
  --raised: #414448;        /* hover, selected rows, table heads */
  --border: #574c4e;        /* rules, outlines, chart grid */
  --text: #f3eeeb;
  --muted: #b8b2af;
  --accent: #ed7b5a;        /* coral: lamps, primary button, active state */
  --accent-hover: #f28e70;
  --accent-press: #d9694a;
  --accent-text: #f39274;   /* coral used as text on --surface (AA) */
  --accent-ink: #1b1e20;    /* text on coral */
  --ok: #8bbd94;
  --warn: #e3b45c;
  --bad: #e25a48;
  --bad-text: #f08070;      /* error used as text on --surface (AA) */
  --idle: #6d6668;
  --scrim: rgba(14, 16, 17, 0.74);

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --fs-hero: 48px;   --lh-hero: 52px;
  --fs-h2: 28px;     --lh-h2: 34px;
  --fs-h3: 20px;     --lh-h3: 28px;
  --fs-lead: 18px;   --lh-lead: 28px;
  --fs-body: 16px;   --lh-body: 24px;
  --fs-small: 14px;  --lh-small: 20px;
  --fs-table: 13px;  --lh-table: 18px;
  --fs-mono: 13px;   --lh-mono: 18px;
  --fs-label: 12px;  --track-label: 0.08em;
  --track-head: -0.01em;

  /* Spacing: 8px scale (4 and 12 are the half steps) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 40px;
  --sp-8: 48px;
  --sp-9: 64px;
  --sp-10: 96px;

  /* Layout */
  --max: 1200px;
  --gutter: 24px;
  --section-pad: 96px;
  --panel-pad: 16px;
  --stack-gap: 12px;
  --header-h: 64px;
  --row-h: 40px;
  --hit: 40px;

  /* Frames (frame_rail.webp nine-slice) */
  --frame-img: url("img/frame_rail.webp");
  --frame-slice: 120;
  --frame-w: 20px;
  --frame-cut: 12px;

  /* Radii and shadows */
  --r-btn: 4px;
  --r-1: 2px;
  --shadow-object: 0 18px 24px -14px rgba(0, 0, 0, 0.8);
  --shadow-float: 0 16px 32px -12px rgba(0, 0, 0, 0.7);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t: 160ms;
  --t-snap: 120ms;
  --t-stamp: 140ms;
  --t-drawer: 220ms;
  --t-scan: 1200ms;
  --lift: -6px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--track-head); }
h1 { font-size: var(--fs-hero); line-height: var(--lh-hero); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
h4 { font-size: var(--fs-body); line-height: var(--lh-body); }
p + p { margin-top: var(--sp-3); }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-btn); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--sp-2); }

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.mono, .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-mono);
  line-height: var(--lh-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  line-height: 16px;
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--muted); }
.text-accent { color: var(--accent-text); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-bad { color: var(--bad-text); }
.break { word-break: break-all; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stack { display: flex; flex-direction: column; gap: var(--stack-gap); }
.stack--tight { gap: var(--sp-2); }
.stack--loose { gap: var(--sp-5); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.cluster--end { justify-content: flex-end; }
.cluster--between { justify-content: space-between; }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   4. Layout: container, 12-column cabinet grid, sections
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}
.grid--stack-gap { row-gap: var(--stack-gap); }
.span-1 { grid-column: span 1; }  .span-2 { grid-column: span 2; }  .span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }  .span-5 { grid-column: span 5; }  .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }  .span-8 { grid-column: span 8; }  .span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; } .span-11 { grid-column: span 11; } .span-12 { grid-column: span 12; }

main { display: block; }
.section { padding-block: var(--section-pad); }
.section--tight { padding-block: var(--sp-8); }
.section--console { padding-block: var(--sp-5) var(--sp-9); }
.section + .section { padding-top: 0; }
.section__head { max-width: 720px; margin-bottom: var(--sp-6); }
.section__head .label { display: inline-flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.section__index { font-family: var(--font-mono); font-weight: 500; color: var(--accent-text); letter-spacing: 0; }
.section__title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.section__lede { margin-top: var(--sp-3); color: var(--muted); font-size: var(--fs-lead); line-height: var(--lh-lead); max-width: 62ch; }

/* --------------------------------------------------------------------------
   5. Frames: every bay and panel sits in the riveted frame_rail bezel
   -------------------------------------------------------------------------- */
.frame {
  --pad: var(--panel-pad);
  position: relative;
  padding: calc(var(--frame-w) + var(--pad));
  background: var(--surface);
  clip-path: polygon(
    var(--frame-cut) 0, calc(100% - var(--frame-cut)) 0, 100% var(--frame-cut),
    100% calc(100% - var(--frame-cut)), calc(100% - var(--frame-cut)) 100%,
    var(--frame-cut) 100%, 0 calc(100% - var(--frame-cut)), 0 var(--frame-cut)
  );
}
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: var(--frame-w) solid transparent;
  border-image: var(--frame-img) var(--frame-slice) / var(--frame-w) stretch;
  filter: saturate(0.2);
  pointer-events: none;
}
.frame > * { position: relative; z-index: 1; }
.frame--thin { --frame-w: 14px; --frame-cut: 8px; }
.frame--flush { --pad: 0px; }
.frame--inset { background: var(--bg); }

/* Bay: a landing section's framed cabinet (roomy) */
.bay { --pad: var(--sp-6); }
/* Panel: console and content panels (dense) */
.panel { --pad: var(--panel-pad); }
.panel + .panel { margin-top: var(--stack-gap); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 32px; margin-bottom: var(--sp-3);
}
.panel__title { font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: var(--track-head); }
.panel__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border);
}
/* Full-width ruled header strip inside a flush panel */
.panel__bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 48px; padding: var(--sp-2) var(--panel-pad); border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   6. Site header and navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 30, 32, 0.96);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; gap: var(--sp-5); height: var(--header-h); }
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  text-decoration: none; min-height: var(--hit); flex-shrink: 0;
}
.brand__logo { width: 32px; height: 32px; object-fit: contain; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: var(--track-head); }
.site-header__menu { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); flex: 1; min-width: 0; }
.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--hit); padding: 0 var(--sp-3);
  color: var(--muted); text-decoration: none; font-size: var(--fs-small); font-weight: 500;
  border-radius: var(--r-btn);
  transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: -12px; height: 2px; background: var(--accent);
}
.site-nav .icon { width: 18px; height: 18px; }

.acct {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: var(--hit); padding: var(--sp-1) var(--sp-3) var(--sp-1) var(--sp-1);
  border: 1px solid var(--border); border-radius: var(--r-btn);
  text-decoration: none; background: var(--bg);
  transition: border-color var(--t) var(--ease);
}
.acct:hover { border-color: var(--muted); }
.acct__badge {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: var(--raised); color: var(--text);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.acct__text { display: flex; flex-direction: column; line-height: 16px; }
.acct__name { font-size: 13px; font-weight: 600; }
.acct__stake { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.nav-toggle {
  display: none; margin-left: auto;
  width: var(--hit); height: var(--hit); align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-btn); cursor: pointer;
}
.nav-toggle .icon { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(27, 30, 32, 0.96);
  padding-block: var(--sp-7);
  font-size: var(--fs-small); line-height: var(--lh-small);
}
.site-footer__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.site-footer__brand { grid-column: span 5; display: flex; flex-direction: column; gap: var(--sp-3); }
.site-footer__brand p { color: var(--muted); max-width: 44ch; }
.site-footer__nav { grid-column: span 4; display: flex; flex-direction: column; gap: var(--sp-1); }
.site-footer__nav a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--muted); text-decoration: none; width: fit-content; }
.site-footer__nav a:hover, .site-footer__nav a[aria-current="page"] { color: var(--text); }
.site-footer__meta { grid-column: span 3; display: flex; flex-direction: column; gap: var(--sp-2); color: var(--muted); }
.site-footer__note { color: var(--muted); }

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--hit); padding: 0 var(--sp-4);
  border: 1px solid transparent; border-radius: var(--r-btn);
  font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; line-height: 1; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease), color var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn .icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--primary:active { background: var(--accent-press); border-color: var(--accent-press); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: var(--raised); border-color: var(--muted); }
.btn--ghost { background: transparent; color: var(--muted); padding-inline: var(--sp-3); }
.btn--ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn--danger { background: transparent; color: var(--bad-text); border-color: var(--bad); }
.btn--danger:hover { background: rgba(226, 90, 72, 0.14); }
.btn--lg { min-height: 48px; padding: 0 var(--sp-5); font-size: var(--fs-body); }
.btn--block { width: 100%; }
.btn--icon { width: var(--hit); padding: 0; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.42; cursor: not-allowed; }
/* Pending: label stays, a thin scanning bar runs along the bottom edge */
.btn.is-pending { cursor: progress; }
.btn.is-pending::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 35%;
  background: currentColor; opacity: 0.8;
  animation: vp-sweep 900ms linear infinite;
}

/* --------------------------------------------------------------------------
   9. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.field__hint { font-size: 13px; line-height: 18px; color: var(--muted); }
.field__error { font-size: 13px; line-height: 18px; color: var(--bad-text); display: flex; align-items: center; gap: var(--sp-1); }
.input, .select, .textarea {
  width: 100%; min-height: var(--hit); padding: 0 var(--sp-3);
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-btn);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  font-size: var(--fs-small);
  transition: border-color var(--t) var(--ease);
}
.textarea { padding: var(--sp-2) var(--sp-3); min-height: 96px; resize: vertical; line-height: var(--lh-small); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 0.85; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--bad); }
.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; }
.input--mono { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-mono); font-variant-numeric: tabular-nums; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.search { position: relative; }
.search .icon { position: absolute; left: 10px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 36px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.toolbar .field { min-width: 160px; }
.toolbar__grow { flex: 1; min-width: 200px; }

/* Segmented filter */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-btn); background: var(--bg); padding: 2px; gap: 2px; }
.seg__btn {
  min-height: 34px; min-width: var(--hit); padding: 0 var(--sp-3); border: 0; border-radius: 3px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--sp-2);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.seg__count { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   10. Tabs
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-3); overflow-x: auto; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: var(--hit); padding: 0 var(--sp-3); border: 0; background: transparent;
  color: var(--muted); font-size: var(--fs-small); font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: color var(--t) var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: -1px; height: 2px; background: var(--accent); }
.tab__count { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); }

/* --------------------------------------------------------------------------
   11. Lamps, seal tag, chips
   -------------------------------------------------------------------------- */
.lamp { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: 13px; line-height: 18px; color: var(--text); white-space: nowrap; }
.lamp__dot {
  --c: var(--idle);
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--c);
  outline: 1px solid var(--c); outline-offset: 2px;
  transition: background-color var(--t-snap) steps(1, end), outline-color var(--t-snap) steps(1, end);
}
.lamp[data-tone="ok"] .lamp__dot { --c: var(--ok); }
.lamp[data-tone="warn"] .lamp__dot { --c: var(--warn); }
.lamp[data-tone="bad"] .lamp__dot { --c: var(--bad); }
.lamp[data-tone="accent"] .lamp__dot { --c: var(--accent); }
.lamp[data-tone="idle"] .lamp__dot { background: transparent; outline-color: var(--muted); }
.lamp--compact { font-size: 12px; gap: 6px; }
.lamp--compact .lamp__dot { outline-offset: 1px; }

.seal-tag {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 24px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.seal-tag--stamp { animation: vp-stamp var(--t-stamp) var(--ease) both; }

.chip {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  min-height: 24px; padding: 0 var(--sp-2);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-1);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip--accent { color: var(--accent-text); border-color: var(--accent); }
.badge {
  display: inline-flex; align-items: center; min-height: 22px; padding: 0 var(--sp-2);
  border: 1px solid var(--border); border-radius: var(--r-1);
  font-size: 11px; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted);
}

/* Icons */
.icon { width: 24px; height: 24px; color: currentColor; flex-shrink: 0; }
.icon__dot { fill: var(--accent); stroke: none; }
[data-icon] { display: inline-flex; }

/* --------------------------------------------------------------------------
   12. Gauge, meter, readouts, key-value lists
   -------------------------------------------------------------------------- */
.gauge { display: inline-flex; align-items: center; gap: var(--sp-2); }
.gauge__svg { width: 118px; height: 12px; }
.gauge__label { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
.gauge--hot .gauge__label { color: var(--accent-text); }
.gauge--wide .gauge__svg { width: 100%; }
.gauge--wide { display: flex; }

.meter { width: 100%; height: 12px; }

.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.readouts > .readout { padding: var(--sp-4) var(--sp-5); border-left: 1px solid var(--border); }
.readouts > .readout:first-child { border-left: 0; padding-left: 0; }
.readout { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.readout__label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.readout__value {
  display: flex; align-items: baseline; gap: var(--sp-2);
  font-family: var(--font-mono); font-weight: 500; font-size: 28px; line-height: 32px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.readout__unit { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0; }
.readout__note { font-size: 13px; line-height: 18px; color: var(--muted); }
.readout--sm .readout__value { font-size: 18px; line-height: 24px; }

.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--sp-2) var(--sp-4); align-items: baseline; }
.kv dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.kv dd { min-width: 0; font-size: var(--fs-small); line-height: var(--lh-small); overflow-wrap: anywhere; }
.kv dd.mono, .kv dd .mono { font-size: var(--fs-mono); }
.kv--rows { gap: 0; }
.kv--rows dt, .kv--rows dd { padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }

/* --------------------------------------------------------------------------
   13. Tables (dense, ruled, sticky head, keyboard rows)
   -------------------------------------------------------------------------- */
.table-wrap { overflow: auto; max-height: var(--table-max-h, none); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-table); line-height: var(--lh-table); }
.table th, .table td { height: var(--row-h); padding: 0 var(--sp-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
.table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--raised);
  font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.table th.num { font-family: var(--font-body); }
.table td.mono { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.table td.wrap { white-space: normal; min-width: 200px; }
.table td .cell-sub { display: block; color: var(--muted); font-size: 12px; line-height: 16px; }
.table tbody tr { transition: background-color var(--t) var(--ease); }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.table tbody tr[tabindex] { cursor: pointer; }
.table tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.table tbody tr[aria-selected="true"], .table tbody tr.is-selected { background: var(--raised); }
.table tbody tr:last-child td { border-bottom: 0; }
.th-sort {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 32px; padding: 0; border: 0; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
}
.th-sort:hover { color: var(--text); }
.th-sort::after { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0.35; }
th[aria-sort="ascending"] .th-sort::after { border-top: 0; border-bottom: 5px solid var(--accent); opacity: 1; }
th[aria-sort="descending"] .th-sort::after { border-top-color: var(--accent); opacity: 1; }
th[aria-sort="ascending"] .th-sort, th[aria-sort="descending"] .th-sort { color: var(--text); }
.table--roomy th, .table--roomy td { height: 56px; padding: 0 var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); }
.table--roomy td { white-space: normal; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0 0; font-size: 13px; color: var(--muted); }
.pager__btns { display: flex; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   14. Lists (sample list, ledgers, feeds)
   -------------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list__item {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  min-height: 56px; padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border); width: 100%;
  background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: inherit; text-decoration: none;
  transition: background-color var(--t) var(--ease);
}
.list__item:last-child { border-bottom: 0; }
button.list__item, a.list__item, .list__item[tabindex] { cursor: pointer; }
button.list__item:hover, a.list__item:hover, .list__item[tabindex]:hover { background: rgba(255, 255, 255, 0.04); }
.list__item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.list__item[aria-selected="true"], .list__item[aria-current="true"] { background: var(--raised); }
.list__item[aria-selected="true"]::before, .list__item[aria-current="true"]::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent);
}
.list__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list__title { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__sub { font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 16px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.list__amount { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.list__amount--plus { color: var(--ok); }

/* Chain of custody (VP.html.custody) */
.custody { display: flex; flex-direction: column; }
.custody__item { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start; padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.custody__item:last-child { border-bottom: 0; }
.custody__icon { color: var(--muted); padding-top: 2px; }
.custody__icon .icon { width: 20px; height: 20px; }
.custody__item[data-type="attest"] .custody__icon { color: var(--ok); }
.custody__item[data-type="flag"] .custody__icon, .custody__item[data-type="slash"] .custody__icon, .custody__item[data-type="void"] .custody__icon { color: var(--bad-text); }
.custody__item[data-type="capture"] .custody__icon { color: var(--accent-text); }
.custody__body { display: flex; flex-direction: column; min-width: 0; }
.custody__label { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.custody__meta { font-size: 12px; line-height: 16px; color: var(--muted); overflow-wrap: anywhere; }
.custody__meta .mono { font-size: 12px; }
.custody__time { font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 20px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   15. States: empty shelf slot, scanning bar, error
   -------------------------------------------------------------------------- */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-5) var(--sp-4); }
.state--center { align-items: center; text-align: center; }
.state__title { font-family: var(--font-display); font-size: 16px; line-height: 24px; font-weight: 600; }
.state__text { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--muted); max-width: 44ch; }
.state__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
/* Empty shelf slot: an open bay on a shelf rail, nothing seated in it */
.state__slot { position: relative; width: 112px; height: 72px; }
.state__slot::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 4px; bottom: 10px;
  border: 1px dashed var(--muted);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%, 0 6px);
  opacity: 0.7;
}
.state__slot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 4px;
  background: var(--border); border-top: 1px solid var(--muted);
}
.state--error .state__title { color: var(--bad-text); display: inline-flex; align-items: center; gap: var(--sp-2); }
.state--error .state__title .icon { width: 20px; height: 20px; }

/* Scanning bar: the one loading indicator */
.scanbar { position: relative; width: 100%; height: 8px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.scanbar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.scanbar.is-running .scanbar__fill { animation: vp-fill var(--t-scan) linear forwards; }
.scanbar.is-done .scanbar__fill { width: 100%; }
.scanbar--indeterminate .scanbar__fill { width: 32%; animation: vp-sweep var(--t-scan) linear infinite; }
.scanbar--sm { height: 4px; }

/* --------------------------------------------------------------------------
   16. Notifications, modal, drawer
   -------------------------------------------------------------------------- */
.toasts { position: fixed; right: var(--sp-5); bottom: var(--sp-5); z-index: 90; display: flex; flex-direction: column; gap: var(--sp-2); width: min(380px, calc(100vw - 32px)); }
.toast {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: start;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-4);
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-btn);
  box-shadow: var(--shadow-float);
  animation: vp-toast-in var(--t) var(--ease) both;
}
.toast.is-leaving { animation: vp-toast-out var(--t) var(--ease) both; }
.toast__icon { padding-top: 2px; color: var(--muted); }
.toast__icon .icon { width: 20px; height: 20px; }
.toast[data-tone="ok"] .toast__icon { color: var(--ok); }
.toast[data-tone="warn"] .toast__icon { color: var(--warn); }
.toast[data-tone="bad"] .toast__icon { color: var(--bad-text); }
.toast[data-tone="info"] .toast__icon { color: var(--accent-text); }
.toast__title { font-weight: 600; font-size: var(--fs-small); line-height: var(--lh-small); }
.toast__text { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text); margin: 0; }
.toast__title + .toast__text { color: var(--muted); margin-top: 2px; }
.toast__close { width: 32px; height: 32px; margin: -6px -6px 0 0; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: var(--r-btn); }
.toast__close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: var(--sp-4); }
.modal__scrim { position: absolute; inset: 0; background: var(--scrim); }
.modal__panel { --pad: var(--sp-5); position: relative; width: min(460px, 100%); animation: vp-enter var(--t) var(--ease) both; }
.modal__title { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.modal__body { margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-5); }
body.has-modal, body.has-drawer { overflow: hidden; }

.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--t-drawer) var(--ease); }
.drawer__panel {
  --pad: var(--sp-5);
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(100%); transition: transform var(--t-drawer) var(--ease);
}
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.drawer__body { flex: 1; overflow-y: auto; padding-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-5); }

/* --------------------------------------------------------------------------
   17. Charts
   -------------------------------------------------------------------------- */
.chart { width: 100%; }
.chart__svg { display: block; width: 100%; overflow: visible; }
.chart__tick { font-family: var(--font-mono); font-weight: 500; font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart__label { font-family: var(--font-body); font-size: 12px; fill: var(--text); }
.chart__value { font-family: var(--font-mono); font-weight: 500; font-size: 12px; fill: var(--text); font-variant-numeric: tabular-nums; }
.chart__legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-3); font-size: 12px; color: var(--muted); }
.chart__key { display: inline-flex; align-items: center; gap: var(--sp-2); }
.chart__swatch { width: 12px; height: 8px; display: inline-block; }
.chart__unit { margin-left: auto; font-family: var(--font-mono); }

/* ==========================================================================
   LANDING COMPONENTS (index.html)
   ========================================================================== */

/* Hero on vault_hero */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: var(--sp-9) 0 var(--section-pad); min-height: 720px; display: flex; align-items: center; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(27, 30, 32, 0.92) 0%, rgba(27, 30, 32, 0.78) 45%, rgba(27, 30, 32, 0.55) 100%),
    linear-gradient(180deg, rgba(27, 30, 32, 0) 60%, var(--bg) 100%);
}
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: center; width: 100%; }
.hero__copy { grid-column: span 5; display: flex; flex-direction: column; gap: var(--sp-5); }
.hero__title { font-size: var(--fs-hero); line-height: var(--lh-hero); max-width: 14ch; }
.hero__promise { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--muted); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); }
.hero__status { display: flex; flex-wrap: wrap; gap: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.hero__status .lamp { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero__stage { grid-column: 7 / span 6; }

/* Stage: framed bay, stage_steel shelf bottom-aligned, slab fan on it */
.stage { --pad: 0px; background: var(--bg); }
.stage__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); background: var(--surface); }
.stage__floor { position: relative; height: 340px; overflow: hidden; }
.stage__shelf {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background-image: url("img/stage_steel.webp");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: saturate(0.35);
}
.slab-fan { position: absolute; left: 0; right: 0; bottom: 24%; display: flex; justify-content: center; align-items: flex-end; padding-inline: var(--sp-5); }

.slab {
  --rot: 0deg; --dy: 0px;
  position: relative; display: block; flex: 0 0 auto; width: 154px;
  margin-left: -26px; text-decoration: none; color: inherit;
  transform: translateY(var(--dy)) rotate(var(--rot));
  transform-origin: 50% 100%;
  transition: transform var(--t) var(--ease);
  z-index: 1;
}
.slab:first-child { margin-left: 0; }
.slab:nth-child(1) { --rot: -7deg; --dy: 10px; }
.slab:nth-child(2) { --rot: -2.5deg; --dy: 0px; }
.slab:nth-child(3) { --rot: 2.5deg; --dy: 0px; }
.slab:nth-child(4) { --rot: 7deg; --dy: 10px; }
.slab:nth-child(5) { --rot: 10deg; --dy: 18px; }
.slab:nth-child(6) { --rot: 13deg; --dy: 26px; }
.slab:hover, .slab:focus-visible { transform: translateY(calc(var(--dy) + var(--lift))) rotate(var(--rot)); z-index: 5; }
.slab:focus-visible { outline: none; }
.slab:focus-visible .slab__frame { outline: 2px solid var(--accent); outline-offset: 2px; }
.slab__frame {
  display: block; width: 154px; height: 205px; overflow: hidden;
  border: 1px solid var(--border); border-radius: 3px; background: var(--text);
  box-shadow: var(--shadow-object);
}
.slab__img { width: 100%; height: 100%; object-fit: cover; }
.slab__cert {
  position: absolute; left: 6px; right: 6px; bottom: 6px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px 8px;
  background: rgba(27, 30, 32, 0.94); border: 1px solid var(--border); border-radius: var(--r-1);
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.slab__cert .mono { font-size: 12px; color: var(--text); }
.slab:hover .slab__cert, .slab:focus-visible .slab__cert { opacity: 1; transform: translateY(0); }
/* The coral inspection lamp under each slab */
.slab__lamp {
  position: absolute; left: 50%; bottom: -22px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: var(--accent); outline: 1px solid var(--accent); outline-offset: 2px;
}
@media (hover: none) { .slab__cert { opacity: 1; transform: none; } }

/* Problem band: platform's word vs outside proof */
.versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.versus__panel { --pad: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.versus__panel--claim { background: var(--surface); }
.versus__panel--proof { background: var(--surface); }
.versus__title { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.versus__list { display: flex; flex-direction: column; }
.versus__list li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--border); font-size: var(--fs-small); line-height: var(--lh-small); }
.versus__list .icon { width: 20px; height: 20px; color: var(--muted); }
.versus__panel--proof .versus__list .icon { color: var(--accent-text); }
.versus__evidence { margin-top: auto; padding: var(--sp-3); background: var(--bg); border: 1px solid var(--border); }

/* How it works: seal card beside four ruled steps */
.how { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.how__media { grid-column: span 5; }
.how__steps { grid-column: span 7; }
.steps { display: flex; flex-direction: column; counter-reset: step; }
.step {
  position: relative; display: grid; grid-template-columns: 56px 28px minmax(0, 1fr); gap: var(--sp-4); align-items: start;
  padding: var(--sp-5) var(--sp-4); border-top: 1px solid var(--border);
  transition: background-color var(--t) var(--ease);
}
.step:last-child { border-bottom: 1px solid var(--border); }
.step__num { font-family: var(--font-mono); font-weight: 500; font-size: 28px; line-height: 32px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color var(--t) var(--ease); }
.step__icon { color: var(--muted); padding-top: 4px; transition: color var(--t) var(--ease); }
.step__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; letter-spacing: var(--track-head); }
.step__text { margin-top: var(--sp-1); color: var(--muted); font-size: var(--fs-small); line-height: var(--lh-small); max-width: 52ch; }
.step:hover, .step:focus-within, .step.is-active { background: var(--raised); }
.step:hover .step__num, .step:focus-within .step__num, .step.is-active .step__num { color: var(--accent-text); }
.step:hover .step__icon, .step.is-active .step__icon { color: var(--text); }

/* Seal card: one live wrapper's NFC seal, shown beside step one */
.seal-card { --pad: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
.seal-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.seal-card__tag { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); background: var(--bg); border: 1px solid var(--border); }
.seal-card__tagid { font-family: var(--font-mono); font-weight: 500; font-size: 20px; line-height: 24px; letter-spacing: 0.04em; }

/* Live registry strip */
.strip { --pad: 0px; }
.strip__head, .strip__row {
  display: grid; align-items: center; gap: var(--sp-4);
  grid-template-columns: 120px minmax(0, 1fr) 96px 200px 120px;
  padding: 0 var(--sp-5);
}
.strip__head { min-height: 40px; background: var(--raised); border-bottom: 1px solid var(--border); }
.strip__head > * { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.strip__row {
  min-height: 64px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: background-color var(--t) var(--ease);
}
.strip__row:last-child { border-bottom: 0; }
.strip__row:hover { background: rgba(255, 255, 255, 0.04); }
.strip__row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.strip__row.is-fresh { animation: vp-fresh 1200ms var(--ease) both; }
.strip__cell { min-width: 0; }
.strip__item { display: flex; flex-direction: column; gap: 2px; }
.strip__name { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip__sub { font-size: 12px; color: var(--muted); }
.strip__audit { display: flex; align-items: center; gap: var(--sp-3); }
.strip__audit time { font-size: 13px; min-width: 52px; }
.strip__audit .gauge__svg { width: 120px; }
.strip__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* Token band */
.token-band { --pad: var(--sp-5); }

/* Comparison table */
.compare th:first-child, .compare td:first-child { width: 28%; color: var(--muted); }
.compare td { vertical-align: top; padding-block: var(--sp-3); }
.compare thead th:last-child { color: var(--text); }
.mark { display: inline-flex; align-items: flex-start; gap: var(--sp-2); }
.mark .icon { width: 18px; height: 18px; margin-top: 1px; }
.mark--yes .icon { color: var(--ok); }
.mark--no .icon { color: var(--bad-text); }

/* Final call to action */
.cta { --pad: var(--sp-7); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-6); align-items: center; }
.cta__logo { width: 72px; height: 72px; object-fit: contain; }
.cta__title { font-size: var(--fs-h2); line-height: var(--lh-h2); }
.cta__text { margin-top: var(--sp-2); color: var(--muted); max-width: 56ch; }

/* ==========================================================================
   CONSOLE COMPONENTS (audit.html)
   ========================================================================== */
.console-head { --pad: var(--panel-pad); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--sp-5); align-items: center; margin-bottom: var(--stack-gap); }
.console-head__id { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.console-head__badge {
  display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0;
  background: var(--raised); font-family: var(--font-mono); font-weight: 500; font-size: 15px;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
.console-head__name { font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; letter-spacing: var(--track-head); }
.console-head__sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); font-size: 13px; color: var(--muted); }
.console-head__stats { display: flex; gap: var(--sp-5); }
.console-head__stats .readout { padding-left: var(--sp-5); border-left: 1px solid var(--border); }
.console-head__actions { display: flex; gap: var(--sp-2); }

.console { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
.console__list { grid-column: span 3; }
.console__stage { grid-column: span 6; }
.console__ledger { grid-column: span 3; }
.console__col { display: flex; flex-direction: column; gap: var(--stack-gap); min-width: 0; }
.console__col > .panel + .panel { margin-top: 0; }

/* Scan bay over slab_scan */
.scanbay { --pad: 0px; }
.scanbay__view { position: relative; min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.scanbay__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; z-index: 0; }
.scanbay__view::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, 0.4); }
.scanbay__sheet {
  position: relative; z-index: 2; margin: var(--sp-4);
  padding: var(--sp-4); background: rgba(27, 30, 32, 0.94); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.scanbay__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; letter-spacing: var(--track-head); }
.scanbay__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); }
.scanbay__controls { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border-top: 1px solid var(--border); background: var(--surface); }
.scanbay__controls-row { display: flex; align-items: center; gap: var(--sp-3); }
.scanbay__controls-row .scanbar { flex: 1; }

/* Read vs expected comparison inside the scan bay */
.readcheck { display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr) max-content; gap: 0 var(--sp-4); align-items: center; font-size: 13px; }
.readcheck > * { padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); min-width: 0; }
.readcheck__head { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.readcheck__val { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.readcheck__val.is-off { color: var(--bad-text); }

/* Attestation card */
.attest-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.attest-card__sig {
  padding: var(--sp-3); background: var(--bg); border: 1px solid var(--border);
  font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 18px; color: var(--muted);
  word-break: break-all; overflow-wrap: anywhere;
}
.attest-card__sig.is-signed { color: var(--text); border-color: var(--accent); }
.attest-card__fee { display: flex; align-items: baseline; justify-content: space-between; padding: var(--sp-3) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.attest-card__actions { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.attest-card__note { font-size: 13px; line-height: 18px; color: var(--muted); }

/* ==========================================================================
   Motion
   ========================================================================== */
@keyframes vp-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vp-stamp { from { transform: scale(1.1); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes vp-fill { from { width: 0; } to { width: 100%; } }
@keyframes vp-sweep { from { transform: translateX(-100%); } to { transform: translateX(320%); } }
@keyframes vp-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes vp-toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(4px); } }
@keyframes vp-fresh { 0% { background-color: rgba(237, 123, 90, 0.16); } 100% { background-color: transparent; } }

/* One entrance per page: add .enter (and style="--i:n" to stagger) to a handful of top blocks */
.vp-motion .enter { animation: vp-enter 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .scanbar.is-running .scanbar__fill { width: 100%; opacity: 0.5; }
  .scanbar--indeterminate .scanbar__fill { width: 100%; opacity: 0.5; transform: none; }
  .btn.is-pending::after { width: 100%; opacity: 0.5; transform: none; }
  .slab:hover, .slab:focus-visible { transform: translateY(var(--dy)) rotate(var(--rot)); }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .console__list { grid-column: span 4; }
  .console__stage { grid-column: span 8; }
  .console__ledger { grid-column: span 12; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stack-gap); }
  .console-head { grid-template-columns: minmax(0, 1fr) auto; }
  .console-head__stats { grid-column: 1 / -1; order: 3; }
  .console-head__stats .readout:first-child { padding-left: 0; border-left: 0; }
  .hero__copy { grid-column: span 6; }
  .hero__stage { grid-column: 7 / span 6; }
  .strip__head, .strip__row { grid-template-columns: 110px minmax(0, 1fr) 90px 160px 110px; }
  .strip__audit .gauge__svg { width: 80px; }
}

@media (max-width: 800px) {
  :root { --gutter: 16px; --section-pad: 64px; --fs-hero: 36px; --lh-hero: 40px; --fs-h2: 24px; --lh-h2: 30px; --frame-w: 16px; --frame-cut: 10px; }
  .grid > [class*="span-"], .hero__copy, .hero__stage, .how__media, .how__steps,
  .console__list, .console__stage, .console__ledger { grid-column: 1 / -1; }
  .console__ledger { display: flex; flex-direction: column; }
  .bay { --pad: var(--sp-4); }

  .nav-toggle { display: inline-flex; }
  .site-header__inner { gap: var(--sp-3); }
  .site-header__menu { display: none; }
  .site-header.is-open .site-header__menu {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-4);
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--sp-2) var(--gutter) var(--sp-5);
  }
  .site-header.is-open .site-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .site-header.is-open .site-nav a { min-height: 48px; font-size: var(--fs-body); border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; }
  .site-header.is-open .site-nav a[aria-current="page"]::after { left: auto; right: 0; top: 50%; bottom: auto; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; }

  .site-footer__brand, .site-footer__nav, .site-footer__meta { grid-column: 1 / -1; }

  .hero { min-height: 0; padding-top: var(--sp-7); }
  .hero__grid { row-gap: var(--sp-6); }
  .stage__floor { height: 250px; }
  .slab, .slab__frame { width: 96px; }
  .slab__frame { height: 128px; }
  .slab { margin-left: -14px; }
  .slab__cert { display: none; }

  .versus { grid-template-columns: 1fr; }
  .step { grid-template-columns: 40px minmax(0, 1fr); padding: var(--sp-4) 0; }
  .step__icon { display: none; }
  .step__num { font-size: 20px; line-height: 28px; }

  .strip__head { display: none; }
  .strip__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "item status" "audit ins"; row-gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); }
  .strip__item { grid-area: item; }
  .strip__status { grid-area: status; justify-self: end; }
  .strip__cert { display: none; }
  .strip__audit { grid-area: audit; }
  .strip__ins { grid-area: ins; justify-self: end; }

  .readouts { grid-template-columns: 1fr; }
  .readouts > .readout { border-left: 0; border-top: 1px solid var(--border); padding: var(--sp-4) 0; }
  .readouts > .readout:first-child { border-top: 0; }

  .cta { grid-template-columns: 1fr; gap: var(--sp-4); }

  .console-head { grid-template-columns: 1fr; }
  .console-head__stats { flex-wrap: wrap; gap: var(--sp-4); }
  .console-head__stats .readout { padding-left: 0; border-left: 0; }
  .scanbay__view { min-height: 360px; }
  .readcheck { grid-template-columns: max-content minmax(0, 1fr) max-content; }
  .readcheck .readcheck__expected { display: none; }

  .toasts { left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); width: auto; }
}

@media (max-width: 420px) {
  .slab, .slab__frame { width: 80px; }
  .slab__frame { height: 106px; }
  .brand__name { font-size: 16px; }
}
