:root {
  --paper: #f7f4ee; --card: #ffffff; --ink: #14213d; --ink-2: #3d4660; --muted: #6b7184; --line: #e4ded2;
  --gold: #a8844c; --gold-2: #c9a96e; --gold-ink: #1b1406; --ok: #2f7a4f; --bad: #a33a3a; --hl: #fff6dc;
  --serif: 'Noto Serif', Georgia, serif; --sans: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 14px; --shadow: 0 1px 2px rgba(20,33,61,.06), 0 8px 24px rgba(20,33,61,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1424; --card: #161d31; --ink: #ece7db; --ink-2: #c8c3b8; --muted: #9399a8; --line: #273049;
    --gold: #c9a96e; --gold-2: #dcc08b; --hl: #2b2a1c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .88em; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--card); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.demo-banner { background: #7a5a1e; color: #fff; text-align: center; padding: 6px 16px; font-size: .9rem; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100% - 1160px)/2));
  background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand span { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--serif); }
.brand small { color: var(--muted); font-family: var(--sans); font-size: .78rem; }
nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
nav a:hover { background: var(--line); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; font-size: 1.2rem; color: var(--ink); padding: 4px 10px; }

.btn-gold, .btn-ghost { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 22px; font: 600 .95rem var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-gold { background: var(--gold); color: #fff !important; }
.btn-gold:hover { background: var(--gold-2); color: var(--gold-ink) !important; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.small.btn-ghost, .btn-ghost.small { padding: 7px 14px; font-size: .85rem; }

section { padding: 56px max(16px, calc((100% - 1160px)/2)); }
.sec-head { max-width: 760px; margin-bottom: 24px; }
.sec-head p { color: var(--ink-2); }

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding-top: 40px; }
.hero-photo img { border-radius: var(--r); box-shadow: var(--shadow); filter: grayscale(1); background: #fff; }
.eyebrow { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; font-weight: 600; margin: 0 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.hero h1 span { color: var(--gold); }
.dates { color: var(--muted); margin-top: -4px; }
blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.stat .k { display: block; color: var(--muted); font-size: .82rem; }
.stat b { font: 700 1.35rem var(--serif); font-variant-numeric: tabular-nums; }
.stat b.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { color: var(--gold); } }
.live { grid-column: 1/-1; margin: 4px 0 0; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47,122,79,.5); animation: pulse 2s infinite; }
.dot.off { background: var(--bad); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(47,122,79,0); } 100% { box-shadow: 0 0 0 0 rgba(47,122,79,0); } }

.donate { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: start; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); text-align: center; }
.qr-card img { width: 260px; height: 260px; }
.qr-hint { color: #6b7184; font-size: .85rem; margin: 8px 0 0; }
.bank { margin: 0 0 12px; display: grid; gap: 8px; }
.bank div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.bank dt { color: var(--muted); } .bank dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.copy { font: .78rem var(--sans); border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 6px; padding: 2px 8px; cursor: pointer; margin-left: 6px; }
.anon { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.thanks { margin-top: 16px; padding: 18px; background: var(--hl); border: 1px solid var(--gold-2); border-radius: var(--r); font-family: var(--serif); }
.thanks b { color: var(--gold); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); padding: 8px 16px; border-radius: 999px; cursor: pointer; font: 500 .9rem var(--sans); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tabs input { flex: 1; min-width: 200px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table.tx { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tx th, .tx td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tx th { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; background: color-mix(in srgb, var(--paper) 60%, var(--card)); }
.tx .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx td.num.in { color: var(--ok); font-weight: 600; } .tx td.num.out { color: var(--bad); font-weight: 600; }
.tx tr.new { animation: newrow 4s ease; }
@keyframes newrow { 0%, 50% { background: var(--hl); } }
.tag { display: inline-block; font-size: .7rem; padding: 1px 7px; border-radius: 999px; background: #7a5a1e22; color: #7a5a1e; border: 1px solid #7a5a1e55; margin-left: 6px; vertical-align: 1px; }
.note { display: block; color: var(--muted); font-size: .85rem; font-style: italic; }
.pager { display: flex; justify-content: center; gap: 14px; align-items: center; margin-top: 12px; color: var(--muted); }
.pager button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.pager button:disabled { opacity: .4; cursor: default; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.steps { padding-left: 20px; margin: 0; } .steps li { margin-bottom: 8px; }
.ticks { padding-left: 0; list-style: none; margin: 0; } .ticks li { padding-left: 24px; position: relative; margin-bottom: 8px; }
.ticks li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); }

.timeline { border-left: 2px solid var(--line); margin: 0 0 32px 8px; }
.timeline div { position: relative; padding: 0 0 18px 24px; }
.timeline div::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); }
.timeline time { font: 700 1rem var(--serif); color: var(--gold); }
.timeline p { margin: 2px 0 0; color: var(--ink-2); max-width: 720px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 8px 12px; font-size: .85rem; color: var(--muted); }

.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; }
.ask-a { margin-top: 14px; white-space: pre-wrap; color: var(--ink-2); }
.ask-a .src { display: block; margin-top: 6px; font-size: .8rem; color: var(--muted); }
.docs { list-style: none; padding: 0; margin: 0; } .docs li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.docs time { color: var(--muted); font-size: .85rem; margin-right: 8px; }
.verify-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#verify-out { overflow-wrap: anywhere; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; padding: 32px max(16px, calc((100% - 1160px)/2)); border-top: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }

@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat:first-child { grid-column: 1/-1; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  nav.open { display: flex; }
  .hero, .donate, .grid-2, .foot { grid-template-columns: 1fr; gap: 24px; }
  .hero-photo { max-width: 420px; }
  .donate .qr-card { justify-self: center; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  section { padding-top: 40px; padding-bottom: 40px; }
  .bank div { grid-template-columns: 1fr; gap: 2px; }
  .tx th:nth-child(1), .tx td:nth-child(1), .tx th:nth-child(5), .tx td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; } }
.nf { margin: 10vh auto; text-align: center; }
