/* Gavelr — design system
   A court of record: paper and ink, serif headlines, mono for anything on a chain.
   One accent (seal vermilion) for rulings against; deep green for what holds up. */

:root {
  --paper: #f1ece2;
  --paper-deep: #e8e1d3;
  --sheet: #faf8f3;
  --ink: #17150f;
  --ink-2: #4a453b;
  --ink-3: #78715f;
  --rule: #d8cfbe;
  --rule-strong: #b6ab95;

  --seal: #b8321e;
  --seal-ink: #9a2614;
  --seal-wash: #f3e0d8;
  --pass: #1e6a44;
  --pass-wash: #dfeadf;
  --warn: #85580a;
  --payout: #1f62a8;

  --net-bsc: #b38600;
  --net-gnfd: #2e7a57;
  --net-gl: #3a4fb8;

  --night: #15130f;
  --night-2: #25221c;
  --night-ink: #ece5d6;
  --night-mute: #a59d8c;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Content width. The landing page leaves 64px gutters at 1440px; app pages 82px. */
  --wrap: 1312px;
  --gutter: clamp(16px, 3.6vw, 40px);
  --masthead-h: 68px;
}
body.app { --wrap: 1276px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  overflow-wrap: break-word;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: #ead0c5; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p, ol, ul, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
[hidden] { display: none !important; }
main, section, aside, article, figure, .sheet, .bench, .figures, .grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- icons ---------- */
.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 24px; height: 24px; }
.ic-xl { width: 32px; height: 32px; }

/* ---------- type ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.kicker .num { color: var(--seal); }
.display {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 72;
  font-size: clamp(44px, 6.2vw, 92px); line-height: .98; letter-spacing: -.022em;
}
.display em, .h1 em, .h2 em { font-style: italic; color: var(--seal); }
.h1 { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 60; font-size: clamp(36px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.018em; }
.h2 { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 48; font-size: clamp(28px, 3vw, 42px); line-height: 1.1; letter-spacing: -.012em; }
.h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; letter-spacing: -.005em; }
.h4 { font: 600 15.5px/1.35 var(--sans); }
.lede { font-family: var(--serif); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-2); }
.body-2 { font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.small { font-size: 13.5px; line-height: 1.55; color: var(--ink-3); }
.muted { color: var(--ink-3); }
.seal-ink { color: var(--seal-ink); }
.pass-ink { color: var(--pass); }
.measure { max-width: 64ch; }
.measure-s { max-width: 46ch; }
.prose p + p { margin-top: 1em; }
.num-tab { font-variant-numeric: tabular-nums; }
.hash { font: 400 12.5px/1.5 var(--mono); word-break: break-all; color: var(--ink-2); }

/* ---------- docket strip (landing): a continuous marquee with a close button ---------- */
.topline { display: flex; align-items: stretch; height: 36px; background: var(--night); color: var(--night-mute); font: 400 12px/1 var(--mono); letter-spacing: .02em; }
.topline[hidden] { display: none; }
.marquee { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-s, 60s) linear infinite; }
.marquee-group { display: flex; align-items: center; gap: 22px; padding-right: 22px; white-space: nowrap; }
.topline:hover .marquee-track, .topline:focus-within .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.topline b { color: var(--night-ink); font-weight: 500; }
.topline .live { display: inline-flex; align-items: center; gap: 8px; color: var(--night-ink); }
.topline .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fb586; }
.topline .sep { width: 1px; height: 14px; background: #3b362d; flex: none; }
.topline a { color: var(--night-ink); text-decoration: underline; text-decoration-color: #5a5346; text-underline-offset: 3px; display: inline-flex; gap: 6px; align-items: center; }
.topline a:hover { text-decoration-color: var(--night-ink); }
.topline-close { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; background: var(--night); border: 0; border-left: 1px solid #3b362d; color: var(--night-mute); cursor: pointer; }
.topline-close:hover { color: var(--night-ink); background: var(--night-2); }
.topline-close .ic { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: rgba(241, 236, 226, .94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--ink); }
.masthead .wrap { display: flex; align-items: center; gap: 28px; height: var(--masthead-h);
  /* Header gutters are half the page's: 32px on the landing page and 41px on app pages at 1440px. */
  max-width: none; padding-inline: max(16px, calc(max(var(--gutter), (100vw - var(--wrap)) / 2) / 2)); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 34px; color: var(--ink); }
.brand-word { font: 500 25px/1 var(--serif); letter-spacing: -.01em; }
.brand-tag { font: 400 11px/1.25 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-left: 12px; border-left: 1px solid var(--rule-strong); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { position: relative; padding: 8px 12px; font: 500 14.5px/1 var(--sans); text-decoration: none; color: var(--ink-2); border-radius: 2px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: rgba(23, 21, 15, .05); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 3px; background: var(--seal); }
.nav .nav-lab { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding: 0 6px 0 14px; margin-left: 8px; border-left: 1px solid var(--rule-strong); }
.nav a.lab { color: var(--ink-3); font-weight: 400; }
.burger { display: none; margin-left: auto; width: 42px; height: 42px; flex: none; border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { width: 18px; height: 1.6px; background: currentColor; transition: transform .22s, opacity .2s; }
body.nav-open .burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
.mbackdrop { position: fixed; inset: 0; z-index: 70; background: rgba(23, 21, 15, .48); opacity: 0; pointer-events: none; transition: opacity .25s; border: 0; padding: 0; }
.mnav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 80; width: min(88vw, 340px); height: 100dvh; display: flex; flex-direction: column; background: var(--sheet); border-right: 1px solid var(--ink); transform: translateX(-102%); visibility: hidden; transition: transform .28s cubic-bezier(.2, .7, .2, 1), visibility .28s; overflow-y: auto; }
body.nav-open .mnav { transform: none; visibility: visible; }
body.nav-open .mbackdrop { opacity: 1; pointer-events: auto; }
body.nav-open { overflow: hidden; }
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--ink); flex: none; }
.mclose { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule-strong); border-radius: 2px; background: transparent; color: var(--ink); cursor: pointer; }
.mlinks { display: flex; flex-direction: column; padding: 8px 0; }
.mlinks a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 20px; border-bottom: 1px solid var(--rule); text-decoration: none; font: 500 16.5px/1.2 var(--sans); color: var(--ink); }
.mlinks a .ic { color: var(--ink-3); }
.mlinks a[aria-current="page"] { color: var(--seal-ink); }
.mlinks a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--seal); }
.mlinks a[aria-current="page"] .ic { color: var(--seal); }
.mlinks .kicker { padding: 22px 20px 8px; }
.mlinks a.lab { color: var(--ink-2); font-weight: 400; }
.mfoot { margin-top: auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ink); display: flex; flex-direction: column; gap: 12px; flex: none; }
.mfoot .btn { justify-content: center; }
@media (max-width: 1080px) { .brand-tag { display: none; } }
@media (max-width: 940px) { .nav { display: none; } .burger { display: inline-flex; } }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 50px; padding: 0 22px;
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px;
  font: 600 15px/1 var(--sans); letter-spacing: .005em; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--seal); border-color: var(--seal); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13.5px; gap: 8px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink); border-color: var(--ink); }
.btn-line:disabled:hover { background: transparent; color: var(--ink); }
.textlink { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.textlink:hover { color: var(--seal); }
.textlink .ic { width: 15px; height: 15px; }
.tx { display: inline-flex; align-items: center; gap: 5px; font: 400 12.5px/1.4 var(--mono); color: var(--ink-2); text-decoration: none; border-bottom: 1px dotted var(--rule-strong); }
.tx:hover { color: var(--seal); border-bottom-color: var(--seal); }
.tx .ic { width: 12px; height: 12px; }

/* ---------- surfaces ---------- */
.sheet { background: var(--sheet); border: 1px solid var(--rule); }
.sheet-pad { padding: clamp(20px, 2.4vw, 32px); }
.sheet-ink { border-color: var(--ink); }
.band-night { background: var(--night); color: var(--night-ink); }
.band-night .muted, .band-night .small { color: var(--night-mute); }
.band-deep { background: var(--paper-deep); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.rule-ink { background: var(--ink); }

/* ---------- section scaffold: margin numeral + content ---------- */
.section { padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--ink); }
.section-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px clamp(24px, 4vw, 64px); }
.section-num { font: 400 clamp(56px, 6vw, 88px)/0.86 var(--serif); font-variation-settings: "opsz" 72; color: var(--ink); letter-spacing: -.03em; }
.section-num .sym { font-size: .5em; vertical-align: .55em; color: var(--seal); margin-right: 4px; }
.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-label { display: block; width: max-content; max-width: 100%; padding-top: 14px; border-top: 3px solid var(--seal); font: italic 400 26px/1.2 var(--serif); color: var(--ink); }
@media (max-width: 860px) { .section-grid { grid-template-columns: minmax(0, 1fr); } .section-num { font-size: 52px; } }

/* ---------- labels ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid currentColor; border-radius: 2px; color: var(--ink-2);
}
.tag .ic { width: 12px; height: 12px; }
.tag-seal { color: var(--seal-ink); background: var(--seal-wash); border-color: rgba(184, 50, 30, .35); }
.tag-pass { color: var(--pass); background: var(--pass-wash); border-color: rgba(30, 106, 68, .35); }
.tag-ink { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.tag-muted { color: var(--ink-3); border-color: var(--rule-strong); }
.tag-warn { color: var(--warn); border-color: rgba(133, 88, 10, .4); background: #f2e6cc; }

.net { display: inline-flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.net .ic { width: 16px; height: 16px; }
.net-bsc .ic { color: var(--net-bsc); }
.net-gnfd .ic { color: var(--net-gnfd); }
.net-gl .ic { color: var(--net-gl); }

/* ---------- key/value with dotted leaders ---------- */
.kv { display: flex; flex-direction: column; }
.kv > div { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { flex: none; font-size: 13.5px; color: var(--ink-3); }
.kv .lead { flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted var(--rule-strong); transform: translateY(-4px); }
.kv dd { flex: 0 1 auto; min-width: 0; text-align: right; font: 400 13px/1.45 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.kv dd a { text-decoration: none; border-bottom: 1px dotted var(--rule-strong); }
.kv dd a:hover { color: var(--seal); }
.kv-plain > div { border-bottom: 0; padding: 5px 0; }

/* ---------- the verdict stamp ---------- */
.stamp {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 18px 9px; border: 3.5px double currentColor; border-radius: 7px;
  color: var(--seal); transform: rotate(-6deg); mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3.2 2.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp .st-top, .stamp .st-bot { font: 600 10.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; }
.stamp .st-main { font: 600 26px/1 var(--serif); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.stamp.pass { color: var(--pass); }
.stamp.ink { color: var(--ink); }
.stamp-sm { padding: 6px 10px 5px; border-width: 3px; transform: rotate(-4deg); }
.stamp-sm .st-main { font-size: 15px; }
.stamp-sm .st-top, .stamp-sm .st-bot { font-size: 9px; letter-spacing: .16em; }
.stamp.thump { animation: thump .55s cubic-bezier(.18, 1.5, .4, 1) both; }
@keyframes thump { 0% { opacity: 0; transform: rotate(-6deg) scale(1.7); } 60% { opacity: 1; } 100% { opacity: 1; transform: rotate(-6deg) scale(1); } }

/* ---------- refund / payout split (tall segmented bar) ---------- */
.split { display: flex; gap: 2px; height: 28px; }
.split > span { display: flex; align-items: center; min-width: 0; padding-left: 9px; border-radius: 4px; overflow: hidden; white-space: nowrap; color: #fff; font: 500 12px/1 var(--mono); }
.split .s-refund { background: var(--seal); }
.split .s-payout { background: var(--payout); }
.split.grow > span { animation: grow 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { flex-basis: 0; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; }
.legend .l-refund { background: var(--seal); }
.legend .l-payout { background: var(--payout); }

/* ---------- pass / fail marks (ballot boxes) ---------- */
.box { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; flex: none; border: 1.5px solid currentColor; border-radius: 2px; }
.box .ic { width: 15px; height: 15px; stroke-width: 2; }
.box-pass { color: var(--pass); }
.box-fail { color: var(--seal); background: var(--seal-wash); }

/* ---------- ledger tables ---------- */
.table-wrap { overflow-x: auto; }
.ltable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ltable th { text-align: left; font: 500 11px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 0 14px 12px; border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.ltable td { padding: 16px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
.ltable tr:last-child td { border-bottom: 0; }
.ltable td.num, .ltable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.ltable tr.is-fail td { background: rgba(184, 50, 30, .045); }
.ltable .cell-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* a claim the chain contradicts, corrected like a proof mark */
.corr { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.corr s { color: var(--ink-3); text-decoration: line-through 2px var(--seal); }
.corr ins { text-decoration: none; font: italic 500 1.08em/1.2 var(--serif); color: var(--seal-ink); }
.corr .ok { color: var(--ink); }
.fact-label { display: block; font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }

/* ---------- the jury bench ---------- */
.bench { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--sheet); }
.seat { padding: 18px 16px 16px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: background .35s; }
.seat:last-child { border-right: 0; }
.seat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.seat-figure { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rule-strong); border-radius: 50%; color: var(--ink-2); }
.seat-figure .ic { width: 20px; height: 20px; }
.seat.is-lead .seat-figure { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seat-role { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.seat-model { font: 500 13px/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere; min-height: 2.7em; }
.seat-time { font: 400 11px/1 var(--mono); color: var(--ink-3); }
.seat.is-agree { background: rgba(30, 106, 68, .05); }
.seat.is-disagree { background: rgba(184, 50, 30, .06); }
.seat.is-idle .seat-model { color: var(--ink-3); }
.seat.is-thinking .seat-figure { animation: deliberate 1.3s ease-in-out infinite; }
@keyframes deliberate { 0%, 100% { border-color: var(--rule-strong); } 50% { border-color: var(--seal); } }
@media (max-width: 900px) { .bench { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seat { border-bottom: 1px solid var(--rule); } }

/* ---------- forms ---------- */
.label { display: block; font: 600 13px/1.3 var(--sans); margin-bottom: 8px; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.field { width: 100%; background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 2px; padding: 11px 13px; font: 400 14.5px/1.5 var(--sans); color: var(--ink); }
.field:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
textarea.field { resize: vertical; }
.field.mono { font-family: var(--mono); font-size: 13px; }
.choice { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.choice input { accent-color: var(--ink); }
.alert { padding: 14px 16px; border: 1px solid rgba(184, 50, 30, .45); background: var(--seal-wash); color: var(--seal-ink); font-size: 14px; }

/* ---------- code & hex ---------- */
.code { background: var(--paper-deep); border: 1px solid var(--rule); padding: 18px 20px; font: 400 13px/1.7 var(--mono); color: var(--ink); overflow-x: auto; white-space: pre; }
.code .c { color: var(--ink-3); }
.code .k { color: var(--seal-ink); }
.band-night .code { background: var(--night-2); border-color: #3a352c; color: var(--night-ink); }
.band-night .code .c { color: var(--night-mute); }
.band-night .code .k { color: #e7957f; }
.hex { font: 400 13px/1.6 var(--mono); word-break: break-all; letter-spacing: .02em; }
.hex .same { color: var(--pass); }
.hex .diff { color: #fff; background: var(--seal); border-radius: 1px; }

/* ---------- FAQ ---------- */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; font: 400 22px/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .2s; color: var(--seal); }
.faq details[open] summary .ic { transform: rotate(45deg); }
.faq details > div { padding: 0 0 24px; max-width: 72ch; color: var(--ink-2); }

/* ---------- misc ---------- */
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--ink); animation: spin .8s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 80px 0; text-align: center; color: var(--ink-3); font-size: 14px; display: flex; gap: 10px; align-items: center; justify-content: center; }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-3); }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; } .mt-6 { margin-top: 64px; }

/* ---------- stat figures ---------- */
.figure { padding: 22px 24px; border-right: 1px solid var(--rule); }
.figure:last-child { border-right: 0; }
.figure-value { font: 400 44px/1 var(--serif); font-variation-settings: "opsz" 60; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.figure-label { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.figures { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border: 1px solid var(--ink); background: var(--sheet); }
@media (max-width: 760px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } .figure:nth-child(2n) { border-right: 0; } .figure { border-bottom: 1px solid var(--rule); } }

/* ---------- page header (app pages) ---------- */
.pagehead { padding: 56px 0 40px; border-bottom: 1px solid var(--ink); }
.pagehead .lede { margin-top: 18px; max-width: 62ch; }

/* ---------- footer ---------- */
.footer { background: var(--night); color: var(--night-mute); padding: 64px 0 36px; font-size: 14px; border-top: 1px solid #332e26; }
.footer a { color: var(--night-ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2fr)); gap: 40px; }
.footer .brand-word { color: var(--night-ink); }
.footer .brand-mark { color: var(--night-ink); }
.footer h4 { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--night-mute); margin-bottom: 16px; }
.footer li { list-style: none; margin-bottom: 10px; }
.footer ul { padding: 0; }
.footer-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid #332e26; display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; justify-content: space-between; }
.partners { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.partners img { height: 20px; width: auto; filter: brightness(0) invert(.9); opacity: .85; }
.partners img.ic-court { height: 24px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ---------- tablet and phone (900px and below) ---------- */
@media (max-width: 900px) {
  :root { --masthead-h: 60px; }
  .field, input:not([type="radio"]):not([type="checkbox"]), select, textarea { font-size: 16px !important; }
  .btn { min-height: 46px; height: auto; }
  .btn-sm { min-height: 40px; }
  button { min-height: 36px; }
  .section { padding-block: 56px; }
  .pagehead { padding: 36px 0 28px; }
  .ltable { min-width: 640px; }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(2n) { border-right: 0; }
  .figure { border-bottom: 1px solid var(--rule); }
  .figure-value { font-size: 36px; }
  .footer { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-base { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .h1 { font-size: 34px; }
  .stamp .st-main { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .stamp.thump, .split.grow > span, .seat.is-thinking .seat-figure, .spin { animation: none; }
  .mnav, .mbackdrop, .burger span { transition: none; }
}
