:root {
  --bg: #07130d;
  --bg-2: #0c1f15;
  --panel: #10281b;
  --line: #1f4330;
  --ink: #eef5e9;
  --ink-dim: #9fb8a6;
  --money: #85bb65;
  --money-hi: #b9e39a;
  --gold: #e8c766;
  --red: #ff6b5b;
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--money-hi); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #17382a 0%, var(--bg) 70%);
}
#sea, #seaFx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.brand {
  position: absolute; top: 18px; right: 24px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end;
}
.logo { font-family: "Bebas Neue", Impact, sans-serif; font-size: 30px; letter-spacing: 2px; line-height: 1; color: var(--money-hi); }
.tag { font-size: 12px; color: var(--ink-dim); letter-spacing: .5px; }

.hero-center {
  position: absolute; z-index: 2;
  left: 50%; top: 34%;
  transform: translate(-50%, -50%);
  width: min(1000px, calc(100% - 32px));
  text-align: center;
  pointer-events: none;
}
.hero-center::before {
  content: ""; position: absolute; inset: -40px -60px; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(4, 12, 8, .72) 0%, rgba(4, 12, 8, .45) 45%, rgba(4, 12, 8, 0) 72%);
}
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold);
}
.big-number {
  font-weight: 900;
  font-size: clamp(30px, 7.4vw, 92px);
  line-height: 1.05;
  margin: 8px 0 6px;
  letter-spacing: -1px;
  text-shadow: 0 4px 30px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.9);
  white-space: nowrap;
}
.bills-line { font-size: clamp(15px, 2vw, 22px); color: var(--money-hi); text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.bills-line span { font-weight: 800; }

.stat-row {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px;
}
.stat {
  background: rgba(7, 19, 13, .72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 180px;
}
.stat-val { font-size: 22px; font-weight: 800; }
.stat-lbl { font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
#sinceArrive { color: var(--red); }

.spigot-note { font-size: 12px; color: var(--ink-dim); margin-top: 8px; text-shadow: 0 1px 6px #000; }

.scroll-cue {
  position: absolute; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(7,19,13,.8); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 999px;
}

.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.share-row.left { justify-content: flex-start; }
.share-row button { pointer-events: auto; font: inherit; cursor: pointer; border-radius: 999px; }
.share-main {
  background: var(--gold); color: #1a1405; border: 0; font-weight: 800; font-size: 14px; padding: 10px 18px;
  box-shadow: 0 6px 24px rgba(232, 199, 102, .25);
}
.share-ico {
  width: 40px; height: 40px; font-weight: 800; font-size: 15px;
  background: rgba(7,19,13,.75); color: var(--ink); border: 1px solid var(--line);
}
.share-main:hover, .share-ico:hover { filter: brightness(1.12); }

/* ---------- SECTIONS ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 80px 24px 40px; }
.section h2 {
  font-family: "Playfair Display", serif; font-weight: 900;
  font-size: clamp(34px, 5vw, 56px); margin: 0 0 8px; color: var(--money-hi);
}
.lede { font-size: 18px; color: var(--ink-dim); max-width: 680px; margin: 0 0 28px; line-height: 1.5; }
.lede strong { color: var(--ink); }
.fine { font-size: 13px; color: var(--ink-dim); max-width: 760px; line-height: 1.55; margin-top: 18px; }

/* denomination picker */
.denoms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.denoms button {
  font: inherit; font-weight: 800; font-size: 16px;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 18px; cursor: pointer;
}
.denoms button.on { background: var(--money); color: #07130d; border-color: var(--money); }

.stack-hero { margin-bottom: 22px; }
.stack-height { font-size: clamp(36px, 6vw, 68px); font-weight: 900; letter-spacing: -1px; }
.stack-sub { color: var(--ink-dim); font-size: 16px; }

.compare-grid, .fact-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.card .k { font-size: 30px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.card .d { font-size: 14px; color: var(--ink-dim); margin-top: 6px; line-height: 1.4; }
.card .ico { font-size: 22px; margin-bottom: 6px; }

/* animated tower */
.tower-wrap {
  position: relative; height: 540px; margin-bottom: 26px;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #02040a;
}
#tower { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tower-hud {
  position: absolute; top: 14px; left: 16px; pointer-events: none;
  background: rgba(2, 8, 5, .62); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 14px; max-width: calc(100% - 32px);
}
.hud-alt { font-size: clamp(26px, 4vw, 40px); font-weight: 900; letter-spacing: -.5px; }
.hud-sub { font-size: 13px; color: var(--money-hi); }
.hud-pass { font-size: 13px; color: var(--gold); margin-top: 4px; min-height: 1em; }
.tower-replay {
  position: absolute; right: 14px; bottom: 14px;
  font: inherit; font-weight: 700; font-size: 13px; cursor: pointer;
  background: rgba(2,8,5,.7); color: var(--ink); border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px; padding: 7px 14px;
}
.tower-note { position: absolute; left: 16px; bottom: 16px; right: 120px; font-size: 11px; color: rgba(238,245,233,.55); pointer-events: none; }

/* log chart */
.chart-title { margin: 44px 0 12px; font-size: 18px; }
.chart-title span { font-weight: 400; color: var(--ink-dim); font-size: 14px; }
.stack-chart { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 8px; }
.stack-chart svg { width: 100%; height: auto; display: block; }

/* hat shop */
.hat-eyebrow { margin-bottom: 4px; }
.hat-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.hat-preview { background: radial-gradient(ellipse at 50% 40%, #1c3a2a, var(--panel) 70%); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.hat-preview svg { width: 100%; height: auto; display: block; }
.hat-caption { text-align: center; font-size: 12px; color: var(--ink-dim); margin-top: 6px; }
.hat-points { margin: 0 0 18px; padding-left: 20px; color: var(--ink-dim); line-height: 1.8; }
.hat-btn {
  width: 100%; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer;
  background: var(--gold); color: #1a1405; border: 0; border-radius: 14px; padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(232,199,102,.22);
}
.hat-btn:disabled { opacity: .55; cursor: default; }
.hat-err { color: var(--red); font-size: 13px; min-height: 1.2em; margin-top: 6px; }
.paid-off { margin-top: 14px; }
.paid-off .k { color: var(--money-hi); }
.hat-thanks { background: var(--money); color: #07130d; font-weight: 800; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; }
.share-hat {
  pointer-events: auto; align-self: center; font-size: 14px; font-weight: 700; color: var(--ink);
  text-decoration: none; padding: 10px 14px; border-radius: 999px; background: rgba(7,19,13,.75); border: 1px solid var(--line);
}

/* flow table */
.flow-table { display: grid; gap: 10px; }
.flow-row {
  display: grid; grid-template-columns: 140px 1fr 1fr; gap: 12px; align-items: baseline;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px;
}
.flow-row.head { background: none; border: 0; padding: 0 18px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); }
.flow-row .per { font-weight: 700; color: var(--ink-dim); }
.flow-row .v { font-size: 20px; font-weight: 800; }
.flow-row .v small { display: block; font-size: 13px; color: var(--money-hi); font-weight: 600; }

/* ads: hidden until ADS_ENABLED in app.js adds .ads-on to <body> */
.ad-slot { display: none; }
body.ads-on .ad-slot {
  display: block; max-width: 970px; min-height: 100px; margin: 24px auto;
  border: 1px dashed var(--line); border-radius: 8px;
}

.footer {
  max-width: var(--max); margin: 60px auto 0; padding: 28px 24px 48px;
  border-top: 1px solid var(--line); color: var(--ink-dim); font-size: 13px; line-height: 1.6;
}
.footer .sources { margin-top: 8px; }

@media (max-width: 700px) {
  .hero-center { top: 36%; }
  .brand { right: 16px; top: 12px; }
  .logo { font-size: 24px; }
  .tag { display: none; }
  .stat { min-width: 0; flex: 1 1 140px; padding: 8px 12px; }
  .stat-val { font-size: 18px; }
  .section { padding: 56px 16px 28px; }
  .flow-row { grid-template-columns: 1fr 1fr; }
  .tower-wrap { height: 460px; }
  .hat-grid { grid-template-columns: 1fr; }
  .flow-row .per { grid-column: 1 / -1; }
  .flow-row.head { display: none; }
}

/* ?og — used once to render og.jpg (the link-preview image) */
body.og .hero { min-height: 0; }
body.og .share-row, body.og .scroll-cue, body.og .spigot-note, body.og .ad-slot { display: none; }
