:root {
  --bg: #eef7f6;
  --surface: #ffffff;
  --surface-soft: #e2f0ee;
  --ink: #08151f;
  --ink-soft: #3f5f60;
  --ink-faint: #719493;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.12);
  --line: #c9dbd9;
  --kelp: #16794f;
  --kelp-soft: rgba(22, 121, 79, 0.13);
  --coral: #b8492d;
  --coral-soft: rgba(184, 73, 45, 0.13);
  --shadow: 0 1px 2px rgba(8, 21, 31, 0.06), 0 8px 24px -12px rgba(8, 21, 31, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060b14;
    --surface: #0d1826;
    --surface-soft: #12202f;
    --ink: #f2fbfa;
    --ink-soft: #8fb4b0;
    --ink-faint: #5c7d7a;
    --accent: #33f0d1;
    --accent-strong: #7ef7e3;
    --accent-soft: rgba(51, 240, 209, 0.16);
    --line: #1c2f3d;
    --kelp: #3ddc7a;
    --kelp-soft: rgba(61, 220, 122, 0.16);
    --coral: #e0836a;
    --coral-soft: rgba(224, 131, 106, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #060b14;
  --surface: #0d1826;
  --surface-soft: #12202f;
  --ink: #f2fbfa;
  --ink-soft: #8fb4b0;
  --ink-faint: #5c7d7a;
  --accent: #33f0d1;
  --accent-strong: #7ef7e3;
  --accent-soft: rgba(51, 240, 209, 0.16);
  --line: #1c2f3d;
  --kelp: #3ddc7a;
  --kelp-soft: rgba(61, 220, 122, 0.16);
  --coral: #e0836a;
  --coral-soft: rgba(224, 131, 106, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3 { font-family: "Unbounded", "Segoe UI", sans-serif; font-weight: 700; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-mark { flex: none; }
.navlinks { display: flex; align-items: center; gap: 24px; font-size: 0.92rem; color: var(--ink-soft); flex-wrap: wrap; }
.navlinks a { text-decoration: none; }
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--ink); }
.navcta { display: flex; align-items: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 7px; font-weight: 600; font-size: 0.92rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--accent); color: #1c1300; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-warn { background: var(--coral-soft); color: var(--coral); }
.btn-warn:hover { transform: translateY(-1px); }
.btn-small { padding: 8px 12px; font-size: 0.82rem; }

.wallet-slot { display: inline-flex; }
.wallet-row { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wallet-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--surface); font-family: "IBM Plex Mono", monospace; font-size: 0.85rem;
}
.wallet-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--kelp); flex: none; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1, .page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.35rem); line-height: 1.08; letter-spacing: -0.01em; }
.hero h1 em, .page-hero h1 em { font-style: normal; color: var(--accent-strong); }
.hero p.lead, .page-hero p.lead { margin: 22px 0 0; max-width: 62ch; color: var(--ink-soft); font-size: 1.08rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

.status-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-family: "IBM Plex Mono", monospace; font-size: 0.76rem; color: var(--ink-soft);
  background: var(--surface);
}
.chip b { color: var(--ink); font-weight: 600; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--kelp); }
.chip .dot.amber { background: var(--accent); }

/* ---------- page hero (sub-pages) ---------- */
.page-hero { padding: 56px 0 16px; }
.page-hero .wrap { max-width: 860px; }

/* ---------- tide chart ---------- */
.tide-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 22px 16px; box-shadow: var(--shadow);
}
.tide-card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.tide-card-head h3 { font-size: 0.98rem; font-weight: 600; }
.tide-card-head span { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--ink-faint); }
.tide-svg { width: 100%; height: auto; display: block; }
.tide-svg text { font-family: "IBM Plex Mono", monospace; }
.tide-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-size: 0.76rem; color: var(--ink-soft); }
.tide-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tide-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- sections ---------- */
section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; letter-spacing: -0.01em; }
.section-head p { margin: 8px 0 0; color: var(--ink-soft); max-width: 62ch; }
.tag {
  font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap;
}

/* ---------- feature teasers (home) ---------- */
.teasers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .teasers { grid-template-columns: 1fr; } }
.teaser {
  display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); padding: 24px; transition: border-color 0.15s ease, transform 0.15s ease;
}
.teaser:hover { border-color: var(--accent); transform: translateY(-2px); }
.teaser .eyebrow { margin-bottom: 10px; }
.teaser h3 { font-size: 1.2rem; margin-bottom: 8px; }
.teaser p { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 14px; }
.teaser .teaser-link { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--accent-strong); font-weight: 600; }

/* ---------- session guard ---------- */
.guard-live {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); margin-bottom: 24px;
}
.guard-live-badge { display: flex; align-items: center; gap: 12px; }
.guard-live-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.guard-live-badge.open .dot { background: var(--kelp); box-shadow: 0 0 0 4px var(--kelp-soft); }
.guard-live-badge.closed .dot { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }
.guard-live-state { font-weight: 700; font-size: 1.05rem; }
.guard-live-time { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--ink-faint); margin-top: 2px; }
.guard-live-note { color: var(--ink-faint); font-size: 0.84rem; max-width: 40ch; margin: 0 0 0 auto; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare-col { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: var(--surface); }
.compare-col.accent { border-color: var(--accent); background: var(--accent-soft); }
.compare-col h4 { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; margin: 0 0 16px; color: var(--ink-soft); }
.compare-col.accent h4 { color: var(--accent-strong); }
.compare-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; padding: 9px 0; border-top: 1px solid var(--line); }
.compare-row:first-of-type { border-top: none; }
.compare-col.accent .compare-row { border-top-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.compare-row .x { color: var(--ink-faint); flex: none; }
.compare-row .check { color: var(--kelp); flex: none; font-weight: 700; }

.spec-list { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; margin-top: 24px; }
.spec-row { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.spec-row:last-child { border-bottom: none; }
@media (max-width: 640px) { .spec-row { grid-template-columns: 1fr; gap: 4px; } }
.spec-row dt { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }
.spec-row dd { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.spec-row dd code { font-family: "IBM Plex Mono", monospace; font-size: 0.88em; background: var(--surface-soft); padding: 1px 6px; border-radius: 4px; color: var(--ink); }

/* ---------- sounding line ---------- */
.sounding-track {
  position: relative; height: 84px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); margin-top: 6px; touch-action: none;
}
.sounding-center-line {
  /* current price sits at 0%, mapped onto a -60%..+150% track: (0-(-60))/210 = 28.57% */
  position: absolute; left: 28.57%; top: 10px; bottom: 10px; width: 1px;
  background: var(--ink-faint); opacity: 0.6;
}
.sounding-band {
  position: absolute; top: 10px; bottom: 10px; background: var(--accent-soft);
  border-left: 2px solid var(--accent); border-right: 2px solid var(--accent);
}
.sounding-handle {
  position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); box-shadow: var(--shadow);
  transform: translate(-50%, -50%); cursor: ew-resize; padding: 0;
}
.sounding-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sounding-scale { display: flex; justify-content: space-between; margin-top: 8px; font-family: "IBM Plex Mono", monospace; font-size: 0.74rem; color: var(--ink-faint); }
.sounding-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 640px) { .sounding-stats { grid-template-columns: 1fr; } }
.sounding-stats .stat { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 18px 20px; }
.sounding-fineprint { color: var(--ink-faint); font-size: 0.8rem; margin-top: 16px; max-width: 68ch; }

/* ---------- control board ---------- */
.board { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.board-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .board-strip { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(4n) { border-right: none; }
@media (max-width: 720px) { .stat:nth-child(2n) { border-right: none !important; } }
.stat-label { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.stat-value { font-family: "IBM Plex Mono", monospace; font-size: 1.9rem; font-weight: 600; margin-top: 8px; color: var(--ink); }
.stat-note { font-size: 0.8rem; color: var(--ink-faint); margin-top: 4px; }

/* ---------- markets table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
thead th {
  text-align: left; padding: 14px 18px; font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--line); font-weight: 500;
}
tbody td { padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 0.94rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-soft); }
.pair { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.pair-icons { display: flex; }
.coin { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); display: flex; align-items: center; justify-content: center; font-family: "IBM Plex Mono", monospace; font-size: 0.6rem; font-weight: 700; color: #fff; }
.coin.c2 { margin-left: -8px; }
.type-pill { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; padding: 3px 9px; border-radius: 5px; background: var(--surface-soft); color: var(--ink-soft); }
.range-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.range-pill.in { background: var(--kelp-soft); color: var(--kelp); }
.range-pill.out { background: var(--coral-soft); color: var(--coral); }
.range-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.num { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }

/* ---------- how it works ---------- */
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 780px) { .phases { grid-template-columns: 1fr; } }
.phase { border: 1px solid var(--line); border-radius: 12px; padding: 26px; background: var(--surface); position: relative; }
.phase-num { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--accent-strong); }
.phase h3 { font-size: 1.15rem; margin-top: 10px; }
.phase p { color: var(--ink-soft); margin: 10px 0 0; font-size: 0.94rem; }
.phase-tide { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }

/* ---------- docs ---------- */
.docs-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 44px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.docs-toc a { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; color: var(--ink-soft); text-decoration: none; }
.docs-toc a:hover { color: var(--accent-strong); }
.docs-section { padding: 0 0 44px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.docs-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.docs-section h2 { font-size: 1.3rem; margin-bottom: 14px; scroll-margin-top: 90px; }
.docs-section p { color: var(--ink-soft); font-size: 0.94rem; max-width: 72ch; }
.docs-section p + p { margin-top: 10px; }
.docs-section code { font-family: "IBM Plex Mono", monospace; font-size: 0.88em; background: var(--surface-soft); padding: 1px 6px; border-radius: 4px; color: var(--ink); }

/* ---------- disclaimer + footer ---------- */
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 16px 18px; font-size: 0.86rem; color: var(--ink-soft);
}
.notice svg { flex: none; margin-top: 2px; color: var(--ink-faint); }
footer { border-top: 1px solid var(--line); padding: 40px 0 50px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-brand { max-width: 34ch; }
.foot-brand h3 { font-size: 1.05rem; }
.foot-brand p { color: var(--ink-faint); font-size: 0.85rem; margin-top: 10px; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col h4 { font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px; }
.foot-col a { display: block; text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 9px; }
.foot-col a:hover { color: var(--ink); }
.foot-legal { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--ink-faint); }

@media (prefers-reduced-motion: no-preference) {
  .fade-up { animation: fadeUp 0.6s ease both; }
  .fade-up.d1 { animation-delay: 0.08s; }
  .fade-up.d2 { animation-delay: 0.16s; }
  .fade-up.d3 { animation-delay: 0.24s; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
}
