/* HONORD v3: THE AUDIT WALL
 * Architectural Forensic Evidence Wall — dark charcoal-slate pegboard backing (#13161A),
 * brushed anodized mounting rails (#2C333E), physical bone-ivory pinned dossiers (#F4F0E6)
 * casting real room shadows onto the dark board, Fraunces editorial serif + JetBrains Mono,
 * and the four Verdict Inks (#25D07D KEPT / #F2AE38 PARTLY / #F24B3D BROKEN / #58A0FF AUDITING)
 * as the deliberate color events on the wall.
 */

:root {
  /* Dark Architectural Evidence Wall Surface */
  --wall: #13161A;
  --wall-2: #1A1E24;
  --wall-3: #222831;
  --wall-rail: #2C333E;
  --wall-line: #2F3744;
  --wall-line-hi: #485364;
  --bar-bg: rgba(19, 22, 26, 0.9);

  /* Text on Dark Wall (WCAG AAA / AA+) */
  --wall-ink: #F3EFE6;
  --wall-ink-2: #C2C8D2;
  --wall-ink-3: #8F99A8;

  /* Physical Pinned Bone-Ivory Dossiers (Objects pinned ON the wall) */
  --sheet: #F4F0E6;
  --sheet-hi: #FCF9F2;
  --sheet-tab: #E4DDD0;
  --sheet-line: #CAC2B2;
  --sheet-hard: #12151A;

  /* Ink on Pinned Paper Sheets */
  --ink: #12151A;
  --ink-2: #3D4450;
  --ink-3: #5A6270;

  /* Forensic Brass Trim & Pin Hardware */
  --brass: #D9A443;
  --brass-dim: rgba(217, 164, 67, 0.2);

  /* The 4 Semantic Verdict Inks — Dark Wall Glows */
  --kept-glow: #25D07D;
  --kept-dark-wash: rgba(37, 208, 125, 0.14);
  --partly-glow: #F2AE38;
  --partly-dark-wash: rgba(242, 174, 56, 0.15);
  --broken-glow: #F24B3D;
  --broken-dark-wash: rgba(242, 75, 61, 0.15);
  --audit-glow: #58A0FF;
  --audit-dark-wash: rgba(88, 160, 255, 0.14);

  /* The 4 Semantic Verdict Inks — Printed Stamp Inks on Bone Paper */
  --kept: #0F6B3E;
  --kept-wash: rgba(15, 107, 62, 0.11);
  --partly: #945605;
  --partly-wash: rgba(148, 86, 5, 0.12);
  --broken: #C4251B;
  --broken-wash: rgba(196, 37, 27, 0.11);
  --audit: #1B4B8A;
  --audit-wash: rgba(27, 75, 138, 0.10);

  /* Real Room Cast Shadows for Pinned Objects */
  --pin-shadow: 0 22px 44px -14px rgba(0, 0, 0, 0.72), 0 6px 14px -4px rgba(0, 0, 0, 0.48);
  --pin-shadow-sm: 0 12px 26px -8px rgba(0, 0, 0, 0.62), 0 3px 8px rgba(0, 0, 0, 0.4);

  /* Distinct Editorial Serif + Technical Sans + Mono Typography */
  --f-disp: "Fraunces", Georgia, "Times New Roman", serif;
  --f-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --nav-h: 60px;
  --shell-w: 1380px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--wall);
}

body {
  margin: 0;
  background-color: var(--wall);
  /* Subtle architectural pegboard perforation matrix + overhead gallery lamp pool */
  background-image:
    radial-gradient(ellipse 90% 520px at 66% 180px, rgba(244, 236, 220, 0.065) 0%, rgba(19, 22, 26, 0) 70%),
    radial-gradient(rgba(255, 255, 255, 0.065) 1px, transparent 1px);
  background-size: 100% 100%, 28px 28px;
  background-attachment: scroll, scroll;
  color: var(--wall-ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.56;
  min-height: 100vh;
  position: relative;
}

a { color: inherit; text-decoration: none; }

button, a[href], summary, select, label[for], input[type="checkbox"], input[type="radio"], [role="button"], [role="tab"] {
  cursor: pointer;
}

button:disabled, input:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==================== TOP CHROME: ANODIZED HEADER + SYS:// + LIVE WIRE ==================== */
.hd-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--nav-h);
  background: var(--bar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--wall-line-hi);
}

.hd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h);
}

.hd-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
  color: var(--wall-ink);
  line-height: 1;
}

.hd-seal-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--brass);
  background: var(--wall-2);
  color: var(--brass);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
}

.hd-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hd-nav a {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wall-ink-2);
  padding: 10px 11px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.hd-nav a:hover,
.hd-nav a[aria-current="page"] {
  color: var(--wall-ink);
  border-bottom-color: var(--brass);
}

.hd-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  color: var(--wall-ink);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.hd-x:hover {
  background: var(--wall-ink);
  color: var(--wall);
  border-color: var(--wall-ink);
}

.hd-burger {
  display: none;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 19px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
}

/* Terminal-style SYS:// Telemetry Strip */
.sys-strip {
  background: var(--wall-2);
  border-bottom: 1px solid var(--wall-line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wall-ink-3);
}

.sys-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 18px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.sys-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--partly-glow);
}

.sys-state.is-live {
  color: var(--kept-glow);
}

.sys-pip {
  width: 7px;
  height: 7px;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

/* Live Wire Real Chain Claim & Accrual Tape */
.wire-bar {
  background: #0D1014;
  border-bottom: 1px solid var(--wall-line-hi);
  font-family: var(--f-mono);
  font-size: 11px;
  position: relative;
  z-index: 15;
}

.wire-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}

.wire-label {
  flex-shrink: 0;
  padding: 3px 9px;
  background: var(--wall-3);
  border: 1px solid var(--wall-line-hi);
  color: var(--wall-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wire-stage {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}

.wire-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}

.wire-seq {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding-right: 22px;
}

.wire-ev {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--wall-ink);
  white-space: nowrap;
  padding: 5px 0;
}

.wire-ev:hover .wire-hash {
  color: var(--brass);
  text-decoration: underline;
}

.wire-tag {
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
}

.wire-tag.t-claim { color: var(--broken-glow); background: var(--broken-dark-wash); }
.wire-tag.t-accrual { color: var(--kept-glow); background: var(--kept-dark-wash); }
.wire-tag.t-outflow { color: var(--audit-glow); background: var(--audit-dark-wash); }

.wire-sym { font-weight: 700; color: var(--wall-ink); }
.wire-amt { color: var(--wall-ink-2); }
.wire-blk { color: var(--wall-ink-3); }
.wire-hash { color: var(--audit-glow); font-weight: 600; }

.wire-toggle {
  flex-shrink: 0;
  min-height: 28px;
  min-width: 62px;
  padding: 0 10px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wire-toggle:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
}

/* ==================== BUTTONS, BADGES & INPUTS ==================== */
.act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--wall-ink);
  background: var(--wall-ink);
  color: var(--wall);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.act-btn:hover:not(:disabled) {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.act-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.act-btn.is-ink {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
}

.act-btn.is-ink:hover:not(:disabled) {
  background: var(--wall-ink);
  border-color: var(--wall-ink);
}

.act-btn.is-ghost {
  background: var(--wall-2);
  border-color: var(--wall-line-hi);
  color: var(--wall-ink);
}

.act-btn.is-ghost:hover:not(:disabled) {
  background: var(--wall-3);
  border-color: var(--brass);
  color: var(--wall-ink);
}

.act-btn.is-quiet {
  background: transparent;
  border-color: var(--wall-line-hi);
  color: var(--wall-ink-2);
}

.act-btn.is-quiet:hover:not(:disabled) {
  border-color: var(--wall-ink);
  color: var(--wall-ink);
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: none;
}

.act-btn.is-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 10.5px;
}

/* Inverted button tones when mounted on light Bone-Ivory Pinned Dossiers */
.case-sheet .act-btn,
.mini-case .act-btn,
.exh-box .act-btn {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--sheet);
}

.case-sheet .act-btn:hover:not(:disabled),
.mini-case .act-btn:hover:not(:disabled),
.exh-box .act-btn:hover:not(:disabled) {
  background: var(--audit);
  border-color: var(--audit);
  color: var(--sheet);
}

.case-sheet .act-btn.is-ghost,
.mini-case .act-btn.is-ghost,
.exh-box .act-btn.is-ghost {
  background: var(--sheet-hi);
  border-color: var(--ink);
  color: var(--ink);
}

.case-sheet .act-btn.is-ghost:hover:not(:disabled),
.mini-case .act-btn.is-ghost:hover:not(:disabled),
.exh-box .act-btn.is-ghost:hover:not(:disabled) {
  background: var(--sheet-tab);
  color: var(--ink);
}

.case-sheet .act-btn.is-quiet,
.mini-case .act-btn.is-quiet,
.exh-box .act-btn.is-quiet {
  background: transparent;
  border-color: var(--sheet-line);
  color: var(--ink-2);
}

.case-sheet .act-btn.is-quiet:hover:not(:disabled),
.mini-case .act-btn.is-quiet:hover:not(:disabled),
.exh-box .act-btn.is-quiet:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--sheet-hi);
}

/* Semantic Verdict Badges (Dark Wall Default + Paper Override) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-3);
  color: var(--wall-ink);
  white-space: nowrap;
}

.badge.b-kept { color: var(--kept-glow); border-color: var(--kept-glow); background: var(--kept-dark-wash); }
.badge.b-partly { color: var(--partly-glow); border-color: var(--partly-glow); background: var(--partly-dark-wash); }
.badge.b-broken { color: var(--broken-glow); border-color: var(--broken-glow); background: var(--broken-dark-wash); }
.badge.b-audit { color: var(--audit-glow); border-color: var(--audit-glow); background: var(--audit-dark-wash); }
.badge.b-sim { color: var(--partly-glow); border: 1px dashed var(--partly-glow); background: var(--partly-dark-wash); }

.case-sheet .badge,
.mini-case .badge,
.affidavit-box .badge,
.mech-panel .badge,
.exh-box .badge {
  background: var(--sheet-hi);
  border-color: var(--ink);
  color: var(--ink);
}
.case-sheet .badge.b-kept, .mini-case .badge.b-kept, .exh-box .badge.b-kept { color: var(--kept); border-color: var(--kept); background: var(--kept-wash); }
.case-sheet .badge.b-partly, .mini-case .badge.b-partly, .exh-box .badge.b-partly { color: var(--partly); border-color: var(--partly); background: var(--partly-wash); }
.case-sheet .badge.b-broken, .mini-case .badge.b-broken, .exh-box .badge.b-broken { color: var(--broken); border-color: var(--broken); background: var(--broken-wash); }
.case-sheet .badge.b-audit, .mini-case .badge.b-audit, .affidavit-box .badge.b-audit, .mech-panel .badge.b-audit, .exh-box .badge.b-audit { color: var(--audit); border-color: var(--audit); background: var(--audit-wash); }
.case-sheet .badge.b-sim { color: var(--partly); border: 1px dashed var(--partly); background: var(--partly-wash); }

.fld {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--wall-line-hi);
  background: #0E1115;
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 13px;
}

.fld::placeholder { color: var(--wall-ink-3); }
.fld:focus { background: #0A0C0F; border-color: var(--brass); outline: none; }

/* ==================== ARCHITECTURAL EDITORIAL TYPOGRAPHY ==================== */
.band {
  padding: 78px 0;
  border-bottom: 1px solid var(--wall-line);
}

.kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 12px;
}

.docket-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: var(--wall-2);
  border: 1px solid var(--wall-line-hi);
  border-left: 3px solid var(--brass);
  color: var(--wall-ink-2);
  padding: 6px 12px;
  margin-bottom: 16px;
}

/* Fraunces Editorial Display Serif — Mixed Sentence Case (breaks studio condensed-black mold!) */
h1, h2 {
  font-family: var(--f-disp);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.028em;
  margin: 0;
  color: var(--wall-ink);
}

h1 { font-size: clamp(42px, 4.6vw, 68px); }
h2 { font-size: clamp(36px, 4.2vw, 58px); }

h3 {
  font-family: var(--f-disp);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0;
}

.hot { color: var(--kept-glow); font-style: italic; font-weight: 700; }
.hot-verdict { color: var(--broken-glow); font-style: italic; font-weight: 700; }

.deck {
  font-size: 16px;
  line-height: 1.58;
  color: var(--wall-ink-2);
  margin: 16px 0 0;
  max-width: 52ch;
}

/* ==================== SECTION 1: HERO = EVIDENCE WALL + 3D AUDIT STACK CENTERPIECE ==================== */
.wall-hero {
  position: relative;
  padding: 28px 0 48px;
  border-bottom: 1px solid var(--wall-line-hi);
  background:
    radial-gradient(ellipse 640px 520px at 74% 38%, rgba(244, 236, 220, 0.085) 0%, rgba(19, 22, 26, 0) 72%),
    linear-gradient(180deg, rgba(13, 16, 20, 0.45) 0%, rgba(19, 22, 26, 0) 100%);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 28px;
  align-items: stretch;
}

.hero-col-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.hero-copy-block {
  min-width: 0;
}

.check-desk {
  border: 1px solid var(--wall-line-hi);
  border-top: 2px solid var(--brass);
  background: rgba(24, 29, 36, 0.94);
  padding: 16px 18px;
  box-shadow: var(--pin-shadow-sm);
}

.check-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wall-ink-3);
  margin-bottom: 10px;
}

.check-form {
  display: flex;
  gap: 10px;
}

.quick-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--wall-ink-3);
}

.quick-chip {
  min-height: 30px;
  padding: 2px 9px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall);
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
}

.quick-chip:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
}

.status-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--audit-glow);
  background: var(--audit-dark-wash);
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--wall-ink);
  display: none;
}

.status-note.is-on { display: block; }
.status-note.is-err {
  border-left-color: var(--broken-glow);
  background: var(--broken-dark-wash);
  color: #FFD2CE;
}

.ca-strip {
  border: 1px solid var(--wall-line-hi);
  background: rgba(24, 29, 36, 0.92);
  padding: 11px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
}

.ca-strip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ca-strip-k {
  font-weight: 700;
  color: var(--brass);
  text-transform: uppercase;
}

.ca-strip-v {
  font-weight: 600;
  color: var(--wall-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ca-strip-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==================== THE 3D AUDIT STACK HERO CENTERPIECE ==================== */
.stack-stage {
  position: relative;
  min-height: 540px;
  height: 100%;
  min-width: 0;
  border: 1px solid var(--wall-line-hi);
  background:
    radial-gradient(ellipse 72% 58% at 50% 42%, rgba(245, 238, 224, 0.14) 0%, rgba(28, 34, 43, 0.65) 54%, rgba(14, 17, 22, 0.96) 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55), var(--pin-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Subtle architectural corner reticles inside the 3D Inspection Bay */
.stack-stage::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  z-index: 3;
  background:
    linear-gradient(to right, var(--brass) 16px, transparent 16px) 0 0 / 16px 1.5px no-repeat,
    linear-gradient(to bottom, var(--brass) 16px, transparent 16px) 0 0 / 1.5px 16px no-repeat,
    linear-gradient(to left, var(--brass) 16px, transparent 16px) 100% 0 / 16px 1.5px no-repeat,
    linear-gradient(to bottom, var(--brass) 16px, transparent 16px) 100% 0 / 1.5px 16px no-repeat,
    linear-gradient(to right, var(--wall-line-hi) 16px, transparent 16px) 0 100% / 16px 1.5px no-repeat,
    linear-gradient(to top, var(--wall-line-hi) 16px, transparent 16px) 0 100% / 1.5px 16px no-repeat,
    linear-gradient(to left, var(--wall-line-hi) 16px, transparent 16px) 100% 100% / 16px 1.5px no-repeat,
    linear-gradient(to top, var(--wall-line-hi) 16px, transparent 16px) 100% 100% / 1.5px 16px no-repeat;
}

#stack-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}

.stack-stage.is-dragging #stack-gl {
  cursor: grabbing;
}

/* Top-left interactive bay telemetry hint */
.stack-bay-head {
  position: absolute;
  top: 16px;
  left: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--wall-ink-2);
}

.stack-bay-pill {
  padding: 4px 9px;
  background: rgba(14, 17, 22, 0.82);
  border: 1px solid var(--wall-line-hi);
  color: var(--wall-ink-2);
}

/* Static CSS Audit Stack fallback (reduced-motion or WebGL unavailable) */
.stack-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.stack-stage.is-fallback .stack-fallback {
  display: flex;
}

.fb-stack-sculpture {
  position: relative;
  width: 240px;
  height: 280px;
}

.fb-box {
  position: absolute;
  border: 1.5px solid var(--wall-line-hi);
  background: var(--wall-3);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.65);
}
.fb-box-1 { width: 170px; height: 130px; left: 26px; top: 96px; border-top: 4px solid var(--kept-glow); }
.fb-box-2 { width: 150px; height: 110px; left: 62px; top: 38px; border-top: 4px solid var(--partly-glow); }
.fb-dossier {
  position: absolute;
  width: 156px;
  height: 204px;
  left: 42px;
  top: 32px;
  background: var(--sheet);
  border: 2px solid var(--ink);
  border-left: 8px solid var(--audit-glow);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.72);
  padding: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

/* Live 3D-Projected Floating Case State Labels */
.stack-pins {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.stack-pin {
  position: absolute;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--wall-line-hi);
  background: rgba(15, 19, 24, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.58);
  transition: border-color 0.16s, background-color 0.16s;
}

.stack-pin:hover,
.stack-pin.is-active {
  background: rgba(24, 30, 38, 0.96);
  border-color: var(--brass);
}

.pin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--audit-glow);
  box-shadow: 0 0 8px currentColor;
  flex-shrink: 0;
}

.pin-sym { font-weight: 700; color: var(--wall-ink); }
.pin-meta { color: var(--wall-ink-3); font-size: 10px; }

.pin-tag {
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
}

.stack-pin.is-kept .pin-dot { background: var(--kept-glow); color: var(--kept-glow); }
.stack-pin.is-kept .pin-tag { color: var(--kept-glow); background: var(--kept-dark-wash); }

.stack-pin.is-partly .pin-dot { background: var(--partly-glow); color: var(--partly-glow); }
.stack-pin.is-partly .pin-tag { color: var(--partly-glow); background: var(--partly-dark-wash); }

.stack-pin.is-broken .pin-dot { background: var(--broken-glow); color: var(--broken-glow); }
.stack-pin.is-broken .pin-tag { color: var(--broken-glow); background: var(--broken-dark-wash); }

.stack-pin.is-auditing .pin-dot,
.stack-pin.is-unpledged .pin-dot { background: var(--audit-glow); color: var(--audit-glow); }
.stack-pin.is-auditing .pin-tag,
.stack-pin.is-unpledged .pin-tag { color: var(--audit-glow); background: var(--audit-dark-wash); }

/* Bottom Status Chip + Working PAUSE / REPLAY Bar (Inside 3D Stage Frame) */
.stack-hud-bar {
  position: relative;
  z-index: 7;
  margin: 0 14px 14px;
  padding: 8px 12px;
  border: 1px solid var(--wall-line-hi);
  background: rgba(13, 16, 20, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  font-family: var(--f-mono);
  font-size: 10.5px;
}

.stack-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--wall-ink);
  min-width: 0;
}

.stack-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--kept-glow);
  box-shadow: 0 0 10px var(--kept-glow);
  flex-shrink: 0;
}

.stack-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stack-ctrl-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  color: var(--wall-ink);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
}

.stack-ctrl-btn:hover {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
}

.stack-ctrl-btn[aria-pressed="true"] {
  background: var(--partly-dark-wash);
  border-color: var(--partly-glow);
  color: var(--partly-glow);
}

/* ==================== PINNED ACTIVE AUDIT RAIL BELOW HERO SPLIT ==================== */
.hero-pinned-rail {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--wall-line-hi);
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.76fr);
  gap: 24px;
  align-items: start;
}

.hero-mini-wall {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
}

.mini-case {
  border: 1.5px solid var(--sheet-hard);
  border-left: 5px solid var(--audit);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--pin-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mini-case::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F2D28B 0%, #B8832E 65%, #5C3D0E 100%);
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.mini-case:hover {
  transform: translateY(-3px);
  box-shadow: var(--pin-shadow);
}

.mini-case-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--sheet-tab);
  border-bottom: 1px solid var(--sheet-line);
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink-2);
}

.mini-case-body {
  padding: 12px 14px;
}

.mini-case-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.mini-sym {
  font-family: var(--f-disp);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  margin: 0;
}

.mini-kv {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--sheet-line);
  font-family: var(--f-mono);
  font-size: 11px;
}

.mini-kv span:first-child { color: var(--ink-3); }
.mini-kv span:last-child { font-weight: 700; color: var(--ink); text-align: right; }

.mini-foot {
  padding: 8px 14px;
  border-top: 1px solid var(--sheet-line);
  background: var(--sheet-hi);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* ==================== PINNED CASE-FILE DOSSIERS + 3D FLIP + STAMP PHYSICS ==================== */
.case-stage {
  perspective: 1400px;
  min-width: 0;
}

.case-flipper {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.42s cubic-bezier(0.2, 0.85, 0.22, 1);
}

.case-stage.is-flipped .case-flipper {
  transform: rotateY(180deg);
}

.case-sheet {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1.5px solid var(--sheet-hard);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--pin-shadow);
  min-width: 0;
  position: relative;
}

/* Physical brushed-brass tack pin pinning the dossier onto the dark Evidence Wall */
.case-front::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #F6D88F 0%, #C18D35 62%, #593A0C 100%);
  border: 1px solid rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  z-index: 4;
}

.case-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.case-stage.is-flipped .case-front { pointer-events: none; }
.case-stage:not(.is-flipped) .case-back { pointer-events: none; }

.case-tab {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  background: var(--sheet-tab);
  border-bottom: 1.5px solid var(--sheet-hard);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
}

.case-body {
  padding: 18px 18px 14px;
  position: relative;
}

.case-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.case-id { min-width: 0; flex: 1; }

.case-sym {
  font-family: var(--f-disp);
  font-size: 38px;
  font-weight: 800;
  line-height: 0.94;
  color: var(--ink);
  margin: 0;
}

.case-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 5px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.case-pledge {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-left: 3px solid var(--audit);
  background: var(--sheet-hi);
  font-size: 13px;
  line-height: 1.46;
  color: var(--ink);
}

/* Heavy Rubber Verdict Stamp (rAF gravity + squash + ink ring + paper shake, ZERO fade) */
.stamp-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  padding: 8px 14px;
  border: 3px double currentColor;
  transform: rotate(-6deg);
  text-align: center;
  flex-shrink: 0;
  user-select: none;
  position: relative;
  opacity: 1;
  will-change: transform;
}

.stamp-box::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid currentColor;
  opacity: 0.45;
  pointer-events: none;
}

.stamp-word {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stamp-sub {
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  margin-top: 4px;
}

.stamp-box.s-kept { color: var(--kept); background: var(--kept-wash); }
.stamp-box.s-partly { color: var(--partly); background: var(--partly-wash); }
.stamp-box.s-broken { color: var(--broken); background: var(--broken-wash); }
.stamp-box.s-unpledged { color: var(--audit); background: var(--audit-wash); }

.stamp-ring {
  position: absolute;
  inset: -14px;
  border: 2.5px solid currentColor;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  will-change: transform, opacity;
}

.stamp-ring::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px dashed currentColor;
  opacity: 0.65;
}

/* Forensic Key-Value Proof Rows (Paper context vs Dark Wall context) */
.ledger-rows { margin-top: 8px; }

.lrow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--sheet-line);
  font-family: var(--f-mono);
  font-size: 11.5px;
  min-width: 0;
}

.lrow-k {
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  max-width: 48%;
}

.lrow-v {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.lrow-v a {
  color: var(--audit);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.case-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--sheet-line);
  background: var(--sheet-hi);
}

.case-back-scroll {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.proof-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--sheet-line);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink);
}

.proof-line a {
  color: var(--audit);
  font-weight: 700;
  text-decoration: underline;
}

/* Scanning Sweep Beam during live RPC fee-check */
.case-sheet.is-scanning { position: relative; }

.scan-mask {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  border: 2px solid var(--audit-glow);
  background: rgba(88, 160, 255, 0.06);
  overflow: hidden;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--audit-glow);
  box-shadow: 0 -22px 28px 6px rgba(88, 160, 255, 0.28), 0 14px 20px 3px rgba(88, 160, 255, 0.2);
}

.scan-beam-tag {
  position: absolute;
  right: 12px;
  top: 7px;
  padding: 2px 8px;
  background: var(--audit);
  color: var(--sheet);
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

/* ==================== SECTION 2: MEASURED ON-CHAIN RAIL ==================== */
.rail-band {
  padding: 48px 0;
  border-bottom: 1px solid var(--wall-line);
  background: rgba(13, 16, 20, 0.52);
}

.rail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  box-shadow: var(--pin-shadow-sm);
}

.rail-cell {
  padding: 24px 22px;
  border-right: 1px solid var(--wall-line-hi);
  min-width: 0;
}

.rail-cell:last-child { border-right: 0; }

.rail-big {
  font-family: var(--f-disp);
  font-weight: 800;
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 0.96;
  color: var(--wall-ink);
  margin-bottom: 10px;
}

.rail-big.hot { color: var(--kept-glow); font-style: normal; }

.rail-cap {
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--wall-ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rail-foot {
  margin-top: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--wall-ink-3);
}

/* ==================== SECTION 3: 4-STAGE AUDIT MECHANISM ==================== */
.mech-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}

.mech-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.mech-step {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background-color 0.16s, border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}

.mech-step:hover {
  background: var(--wall-3);
}

.mech-step[aria-selected="true"] {
  border-color: var(--brass);
  border-left: 4px solid var(--brass);
  background: #222933;
  box-shadow: var(--pin-shadow-sm);
  transform: translateX(4px);
}

.mech-step-k {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brass);
}

.mech-step-t {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
  color: var(--wall-ink);
}

.mech-step-p {
  font-size: 14px;
  color: var(--wall-ink-2);
  margin: 0;
}

/* Pinned Light Evidence Spec Sheet on the Right */
.mech-panel {
  border: 1.5px solid var(--sheet-hard);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--pin-shadow);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  min-width: 0;
  max-width: 100%;
}

.mech-panel-body {
  padding: 24px;
  min-width: 0;
}

.mech-panel-body h3 {
  color: var(--ink);
}

.mech-panel-body .deck {
  color: var(--ink-2);
}

.mech-progress {
  height: 5px;
  background: var(--sheet-tab);
  border-top: 1px solid var(--sheet-line);
  overflow: hidden;
}

.mech-progress-fill {
  height: 100%;
  width: 25%;
  background: var(--audit);
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.mech-code {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: #14181F;
  color: #E7E2D8;
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.65;
  max-width: 100%;
  overflow-x: auto;
}

/* ==================== SECTION 4: FULL PINNED CASE-FILE WALL + WATCHLIST DOCKET ==================== */
.wall-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 24px;
}

.wall-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  color: var(--wall-ink-2);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tab-btn:hover { background: var(--wall-3); color: var(--wall-ink); }
.tab-btn[aria-pressed="true"] {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--wall);
}

.wall-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.docket-aside {
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  box-shadow: var(--pin-shadow-sm);
  min-width: 0;
}

.docket-head {
  padding: 12px 16px;
  background: var(--wall-3);
  border-bottom: 1px solid var(--wall-line-hi);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wall-ink);
}

.docket-list { padding: 10px 16px; }

.docket-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--wall-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docket-item:last-child { border-bottom: 0; }

.docket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--wall-ink);
}

.docket-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--wall-ink-3);
}

/* ==================== SECTION 5: FOUR VERDICT RULE PLAQUES ==================== */
.rules-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.rule-box {
  border: 1px solid var(--wall-line-hi);
  border-top: 3px solid var(--wall-line-hi);
  background: var(--wall-2);
  padding: 22px;
  box-shadow: var(--pin-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rule-box:nth-child(1) { border-top-color: var(--kept-glow); }
.rule-box:nth-child(2) { border-top-color: var(--partly-glow); }
.rule-box:nth-child(3) { border-top-color: var(--broken-glow); }
.rule-box:nth-child(4) { border-top-color: var(--audit-glow); }

.rule-box:hover {
  transform: translateY(-4px);
}

.rule-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rule-idx {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--wall-ink-3);
  letter-spacing: 0.1em;
}

.rule-box h3 { font-size: 24px; color: var(--wall-ink); }
.rule-box p { margin: 0; font-size: 14px; color: var(--wall-ink-2); line-height: 1.54; }

.honesty-bar {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--wall-line-hi);
  border-left: 4px solid var(--partly-glow);
  background: var(--wall-2);
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--wall-ink-2);
}

.honesty-bar strong { color: var(--wall-ink); }

/* ==================== SECTION 6: PROMISE FILING BENCH ==================== */
.bench-split {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 28px;
  margin-top: 30px;
  align-items: start;
}

.bench-box {
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  padding: 24px;
  box-shadow: var(--pin-shadow-sm);
  min-width: 0;
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.frow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.frow label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wall-ink-2);
}

.gate-panel {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall);
}

.gate-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--wall-ink);
}

/* Pinned Light Affidavit Sheet Preview */
.affidavit-box {
  border: 1.5px solid var(--sheet-hard);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--pin-shadow);
  position: relative;
  min-width: 0;
}

.affidavit-box::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #F6D88F 0%, #C18D35 62%, #593A0C 100%);
  border: 1px solid rgba(0, 0, 0, 0.65);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.affidavit-pad { padding: 22px; }
.affidavit-pad .kicker { color: var(--ink-3); }

.affidavit-pre {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.6;
  padding: 15px;
  background: var(--sheet-hi);
  border: 1px solid var(--sheet-line);
  color: var(--ink);
  margin: 12px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ==================== SECTION 7: FAQ + SECTION 8: CLOSING WALL ==================== */
.faq-split {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 36px;
  align-items: start;
}

.faq-row {
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  margin-bottom: 12px;
}

.faq-row summary {
  list-style: none;
  padding: 17px 20px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--wall-ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 52px;
}

.faq-row summary::-webkit-details-marker { display: none; }
.faq-row summary::after {
  content: "+";
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 20px;
  color: var(--brass);
  flex-shrink: 0;
}

.faq-row[open] summary {
  border-bottom: 1px solid var(--wall-line);
  background: var(--wall-3);
}
.faq-row[open] summary::after { content: "-"; }

.faq-body {
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--wall-ink-2);
  line-height: 1.64;
}

.closing-band {
  padding: 84px 0;
  border-bottom: 1px solid var(--wall-line-hi);
  background:
    radial-gradient(ellipse 680px 360px at 30% 50%, rgba(37, 208, 125, 0.08) 0%, rgba(19, 22, 26, 0) 70%);
}

.closing-band h2 {
  font-size: clamp(42px, 6.4vw, 96px);
  line-height: 0.96;
}

/* ==================== EXHIBITS, TABLES, ADMIN & FOOTER ==================== */
.exh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.exh-box {
  border: 1.5px solid var(--sheet-hard);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--pin-shadow-sm);
  min-width: 0;
}

.exh-head {
  padding: 10px 16px;
  background: var(--sheet-tab);
  border-bottom: 1.5px solid var(--sheet-hard);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.exh-body { padding: 16px; }

.tbl-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--wall-line-hi);
  background: var(--wall-2);
  margin-top: 16px;
  box-shadow: var(--pin-shadow-sm);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--wall-ink);
}

.tbl th, .tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--wall-line);
  text-align: left;
  vertical-align: top;
}

.tbl th {
  background: var(--wall-3);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wall-ink-2);
  border-bottom: 1px solid var(--wall-line-hi);
}

.tbl td a { color: var(--audit-glow); text-decoration: underline; font-weight: 600; }

.meter {
  height: 10px;
  width: 100%;
  background: var(--sheet-tab);
  border: 1px solid var(--sheet-hard);
  margin: 10px 0 6px;
}

.meter-fill { height: 100%; background: var(--audit); }
.meter-fill.m-kept { background: var(--kept); }
.meter-fill.m-partly { background: var(--partly); }
.meter-fill.m-broken { background: var(--broken); }

.ft-bar {
  padding: 28px 0 38px;
  background: #0D1014;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--wall-ink-2);
}

.ft-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
}

.ft-links { display: flex; flex-wrap: wrap; gap: 14px; }
.ft-links a { text-decoration: underline; text-underline-offset: 2px; }
.ft-links a:hover { color: var(--brass); }

.ft-sec {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--wall-line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--wall-ink-3);
}

.empty-note {
  padding: 20px;
  border: 1px dashed var(--wall-line-hi);
  background: var(--wall-2);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--wall-ink-2);
}

.case-sheet .empty-note {
  background: var(--sheet-hi);
  border-color: var(--sheet-line);
  color: var(--ink-2);
}

.toast-pop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
  padding: 12px 16px;
  background: var(--wall-ink);
  color: var(--wall);
  border: 1px solid var(--brass);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--pin-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast-pop.is-on { opacity: 1; transform: translateY(0); }

.dirty-bar {
  position: sticky;
  bottom: 16px;
  z-index: 40;
  margin-top: 18px;
  padding: 12px 16px;
  background: var(--brass);
  color: var(--wall);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
}

.dirty-bar.is-on { display: flex; }

/* ==================== SCROLL LIFE: STAGGERED REVEAL & ROW SLIDE-IN ==================== */
html.fx-on [data-rise] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.44s cubic-bezier(0.22, 1, 0.36, 1) var(--rise-d, 0ms),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--rise-d, 0ms);
}

html.fx-on [data-rise].is-in {
  opacity: 1;
  transform: translateY(0);
}

html.fx-on [data-slide-row] {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--row-i, 0) * 38ms),
              transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--row-i, 0) * 38ms);
}

html.fx-on [data-slide-row].is-in {
  opacity: 1;
  transform: translateX(0);
}

/* ==================== RESPONSIVE BREAKPOINTS (1120px, 840px, TRUE 390px) ==================== */
@media (max-width: 1120px) {
  .hero-split,
  .hero-pinned-rail,
  .mech-grid,
  .wall-wrap,
  .bench-split,
  .faq-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .stack-stage { min-height: 480px; }
  .mech-panel { position: static; }

  .rail-grid,
  .rules-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-cell { border-bottom: 1px solid var(--wall-line-hi); }
  .rail-cell:nth-child(2n) { border-right: 0; }
}

@media (max-width: 840px) {
  .hd-burger { display: inline-flex; }
  .hd-wallet { display: none; }

  .hd-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--wall-2);
    border-bottom: 1px solid var(--wall-line-hi);
    padding: 10px 18px 16px;
    gap: 2px;
    z-index: 70;
  }

  .hd-nav.is-open { display: flex; }
  .hd-nav a { border-bottom: 1px solid var(--wall-line); padding: 12px 6px; }

  .wall-grid,
  .exh-grid,
  .fgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 540px) {
  .shell { padding: 0 14px; }
  .band { padding: 52px 0; }
  .wall-hero { padding: 20px 0 38px; }
  .closing-band { padding: 56px 0; }
  .closing-band h2 { font-size: clamp(34px, 9.5vw, 56px); }
  .wire-label { display: none; }

  .stack-stage { min-height: 410px; }
  .stack-bay-head { font-size: 9px; top: 12px; left: 12px; right: 12px; }
  .stack-pin { padding: 4px 7px; font-size: 9.5px; }
  .pin-meta { display: none; }
  .stack-hud-bar { margin: 0 10px 10px; padding: 7px 10px; font-size: 9.5px; }

  .check-form { flex-direction: column; }

  .mech-panel-body { padding: 16px; }
  .mech-code {
    font-size: 11px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .rail-grid,
  .rules-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail-cell {
    border-right: 0;
    border-bottom: 1px solid var(--wall-line-hi);
  }
  .rail-cell:last-child { border-bottom: 0; }

  .case-head { flex-direction: column; }
  .stamp-box { align-self: flex-start; }

  .lrow { flex-direction: column; gap: 2px; }
  .lrow-k { max-width: 100%; }
  .lrow-v { text-align: left; }
}

/* ==================== REDUCED MOTION (COMPLETE SHUTDOWN) ==================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  #stack-gl { display: none !important; }
  .stack-fallback { display: flex !important; }

  html.fx-on [data-rise],
  html.fx-on [data-slide-row] {
    opacity: 1 !important;
    transform: none !important;
  }

  .wire-stage {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
  .wire-track { transform: none !important; }
  .wire-seq[aria-hidden="true"] { display: none; }

  .case-stage.is-flipped .case-flipper { transform: none; }
  .case-stage.is-flipped .case-front { display: none; }
  .case-stage.is-flipped .case-back { position: relative; transform: none; }
}
