:root {
  color-scheme: light dark;
  --bg: #f6f5f0;
  --surface: #ffffff;
  --surface-alt: #eceae2;
  --text: #1c1a17;
  --muted: #57534c;
  --border: #d6d2c6;
  --primary: #0b6b62;
  --primary-strong: #08544d;
  --on-primary: #ffffff;
  --accent: #9a5b00;
  --banner-bg: #fff1c2;
  --banner-text: #3d2c00;
  --code-bg: #efece3;
  --loss: #b42318;
  --gain: #0b6b62;
  --focus: #1d4ed8;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 6%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1315;
    --surface: #141d20;
    --surface-alt: #10181b;
    --text: #e8ede9;
    --muted: #a9b5b0;
    --border: #2a383c;
    --primary: #3fd0bd;
    --primary-strong: #74e2d3;
    --on-primary: #06201d;
    --accent: #f5b544;
    --banner-bg: #3a2c05;
    --banner-text: #fbe7b0;
    --code-bg: #1b272a;
    --loss: #ff8a80;
    --gain: #3fd0bd;
    --focus: #93c5fd;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--primary-strong); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(48rem, 100% - 2.5rem); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 1rem; }

.banner {
  background: var(--banner-bg);
  color: var(--banner-text);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand .logo { color: var(--primary); flex: none; }

.main-nav { margin-left: auto; min-width: 0; }
.main-nav ul { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--surface-alt); color: var(--text); }
.main-nav a.btn { color: var(--on-primary); margin-left: 0.4rem; }
.main-nav a.btn:hover { background: var(--primary-strong); color: var(--on-primary); }

.btn {
  display: inline-block;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-small { padding: 0.4rem 0.95rem; }
.btn-primary, .btn-small { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-secondary { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-secondary:hover { background: var(--primary); color: var(--on-primary); }
.btn-ghost { color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero { padding: clamp(3rem, 2rem + 5vw, 6rem) 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.hero-card-title { font-family: var(--font); font-weight: 700; margin-bottom: 1rem; }
.flow { list-style: none; margin: 0; padding: 0; counter-reset: flow; }
.flow li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-top: 1px dashed var(--border);
}
.flow li:first-child { border-top: 0; }
.flow-key { color: var(--primary); font-weight: 700; }

.live { padding: 0 0 2.5rem; }
.section-label { font-size: 0.95rem; color: var(--muted); font-weight: 600; margin-bottom: 0.75rem; }
.stats-strip { width: 100%; border-collapse: separate; border-spacing: 0; margin: 0 0 0.75rem; }
.stats-strip tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 0.75rem; }
.stats-strip tr {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.stats-strip th { font-weight: 500; color: var(--muted); font-size: 0.9rem; text-align: left; border: 0; padding: 0; }
.stats-strip td { font-size: 1.45rem; font-weight: 700; border: 0; padding: 0; overflow-wrap: anywhere; }
.stats-strip td a { font-size: 0.95rem; font-weight: 600; }
#live-signals-none, #live-unavailable, #live-anchor td { font-size: 1.05rem; }

.section { padding: clamp(3rem, 2rem + 3vw, 5rem) 0; }
.section-alt { background: var(--surface-alt); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.card .card-link { margin-top: auto; font-weight: 600; }
.routes { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; }
.copy-label { margin-bottom: 0.35rem; font-size: 0.85rem; }
.copy {
  display: block;
  padding: 0.65rem 0.8rem;
  margin-bottom: 1rem;
  border: 1px dashed var(--primary);
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
}

.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem; }
.steps li { counter-increment: step; position: relative; padding: 3.2rem 1.2rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  font-size: 0.9rem;
}
.steps p { color: var(--muted); margin: 0; }

.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.link-list { padding-left: 1.1rem; }
.link-list li { margin-bottom: 0.5rem; }
.wallets { list-style: none; padding: 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; margin: 1rem 0; }
.prices { width: 100%; background: var(--surface); border-radius: var(--radius); }
caption { text-align: left; font-weight: 700; padding: 0 0 0.5rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
thead th { font-size: 0.85rem; color: var(--muted); }

details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 1.2rem; margin-bottom: 0.75rem; }
summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style-position: inside; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; }
details p { color: var(--muted); }

.prose { padding: 2.5rem 0 3.5rem; max-width: 52rem; }
.prose h2 { margin-top: 2rem; }
.prose li { margin-bottom: 0.35rem; }

td.loss { color: var(--loss); }
td.gain { color: var(--gain); }
svg.curve { max-width: 100%; height: auto; }
svg.curve .frame { fill: none; stroke: var(--border); }
svg.curve .zero { stroke: var(--muted); stroke-dasharray: 4 4; }
svg.curve .equity { fill: none; stroke: var(--primary); stroke-width: 2; }
.stats th { font-weight: 500; }

.note, .draft { font-size: 0.85rem; color: var(--muted); }

input[type="email"] { font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
button { font: inherit; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 999px; border: 2px solid var(--primary); background: var(--primary); color: var(--on-primary); cursor: pointer; }
button:hover { background: var(--primary-strong); }

.site-footer { border-top: 1px solid var(--border); padding: 3rem 0 2rem; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-about .disclaimer { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
.footer-title { font-weight: 700; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }

@media (max-width: 52rem) {
  .hero-grid, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .header-row { flex-wrap: wrap; gap: 0.25rem; padding: 0.5rem 0; }
  .site-header { position: static; }
  .main-nav { margin-left: 0; width: 100%; }
  .main-nav ul { flex-wrap: wrap; padding-bottom: 0.25rem; }
  .main-nav a { padding: 0.4rem 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .btn, .card, .panel, details, .stats-strip tr { border: 1px solid CanvasText; }
}

@media print {
  .site-header, .banner, .cta-row, .skip-link { position: static; }
  .site-header { backdrop-filter: none; }
}
