:root {
  --ground: #eef3ff;
  --paper: #f8faff;
  --ink: #0b1f3a;
  --navy: #173d91;
  --muted: #40506d;
  --red: #c8102e;
  --blue: #1477d4;
  --chain: #bfeee8;
  --line: color-mix(in srgb, var(--navy) 24%, transparent);
  --shadow: 0 18px 60px rgb(10 31 76 / 13%);
}

* { box-sizing: border-box; }
html { background: var(--ground); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; font-family: "Public Sans", Arial, sans-serif; background: var(--ground); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
code, .mono { font-family: "DM Mono", ui-monospace, monospace; }

.skip-link { position: fixed; z-index: 100; left: 16px; top: -70px; padding: 12px 18px; border-radius: 12px; background: var(--red); color: white; transition: top .2s; }
.skip-link:focus { top: 16px; }

.top-shell { position: relative; z-index: 30; padding: 0; }
.top-rail { width: 100%; height: 64px; margin: 0; padding: 0 28px; display: flex; align-items: center; gap: 25px; background: var(--ink); color: white; box-shadow: 0 8px 22px rgb(9 22 48 / 12%); }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; font-family: "Bricolage Grotesque", Arial, sans-serif; font-weight: 800; letter-spacing: .06em; font-size: 21px; }
.brand-mark { width: 46px; height: 46px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 4px 5px rgb(0 0 0 / 18%)); }
.route-links, .social-links { display: flex; align-items: center; gap: 22px; }
.route-links a, .social-links a { text-decoration: none; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; font-size: 12px; color: #e7edff; }
.route-links a:hover, .route-links a[aria-current="page"], .social-links a:hover { color: var(--chain); }
.social-links { gap: 14px; }
.chain-pill { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; border-radius: 22px; background: var(--chain); color: var(--ink); font: 600 11px "DM Mono", monospace; }
.chain-pill i { width: 7px; height: 7px; border-radius: 50%; background: #2ad277; }
.menu-button { display: none; }

#app { min-height: 70vh; }
.page { width: min(1540px, calc(100% - 32px)); margin: 16px auto 44px; }
.route-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 32px; align-items: end; padding: 30px 0 24px; border-bottom: 2px solid var(--navy); }
.eyebrow, .micro { display: block; color: var(--navy); font: 600 11px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { font-family: "Bricolage Grotesque", Arial, sans-serif; margin: 0; line-height: .98; letter-spacing: -.035em; }
h1 { max-width: 920px; margin-top: 12px; font-size: clamp(48px, 6vw, 84px); }
h2 { font-size: clamp(34px, 5vw, 64px); }
h3 { font-size: 25px; line-height: 1.08; }
p { line-height: 1.62; }
.route-intro { max-width: 580px; justify-self: end; color: var(--muted); font-size: 18px; }
.source-line { margin: 12px 0 0; color: var(--muted); font: 400 11px "DM Mono", monospace; overflow-wrap: anywhere; }

.hero-machine { position: relative; width: 100%; min-height: 540px; overflow: hidden; isolation: isolate; background:
  linear-gradient(to bottom, transparent 108px, rgb(23 61 145 / 12%) 109px, transparent 110px),
  linear-gradient(to bottom, transparent calc(100% - 111px), rgb(23 61 145 / 12%) calc(100% - 110px), transparent calc(100% - 109px)),
  linear-gradient(140deg, var(--paper), #dce7ff);
}
.hero-machine::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: linear-gradient(rgb(23 61 145 / 5%) 1px, transparent 1px), linear-gradient(90deg, rgb(23 61 145 / 5%) 1px, transparent 1px); background-size: 32px 32px; }
.ghost-word { position: absolute; z-index: -1; left: 50%; top: 18px; transform: translateX(-50%); white-space: nowrap; font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: clamp(120px, 13vw, 190px); font-weight: 800; letter-spacing: -.07em; color: transparent; -webkit-text-stroke: 2px rgb(23 61 145 / 8%); }
.stamp-carriage { position: absolute; z-index: 8; left: 50%; top: 8px; width: min(288px, 29vw); transform: translate(-50%, var(--stamp-y, 0px)) scaleY(var(--stamp-scale, 1)); transform-origin: 50% 18%; will-change: transform; }
.carriage-rail { position: absolute; z-index: -1; left: 2%; right: 2%; top: 0; height: 44px; clip-path: polygon(0 0,100% 0,90% 100%,10% 100%); background: var(--ink); }
.carriage-lights { position: absolute; z-index: 2; top: 14px; left: 48px; display: flex; gap: 10px; }
.carriage-lights i { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); }
.carriage-lights i:last-child { background: var(--red); }
.stamp-carriage img { width: 100%; filter: drop-shadow(0 18px 20px rgb(9 22 48 / 20%)); }
.impact-ring { position: absolute; left: 50%; top: 218px; z-index: 10; width: 160px; height: 76px; border: 14px solid var(--red); border-radius: 50%; opacity: var(--ink-opacity, 0); transform: translate(-50%, -50%) scale(var(--ink-scale, .72)); transition: opacity .08s linear; pointer-events: none; }

.belt-window { position: absolute; z-index: 3; left: 0; right: 0; top: 212px; height: 230px; overflow: hidden; border-block: 4px solid var(--navy); background: var(--paper); box-shadow: 0 14px 0 rgb(23 61 145 / 14%); }
.belt-track { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1.7fr 1fr; transform: translateX(var(--belt-x, 0%)); will-change: transform; }
.belt-track::before, .belt-track::after { content: ""; position: absolute; left: 0; right: 0; height: 18px; background: radial-gradient(circle, rgb(23 61 145 / 28%) 3px, transparent 4px) 0 0 / 34px 18px; }
.belt-track::before { top: 10px; }
.belt-track::after { bottom: 10px; }
.belt-zone { min-width: 0; padding: 42px 38px 28px; border-right: 2px dashed rgb(23 61 145 / 30%); display: flex; flex-direction: column; justify-content: center; }
.belt-zone:last-child { border: 0; }
.belt-zone strong { margin: 12px 0 5px; font: 600 22px "DM Mono", monospace; }
.belt-zone small { color: var(--navy); font: 400 12px "DM Mono", monospace; }
.zone-box { width: min(270px, 100%); margin-top: 10px; padding: 11px 16px; border: 2px solid var(--navy); border-radius: 9px; color: var(--navy); font: 500 11px "DM Mono", monospace; }
.output-dot { width: 44px; height: 44px; margin: 14px 0 0 auto; border: 8px solid var(--navy); border-radius: 50%; background: var(--chain); }
.center-zone { text-align: center; align-items: center; padding-top: 52px; }
.center-zone h1 { max-width: 650px; margin: 0; font-size: clamp(34px, 2.7vw, 39px); line-height: .93; }
.center-zone p { max-width: 620px; margin: 6px auto 9px; color: var(--muted); font-size: 12px; }
.airmail-mini { display: flex; align-self: flex-start; gap: 12px; margin-bottom: 10px; }
.airmail-mini i { display: block; width: 52px; height: 10px; background: var(--red); }
.airmail-mini i:last-child { width: 32px; background: var(--blue); }
.command-slot { width: min(490px, 100%); display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 20px; border-radius: 10px; background: var(--ink); color: white; }
.command-slot code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.command-slot button { margin-left: auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hero-actions button { min-height: 34px; padding-inline: 16px; font-size: 11px; }
.machine-console { position: absolute; z-index: 12; left: 3vw; right: 3vw; bottom: 14px; min-height: 76px; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; border: 2px solid var(--navy); border-radius: 18px; background: var(--ground); }
.machine-console strong { display: block; margin: 9px 0; font: 600 14px "DM Mono", monospace; }
.machine-console p { margin: 0; color: var(--muted); font-size: 12px; }
.console-step { display: flex; gap: 16px; align-items: center; padding: 12px 26px; border-right: 1px solid var(--line); }
.console-step:last-child { border: 0; }
.console-step > span { color: var(--red); font: 600 12px "DM Mono", monospace; }
.console-step b, .console-step small { display: block; }
.console-step b { font: 600 15px "DM Mono", monospace; }
.console-step small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.console-actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.button, button { min-height: 44px; padding: 0 20px; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); color: var(--navy); cursor: pointer; font-weight: 800; font-size: 12px; letter-spacing: .03em; }
.button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.button.primary, button.primary { border-color: var(--red); background: var(--red); color: white; }
.button.dark, button.dark { border-color: var(--navy); background: var(--navy); color: white; }
button:disabled { cursor: not-allowed; opacity: .52; }
.command-slot button { min-height: 34px; padding: 0 17px; border: 0; border-radius: 7px; background: var(--red); color: white; }
.text-button { min-height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; text-decoration: underline; }

.home-sections { width: min(1360px, calc(100% - 6vw)); margin: 0 auto 48px; }
.home-section { padding: 44px 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.home-section-head { max-width: 980px; margin-bottom: 20px; }
.home-section-head h2 { max-width: 900px; margin-top: 10px; font-size: clamp(48px, 5vw, 70px); }
.home-section-head p { max-width: 760px; margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.home-workbench { width: 100%; padding: 22px; }
.home-workbench .drop-zone { min-height: 130px; }
.chain-section { margin-top: 24px; padding: 48px clamp(28px, 4vw, 64px); border: 0; border-radius: 28px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.chain-section .eyebrow { color: var(--chain); }
.chain-section .home-section-head p { color: #bdc9e0; }
.home-flow { margin: 0; }
.chain-section .flow-step { color: var(--ink); }
.chain-tape { margin-top: 20px; padding: 18px; border-radius: 16px; background: var(--paper); color: var(--ink); }
.chain-tape .data-grid { margin-top: 0; }

.home-board { width: min(1540px, calc(100% - 32px)); margin: 16px auto 40px; display: grid; gap: 16px; }
.desk-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 370px; overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; background:
  linear-gradient(rgb(23 61 145 / 5%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(23 61 145 / 5%) 1px, transparent 1px),
  linear-gradient(135deg, var(--paper), #dce7ff);
  background-size: 30px 30px, 30px 30px, auto;
}
.desk-hero-copy { min-height: 300px; padding: 36px 42px 30px; display: flex; flex-direction: column; justify-content: center; }
.desk-hero-copy h1 { max-width: 820px; margin-top: 10px; font-size: clamp(52px, 5.2vw, 76px); }
.desk-hero-copy p { max-width: 720px; margin: 14px 0 18px; color: var(--muted); font-size: 17px; }
.desk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.desk-seal { position: relative; min-height: 300px; display: grid; place-items: center; overflow: hidden; border-left: 2px dashed rgb(23 61 145 / 28%); background: rgb(248 250 255 / 58%); }
.desk-seal::before { content: "POSTMARK"; position: absolute; color: transparent; -webkit-text-stroke: 2px rgb(23 61 145 / 9%); font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 72px; font-weight: 800; transform: rotate(-90deg); }
.desk-seal img { position: relative; z-index: 1; width: 260px; filter: drop-shadow(0 16px 18px rgb(9 22 48 / 17%)); transform: rotate(-2deg); }
.seal-orbit { position: absolute; width: 250px; height: 250px; border: 1px dashed rgb(23 61 145 / 24%); border-radius: 50%; animation: orbit 18s linear infinite; }
.seal-orbit::before, .seal-orbit::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.seal-orbit::before { left: 30px; top: 24px; }
.seal-orbit::after { right: 14px; bottom: 44px; background: var(--chain); border: 2px solid var(--navy); }
.desk-seal span, .desk-seal b { position: absolute; z-index: 2; left: 22px; font: 600 10px "DM Mono", monospace; letter-spacing: .1em; }
.desk-seal span { top: 18px; color: var(--navy); }
.desk-seal b { bottom: 18px; color: var(--red); }
.desk-proofbar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--navy); background: var(--ground); }
.desk-proofbar div { min-width: 0; padding: 14px 22px; border-right: 1px solid var(--line); }
.desk-proofbar div:last-child { border: 0; }
.desk-proofbar span, .desk-proofbar strong { display: block; }
.desk-proofbar span { margin-bottom: 5px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .1em; }
.desk-proofbar strong { font-size: 13px; }

.desk-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr); gap: 16px; align-items: stretch; }
.desk-panel { min-width: 0; padding: 26px; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); }
.panel-head { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.panel-head h2 { margin-top: 8px; font-size: clamp(38px, 3.7vw, 52px); }
.panel-head p { width: min(340px, 42%); margin: 0; color: var(--muted); font-size: 14px; }
.desk-workbench { margin-top: 20px; padding: 18px; border-radius: 18px; box-shadow: none; }
.desk-workbench .drop-zone { min-height: 112px; padding: 18px; border-radius: 14px; }
.desk-workbench .drop-zone strong { font-size: 25px; }
.desk-workbench .hash-progress { margin: 14px 0 7px; }
.desk-workbench .result-grid { margin-top: 12px; gap: 10px; }
.desk-workbench .data-cell { padding: 13px; }
.local-draft { position: relative; margin-top: 12px; padding: 13px 14px; display: grid; grid-template-columns: 155px minmax(0, 1fr) auto; gap: 14px; align-items: center; overflow: hidden; border: 1px dashed var(--navy); background: var(--ground); }
.local-draft span { display: block; margin-bottom: 4px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .08em; }
.local-draft strong { font-size: 12px; }
.local-draft code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.local-draft button { min-height: 34px; padding-inline: 14px; }
.local-draft > i { position: absolute; right: 100px; width: 82px; height: 48px; display: grid; place-items: center; border: 8px solid var(--red); border-radius: 50%; color: var(--red); font: 600 9px "DM Mono", monospace; opacity: 0; transform: scale(1.7) rotate(-8deg); pointer-events: none; }
.local-draft.stamped > i { animation: stamp-pop .48s cubic-bezier(.2,.9,.25,1) forwards; }
.chain-panel { background: var(--ink); color: white; }
.chain-panel .eyebrow { color: var(--chain); }
.chain-panel .panel-head { display: block; }
.chain-panel .panel-head p { width: auto; margin-top: 12px; color: #bdc9e0; }
.chain-panel .data-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.chain-panel .data-cell { padding: 14px; color: var(--ink); }
.chain-panel .source-line { color: #bdc9e0; }
.process-panel { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 2.25fr); gap: 24px; align-items: center; padding: 24px 26px; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); }
.process-panel h2 { margin-top: 8px; font-size: clamp(32px, 3vw, 44px); }
.process-panel .flow-row { margin: 0; gap: 10px; }
.process-panel .flow-step { min-height: 126px; padding: 17px; border: 1px solid var(--line); border-top: 5px solid var(--navy); background: var(--ground); }
.process-panel .flow-step b { margin-bottom: 9px; }
.process-panel .flow-step h3 { font-size: 21px; }
.process-panel .flow-step p { margin-top: 6px; font-size: 12px; }
.process-panel .flow-step a, .process-panel .flow-step .text-button { display: inline-block; margin-top: 10px; color: var(--navy); font-size: 11px; font-weight: 800; }

.insight-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(116px, auto); gap: 12px; }
.insight-card { min-width: 0; padding: 20px; border: 2px solid var(--navy); border-radius: 20px; background: var(--paper); transition: transform .18s ease, box-shadow .18s ease; }
.insight-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgb(10 31 76 / 10%); }
.insight-card > span:not(.eyebrow) { display: block; margin-bottom: 14px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .09em; }
.insight-card h3 { font-size: 20px; }
.insight-card > p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.insight-lead { grid-column: span 6; grid-row: span 2; padding: 26px; background: var(--ink); color: white; }
.insight-lead .eyebrow { color: var(--chain); }
.insight-lead h2 { max-width: 620px; margin-top: 10px; font-size: clamp(36px, 3.5vw, 52px); }
.insight-lead > p { max-width: 650px; color: #bdc9e0; font-size: 14px; }
.insight-grid > .insight-card:not(.insight-lead):not(.boundary-card):not(.faq-card) { grid-column: span 3; }
.boundary-card, .faq-card { grid-column: span 6; }
.boundary-card { border-color: var(--red); }
.boundary-card a { display: inline-block; margin-top: 12px; color: var(--navy); font-size: 12px; font-weight: 800; }
.mini-equation { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mini-equation b { padding: 8px 10px; border: 1px solid #7894cf; border-radius: 8px; font: 600 11px "DM Mono", monospace; }
.mini-equation i { color: var(--red); font-style: normal; }
.faq-card details { border-top: 1px solid var(--line); }
.faq-card summary { padding: 10px 0; cursor: pointer; font-size: 12px; font-weight: 800; }
.faq-card details p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes stamp-pop { 0% { opacity: 0; transform: scale(1.7) rotate(-8deg); } 55% { opacity: 1; transform: scale(.92) rotate(-8deg); } 100% { opacity: .9; transform: scale(1) rotate(-8deg); } }

.page-stamp .route-head { padding-bottom: 20px; }
.page-stamp .route-head h1 { max-width: 1080px; font-size: clamp(52px, 5.3vw, 78px); }
.stamp-console { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(360px, .8fr); margin-top: 16px; overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.stamp-compose { min-width: 0; padding: 28px; }
.stamp-panel-head { display: flex; justify-content: space-between; gap: 22px; align-items: end; }
.stamp-panel-head h2 { margin-top: 7px; font-size: clamp(38px, 3.8vw, 54px); }
.stamp-state-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 30px; color: var(--muted); font: 600 10px "DM Mono", monospace; text-transform: uppercase; }
.stamp-state-chip i { width: 8px; height: 8px; border-radius: 50%; background: #93a0b7; }
.stamp-state-chip.ready { border-color: #56bca0; color: var(--ink); background: var(--chain); }
.stamp-state-chip.ready i { background: #16a46f; box-shadow: 0 0 0 5px rgb(42 210 119 / 16%); }
.stamp-drop { position: relative; min-height: 126px; margin-top: 22px; padding: 20px 22px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 18px; align-items: center; border: 2px dashed var(--navy); border-radius: 16px; background:
  linear-gradient(90deg, transparent 49.7%, rgb(23 61 145 / 5%) 50%, transparent 50.3%),
  var(--ground); cursor: pointer; transition: background .18s ease, transform .18s ease; }
.stamp-drop:hover, .stamp-drop.dragging { background: var(--chain); transform: translateY(-2px); }
.stamp-drop input { position: absolute; opacity: 0; pointer-events: none; }
.stamp-drop-index { width: 48px; height: 48px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 50%; color: var(--red); font: 700 17px "DM Mono", monospace; background: var(--paper); }
.stamp-drop strong, .stamp-drop small { display: block; }
.stamp-drop strong { font: 700 26px "Bricolage Grotesque", Arial, sans-serif; letter-spacing: -.025em; }
.stamp-drop small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.stamp-drop > b { padding: 10px 14px; border-radius: 20px; background: var(--navy); color: white; font-size: 11px; }
.stamp-progress { margin: 12px 0 0; }
.stamp-file-strip { display: grid; grid-template-columns: 1.5fr .55fr .75fr; margin-top: 14px; border-block: 1px solid var(--line); }
.stamp-file-strip > div { min-width: 0; padding: 14px; border-right: 1px solid var(--line); }
.stamp-file-strip > div:last-child { border: 0; }
.stamp-file-strip span, .stamp-file-strip strong { display: block; }
.stamp-file-strip span { margin-bottom: 6px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .08em; }
.stamp-file-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.stamp-digest-box { position: relative; margin-top: 16px; padding: 17px; display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 16px; align-items: center; overflow: hidden; border: 2px solid var(--navy); border-radius: 15px; background: #e8efff; }
.stamp-digest-box span { display: block; margin-bottom: 5px; color: var(--navy); font: 600 9px "DM Mono", monospace; letter-spacing: .08em; }
.stamp-digest-box strong { font-size: 12px; }
.stamp-digest-box code { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stamp-digest-box button { min-height: 36px; padding-inline: 14px; }
.stamp-digest-box > i { position: absolute; right: 84px; width: 88px; height: 50px; display: grid; place-items: center; border: 8px solid var(--red); border-radius: 50%; color: var(--red); font: 700 9px "DM Mono", monospace; font-style: normal; opacity: 0; transform: rotate(-8deg) scale(1.7); pointer-events: none; }
.stamp-digest-box.ready > i { animation: stamp-pop .48s cubic-bezier(.2,.9,.25,1) forwards; }
.compose-trace { margin-top: 16px; border: 1px solid var(--line); background: var(--ground); }
.compose-trace header { padding: 11px 14px; display: flex; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.compose-trace header span, .compose-trace header b { font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.compose-trace header span { color: var(--red); }
.compose-trace header b { color: var(--muted); text-align: right; }
.compose-trace ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.compose-trace li { padding: 15px 14px; display: flex; gap: 10px; align-items: center; border-right: 1px solid var(--line); }
.compose-trace li:last-child { border: 0; }
.compose-trace li > i { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--navy); border-radius: 50%; color: var(--muted); font: 600 8px "DM Mono", monospace; font-style: normal; }
.compose-trace li strong, .compose-trace li small { display: block; }
.compose-trace li strong { font-size: 11px; }
.compose-trace li small { margin-top: 3px; color: var(--muted); font: 400 8px "DM Mono", monospace; }
.compose-trace.ready li > i { border-color: #56bca0; color: var(--ink); background: var(--chain); }
.compose-trace > p { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.compose-trace > p span { margin-right: 10px; color: var(--navy); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }

.tx-preview { min-width: 0; padding: 28px; color: white; background:
  linear-gradient(rgb(191 238 232 / 7%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(191 238 232 / 7%) 1px, transparent 1px),
  var(--ink); background-size: 28px 28px, 28px 28px, auto; }
.tx-preview header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.tx-preview .eyebrow { color: var(--chain); }
.tx-preview header > b { padding: 7px 10px; border: 1px solid #7185aa; border-radius: 4px; color: #aab8d2; font: 600 9px "DM Mono", monospace; letter-spacing: .1em; }
.tx-preview h2 { margin-top: 22px; color: white; font-size: clamp(38px, 3.6vw, 52px); }
.tx-route { display: flex; gap: 7px; align-items: center; margin: 20px 0 15px; color: var(--chain); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.tx-route span { padding: 6px 7px; border: 1px solid #4c648c; border-radius: 5px; }
.tx-route i { color: var(--red); font-style: normal; }
.tx-fields { margin: 0; border-top: 1px solid #53698f; }
.tx-fields > div { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid #324969; }
.tx-fields dt { color: #93a8c8; font: 400 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.tx-fields dd { min-width: 0; margin: 0; overflow: hidden; color: #f0f4ff; font: 500 11px "DM Mono", monospace; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.tx-fields .tx-data dd { color: var(--chain); }
.tx-head { margin-top: 15px; padding: 14px; border: 1px solid #53698f; border-left: 5px solid var(--chain); background: rgb(255 255 255 / 4%); }
.tx-head span, .tx-head strong, .tx-head small { display: block; }
.tx-head span { color: var(--chain); font: 600 8px "DM Mono", monospace; letter-spacing: .09em; }
.tx-head strong { margin-top: 5px; font-size: 17px; }
.tx-head small { margin-top: 4px; color: #aab8d2; font: 400 9px "DM Mono", monospace; }
.tx-submit { width: 100%; margin-top: 14px; }

.stamp-anatomy { margin-top: 16px; padding: 26px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.stamp-anatomy > header { display: grid; grid-template-columns: minmax(0, .9fr) minmax(260px, .6fr); gap: 24px; align-items: end; }
.stamp-anatomy > header .eyebrow { grid-column: 1 / -1; }
.stamp-anatomy > header h2 { font-size: clamp(37px, 3.5vw, 50px); }
.stamp-anatomy > header p { margin: 0; color: var(--muted); font-size: 13px; }
.payload-ruler { display: grid; grid-template-columns: 90px minmax(0, 1fr) 130px; margin-top: 22px; border: 2px solid var(--navy); background: var(--ground); }
.ruler-label, .ruler-total { padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.ruler-label { color: white; background: var(--red); }
.ruler-label b { font: 700 22px "DM Mono", monospace; }
.ruler-label span, .ruler-total span { margin-top: 4px; font: 500 8px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.ruler-body { position: relative; min-width: 0; padding: 18px 20px 15px; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 10px; border-inline: 1px solid var(--line); }
.ruler-body b { grid-column: 1 / -1; overflow: hidden; color: var(--navy); font: 600 12px "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.ruler-body span { color: var(--muted); font: 400 8px "DM Mono", monospace; text-transform: uppercase; }
.ruler-body i { height: 1px; margin-bottom: 4px; background: repeating-linear-gradient(90deg, var(--navy) 0 6px, transparent 6px 11px); }
.ruler-total { text-align: center; }
.ruler-total strong { font: 700 28px "DM Mono", monospace; }
.stamp-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stamp-check-grid article { padding: 15px; border-top: 5px solid var(--navy); background: var(--ground); }
.stamp-check-grid article > span { display: block; margin-bottom: 13px; color: var(--red); font: 600 9px "DM Mono", monospace; }
.stamp-check-grid article > b, .stamp-check-grid article > strong { display: block; }
.stamp-check-grid article > b { color: var(--muted); font-size: 11px; }
.stamp-check-grid article > strong { margin-top: 4px; font-size: 18px; }
.stamp-check-grid article > p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.stamp-closeout { margin-top: 16px; padding: 24px 26px; display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.6fr) auto; gap: 28px; align-items: center; border: 2px solid var(--navy); border-radius: 22px; background: var(--chain); }
.stamp-closeout h2 { margin-top: 7px; font-size: clamp(30px, 2.7vw, 40px); }
.stamp-closeout ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; }
.stamp-closeout li { padding: 6px 16px; border-left: 1px solid rgb(23 61 145 / 27%); }
.stamp-closeout li b, .stamp-closeout li span { display: block; }
.stamp-closeout li b { margin-bottom: 6px; color: var(--red); font: 600 9px "DM Mono", monospace; }
.stamp-closeout li span { font-size: 11px; line-height: 1.45; }

.page-verify .route-head { padding-bottom: 20px; }
.page-verify .route-head h1 { max-width: 980px; font-size: clamp(52px, 5.3vw, 78px); }
.verify-lab { display: grid; grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr); margin-top: 16px; overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.verify-side { min-width: 0; padding: 26px; }
.verify-side > header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.verify-side > header > b { color: var(--muted); font: 600 8px "DM Mono", monospace; letter-spacing: .09em; }
.verify-side > h2 { margin-top: 16px; font-size: clamp(38px, 3.7vw, 52px); }
.verify-drop { position: relative; min-height: 116px; margin-top: 18px; padding: 18px; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; border: 2px dashed var(--navy); border-radius: 15px; background: var(--ground); cursor: pointer; transition: background .18s ease, transform .18s ease; }
.verify-drop:hover, .verify-drop.dragging { background: var(--chain); transform: translateY(-2px); }
.verify-drop input { position: absolute; opacity: 0; pointer-events: none; }
.verify-drop > i { width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--navy); border-radius: 50%; color: var(--red); font: 700 15px "DM Mono", monospace; font-style: normal; background: var(--paper); }
.verify-drop strong, .verify-drop small { display: block; }
.verify-drop strong { font: 700 21px "Bricolage Grotesque", Arial, sans-serif; }
.verify-drop small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.verify-drop > b { padding: 9px 12px; border-radius: 20px; color: white; background: var(--navy); font-size: 10px; }
.verify-progress { margin: 11px 0 0; }
.verify-source-meta, .verify-chain-meta { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(100px, .5fr); margin-top: 12px; border-block: 1px solid var(--line); }
.verify-source-meta > div, .verify-chain-meta > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); }
.verify-source-meta > div:last-child, .verify-chain-meta > div:last-child { border: 0; }
.verify-source-meta span, .verify-chain-meta span { display: block; margin-bottom: 5px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.verify-source-meta strong, .verify-chain-meta strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.verify-digest-card { margin-top: 13px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; align-items: center; border: 2px solid var(--navy); border-radius: 13px; background: #e7eeff; }
.verify-digest-card span { color: var(--navy); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.verify-digest-card code { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.verify-digest-card button, .verify-digest-card a { grid-column: 2; grid-row: 1 / span 2; min-height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border: 1px solid var(--navy); border-radius: 18px; color: var(--navy); font-size: 9px; font-weight: 800; text-decoration: none; }
.verify-file-side.ready .verify-digest-card { border-color: #56bca0; background: var(--chain); }

.verify-chain-side { color: white; background:
  linear-gradient(rgb(191 238 232 / 7%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(191 238 232 / 7%) 1px, transparent 1px),
  var(--ink); background-size: 28px 28px, 28px 28px, auto; }
.verify-chain-side .eyebrow { color: var(--chain); }
.verify-chain-side > header > b { color: #9eb0ce; }
.verify-chain-side > h2 { color: white; }
.verify-tx-form { margin-top: 18px; }
.verify-tx-form label { display: block; margin-bottom: 7px; color: #9eb0ce; font: 500 8px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.verify-tx-form > div { display: flex; overflow: hidden; border: 1px solid #60769b; border-radius: 10px; background: rgb(255 255 255 / 5%); }
.verify-tx-form input { min-width: 0; min-height: 46px; flex: 1; padding: 0 13px; border: 0; outline: 0; color: white; background: transparent; font: 400 11px "DM Mono", monospace; }
.verify-tx-form button { min-height: 46px; border: 0; border-radius: 0; color: white; background: var(--red); }
.verify-tx-status { min-height: 31px; margin: 9px 0 0; color: #aebbd1; font-size: 10px; line-height: 1.45; }
.verify-chain-meta { grid-template-columns: .6fr 1fr .7fr; border-color: #42597e; }
.verify-chain-meta > div { border-color: #42597e; }
.verify-chain-meta span { color: var(--chain); }
.verify-chain-meta strong { color: white; }
.verify-digest-card.dark { border-color: #60769b; background: rgb(255 255 255 / 5%); }
.verify-digest-card.dark span { color: var(--chain); }
.verify-digest-card.dark code { color: #c7d3e8; }
.verify-digest-card.dark a { border-color: #60769b; color: white; }
.verify-digest-card.dark a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.verify-chain-side.ready .verify-digest-card.dark { border-color: var(--chain); }

.verify-gate { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; border-inline: 2px solid var(--navy); color: var(--navy); background: #dce7ff; }
.verify-gate span, .verify-gate > b, .verify-gate small { font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.verify-gate strong { margin: 13px 0; font: 800 50px "Bricolage Grotesque", Arial, sans-serif; }
.verify-gate > i { width: 1px; height: 64px; margin: 14px 0; background: repeating-linear-gradient(to bottom, var(--navy) 0 5px, transparent 5px 10px); }
.verify-gate small { color: var(--muted); writing-mode: vertical-rl; }
.verify-gate.match { color: #096947; background: var(--chain); }
.verify-gate.mismatch { color: white; background: var(--red); }
.verify-gate.mismatch small { color: white; }
.verify-verdict { grid-column: 1 / -1; padding: 16px 24px; display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.6fr) auto; gap: 24px; align-items: center; border-top: 2px solid var(--navy); background: var(--ground); }
.verify-verdict span { display: block; margin-bottom: 5px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .09em; }
.verify-verdict strong { font-size: 17px; }
.verify-verdict p { margin: 0; color: var(--muted); font-size: 11px; }
.verify-verdict > b { padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 700 9px "DM Mono", monospace; letter-spacing: .08em; }
.verify-verdict.match { background: var(--chain); }
.verify-verdict.match > b { border-color: #25966e; color: #096947; }
.verify-verdict.mismatch { color: white; background: var(--red); }
.verify-verdict.mismatch span, .verify-verdict.mismatch p, .verify-verdict.mismatch > b { color: white; }

.verify-index-panel { margin-top: 16px; padding: 24px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.verify-index-panel > header { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .65fr); gap: 28px; align-items: end; }
.verify-index-panel h2 { margin-top: 7px; font-size: clamp(34px, 3.2vw, 46px); }
.verify-index-panel header p { margin: 0; color: var(--muted); font-size: 12px; }
.verify-index-strip { display: grid; grid-template-columns: 1fr .7fr 1.25fr auto; margin-top: 18px; border-block: 1px solid var(--line); }
.verify-index-strip > div { min-width: 0; padding: 14px; border-right: 1px solid var(--line); }
.verify-index-strip span, .verify-index-strip strong { display: block; }
.verify-index-strip span { margin-bottom: 6px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.verify-index-strip strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.verify-index-strip > .button { align-self: center; margin-left: 14px; }

.verify-reading-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.verify-reading-grid article { min-width: 0; padding: 18px; border: 2px solid var(--navy); border-radius: 17px; background: var(--paper); }
.verify-reading-grid article > span:not(.eyebrow) { display: block; margin-bottom: 18px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .08em; }
.verify-reading-grid h3 { font-size: 20px; }
.verify-reading-grid article > p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.verify-reading-lead { grid-column: span 2; grid-row: span 2; color: white; background: var(--navy) !important; }
.verify-reading-lead .eyebrow { color: var(--chain); }
.verify-reading-lead h2 { max-width: 520px; margin-top: 9px; font-size: clamp(36px, 3.5vw, 50px); }
.verify-reading-lead > p { max-width: 530px; color: #c1cee3 !important; font-size: 12px !important; }

.page-ledger .route-head { padding-bottom: 20px; }
.page-ledger .route-head h1 { max-width: 1040px; font-size: clamp(52px, 5.3vw, 78px); }
.ledger-console { margin-top: 16px; padding: 26px; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.ledger-console-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; }
.ledger-console-head h2 { margin-top: 7px; font-size: clamp(39px, 3.7vw, 52px); }
.ledger-state-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 24px; color: var(--muted); font: 600 9px "DM Mono", monospace; text-transform: uppercase; }
.ledger-state-pill i { width: 8px; height: 8px; border-radius: 50%; background: #98a5ba; }
.ledger-state-pill.ready { color: #075d41; border-color: #55bd9f; background: var(--chain); }
.ledger-state-pill.ready i { background: #16a46f; }
.ledger-state-pill.blocked { color: var(--red); border-color: rgb(200 16 46 / 35%); background: #fff0f3; }
.ledger-state-pill.blocked i { background: var(--red); }
.ledger-monitor { display: grid; grid-template-columns: 1.35fr 1.35fr repeat(3, .7fr); margin-top: 20px; overflow: hidden; border: 1px solid var(--line); }
.ledger-monitor > div { min-width: 0; min-height: 92px; padding: 15px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); background: var(--ground); }
.ledger-monitor > div:last-child { border: 0; }
.ledger-monitor span, .ledger-monitor strong, .ledger-monitor small { display: block; }
.ledger-monitor span { margin-bottom: 8px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.ledger-monitor strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.ledger-monitor small { margin-top: 5px; color: var(--muted); font: 400 8px "DM Mono", monospace; }
.ledger-monitor .ledger-head-card { position: relative; color: white; background: var(--ink); }
.ledger-head-card span { color: var(--chain); }
.ledger-head-card strong { font-size: 21px; }
.ledger-head-card small { color: #aab8d2; }
.ledger-head-card > i { position: absolute; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: #2ad277; box-shadow: 0 0 0 7px rgb(42 210 119 / 13%); }
.ledger-head-card.error > i { background: var(--red); box-shadow: 0 0 0 7px rgb(200 16 46 / 15%); }
.ledger-scanline { display: grid; grid-template-columns: 210px minmax(0, 1fr) 230px; gap: 18px; align-items: center; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); background: #e7eeff; }
.ledger-scanline span, .ledger-scanline strong { display: block; }
.ledger-scanline span { color: var(--navy); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.ledger-scanline strong { margin-top: 4px; font-size: 11px; }
.ledger-meter { height: 7px; overflow: hidden; border-radius: 8px; background: #cad6ee; }
.ledger-meter i { display: block; width: 0; height: 100%; background: var(--red); transition: width .35s ease; }
.ledger-scanline small { color: var(--muted); font: 400 9px "DM Mono", monospace; text-align: right; }
.ledger-controls { display: grid; grid-template-columns: 150px minmax(280px, 1fr) auto auto; gap: 10px; align-items: center; margin-top: 14px; }
.ledger-controls > label { color: var(--muted); font: 600 9px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .07em; }
.ledger-controls > div { display: flex; min-width: 0; overflow: hidden; border: 1px solid var(--navy); border-radius: 24px; }
.ledger-controls input { min-width: 0; min-height: 42px; flex: 1; padding: 0 15px; border: 0; outline: 0; color: var(--ink); background: var(--ground); font: 400 11px "DM Mono", monospace; }
.ledger-controls > div button { min-height: 42px; border: 0; border-radius: 0; color: white; background: var(--red); }
.ledger-controls > button { min-height: 42px; }
.ledger-table-shell { margin-top: 14px; overflow: hidden; border: 2px solid var(--navy); border-radius: 14px; }
.ledger-table-labels, .ledger-record-row { display: grid; grid-template-columns: 1.25fr .8fr 1.05fr .8fr; }
.ledger-table-labels { color: var(--chain); background: var(--ink); }
.ledger-table-labels span { padding: 12px 14px; border-right: 1px solid #405778; font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.ledger-record-row { border-bottom: 1px solid var(--line); background: var(--paper); }
.ledger-record-row:last-child { border: 0; }
.ledger-record-row > * { min-width: 0; padding: 14px; border-right: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 10px "DM Mono", monospace; }
.ledger-record-row > *:last-child { border: 0; }
.ledger-record-row a { color: var(--navy); }
.ledger-record-row strong, .ledger-record-row small { display: block; }
.ledger-record-row small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.ledger-empty-state { min-height: 190px; padding: 27px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background:
  linear-gradient(rgb(23 61 145 / 5%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(23 61 145 / 5%) 1px, transparent 1px),
  var(--ground); background-size: 26px 26px, 26px 26px, auto; }
.ledger-empty-state > span { color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .1em; }
.ledger-empty-state h3 { margin-top: 10px; font-size: 28px; }
.ledger-empty-state > p { max-width: 620px; margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.ledger-empty-state > div { margin-top: 16px; display: flex; gap: 9px; align-items: center; }
.ledger-empty-state b { color: var(--red); font: 600 8px "DM Mono", monospace; }
.ledger-empty-state code { padding: 7px 9px; border: 1px solid var(--line); color: var(--navy); background: var(--paper); font-size: 9px; }
.ledger-empty-state i { color: var(--red); font-style: normal; }
.ledger-empty-state.loading > span { color: var(--navy); }

.ledger-schema { margin-top: 16px; padding: 25px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.ledger-schema > header { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(260px, .65fr); gap: 28px; align-items: end; }
.ledger-schema h2 { margin-top: 7px; font-size: clamp(36px, 3.3vw, 48px); }
.ledger-schema header p { margin: 0; color: var(--muted); font-size: 12px; }
.ledger-schema-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 19px; }
.ledger-schema-grid article { position: relative; min-width: 0; min-height: 122px; padding: 15px; overflow: hidden; border: 1px solid var(--line); border-top: 5px solid var(--navy); background: var(--ground); }
.ledger-schema-grid article > span, .ledger-schema-grid article > strong, .ledger-schema-grid article > code { display: block; }
.ledger-schema-grid article > span { margin-bottom: 16px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.ledger-schema-grid article > strong { font-size: 14px; }
.ledger-schema-grid article > code { margin-top: 7px; overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.ledger-schema-grid .schema-excluded { border-color: var(--red); }
.schema-excluded > i { position: absolute; right: -4px; bottom: 4px; width: 80px; height: 45px; display: grid; place-items: center; border: 7px solid var(--red); border-radius: 50%; color: var(--red); font: 700 8px "DM Mono", monospace; font-style: normal; opacity: .75; transform: rotate(-8deg); }
.ledger-pipeline { margin-top: 16px; padding: 22px 25px; display: grid; grid-template-columns: minmax(200px, .7fr) minmax(0, 1.8fr) auto; gap: 24px; align-items: center; border: 2px solid var(--navy); border-radius: 22px; background: var(--chain); }
.ledger-pipeline h2 { margin-top: 7px; font-size: clamp(31px, 2.8vw, 40px); }
.ledger-pipeline ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.ledger-pipeline li { padding: 7px 13px; border-left: 1px solid rgb(23 61 145 / 25%); }
.ledger-pipeline li b, .ledger-pipeline li strong, .ledger-pipeline li span { display: block; }
.ledger-pipeline li b { color: var(--red); font: 600 8px "DM Mono", monospace; }
.ledger-pipeline li strong { margin-top: 5px; font-size: 11px; }
.ledger-pipeline li span { margin-top: 4px; color: var(--muted); font-size: 9px; }

.page-cli .route-head { padding-bottom: 20px; }
.page-cli .route-head h1 { max-width: 1040px; font-size: clamp(52px, 5.3vw, 78px); }
.cli-releasebar { display: grid; grid-template-columns: 1.15fr repeat(3, 1fr) 150px; margin-top: 16px; overflow: hidden; border: 2px solid var(--navy); border-radius: 18px; background: var(--paper); }
.cli-releasebar > div { min-width: 0; min-height: 84px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.cli-releasebar span, .cli-releasebar strong, .cli-releasebar small { display: block; }
.cli-releasebar span { margin-bottom: 6px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.cli-releasebar strong { font-size: 15px; }
.cli-releasebar small { margin-top: 4px; overflow: hidden; color: var(--muted); font: 400 8px "DM Mono", monospace; text-overflow: ellipsis; white-space: nowrap; }
.cli-releasebar .cli-phase { color: white; background: var(--ink); }
.cli-releasebar .cli-phase span { color: var(--chain); }
.cli-releasebar .cli-phase small { color: #aab8d2; }
.cli-releasebar > i { display: grid; place-items: center; color: var(--red); background: #fff0f3; font: 700 10px/1.3 "DM Mono", monospace; font-style: normal; text-align: center; transform: rotate(-5deg); }

.cli-workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .65fr); margin-top: 16px; overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; box-shadow: var(--shadow); }
.terminal-shell { min-width: 0; color: white; background:
  linear-gradient(rgb(191 238 232 / 6%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(191 238 232 / 6%) 1px, transparent 1px),
  var(--ink); background-size: 28px 28px, 28px 28px, auto; }
.terminal-bar { min-height: 44px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #415776; background: #08182e; }
.terminal-bar > div { display: flex; gap: 7px; }
.terminal-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.terminal-bar i:nth-child(2) { background: #f6b83f; }
.terminal-bar i:nth-child(3) { background: #2ad277; }
.terminal-bar span, .terminal-bar b { font: 600 8px "DM Mono", monospace; letter-spacing: .09em; }
.terminal-bar span { color: #aab8d2; }
.terminal-bar b { color: var(--chain); }
.cli-tabs { display: flex; border-bottom: 1px solid #415776; }
.cli-tabs button { min-height: 42px; padding: 0 22px; border: 0; border-right: 1px solid #415776; border-radius: 0; color: #91a5c6; background: transparent; font: 600 9px "DM Mono", monospace; letter-spacing: .08em; }
.cli-tabs button.active { color: var(--ink); background: var(--chain); }
.terminal-body { padding: 25px; }
.terminal-body .eyebrow { color: var(--chain); }
.terminal-body h2 { margin-top: 8px; color: white; font-size: clamp(40px, 4vw, 56px); }
.cli-prompt { min-width: 0; margin-top: 19px; padding: 11px 11px 11px 15px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 1px solid #60769b; border-left: 5px solid var(--red); border-radius: 8px; background: rgb(255 255 255 / 5%); }
.cli-prompt > b { color: var(--red); font: 700 14px "DM Mono", monospace; }
.cli-prompt code { min-width: 0; overflow: hidden; color: #f0f4ff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cli-prompt button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 6px; color: white; background: var(--red); }
.cli-terminal-output { margin-top: 13px; overflow: hidden; border: 1px solid #4f668a; border-radius: 10px; background: #07162a; }
.cli-terminal-output header { min-height: 34px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #334969; }
.cli-terminal-output header span, .cli-terminal-output header b { font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.cli-terminal-output header span { color: #8fa3c3; }
.cli-terminal-output header b { color: var(--chain); }
.cli-terminal-output pre { min-height: 235px; margin: 0; padding: 17px; overflow: auto; color: #dce7ff; font: 400 10px/1.55 "DM Mono", monospace; white-space: pre; }
.terminal-note { margin: 12px 0 0; color: #9eb0cc; font-size: 10px; }
.terminal-note span { margin-right: 9px; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }

.cli-contract { min-width: 0; padding: 25px; display: flex; flex-direction: column; border-left: 2px solid var(--navy); background: var(--paper); }
.cli-contract > header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.cli-contract > header > b { padding: 7px 9px; color: var(--red); border: 1px solid rgb(200 16 46 / 35%); border-radius: 4px; font: 700 8px "DM Mono", monospace; letter-spacing: .09em; }
.cli-contract h2 { margin-top: 20px; font-size: clamp(36px, 3.3vw, 47px); }
.cli-contract dl { margin: 21px 0 0; border-top: 1px solid var(--line); }
.cli-contract dl > div { padding: 11px 0; display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid var(--line); }
.cli-contract dt { color: var(--muted); font: 500 8px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .07em; }
.cli-contract dd { min-width: 0; margin: 0; font: 600 10px "DM Mono", monospace; text-align: right; }
.cli-state-stack { margin-top: 17px; border: 1px solid var(--line); }
.cli-state-stack article { padding: 12px; display: flex; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); background: var(--ground); }
.cli-state-stack article:last-child { border: 0; }
.cli-state-stack i { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--navy); border-radius: 50%; color: var(--red); font: 600 8px "DM Mono", monospace; font-style: normal; }
.cli-state-stack strong, .cli-state-stack span { display: block; }
.cli-state-stack strong { font-size: 10px; }
.cli-state-stack span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.cli-publish-lock { margin-top: auto; padding: 13px 14px; border-left: 5px solid var(--red); background: #fff0f3; }
.cli-publish-lock span, .cli-publish-lock strong { display: block; }
.cli-publish-lock span { color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.cli-publish-lock strong { margin-top: 6px; font-size: 11px; }
.cli-publish-lock p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.cli-reference { margin-top: 16px; padding: 24px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.cli-reference > header { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, .65fr); gap: 28px; align-items: end; }
.cli-reference h2 { margin-top: 7px; font-size: clamp(35px, 3.2vw, 47px); }
.cli-reference header p { margin: 0; color: var(--muted); font-size: 12px; }
.cli-flag-table { margin-top: 18px; border: 1px solid var(--line); }
.cli-flag-head, .cli-flag-table article { display: grid; grid-template-columns: .65fr .85fr .8fr 1.7fr; }
.cli-flag-head { color: var(--chain); background: var(--ink); }
.cli-flag-head span { padding: 10px 13px; border-right: 1px solid #405778; font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.cli-flag-table article { border-bottom: 1px solid var(--line); background: var(--ground); }
.cli-flag-table article:last-child { border: 0; }
.cli-flag-table article > * { min-width: 0; margin: 0; padding: 12px 13px; border-right: 1px solid var(--line); font-size: 10px; }
.cli-flag-table article > *:last-child { border: 0; }
.cli-flag-table article code { color: var(--navy); font-weight: 700; }
.cli-flag-table article span, .cli-flag-table article p { color: var(--muted); }

.cli-runbook { margin-top: 16px; padding: 22px 24px; display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.8fr) auto; gap: 24px; align-items: center; border: 2px solid var(--navy); border-radius: 22px; background: var(--chain); }
.cli-runbook h2 { margin-top: 7px; font-size: clamp(31px, 2.8vw, 40px); }
.cli-runbook ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; }
.cli-runbook li { padding: 7px 13px; border-left: 1px solid rgb(23 61 145 / 25%); }
.cli-runbook li b, .cli-runbook li strong, .cli-runbook li span { display: block; }
.cli-runbook li b { color: var(--red); font: 600 8px "DM Mono", monospace; }
.cli-runbook li strong { margin-top: 5px; font-size: 11px; }
.cli-runbook li span { margin-top: 4px; color: var(--muted); font-size: 9px; }

.cli-boundary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.cli-boundary-grid article { min-width: 0; padding: 19px; border: 2px solid var(--navy); border-radius: 17px; background: var(--paper); }
.cli-boundary-grid article > span:not(.eyebrow) { display: block; margin-bottom: 18px; color: var(--red); font: 600 9px "DM Mono", monospace; }
.cli-boundary-grid article > strong { display: block; font-size: 16px; }
.cli-boundary-grid article > p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.cli-boundary-lead { grid-column: span 3; display: grid; grid-template-columns: .5fr 1fr 1fr; gap: 22px; align-items: end; color: white; background: var(--navy) !important; }
.cli-boundary-lead .eyebrow { color: var(--chain); }
.cli-boundary-lead h2 { font-size: clamp(34px, 3.2vw, 46px); }
.cli-boundary-lead > p { color: #c1cee3 !important; font-size: 12px !important; }

.page-rules .route-head { padding-bottom: 20px; }
.page-rules .route-head h1 { max-width: 1060px; font-size: clamp(52px, 5.3vw, 78px); }
.rules-classifier { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(390px, .75fr); margin-top: 16px; overflow: hidden; border: 2px solid var(--navy); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.rules-claims { min-width: 0; padding: 27px; }
.rules-claims header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 22px; align-items: end; }
.rules-claims header .eyebrow { grid-column: 1 / -1; }
.rules-claims h2 { font-size: clamp(39px, 3.8vw, 53px); }
.rules-claims header p { margin: 0; color: var(--muted); font-size: 12px; }
.claim-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; }
.claim-buttons button { min-height: 62px; padding: 10px 14px; display: flex; gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--ground); font-size: 11px; text-align: left; }
.claim-buttons button span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--navy); border-radius: 50%; color: var(--red); font: 600 8px "DM Mono", monospace; }
.claim-buttons button:hover { border-color: var(--navy); }
.claim-buttons button.active { color: white; border-color: var(--navy); background: var(--navy); }
.claim-buttons button.active span { color: var(--ink); border-color: var(--chain); background: var(--chain); }

.rule-verdict { min-width: 0; padding: 27px; color: white; background:
  linear-gradient(rgb(191 238 232 / 7%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(191 238 232 / 7%) 1px, transparent 1px),
  var(--ink); background-size: 28px 28px, 28px 28px, auto; transition: background .2s ease; }
.rule-verdict > header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.rule-verdict header span, .rule-verdict header b { font: 600 8px "DM Mono", monospace; letter-spacing: .09em; }
.rule-verdict header span { color: var(--chain); }
.rule-verdict header b { padding: 7px 9px; border: 1px solid #5f7598; border-radius: 4px; }
.rule-verdict-mark { width: 88px; height: 58px; margin-top: 22px; display: grid; place-items: center; border: 9px solid var(--chain); border-radius: 50%; color: var(--chain); font: 700 11px "DM Mono", monospace; transform: rotate(-6deg); }
.rule-verdict h2 { margin-top: 20px; color: white; font-size: clamp(35px, 3.2vw, 45px); }
.rule-verdict > p { margin: 12px 0 0; color: #b9c7dd; font-size: 11px; }
.rule-verdict dl { margin: 18px 0 0; border-top: 1px solid #42597b; }
.rule-verdict dl > div { padding: 10px 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; border-bottom: 1px solid #42597b; }
.rule-verdict dt { color: #94a8c6; font: 500 8px "DM Mono", monospace; text-transform: uppercase; }
.rule-verdict dd { margin: 0; color: white; font: 500 9px "DM Mono", monospace; text-align: right; }
.rule-verdict.unsupported { background:
  linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
  linear-gradient(90deg, rgb(255 255 255 / 6%) 1px, transparent 1px),
  #8e1027; background-size: 28px 28px, 28px 28px, auto; }
.rule-verdict.unsupported .rule-verdict-mark { color: white; border-color: white; }
.rule-verdict.unsupported header span, .rule-verdict.unsupported > p { color: #ffe0e6; }
.rule-verdict.unsupported dl, .rule-verdict.unsupported dl > div { border-color: rgb(255 255 255 / 25%); }
.rule-verdict.unsupported dt { color: #ffc6d0; }
.rules-equation { grid-column: 1 / -1; padding: 14px 20px; display: flex; gap: 10px; align-items: center; border-top: 2px solid var(--navy); background: #e7eeff; }
.rules-equation span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); background: var(--paper); font: 600 9px "DM Mono", monospace; }
.rules-equation i { color: var(--red); font-style: normal; }
.rules-equation b { margin-left: auto; color: var(--red); font: 600 9px "DM Mono", monospace; text-transform: uppercase; }

.rules-boundary-map { margin-top: 16px; padding: 25px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.rules-boundary-map > header, .rules-field-matrix > header { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(260px, .65fr); gap: 28px; align-items: end; }
.rules-boundary-map h2, .rules-field-matrix h2 { margin-top: 7px; font-size: clamp(36px, 3.3vw, 48px); }
.rules-boundary-map header p, .rules-field-matrix header p { margin: 0; color: var(--muted); font-size: 12px; }
.boundary-diagram { display: grid; grid-template-columns: minmax(0, .9fr) 100px minmax(0, 1.25fr); margin-top: 19px; overflow: hidden; border: 2px solid var(--navy); }
.boundary-zone { min-width: 0; padding: 16px; display: flex; gap: 10px; align-items: center; background: var(--ground); }
.boundary-zone > span { align-self: flex-start; margin-right: auto; color: var(--red); font: 600 8px "DM Mono", monospace; letter-spacing: .08em; writing-mode: vertical-rl; }
.boundary-zone article { min-width: 0; flex: 1; padding: 12px; border: 1px solid var(--line); background: var(--paper); }
.boundary-zone article b, .boundary-zone article small { display: block; }
.boundary-zone article b { color: var(--navy); font: 600 10px "DM Mono", monospace; }
.boundary-zone article small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.boundary-zone > i { color: var(--red); font-style: normal; }
.boundary-wall { padding: 12px; display: grid; place-items: center; color: white; background: var(--red); }
.boundary-wall span { font: 700 9px/1.4 "DM Mono", monospace; text-align: center; }
.boundary-wall i { width: 1px; height: 28px; background: white; }
.chain-zone { color: white; background: var(--ink); }
.chain-zone > span { color: var(--chain); }
.chain-zone article { border-color: #4f6689; background: rgb(255 255 255 / 5%); }
.chain-zone article b { color: var(--chain); }
.chain-zone article small { color: #acbbd2; }

.rules-field-matrix { margin-top: 16px; padding: 25px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); }
.field-matrix-table { margin-top: 19px; border: 1px solid var(--line); }
.field-matrix-head, .field-matrix-table article { display: grid; grid-template-columns: 1fr 1.25fr .7fr 1.3fr; }
.field-matrix-head { color: var(--chain); background: var(--ink); }
.field-matrix-head span { padding: 10px 13px; border-right: 1px solid #405778; font: 600 8px "DM Mono", monospace; letter-spacing: .08em; }
.field-matrix-table article { border-bottom: 1px solid var(--line); background: var(--ground); }
.field-matrix-table article:last-child { border: 0; }
.field-matrix-table article > * { min-width: 0; margin: 0; padding: 12px 13px; border-right: 1px solid var(--line); font-size: 10px; }
.field-matrix-table article > *:last-child { border: 0; }
.field-matrix-table article code { color: var(--navy); }
.field-matrix-table article b { color: #087052; font: 700 9px "DM Mono", monospace; }
.field-matrix-table article p { color: var(--muted); }
.field-matrix-table article.excluded { background: #fff0f3; }
.field-matrix-table article.excluded b { color: var(--red); }

.no-record-panel { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; margin-top: 16px; }
.no-record-panel > * { min-width: 0; padding: 21px; border: 2px solid var(--navy); border-radius: 18px; background: var(--paper); }
.no-record-lead { color: white; background: var(--navy) !important; }
.no-record-lead .eyebrow { color: var(--chain); }
.no-record-lead h2 { margin-top: 8px; color: white; font-size: clamp(34px, 3.1vw, 45px); }
.no-record-panel p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.no-record-lead p { color: #c3cfe2; }
.no-record-panel article > span { display: block; margin-bottom: 22px; color: var(--red); font: 600 9px "DM Mono", monospace; }
.no-record-panel article > strong { display: block; font-size: 17px; line-height: 1.25; }
.no-record-panel .no-record-stop { border-color: var(--red); background: #fff0f3; }

.rules-rebuild { margin-top: 16px; padding: 22px 24px; display: grid; grid-template-columns: minmax(210px, .65fr) minmax(0, 1.7fr) minmax(190px, .55fr); gap: 22px; align-items: center; border: 2px solid var(--navy); border-radius: 22px; background: var(--chain); }
.rules-rebuild h2 { margin-top: 7px; font-size: clamp(31px, 2.8vw, 40px); }
.rules-rebuild ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; }
.rules-rebuild li { padding: 8px 11px; border-left: 1px solid rgb(23 61 145 / 24%); }
.rules-rebuild li b, .rules-rebuild li span { display: block; }
.rules-rebuild li b { color: var(--red); font: 600 8px "DM Mono", monospace; }
.rules-rebuild li span { margin-top: 5px; font-size: 9px; }
.rules-target { padding: 13px; border: 1px solid rgb(23 61 145 / 28%); background: rgb(248 250 255 / 55%); }
.rules-target span, .rules-target strong, .rules-target small { display: block; }
.rules-target span { color: var(--red); font: 600 8px "DM Mono", monospace; }
.rules-target strong { margin-top: 5px; font-size: 11px; }
.rules-target small { margin-top: 4px; color: var(--muted); font-size: 8px; }

.info-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.info-band.four-up { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-band.five-up { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.info-band article { min-width: 0; padding: 15px; border: 1px solid var(--line); border-top: 4px solid var(--navy); background: var(--paper); }
.info-band article > span { display: block; margin-bottom: 10px; color: var(--red); font: 600 9px "DM Mono", monospace; letter-spacing: .09em; }
.info-band article > strong { display: block; font-size: 15px; }
.info-band article > p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.boundary-note { margin-top: 16px; padding: 15px 18px; display: flex; gap: 24px; align-items: baseline; border-left: 6px solid var(--red); background: var(--paper); }
.boundary-note strong { white-space: nowrap; }
.boundary-note p { margin: 0; color: var(--muted); font-size: 12px; }
.compact-info-section { padding: 28px 0 36px; border-bottom: 1px solid var(--line); }
.compact-head { display: flex; gap: 28px; align-items: end; }
.compact-head h2 { font-size: clamp(34px, 3.5vw, 50px); }
.claim-matrix { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.claim-matrix article { padding: 20px; border: 2px solid var(--navy); background: var(--paper); }
.claim-matrix article:last-child { border-color: var(--red); }
.claim-matrix span { color: var(--navy); font: 600 10px "DM Mono", monospace; letter-spacing: .08em; }
.claim-matrix p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.ledger-fields { margin-top: 0; margin-bottom: 16px; }
.page-ledger .art-frame img { max-height: 230px; }
.page-ledger .art-frame { margin-bottom: 16px; }
.receipt-checks { margin-top: 18px; }

.product-section { padding: 36px 0; border-bottom: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 30px; align-items: start; }
.section-grid.reverse { grid-template-columns: minmax(360px, 1.1fr) minmax(0, .9fr); }
.section-grid.reverse .section-copy { order: 2; }
.section-copy p { max-width: 610px; color: var(--muted); }
.art-frame { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: rgb(248 250 255 / 70%); box-shadow: var(--shadow); }
.art-frame img { width: 100%; max-height: 580px; object-fit: contain; }
.art-caption { display: flex; justify-content: space-between; gap: 20px; margin-top: 13px; color: var(--muted); font: 400 10px "DM Mono", monospace; }

.workbench { position: relative; padding: 26px; border: 2px solid var(--navy); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.drop-zone { min-height: 160px; padding: 22px; display: grid; place-items: center; text-align: center; border: 2px dashed var(--navy); border-radius: 16px; background: var(--ground); cursor: pointer; }
.drop-zone.dragging { background: var(--chain); }
.drop-zone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-zone strong { display: block; margin-bottom: 8px; font-family: "Bricolage Grotesque", Arial, sans-serif; font-size: 29px; }
.drop-zone span { color: var(--muted); }
.hash-progress { height: 6px; margin: 22px 0 8px; overflow: hidden; border-radius: 8px; background: #d7e0f5; }
.hash-progress i { display: block; width: var(--hash-progress, 0%); height: 100%; background: var(--red); transition: width .1s linear; }
.result-grid, .data-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.data-cell { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--ground); }
.data-cell span { display: block; margin-bottom: 9px; color: var(--muted); font: 400 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .09em; }
.data-cell strong, .data-cell code { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }
.digest-output { grid-column: 1 / -1; }

.flow-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.flow-step { padding: 24px; border-top: 5px solid var(--navy); background: var(--paper); }
.flow-step b { display: block; margin-bottom: 16px; color: var(--red); font: 600 12px "DM Mono", monospace; }
.flow-step p { margin: 0; color: var(--muted); font-size: 14px; }
.status-banner { margin: 24px 0; padding: 17px 20px; border-left: 8px solid var(--red); background: var(--paper); font-family: "DM Mono", monospace; font-size: 13px; }
.status-banner.ok { border-color: #2ad277; }
.status-banner.info { border-color: var(--blue); }
.phase-label { display: inline-block; padding: 6px 9px; border-radius: 20px; background: var(--chain); color: var(--ink); font: 600 10px "DM Mono", monospace; text-transform: uppercase; }

.receipt-layout { display: grid; grid-template-columns: minmax(320px, .76fr) minmax(0, 1.24fr); gap: 42px; align-items: start; }
.receipt-card { position: relative; padding: 34px; border: 3px solid var(--navy); background: var(--paper); box-shadow: var(--shadow); }
.receipt-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: -15px; height: 17px; background: linear-gradient(135deg, var(--paper) 8px, transparent 0) 0 0/17px 17px repeat-x; }
.receipt-lines { display: grid; gap: 12px; margin-top: 28px; }
.receipt-line { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.receipt-line span { display: block; margin-bottom: 6px; color: var(--muted); font: 400 10px "DM Mono", monospace; text-transform: uppercase; }
.receipt-line code { overflow-wrap: anywhere; }
.receipt-seal { width: 180px; height: 112px; margin: 22px auto; border: 17px solid var(--red); border-radius: 50%; display: grid; place-items: center; transform: rotate(-5deg); color: var(--red); font: 600 11px "DM Mono", monospace; }
.qr { width: 148px; aspect-ratio: 1; margin-top: 20px; border: 9px solid white; background: repeating-conic-gradient(var(--ink) 0 25%, white 0 50%) 0 0/18px 18px; }
.qr img { width: 100%; height: 100%; object-fit: cover; }

.ledger-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 20px 0; }
.ledger-table { width: 100%; border-collapse: collapse; background: var(--paper); }
.ledger-table th, .ledger-table td { padding: 16px; border-bottom: 1px solid var(--line); text-align: left; }
.ledger-table th { color: var(--muted); font: 600 10px "DM Mono", monospace; text-transform: uppercase; }
.ledger-table td { font: 400 12px "DM Mono", monospace; overflow-wrap: anywhere; }
.empty-ledger { min-height: 220px; display: grid; place-items: center; padding: 30px; border: 2px dashed var(--navy); text-align: center; background: var(--paper); }

.code-stack { display: grid; gap: 13px; margin: 24px 0; }
.code-row { display: flex; gap: 14px; align-items: center; padding: 17px; border-radius: 12px; background: var(--ink); color: white; }
.code-row code { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.code-row button { min-width: 82px; min-height: 34px; border: 0; border-radius: 8px; background: var(--red); color: white; }
.json-block { overflow-x: auto; padding: 24px; border-left: 8px solid var(--blue); background: var(--ink); color: #dce7ff; font: 400 13px/1.7 "DM Mono", monospace; white-space: pre; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; counter-reset: rules; }
.rule-card { min-height: 210px; padding: 26px; border: 2px solid var(--navy); border-radius: 20px; background: var(--paper); counter-increment: rules; }
.rule-card::before { content: "0" counter(rules); display: block; margin-bottom: 38px; color: var(--red); font: 600 12px "DM Mono", monospace; }
.recipe-list { display: grid; gap: 0; padding: 0; list-style: none; counter-reset: recipe; }
.recipe-list li { display: grid; grid-template-columns: 55px 1fr; padding: 20px 0; border-bottom: 1px solid var(--line); counter-increment: recipe; }
.recipe-list li::before { content: counter(recipe, decimal-leading-zero); color: var(--red); font: 600 12px "DM Mono", monospace; }

.site-footer { width: min(1540px, calc(100% - 32px)); margin: 0 auto 24px; overflow: hidden; border: 2px solid var(--navy); border-radius: 20px; background: var(--paper); }
.footer-perf { height: 18px; background: radial-gradient(circle, rgb(23 61 145 / 27%) 3px, transparent 4px) 0 0/34px 18px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.footer-grid section { min-width: 0; padding: 25px; border-right: 1px solid var(--line); }
.footer-grid section:last-child { border: 0; }
.footer-grid strong, .footer-grid a { display: block; margin-top: 10px; overflow-wrap: anywhere; font-size: 13px; }
.footer-grid p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.footer-bottom { padding: 13px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font: 400 10px "DM Mono", monospace; }
.announcer { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 320px; padding: 13px 17px; border-radius: 10px; background: var(--ink); color: white; box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.announcer.show { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .top-rail { gap: 15px; }
  .route-links { gap: 13px; }
  .social-links { display: none; }
  .stamp-carriage { width: 278px; }
  .belt-track { grid-template-columns: .8fr 1.6fr .8fr; }
  .belt-zone { padding-inline: 22px; }
  .center-zone h1 { font-size: 38px; }
  .desk-hero { grid-template-columns: minmax(0, 1fr) 300px; }
  .desk-seal img { width: 220px; }
  .desk-grid { grid-template-columns: 1fr; }
  .process-panel { grid-template-columns: 1fr; }
  .stamp-console { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .8fr); }
  .stamp-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stamp-closeout { grid-template-columns: 1fr auto; }
  .stamp-closeout ol { grid-column: 1 / -1; grid-row: 2; }
  .verify-lab { grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); }
  .verify-side { padding: 22px; }
  .verify-drop { grid-template-columns: 42px 1fr; }
  .verify-drop > b { display: none; }
  .verify-reading-lead { grid-column: span 4; grid-row: auto; }
  .ledger-monitor { grid-template-columns: repeat(3, 1fr); }
  .ledger-monitor .ledger-head-card { grid-column: span 2; }
  .ledger-schema-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ledger-pipeline { grid-template-columns: 1fr auto; }
  .ledger-pipeline ol { grid-column: 1 / -1; grid-row: 2; }
  .cli-releasebar { grid-template-columns: repeat(2, 1fr) 120px; }
  .cli-releasebar .cli-phase { grid-row: span 2; }
  .cli-workspace { grid-template-columns: minmax(0, 1.25fr) minmax(310px, .7fr); }
  .cli-runbook { grid-template-columns: 1fr auto; }
  .cli-runbook ol { grid-column: 1 / -1; grid-row: 2; }
  .rules-classifier { grid-template-columns: minmax(0, 1.1fr) minmax(350px, .8fr); }
  .rules-claims header { grid-template-columns: 1fr; }
  .rules-claims header .eyebrow { grid-column: auto; }
  .boundary-diagram { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1.25fr); }
  .rules-rebuild { grid-template-columns: 1fr minmax(180px, .5fr); }
  .rules-rebuild ol { grid-column: 1 / -1; grid-row: 2; }
  .insight-lead { grid-column: span 12; grid-row: auto; }
  .insight-grid > .insight-card:not(.insight-lead):not(.boundary-card):not(.faq-card) { grid-column: span 6; }
  .info-band.four-up, .info-band.five-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid section:nth-child(2) { border-right: 0; }
  .footer-grid section:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .top-shell { padding: 16px 14px 0; }
  .top-rail { height: 56px; padding-inline: 11px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 42px; height: 42px; }
  .route-links { position: absolute; top: 64px; left: 14px; right: 14px; padding: 18px; display: none; flex-direction: column; align-items: stretch; border-radius: 18px; background: var(--ink); box-shadow: var(--shadow); }
  .route-links.open { display: flex; }
  .route-links a { padding: 10px; }
  .menu-button { display: inline-flex; min-height: 38px; padding: 0 13px; border-color: #8da6df; background: transparent; color: white; }
  .chain-pill { padding: 9px 11px; }
  .page { width: min(100% - 28px, 680px); margin-top: 12px; }
  .home-board { width: calc(100% - 28px); margin: 14px auto 32px; }
  .desk-hero { grid-template-columns: 1fr; }
  .desk-hero-copy { min-height: auto; padding: 26px 22px; }
  .desk-hero-copy h1 { font-size: clamp(46px, 14vw, 64px); }
  .desk-hero-copy p { font-size: 15px; }
  .desk-seal { min-height: 220px; border-left: 0; border-top: 2px dashed rgb(23 61 145 / 28%); }
  .desk-seal img { width: 210px; }
  .desk-proofbar { grid-template-columns: 1fr; }
  .desk-proofbar div { border-right: 0; border-bottom: 1px solid var(--line); }
  .desk-panel, .process-panel { padding: 22px; }
  .panel-head { display: block; }
  .panel-head p { width: auto; margin-top: 12px; }
  .process-panel .flow-row { grid-template-columns: 1fr; }
  .local-draft { grid-template-columns: 1fr; }
  .local-draft > i { display: none; }
  .stamp-console { grid-template-columns: 1fr; }
  .stamp-compose, .tx-preview { padding: 22px; }
  .stamp-panel-head { display: block; }
  .stamp-state-chip { margin-top: 13px; }
  .stamp-drop { grid-template-columns: 44px 1fr; }
  .stamp-drop > b { display: none; }
  .stamp-file-strip, .stamp-digest-box { grid-template-columns: 1fr; }
  .stamp-file-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stamp-digest-box > i { display: none; }
  .compose-trace header { display: block; }
  .compose-trace header b { display: block; margin-top: 5px; text-align: left; }
  .compose-trace ol { grid-template-columns: 1fr; }
  .compose-trace li { border-right: 0; border-bottom: 1px solid var(--line); }
  .stamp-anatomy > header { grid-template-columns: 1fr; }
  .stamp-anatomy > header .eyebrow { grid-column: auto; }
  .payload-ruler { grid-template-columns: 70px minmax(0, 1fr); }
  .ruler-total { grid-column: 1 / -1; border-top: 1px solid var(--line); }
  .stamp-check-grid { grid-template-columns: 1fr; }
  .stamp-closeout { grid-template-columns: 1fr; }
  .stamp-closeout ol { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .stamp-closeout li { padding: 10px 0; border-left: 0; border-bottom: 1px solid rgb(23 61 145 / 27%); }
  .verify-lab { grid-template-columns: 1fr; }
  .verify-gate { min-height: 78px; flex-direction: row; gap: 12px; border-inline: 0; border-block: 2px solid var(--navy); }
  .verify-gate strong { margin: 0; font-size: 36px; }
  .verify-gate > i { width: 58px; height: 1px; margin: 0; background: repeating-linear-gradient(90deg, var(--navy) 0 5px, transparent 5px 10px); }
  .verify-gate small { writing-mode: horizontal-tb; }
  .verify-verdict { grid-column: auto; grid-template-columns: 1fr; gap: 9px; }
  .verify-verdict > b { justify-self: start; }
  .verify-source-meta, .verify-chain-meta { grid-template-columns: 1fr; }
  .verify-source-meta > div, .verify-chain-meta > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .verify-index-panel > header { grid-template-columns: 1fr; }
  .verify-index-strip { grid-template-columns: 1fr; }
  .verify-index-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .verify-index-strip > .button { justify-self: start; margin: 12px 0; }
  .verify-reading-grid { grid-template-columns: 1fr; }
  .verify-reading-lead { grid-column: auto; }
  .ledger-console-head { display: block; }
  .ledger-state-pill { margin-top: 12px; }
  .ledger-monitor { grid-template-columns: 1fr; }
  .ledger-monitor .ledger-head-card { grid-column: auto; }
  .ledger-monitor > div { min-height: 76px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ledger-scanline { grid-template-columns: 1fr; }
  .ledger-scanline small { text-align: left; }
  .ledger-controls { grid-template-columns: 1fr 1fr; }
  .ledger-controls > label, .ledger-controls > div { grid-column: 1 / -1; }
  .ledger-table-shell { overflow-x: auto; }
  .ledger-table-labels, .ledger-record-row { min-width: 760px; }
  .ledger-schema > header { grid-template-columns: 1fr; }
  .ledger-schema-grid { grid-template-columns: 1fr; }
  .ledger-pipeline { grid-template-columns: 1fr; }
  .ledger-pipeline ol { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .ledger-pipeline li { padding: 10px 0; border-left: 0; border-bottom: 1px solid rgb(23 61 145 / 25%); }
  .ledger-pipeline > .button { justify-self: start; }
  .cli-releasebar { grid-template-columns: 1fr; }
  .cli-releasebar .cli-phase { grid-row: auto; }
  .cli-releasebar > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .cli-releasebar > i { min-height: 74px; }
  .cli-workspace { grid-template-columns: 1fr; }
  .cli-contract { border-left: 0; border-top: 2px solid var(--navy); }
  .terminal-body, .cli-contract { padding: 21px; }
  .cli-prompt { grid-template-columns: auto minmax(0, 1fr); }
  .cli-prompt button { grid-column: 1 / -1; }
  .cli-reference > header { grid-template-columns: 1fr; }
  .cli-flag-table { overflow-x: auto; }
  .cli-flag-head, .cli-flag-table article { min-width: 710px; }
  .cli-runbook { grid-template-columns: 1fr; }
  .cli-runbook ol { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .cli-runbook li { padding: 10px 0; border-left: 0; border-bottom: 1px solid rgb(23 61 145 / 25%); }
  .cli-runbook > .button { justify-self: start; }
  .cli-boundary-grid { grid-template-columns: 1fr; }
  .cli-boundary-lead { grid-column: auto; grid-template-columns: 1fr; }
  .rules-classifier { grid-template-columns: 1fr; }
  .rules-claims, .rule-verdict { padding: 22px; }
  .claim-buttons { grid-template-columns: 1fr; }
  .rules-equation { flex-wrap: wrap; }
  .rules-equation b { width: 100%; margin-left: 0; }
  .rules-boundary-map > header, .rules-field-matrix > header { grid-template-columns: 1fr; }
  .boundary-diagram { grid-template-columns: 1fr; }
  .boundary-zone { flex-wrap: wrap; }
  .boundary-zone > span { width: 100%; margin-right: 0; writing-mode: horizontal-tb; }
  .boundary-wall { min-height: 72px; }
  .boundary-wall i { width: 40px; height: 1px; }
  .field-matrix-table { overflow-x: auto; }
  .field-matrix-head, .field-matrix-table article { min-width: 710px; }
  .no-record-panel { grid-template-columns: 1fr; }
  .rules-rebuild { grid-template-columns: 1fr; }
  .rules-rebuild ol { grid-column: auto; grid-row: auto; grid-template-columns: 1fr; }
  .rules-rebuild li { padding: 10px 0; border-left: 0; border-bottom: 1px solid rgb(23 61 145 / 24%); }
  .insight-grid { grid-template-columns: 1fr; }
  .insight-lead, .insight-grid > .insight-card:not(.insight-lead):not(.boundary-card):not(.faq-card), .boundary-card, .faq-card { grid-column: auto; }
  .info-band, .info-band.four-up, .info-band.five-up, .claim-matrix { grid-template-columns: 1fr; }
  .compact-head, .boundary-note { display: block; }
  .compact-head h2 { margin-top: 8px; }
  .boundary-note p { margin-top: 8px; }
  .route-head { grid-template-columns: 1fr; gap: 18px; padding-top: 48px; }
  .route-intro { justify-self: start; }
  h1 { font-size: clamp(48px, 16vw, 74px); }
  .hero-machine { min-height: 640px; margin-top: 0; padding-top: 0; }
  .ghost-word { top: 48px; font-size: 27vw; }
  .stamp-carriage { top: 18px; width: min(250px, 76vw); }
  .impact-ring { top: 212px; width: 154px; height: 72px; }
  .belt-window { top: 206px; height: 270px; }
  .belt-track { inset-inline: 0; display: block; transform: none !important; }
  .belt-zone { display: none; }
  .center-zone { display: flex; padding: 64px 18px 20px; border: 0; }
  .center-zone h1 { max-width: 480px; font-size: clamp(37px, 11vw, 52px); }
  .center-zone p { font-size: 14px; }
  .command-slot { max-width: 460px; }
  .machine-console { left: 14px; right: 14px; bottom: 14px; min-height: 76px; padding: 0 10px; grid-template-columns: repeat(3, 1fr); }
  .console-step { justify-content: center; gap: 8px; padding: 14px 7px; }
  .console-step small { display: none; }
  .console-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .console-actions .button { padding-inline: 7px; font-size: 10px; }
  .section-grid, .section-grid.reverse, .receipt-layout { grid-template-columns: 1fr; }
  .section-grid.reverse .section-copy { order: initial; }
  .product-section { padding: 60px 0; }
  .home-sections { width: calc(100% - 28px); margin-bottom: 60px; }
  .home-section { min-height: auto; padding: 64px 0; }
  .home-section-head { margin-bottom: 28px; }
  .home-section-head h2 { font-size: clamp(42px, 13vw, 64px); }
  .home-section-head p { margin-top: 16px; font-size: 16px; }
  .home-workbench { padding: 22px; }
  .chain-section { margin-top: 0; padding-inline: 22px; border-radius: 24px; }
  .chain-tape { padding: 14px; }
  .workbench { padding: 22px; }
  .result-grid, .data-grid, .flow-row { grid-template-columns: 1fr; }
  .digest-output { grid-column: auto; }
  .rules-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid section { border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-grid section:last-child { border: 0; }
  .site-footer { width: calc(100% - 28px); }
  .ledger-table { display: block; overflow-x: auto; }
}

@media (max-width: 420px) {
  .brand span:last-child { display: none; }
  .top-rail { gap: 9px; }
  .menu-button { margin-left: auto; }
  .chain-pill { font-size: 10px; }
  .hero-machine { min-height: 640px; }
  .stamp-carriage { top: 24px; width: 240px; }
  .belt-window { top: 204px; height: 272px; }
  .impact-ring { top: 210px; width: 148px; height: 70px; }
  .center-zone { padding-top: 68px; }
  .center-zone h1 { font-size: 39px; }
  .center-zone p { max-width: 330px; }
  .machine-console { min-height: 76px; }
  .command-slot { padding-left: 12px; }
  .command-slot code { font-size: 11px; }
  .route-head { padding-top: 40px; }
  .route-intro { font-size: 16px; }
  .art-frame { padding: 10px; border-radius: 18px; }
}

@media print {
  body * { visibility: hidden !important; }
  .receipt-card, .receipt-card * { visibility: visible !important; }
  .receipt-card { position: absolute; inset: 0; width: 100%; border-color: #000; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .stamp-carriage { --stamp-y: 34px; --stamp-scale: .97; }
  .impact-ring { --ink-opacity: 1; --ink-scale: 1; }
}

.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: var(--chain); }
