:root {
  --bg: #0a0a0a;
  --side-bg: #050505;
  --panel: #151411;
  --panel-2: #22201a;
  --line: #34312a;
  --accent: #ffc636;
  --accent-hover: #ffd466;
  --accent-dark: #c28d17;
  --ink: #0a0a0a;
  --text: #fbf8ef;
  --muted: #c2bcab;
  --faint: #a19b8b;
  --up: #5fd39a;
  --down: #f07a6f;
  /* chart marks */
  --c-up: #2aa876;
  --c-down: #cf5148;
  --c-bar: #ffc636;
  --radius: 14px;
  --side: 256px;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--accent);
  color: var(--ink);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
}

/* ---------- sidebar ---------- */
.side {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--side);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--side-bg);
  border-right: 1px solid var(--line);
  padding: 26px 18px 22px;
  z-index: 40;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.01em;
  padding: 0 8px 26px;
}

.side-brand img { border-radius: 9px; transition: transform 0.3s; }
.side-brand:hover img { transform: scale(1.06); }

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav a {
  position: relative;
  display: block;
  padding: 14px 14px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  overflow: hidden;
  transition: color 0.2s, background 0.2s;
}

.side-nav a::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 50%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 198, 54, 0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.side-nav a:hover::after { left: 140%; }

.side-nav a:hover { color: var(--text); background: rgba(255, 198, 54, 0.07); }

.side-nav a.is-active {
  color: var(--text);
  background: rgba(255, 198, 54, 0.12);
}

.side-social {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding: 20px 6px 0;
  border-top: 1px solid var(--line);
}

.side-social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}

.side-social a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 198, 54, 0.08);
  transform: translateY(-2px);
}

.side-social img { opacity: 0.82; border-radius: 5px; transition: opacity 0.2s; }
.side-social a:hover img { opacity: 1; }

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 35;
}

.scrim.is-open { display: block; }

/* ---------- shell ---------- */
.shell {
  margin-left: var(--side);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 14px 34px;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-brand, .burger { display: none; }

main {
  max-width: 1180px;
  padding: 0 34px 60px;
}

.page-head { padding: 46px 0 34px; }

.page-head h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
}

.eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ---------- buttons ---------- */
.btn, .btn-sm {
  position: relative;
  overflow: hidden;
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  border: 1px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s;
}

.btn {
  font-size: 17px;
  padding: 17px 34px;
  border-radius: 12px;
}

.btn-sm {
  font-size: 16px;
  padding: 11px 22px;
  border-radius: 10px;
}

.btn::after, .btn-sm::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 45%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
}

.btn:hover::after, .btn-sm:hover::after { left: 130%; }

.btn:hover, .btn-sm:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 198, 54, 0.28);
}

.btn:active, .btn-sm:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--panel);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 64px 0 60px; }

.hero-logo {
  margin: 0 auto 30px;
  border-radius: 26px;
  width: 148px;
  height: 148px;
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 18px 60px rgba(255, 198, 54, 0.22);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero h1 { font-size: 76px; font-weight: 900; line-height: 1; letter-spacing: -0.035em; }

.lede {
  margin: 26px auto 0;
  max-width: 560px;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hl { color: var(--accent); }

.hero-actions {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stats-4 { grid-template-columns: repeat(4, 1fr); }

.stat {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s, transform 0.25s;
}

.stat::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 55%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 198, 54, 0.13), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.stat:hover::after { left: 140%; }
.stat:hover { border-color: var(--accent); transform: translateY(-2px); }

.flat .stat { background: var(--bg); }
.flat { margin-bottom: 0; }

.stat-label {
  display: block;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- cards ---------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.card-note {
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.grid-2 .card { margin-bottom: 24px; }

.placeholder {
  padding: 70px 28px;
  text-align: center;
  color: var(--muted);
}

.placeholder p { margin: 0; font-size: 19px; font-weight: 600; }

.mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.mini {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.mini span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.mini strong { font-size: 19px; font-weight: 700; }

/* ---------- meter ---------- */
.meter { position: relative; }

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.meter-pct {
  font-size: 27px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.meter-remain { font-size: 16px; font-weight: 600; color: var(--muted); }

.meter-track {
  position: relative;
  height: 26px;
  border-radius: 99px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.meter-fill {
  position: relative;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  box-shadow: 0 0 22px rgba(255, 198, 54, 0.55);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.meter-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.5) 50%, transparent 80%);
  background-size: 220% 100%;
  animation: sweep 2.6s linear infinite;
}

@keyframes sweep {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

.meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

/* ---------- mission / treasury ---------- */
.mission {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 38px 34px;
  margin-bottom: 24px;
}

.mission::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 60%;
  height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 198, 54, 0.07), transparent);
  transform: skewX(-18deg);
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}

@keyframes drift {
  0%, 100% { left: -40%; }
  50% { left: 90%; }
}

.treasury {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.treasury-main { min-width: 0; }

.treasury-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.treasury-value {
  display: block;
  font-size: 62px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
  background: linear-gradient(96deg, #fbf8ef 12%, var(--accent) 42%, #ffe7a8 58%, #fbf8ef 88%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 7s linear infinite;
}

@keyframes sheen {
  0% { background-position: 160% 0; }
  100% { background-position: -60% 0; }
}

.treasury-usd {
  display: block;
  margin-top: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
}

.treasury-goal { text-align: right; }

.treasury-goal-value {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pace {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.pace-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.pace-item span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.pace-item strong { font-size: 20px; font-weight: 700; }

.pace-note {
  position: relative;
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--faint);
}

/* ---------- wallet cards ---------- */
.wallet-card { display: flex; flex-direction: column; }

.wallet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.wallet-head .card-title { margin-bottom: 6px; }

.wallet-link {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.wallet-link:hover { color: var(--accent); }

.wallet-total { text-align: right; }

.wallet-total span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.wallet-total strong { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }

.holdings { display: flex; flex-direction: column; gap: 2px; }

.hold {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  overflow: hidden;
  transition: background 0.2s;
}

.hold:hover { background: rgba(255, 198, 54, 0.06); }

.hold-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 198, 54, 0.17);
  border-right: 2px solid var(--c-bar);
  border-radius: 3px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.hold-name, .hold-amt, .hold-chg { position: relative; }

.hold-name { font-size: 16px; font-weight: 700; }

.hold-sub {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
  margin-top: 2px;
}

.hold-amt { font-size: 16px; font-weight: 700; text-align: right; }

.hold-chg {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  min-width: 66px;
}

.empty { margin: 0; color: var(--muted); font-weight: 600; }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; }

.chart svg { display: block; width: 100%; height: auto; overflow: visible; }

.grid-line { stroke: var(--line); stroke-width: 1; opacity: 0.5; }
.axis-text { fill: var(--faint); font-size: 12px; font-weight: 600; }
.axis-text-val { fill: var(--muted); font-size: 12px; font-weight: 700; }

.bar-mark {
  transition: opacity 0.15s;
  cursor: default;
}

.bar-mark:hover { opacity: 0.78; }

.bar-grow { transform-origin: center bottom; animation: grow 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bar-wide { transform-origin: left center; animation: widen 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes widen {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.tip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: opacity 0.15s;
  z-index: 5;
}

.tip.on { opacity: 1; }
.tip b { display: block; font-size: 16px; font-weight: 800; margin-top: 3px; }

/* ---------- split bar ---------- */
.split-bar {
  display: flex;
  background: var(--bg);
  border-radius: 4px;
  gap: 2px;
  height: 30px;
  margin-bottom: 16px;
}

.split-buy, .split-sell {
  height: 100%;
  border-radius: 4px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.split-buy { background: var(--c-up); }
.split-sell { background: var(--c-down); }

.split-legend {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}

.split-legend strong { color: var(--text); margin-left: 6px; }

.key {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 8px;
}

.key-up { background: var(--c-up); }
.key-down { background: var(--c-down); }

/* ---------- key/value + table ---------- */
.kv { display: flex; flex-direction: column; }

.kv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(52, 49, 42, 0.6);
}

.kv-row:last-child { border-bottom: none; }
.kv-row span { font-size: 15px; font-weight: 600; color: var(--muted); }
.kv-row strong { font-size: 18px; font-weight: 700; }

.table-wrap { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

.tbl th {
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 14px 12px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 15px 14px 15px 0;
  border-bottom: 1px solid rgba(52, 49, 42, 0.5);
  font-size: 16px;
  font-weight: 600;
}

.tbl tr:last-child td { border-bottom: none; }
.tbl .num-col { text-align: right; padding-right: 0; }
.tbl .sym { font-weight: 700; }

.tbl-link { color: var(--accent); }
.tbl-link:hover { color: var(--accent-hover); }

/* ---------- calculator ---------- */
.calc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 24px;
}

.calc h2, .how h2 { font-size: 30px; font-weight: 800; margin-bottom: 28px; }

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.field-head label { font-size: 17px; font-weight: 700; }
.field-sub { font-size: 15px; color: var(--muted); font-weight: 600; }

button.link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

button.link:hover { color: var(--accent-hover); }

.num {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  padding: 16px 18px;
}

.num:focus { outline: none; border-color: var(--accent); }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  margin: 10px 0 0;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
}

.range::-moz-range-track {
  height: 8px;
  border-radius: 99px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--panel);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 32px 0 26px;
}

.tab {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tab:hover { color: var(--text); }

.tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

.result {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 26px;
  text-align: center;
}

.result-label { display: block; font-size: 16px; font-weight: 600; color: var(--muted); }

.result-value {
  display: block;
  margin: 12px 0 8px;
  font-size: 56px;
  line-height: 1.05;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.result-sub { font-size: 17px; color: var(--muted); font-weight: 600; }

.calc-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.foot-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
}

.foot-item span {
  display: block;
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.foot-item strong { font-size: 21px; font-weight: 700; }

.note { margin: 24px 0 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* ---------- how ---------- */
.how { margin-bottom: 24px; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.steps li {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s, transform 0.25s;
}

.steps li::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 55%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 198, 54, 0.13), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.steps li:hover::after { left: 140%; }
.steps li:hover { border-color: var(--accent); transform: translateY(-2px); }

.step-n {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
}

.steps h3 { font-size: 23px; font-weight: 700; margin-bottom: 10px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- home mission cta ---------- */
.panel-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  margin-bottom: 24px;
}

.panel-cta::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 60%;
  height: 220%;
  background: linear-gradient(100deg, transparent, rgba(255, 198, 54, 0.07), transparent);
  transform: skewX(-18deg);
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}

.cta-title { font-size: 32px; font-weight: 800; }

.cta-sub {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
}

.cta-sub strong { color: var(--accent); }

.panel-cta .btn { position: relative; }

/* ---------- contract ---------- */
.ca { margin-bottom: 8px; }

.ca-label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

.ca-box {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
  transition: border-color 0.2s;
}

.ca-box:hover { border-color: var(--accent); }

.ca-action { color: var(--accent); font-weight: 700; white-space: nowrap; }

/* ---------- motion ---------- */
.flash { animation: flash 0.9s ease; }

@keyframes flash {
  0% { color: #ffffff; text-shadow: 0 0 18px rgba(255, 198, 54, 0.8); }
  100% { text-shadow: none; }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: none; }

.page[hidden] { display: none; }

.page-enter { animation: pageIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mission::before, .panel-cta::before, .treasury-value,
  .meter-fill::after, .hero-logo, .bar-grow, .bar-wide, .page-enter, .line-draw { animation: none; }
  .btn::after, .btn-sm::after, .stat::after, .steps li::after, .side-nav a::after { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .meter-fill, .split-buy, .split-sell, .hold-bar { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .side {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    width: 268px;
  }

  .side.is-open { transform: none; }

  .shell { margin-left: 0; }

  .topbar {
    justify-content: space-between;
    padding: 12px 18px;
  }

  .burger {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0 11px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    flex: none;
  }

  /* explicit width: Safari forces align-items:center on <button>, which
     collapses stretch-sized empty spans to zero width */
  .burger span {
    display: block;
    width: 100%;
    min-width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
  }

  .topbar-brand { display: block; }
  .topbar-brand img { border-radius: 8px; }

  main { padding: 0 18px 50px; }

  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 60px; }
  .page-head h1 { font-size: 36px; }
  .pace { grid-template-columns: repeat(2, 1fr); }
  .treasury-value { font-size: 50px; }


  /* the full treasury panel is shown on home at this width, so the
     summary call-out would just repeat it */
  .panel-cta { display: none; }

  #home-treasury-slot .mission, #home-calc-slot .calc { margin-bottom: 24px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  main { padding: 0 16px 44px; }

  .page-head { padding: 32px 0 26px; }
  .page-head h1 { font-size: 30px; }

  .hero { padding: 36px 0 40px; }
  .hero-logo { width: 108px; height: 108px; border-radius: 22px; margin-bottom: 24px; }
  .hero h1 { font-size: 48px; }
  .lede { font-size: 21px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; padding: 18px 20px; text-align: center; }

  .stats { gap: 10px; }
  .stat { padding: 18px; }
  .stat-value { font-size: 22px; }

  .card { padding: 20px 18px; border-radius: 15px; }
  .card-title { font-size: 18px; margin-bottom: 18px; }
  .mini-row { grid-template-columns: 1fr; }

  .calc { padding: 24px 18px; border-radius: 16px; }
  .calc h2, .how h2 { font-size: 26px; margin-bottom: 24px; }
  .calc-grid { grid-template-columns: 1fr; gap: 26px; }
  .num { font-size: 21px; }
  .tabs { grid-template-columns: repeat(2, 1fr); margin: 26px 0 22px; }
  .result { padding: 26px 16px; }
  .result-value { font-size: 40px; }
  .calc-foot { grid-template-columns: 1fr; }

  .mission { padding: 24px 18px; border-radius: 16px; }
  .treasury { gap: 20px; margin-bottom: 26px; }
  .treasury-value { font-size: 40px; }
  .treasury-usd { font-size: 16px; }
  .treasury-goal { text-align: left; }
  .treasury-goal-value { font-size: 24px; }
  .meter-track { height: 22px; }
  .meter-pct { font-size: 23px; }
  .meter-remain { font-size: 14px; }
  #m-scale span:nth-child(2), #m-scale span:nth-child(4) { display: none; }
  .pace-item strong { font-size: 18px; }

  .panel-cta { padding: 24px 18px; }
  .cta-title { font-size: 25px; }
  .cta-sub { font-size: 16px; }

  .wallet-head { flex-direction: column; gap: 12px; }
  .wallet-total { text-align: left; }
  .hold { grid-template-columns: 1fr auto; padding: 13px 12px; row-gap: 4px; }
  .hold-chg { grid-column: 2; min-width: 0; }
  .hold-amt { font-size: 15px; }

  .ca-box { flex-direction: column; align-items: flex-start; gap: 12px; font-size: 14px; }

  .split-legend { flex-direction: column; gap: 10px; }

}

/* ---------- ztrategy additions ---------- */
h1, h2, h3 { font-weight: 800; }

.stat-value, .result-value, .treasury-value, .meter-pct, .foot-item strong,
.mini strong, .pace-item strong, .kv-row strong, .wallet-total strong {
  font-variant-numeric: tabular-nums;
}

.hero { position: relative; }

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 20px;
  width: 520px;
  max-width: 100%;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 198, 54, 0.16), transparent);
  pointer-events: none;
}

.hero > * { position: relative; }

.topbar-brand {
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-right: auto;
}

[data-hidden-link] { display: none !important; }

/* zdash head */
.zhead {
  display: flex;
  align-items: center;
  gap: 22px;
}

.zhead img { width: 64px; height: 64px; flex: none; }
.zhead .eyebrow { margin-bottom: 6px; }

.zhead-price {
  color: var(--accent);
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

/* card header with controls */
.card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin-bottom: 22px;
}

.card-bar .card-title { margin-bottom: 0; }

.seg {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.seg button {
  min-width: 62px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.seg button:hover { color: var(--text); }
.seg button.is-active { background: var(--accent); color: var(--ink); }

/* line chart */
.line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.line-draw {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: drawLine 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes drawLine { to { stroke-dashoffset: 0; } }

.line-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.line-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }

.chart .axis-text, .chart .axis-text-val { font-size: 15px; }

/* 24h range */
.range-bar { padding-top: 12px; }

.range-track {
  position: relative;
  height: 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-down), var(--accent), var(--c-up));
}

.range-track i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  border: 5px solid var(--bg);
  transform: translate(-50%, -50%);
  transition: left 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.wallet-empty {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .topbar-brand { display: flex; }
}

@media (max-width: 640px) {
  .zhead { gap: 16px; }
  .zhead img { width: 52px; height: 52px; }
  .zhead-price { display: block; margin-left: 0; margin-top: 4px; font-size: 26px; }
  .card-bar { flex-direction: column; align-items: stretch; }
  .seg { display: grid; grid-template-columns: repeat(4, 1fr); }
  .seg button { min-width: 0; }
  .stats-4 .stat-value { font-size: 21px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
}

.val-up { fill: var(--up); }
.val-down { fill: var(--down); }
.card-note.up { color: var(--up); }
.card-note.down { color: var(--down); }
