:root {
  --paper: #EFEEE8;
  --paper-raised: #F5F4EF;
  --paper-recessed: #E7E6DF;
  --ink: #191813;
  --ink-soft: #4A483F;
  --ink-faint: #8B887B;
  --trust-green: #1F4A38;
  --trust-green-hover: #153427;
  --trust-green-active: #11291F;
  --laurel-gold: #8A6A1F;
  --error: #7A2E22;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --serif: 'Bodoni Moda', serif;
  --sans: 'Didact Gothic', sans-serif;
  --script: 'Pinyon Script', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); }
body { font-family: var(--sans); color: var(--ink); font-size: 16px; line-height: 1.6; }
a { color: var(--ink); text-decoration: none; }
button { font-family: var(--sans); }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
img { max-width: 100%; }

.frame {
  position: fixed; inset: 16px; border: 1px solid var(--ink);
  pointer-events: none; z-index: 90;
}

.shell { max-width: 1840px; margin: 0 auto; padding: 0 48px; }

.subhead { font-size: 18px; letter-spacing: 0.22em; text-transform: uppercase; line-height: 1.3; color: var(--ink-soft); }
.caption { font-size: 13px; line-height: 1.45; letter-spacing: 0.06em; color: var(--ink-soft); }
.money { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.rank-sign { font-size: 0.55em; color: var(--ink-soft); }

/* ── Nav ─────────────────────────────────────────── */
header { position: relative; z-index: 82; }
.nav-bar { height: 88px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.nav-left { display: flex; justify-content: flex-start; }
.nav-right { display: flex; justify-content: flex-end; align-items: center; }
.wordmark { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 28px; padding: 0 48px; }
.nav-link {
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color 150ms var(--ease);
}
.nav-link:hover { border-bottom-color: var(--ink); }
.nav-link.give { color: var(--trust-green); }
.nav-link.give:hover { border-bottom-color: var(--trust-green); }
.nav-rule { height: 1px; background: var(--ink); }
.menu-toggle { display: none; }

.menu-sheet {
  position: fixed; inset: 0; z-index: 80; background: var(--paper);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
}
.menu-sheet.open { display: flex; }
.menu-sheet a { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; line-height: 1.1; padding: 8px 16px; }

/* ── The Wire ────────────────────────────────────── */
.wire {
  display: flex; align-items: baseline; gap: 16px; padding-top: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-faint); overflow: hidden; white-space: nowrap;
}
.wire-label { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); flex: none; }
.wire-entry {
  transition: opacity 150ms var(--ease); overflow: hidden; text-overflow: ellipsis;
  background: none; border: none; padding: 0; cursor: pointer; font-family: var(--sans);
  text-underline-offset: 3px;
}
.wire-entry:hover { text-decoration: underline; }
.wire-entry.settling { opacity: 0; }

/* ── Main grid: standings rail top-left, overview right ── */
.main-grid {
  display: grid; grid-template-columns: 320px 1fr; gap: 24px 64px;
  grid-template-areas: 'board panel' 'board edition';
  align-items: start; padding-top: 32px; padding-bottom: 56px;
}
.rail { grid-area: board; }
.overview { grid-area: panel; min-width: 0; }


/* ── Standings rail ──────────────────────────────── */
.rail {
  position: sticky; top: 17px; align-self: start;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 34px); border: 1px solid var(--ink); background: var(--paper);
}
.rail-head { padding: 20px 16px 14px; border-bottom: 1px solid var(--ink); flex: none; }
.rail-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; line-height: 1.1; margin: 0; }
.rail-sub { margin-top: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.board-scroll {
  overflow-y: auto; flex: 1; min-height: 320px;
  scrollbar-width: thin; scrollbar-color: var(--ink-faint) transparent;
}
.board { position: relative; }

.board-row {
  position: absolute; left: 0; right: 0; height: 64px;
  display: grid; grid-template-columns: 42px 34px 1fr; gap: 8px; align-items: center;
  padding: 0 12px 0 8px; border-bottom: 1px solid var(--ink-faint); border-left: 3px solid transparent;
  transition: top 600ms var(--ease), background 150ms var(--ease);
}
.board-row:hover { background: var(--paper-recessed); }
.board-row.first { border-left-color: var(--laurel-gold); }
.board-row.first .row-rank { color: var(--laurel-gold); }
.board-row.mine .row-rank { color: var(--trust-green); }
.board-row.first.mine .row-rank { color: var(--laurel-gold); }
.row-rank { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.flag { filter: saturate(0.82); border: 1px solid var(--ink); background: var(--paper-recessed); object-fit: cover; display: block; flex: none; }
.flag-row { width: 28px; height: 21px; }
.flag-marquee { width: 40px; height: 30px; }
.flag-small { width: 28px; height: 21px; }
.row-name-cell { min-width: 0; }
.row-name {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 18px;
  line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  position: relative; display: inline-block; max-width: 100%; padding-bottom: 2px;
}
.row-name::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--ink);
}
.board-row.risen .row-name::after { animation: riseRule 2.3s var(--ease) forwards; }
@keyframes riseRule {
  0% { width: 0; opacity: 1; }
  13% { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
.row-figures { display: flex; align-items: baseline; gap: 10px; line-height: 1.3; }
.row-total { font-size: 14px; color: var(--trust-green); font-variant-numeric: tabular-nums; }
.row-delta { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.row-total.rolling { display: inline-flex; align-items: baseline; line-height: 1; }
.row-total.rolling > span { display: block; line-height: 1; }
.digit { overflow: hidden; height: 1em; line-height: 1; }
.digit .digit-reel { display: block; transition: transform 600ms var(--ease); }
.digit .digit-reel span { display: block; height: 1em; line-height: 1; }

/* ── Overview hero ───────────────────────────────── */
.overview-hero { position: relative; overflow: hidden; text-align: center; padding: 40px 0 56px; }
.letterform {
  position: absolute; font-family: var(--script); line-height: 0.8; color: var(--ink);
  pointer-events: none; user-select: none;
}
.overview-hero > .letterform { right: -90px; top: -70px; font-size: 380px; opacity: 0.05; }
.overview-kicker { margin-bottom: 16px; position: relative; }
.overview-title {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 64px;
  line-height: 1.03; letter-spacing: -0.005em; margin: 0; position: relative;
}
.hero-subline { font-size: 17px; color: var(--ink-soft); margin-top: 20px; position: relative; }
.overview-motto { font-size: 22px; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1.2; margin-top: 12px; position: relative; }

.marquee { margin-top: 56px; transition: opacity 150ms var(--ease); position: relative; overflow: hidden; padding: 8px 8px 4px; }
.marquee.settling { opacity: 0; }
.marquee-initial {
  right: -14%; top: -42%; font-size: clamp(200px, 21vw, 420px); opacity: 1; z-index: 0;
}
.marquee > :not(.marquee-initial) { position: relative; z-index: 1; }
.marquee-label { margin-bottom: 18px; font-size: 15px; }
.marquee-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.marquee-rank { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; color: var(--laurel-gold); font-variant-numeric: tabular-nums; }
.marquee-name {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(52px, 4.8vw, 92px); line-height: 1.02; margin-top: 10px;
}
.marquee-total { font-size: clamp(26px, 2vw, 36px); line-height: 1.2; margin-top: 12px; }
.marquee-caption { margin-top: 12px; }
.marquee-rule { width: 96px; height: 1px; background: var(--ink); margin: 18px auto 0; }

/* ── Section heads ───────────────────────────────── */
.section-head { text-align: center; margin-bottom: 40px; }
.section-title { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 40px; line-height: 1.1; margin: 0; }
.section-sub { margin-top: 8px; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }

/* ── Chart (The Standings, Charted) ──────────────── */
.chart-section { padding-top: 24px; }
.chart-plot { position: relative; height: 320px; }
.gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--ink-faint); }
.chart-bars { position: relative; display: flex; align-items: flex-end; gap: 16px; height: 100%; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.chart-money { font-size: 13px; margin-bottom: 8px; white-space: nowrap; color: var(--ink-soft); }
.chart-bar { width: 100%; transition: height 600ms var(--ease), background 600ms var(--ease); background: var(--ink); }
.chart-legend {
  border-top: 1px solid var(--ink); display: flex; gap: 16px; padding-top: 14px; margin-bottom: 8px;
}
.chart-leg { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.flag-chart { width: 32px; height: 24px; }
.chart-rank { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.chart-name { font-size: 10px; letter-spacing: 0.06em; color: var(--ink-soft); text-align: center; line-height: 1.4; word-break: keep-all; max-width: 100%; }

.chase { text-align: center; margin: 36px 0 48px; }
.chase-lead { font-size: 16px; color: var(--ink-soft); }
.chase-amount { font-size: 16px; color: var(--trust-green); }
.chase-link {
  font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--trust-green);
  text-decoration: underline; text-underline-offset: 3px;
}
.chase-link:hover { text-decoration-thickness: 2px; }

.field-head { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); text-align: center; margin-bottom: 16px; }
.field-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; border-bottom: 1px solid var(--ink); }
.field-slot { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.field-bar { width: 100%; transition: height 600ms var(--ease); background: var(--ink); }
.field-slot:hover .field-bar { background: var(--trust-green); }
.field-labels { display: flex; gap: 3px; padding-top: 10px; }
.field-label-slot { flex: 1; display: flex; justify-content: center; min-width: 0; }
.field-code { writing-mode: vertical-rl; font-size: 10px; letter-spacing: 0.12em; color: var(--ink-soft); }
.field-caption { text-align: center; margin-top: 28px; text-wrap: pretty; }

/* ── The Daily Edition ───────────────────────────── */
.edition { grid-area: edition; min-width: 0; margin-top: 72px; padding: 0 0 32px; }
.edition-head { margin-bottom: 0; }
.edition-lines { border-bottom: 1px solid var(--ink-faint); }
.edition-line {
  display: flex; align-items: baseline; gap: 24px; padding: 18px 0;
  border-bottom: 1px solid var(--ink-faint);
}
.edition-line:last-child { border-bottom: none; }
.edition-label { flex: none; width: 220px; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.edition-fact { font-size: 19px; line-height: 1.5; }
.edition-close { margin-top: 28px; font-size: 16px; color: var(--ink-soft); text-wrap: pretty; }
.edition-close .chase-link { margin-left: 10px; }

/* ── Give section ────────────────────────────────── */
.give-area { padding-top: 56px; padding-bottom: 72px; }

.give-inner { max-width: 560px; margin: 0 auto; }
.card {
  border: 1px solid var(--ink);
  padding: 48px; position: relative; background: var(--paper);
}
.chase-banner { text-align: center; margin: -24px 0 0; min-height: 19px; text-wrap: pretty; }
.stamp {
  position: absolute; top: -13px; right: 28px; transform: rotate(-2.5deg);
  background: var(--paper); border: 1px solid var(--ink); padding: 4px 12px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
}
.defend-line { text-align: center; margin: 6px 0 0; text-wrap: pretty; }
.watch-row { text-align: center; margin: 8px 0 28px; min-height: 17px; }
.watch-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.watch-toggle:hover { text-decoration-thickness: 2px; }
.watch-toggle.on { color: var(--ink-soft); }
.watch-note { margin-left: 10px; }
.defend-take {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; font-variant-numeric: tabular-nums;
}
.defend-take:hover { text-decoration-thickness: 2px; }
.patron-number { text-align: center; margin: 12px 0 0; min-height: 19px; }
.return-line { position: relative; text-align: center; margin: 0 auto 24px; max-width: 560px; text-wrap: pretty; }
.return-take {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; font-variant-numeric: tabular-nums;
}
.return-take:hover { text-decoration-thickness: 2px; }

.patrons {
  margin: 24px 0 0; border: 1px solid var(--ink);
  padding: 28px 32px 20px; background: var(--paper); text-align: center;
}
.patrons-head { font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.patrons-rule { width: 48px; height: 1px; background: var(--ink); margin: 14px auto 6px; }
.patron-row {
  display: flex; align-items: baseline; gap: 14px; padding: 11px 0;
  border-bottom: 1px solid var(--ink-faint); text-align: left;
}
.patron-row:last-child { border-bottom: none; }
.patron-rank { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; flex: none; width: 36px; }
.patron-name { flex: 1; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patron-amount { font-size: 14px; color: var(--ink-soft); }
.patrons-empty { padding: 14px 0 8px; }
.patrons-note { margin-top: 12px; }

.sign-block { margin-top: 28px; }
.sign-row { display: flex; gap: 12px; margin-top: 4px; }
.sign-row .pay-input { flex: 1; }
.sign-btn { width: auto; padding: 0 28px; margin-top: 0; flex: none; }
.sign-done { text-align: center; margin-top: 8px; }
.success-rival { margin-top: 10px; }
.picker-line { text-align: center; margin-bottom: 32px; position: relative; }
.picker-lead { font-size: 16px; color: var(--ink-soft); }
.picker-trigger {
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 24px;
  background: none; border: none; padding: 0 0 1px; color: var(--ink); cursor: pointer;
  border-bottom: 1px solid transparent; position: relative;
}
.picker-trigger:hover { border-bottom-color: var(--ink); }
.picker-trigger.flash::after {
  content: ''; position: absolute; left: 0; bottom: -1px; height: 1px;
  background: var(--ink); animation: riseRule 2.3s var(--ease) forwards;
}
.flag-trigger { display: inline-block; width: 26px; height: 20px; vertical-align: -2px; margin-right: 10px; }
.card .chase-banner, .card .defend-line, .card .impact-line, .card .patron-number,
.card .picker-trigger, .card .fx-line { transition: opacity 150ms var(--ease); }
.card.settling .chase-banner, .card.settling .defend-line, .card.settling .impact-line,
.card.settling .patron-number, .card.settling .picker-trigger, .card.settling .fx-line { opacity: 0; }
.picker-trigger.empty { color: var(--ink-faint); }
.picker-caret { color: var(--ink-soft); cursor: pointer; }

.picker-panel {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  width: min(400px, calc(100vw - 48px)); background: var(--paper-raised); border: 1px solid var(--ink);
  z-index: 50; text-align: left; display: none; flex-direction: column;
}
.picker-panel.open { display: flex; }
.picker-search {
  height: 48px; margin: 12px; padding: 0 16px; background: var(--paper-recessed);
  border: 1px solid var(--ink); font-family: var(--sans); font-size: 16px; color: var(--ink); flex: none;
}
.picker-search:focus { outline: none; border-color: var(--trust-green); color: var(--trust-green); }
.picker-list { overflow-y: auto; max-height: 288px; }
.picker-row {
  display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 0 16px;
  cursor: pointer; transition: background 150ms var(--ease);
}
.picker-row:hover, .picker-row.active { background: var(--paper-recessed); }
.picker-row .picker-name { flex: 1; font-size: 16px; }
.picker-row.chosen .picker-name { font-family: var(--serif); font-style: italic; }
.picker-row .picker-rank { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.picker-empty { padding: 16px; font-size: 13px; color: var(--ink-soft); }

.field-label { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.amount-wrap {
  display: flex; align-items: center; height: 64px; background: var(--paper-recessed);
  border: 1px solid var(--ink); padding: 0 20px; transition: background 150ms var(--ease), border-color 150ms var(--ease);
  margin-bottom: 16px;
}
.amount-wrap:hover { background: var(--paper); }
.amount-wrap.focus { background: var(--paper); border-color: var(--trust-green); }
.amount-wrap.error { border-color: var(--error); }
.amount-sign { font-size: 22px; color: var(--ink-soft); margin-right: 8px; }
#amount {
  flex: 1; border: none; outline: none; background: transparent; min-width: 0;
  font-family: var(--sans); font-size: 28px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.amount-wrap.focus #amount { color: var(--trust-green); }
#amount::placeholder { color: var(--ink-faint); }
.fx-line { text-align: center; min-height: 17px; margin: -8px 0 12px; }
.amount-error { display: none; color: var(--error); margin-top: -8px; margin-bottom: 16px; }
.amount-error.show { display: block; }

.chips { display: flex; gap: 8px; }
.chip {
  flex: 1; height: 40px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--ink-faint); background: transparent;
  color: var(--ink); cursor: pointer; transition: border-color 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.selected { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.impact-line { min-height: 19px; margin: 6px 0 28px; text-align: center; text-wrap: pretty; }
.impact-take {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.06em; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; font-variant-numeric: tabular-nums;
}
.impact-take:hover { text-decoration-thickness: 2px; }
.impact-take:active { color: var(--ink-soft); }

.methods { display: flex; flex-direction: column; gap: 8px; margin-bottom: 40px; }
.method {
  display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 20px;
  border: 1px solid var(--ink-faint); background: transparent; cursor: pointer; width: 100%;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.method:hover { border-color: var(--ink); }
.method.selected { border-color: var(--ink); background: var(--paper-raised); }
.method-name { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.method-tag { font-size: 13px; letter-spacing: 0.06em; color: var(--trust-green); visibility: hidden; }
.method.selected .method-tag { visibility: visible; }

.btn {
  width: 100%; height: 56px; font-size: 14px; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; transition: background 150ms var(--ease), color 150ms var(--ease), transform 150ms var(--ease);
  font-variant-numeric: tabular-nums;
}
.btn-pay { background: var(--trust-green); color: var(--paper); border: none; }
.btn-pay:hover { background: var(--trust-green-hover); }
.btn-pay:active { background: var(--trust-green-active); transform: translateY(1px); }
.btn-pay:disabled { background: var(--paper-recessed); color: var(--ink-faint); cursor: default; transform: none; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); margin-top: 12px; }
.btn-secondary:hover { background: var(--paper-recessed); }
.btn-secondary:active { background: var(--ink); color: var(--paper); }
.card-note { text-align: center; margin-top: 24px; text-wrap: pretty; }

/* ── Payment modal ───────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(239, 238, 232, 0.92);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  position: relative; width: 480px; max-width: 100%; max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--paper-raised); border: 1px solid var(--ink); padding: 44px 36px 36px;
}
.modal::before {
  content: ''; position: absolute; inset: 12px; border: 1px solid var(--ink); pointer-events: none;
}
.modal-label { text-align: center; font-size: 18px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.modal-amount { text-align: center; font-size: 44px; color: var(--trust-green); font-variant-numeric: tabular-nums; margin: 16px 0 8px; }
.modal-usd { text-align: center; margin: -2px 0 8px; }
.modal-for { text-align: center; font-size: 16px; color: var(--ink-soft); margin-bottom: 28px; }
.modal-for .modal-country { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; color: var(--ink); }
.modal .field-label { margin-top: 16px; }
.pay-input {
  width: 100%; height: 56px; padding: 0 16px; background: var(--paper-recessed);
  border: 1px solid var(--ink); font-family: var(--sans); font-size: 18px; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pay-input:focus { outline: none; border-color: var(--trust-green); color: var(--trust-green); }
.pay-row { display: flex; gap: 12px; }
.pay-row > div { flex: 1; }
.modal-hint { margin-top: 12px; }
.modal-error { display: none; color: var(--error); margin-top: 12px; }
.modal-error.show { display: block; }
.modal .btn-pay { margin-top: 28px; }
.address-box {
  background: var(--paper-recessed); border: 1px solid var(--ink); padding: 16px;
  font-size: 15px; font-variant-numeric: tabular-nums; word-break: break-all; text-align: center;
}
.processing { text-align: center; padding: 48px 0; font-size: 16px; color: var(--ink-soft); animation: settlePulse 1.6s var(--ease) infinite; }
@keyframes settlePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.success-message { text-align: center; font-size: 19px; line-height: 1.6; margin-top: 24px; text-wrap: pretty; }
.success-stands { text-align: center; margin-top: 32px; }
.success-rank {
  font-family: var(--serif); font-weight: 600; font-size: 120px; line-height: 1;
  color: var(--trust-green); font-variant-numeric: tabular-nums; margin-top: 12px;
}
.success-rule { width: 48px; height: 1px; background: var(--ink); margin: 16px auto; }
.success-chase { margin-top: 4px; }

/* ── Footer ──────────────────────────────────────── */
.footer { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; }
.footer-frame { position: absolute; inset: 16px; border: 1px solid var(--paper); pointer-events: none; }
.footer .letterform { left: 50%; bottom: -38vw; transform: translateX(-50%); font-size: 44vw; color: var(--paper); opacity: 0.06; }
.footer-inner { position: relative; text-align: center; padding-top: 96px; padding-bottom: 96px; }
.footer-wordmark { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 40px; }
.footer-links { display: flex; justify-content: center; gap: 48px; margin-top: 48px; flex-wrap: wrap; }
.footer-links a {
  color: var(--paper); font-size: 15px; letter-spacing: 0.22em; text-transform: uppercase;
  border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color 150ms var(--ease);
}
.footer-links a:hover { border-bottom-color: var(--paper); }
.footer-links a:active { opacity: 0.7; }
.footer-legal { font-size: 13px; line-height: 1.45; opacity: 0.7; margin-top: 64px; }

/* ── Editorial asymmetry (wide screens) ──────────── */
@media (min-width: 1024px) {
  .overview-hero {
    display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 48px;
    align-items: center; text-align: left; padding: 48px 0 56px;
  }
  .return-line { grid-column: 1 / -1; text-align: left; margin: 0 0 28px; max-width: none; }
  .hero-copy { grid-column: 1; }
  .overview-kicker { margin-bottom: 20px; }
  .overview-title { font-size: clamp(64px, 5.6vw, 110px); }
  .overview-motto { margin-top: 14px; }
  .marquee { grid-column: 2; margin-top: 0; }
  .section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 24px; text-align: left; border-bottom: 1px solid var(--ink);
    padding-bottom: 14px; margin-bottom: 40px;
  }
  .section-sub { margin-top: 0; text-align: right; }
  .chart-section { padding-top: 40px; }
  .chase { text-align: left; margin: 36px 0 56px; }
  .field-head { text-align: left; }
  .field-caption { text-align: left; max-width: 64ch; margin-top: 24px; }
  .give-area { padding-top: 40px; padding-bottom: 64px; }
}

@media (min-width: 1280px) {
  .give-inner {
    max-width: none; margin: 0; display: grid;
    grid-template-columns: minmax(480px, 560px) minmax(320px, 520px);
    gap: 48px; align-items: start;
  }
  .patrons { margin: 0; }
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 767px) {
  .frame { inset: 10px; }
  .shell { padding: 0 24px; }
  .stamp { right: 14px; top: -12px; }

  .nav-bar { height: 64px; }
  .wordmark { font-size: 22px; padding: 0 16px; }
  .nav-left .nav-link { display: none; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0;
  }
  .menu-toggle span { display: block; width: 16px; height: 1px; background: var(--ink); }

  .main-grid {
    grid-template-columns: 1fr; gap: 0;
    grid-template-areas: 'panel' 'board' 'edition';
    padding-top: 8px;
  }

  .rail { position: static; max-height: none; border: none; margin-top: 64px; }
  .rail-head { padding: 0 0 14px; border-bottom: 1px solid var(--ink); text-align: center; }
  .board-scroll { overflow: visible; }
  .board-row { padding: 0 8px; grid-template-columns: 50px 32px 1fr; }
  .row-rank { font-size: 20px; }
  .flag-row { width: 28px; height: 21px; }

  .overview-hero { padding: 40px 0 48px; }
  .overview-hero > .letterform { right: -95px; top: -55px; font-size: 280px; opacity: 1; }
  .marquee-initial { display: none; }
  .overview-title { font-size: 44px; }
  .overview-motto { font-size: 18px; }
  .subhead { font-size: 14px; }
  .wire { gap: 10px; padding-top: 8px; padding-bottom: 8px; }
  .marquee { margin-top: 48px; }
  .marquee-rank { font-size: 30px; }
  .marquee-name { font-size: 40px; }
  .marquee-total { font-size: 22px; }
  .marquee-initial { font-size: 170px; right: -18%; top: -62%; }
  .marquee-row { gap: 12px; }
  .hero-subline { font-size: 15px; }
  .flag-marquee { width: 28px; height: 21px; }

  .section-title { font-size: 30px; }
  .section-sub { font-size: 11px; letter-spacing: 0.1em; }

  .chart-plot { height: 200px; }
  .chart-bars { gap: 6px; }
  .chart-legend { gap: 6px; }
  .chart-money { font-size: 9px; margin-bottom: 6px; letter-spacing: 0; }
  .flag-chart { width: 24px; height: 18px; }
  .chart-rank { font-size: 14px; }
  .chart-name { display: none; }
  .chase { margin: 28px 0 40px; }
  .chase-lead, .chase-amount { font-size: 14px; }
  .field-bars { height: 80px; }
  .field-labels { display: none; }
  .field-caption { margin-top: 16px; }

  .give-area { padding-top: 48px; padding-bottom: 56px; }
  .patrons { padding: 20px 20px 14px; }
  .sign-row { flex-direction: column; }
  .sign-btn { width: 100%; }

  .card { padding: 24px; }
  .picker-trigger { font-size: 20px; }
  .picker-panel {
    position: fixed; inset: 0; top: 0; left: 0; transform: none; width: 100%; height: 100%;
    z-index: 85; padding: 34px 24px 24px;
  }
  .picker-panel::before { content: ''; position: fixed; inset: 10px; border: 1px solid var(--ink); pointer-events: none; }
  .picker-list { max-height: none; flex: 1; }
  .amount-wrap { height: 56px; }
  #amount { font-size: 22px; }
  .btn { height: 52px; }

  .modal-overlay { padding: 0; }
  .modal { width: 100%; height: 100%; max-height: 100%; padding: 40px 24px 24px; }
  .modal::before { inset: 10px; }
  .success-rank { font-size: 72px; }

  .edition { margin-top: 56px; padding-bottom: 24px; }
  .edition-line { flex-direction: column; gap: 4px; padding: 14px 0; }
  .edition-label { width: auto; }
  .edition-fact { font-size: 17px; }
  .edition-close { margin-top: 24px; }
  .edition-close .chase-link { display: inline-block; margin-left: 0; margin-top: 8px; }

  .footer-frame { inset: 10px; }
  .footer-inner { padding-top: 64px; padding-bottom: 64px; }
  .footer-links { flex-direction: column; gap: 24px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .main-grid { grid-template-columns: 300px 1fr; gap: 24px 32px; }
  .chart-bars, .chart-legend { gap: 10px; }
  .chart-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .board-row { transition: background 150ms var(--ease); }
  .digit .digit-reel { transition: none; }
  .chart-bar, .field-bar { transition: none; }
  .marquee { transition: opacity 150ms var(--ease); }
  .board-row.risen .row-name::after { animation: none; }
  .processing { animation: none; }
}
