/* ============================================================
   StatStation - site.css
   Design tokens + components. Mirrors src/reports/canvas-style.ts.
   Self-sufficient: pages render fully even without Tailwind.
   ============================================================ */
:root{
  --bg:#0b1622; --surface:#0e1d2c; --raised:#13263a; --border:#1c2b3a; --code:#0a1420;
  --text:#dfe7ec; --muted:#7c93a6; --deemph:#3a5067;
  --gold:#f5c518; --on-gold:#3a2d00; --teal:#4ecdc4;
  --pos:#a5d6a7; --neg:#ef5350; --lilac:#c792ea; --blurple:#5865f2;
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:22px; --r-pill:999px;
  --shadow-card:0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px -18px rgba(0,0,0,.75);
  --shadow-cta:0 8px 24px -10px rgba(245,197,24,.45);
  --ring:0 0 0 3px rgba(245,197,24,.35);
  --sans:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,'SF Mono',Menlo,monospace;
}
*{box-sizing:border-box}
/* Lets height/block-size transition to `auto` (used by the FAQ accordion). Ignored where unsupported. */
:root{interpolate-size:allow-keywords}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%}
body{margin:0; background:var(--bg); color:var(--text); font-family:var(--sans);
  font-size:16px; line-height:1.65; -webkit-font-smoothing:antialiased}
img,svg{max-width:100%}
a{color:var(--gold); text-decoration:none}
h1,h2,h3,h4{margin:0; line-height:1.15; font-weight:800; letter-spacing:-.01em}
code,.mono{font-family:var(--mono)}
.container{max-width:1120px; margin:0 auto; padding:0 24px}
.center{text-align:center}
.muted{color:var(--muted)}

/* signature: rail-tick + eyebrow */
.eyebrow{display:inline-flex; align-items:center; gap:9px; font-family:var(--mono);
  font-size:12px; font-weight:500; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); margin-bottom:14px}
.eyebrow::before{content:""; width:22px; height:2px; background:var(--gold); border-radius:2px}

/* ---------- NAV ---------- */
.nav{position:sticky; top:0; z-index:50; background:rgba(11,22,34,.82);
  backdrop-filter:blur(10px); border-bottom:1px solid var(--border)}
.nav-inner{display:flex; align-items:center; gap:20px; height:62px}
/* No `gap` here: "Stat" and <span>Station</span> are separate flex items, so a gap would split the
   wordmark into "Stat Station". Space the mark with a margin instead. */
.brand{display:flex; align-items:center; font-weight:800; color:var(--text); font-size:18px}
.brand .g{color:var(--gold)}
.brand svg,.brand img{border-radius:8px; flex:none; margin-right:10px}
.nav-links{display:flex; gap:2px; margin-left:auto}
.nav-links a{color:var(--muted); font-size:14px; font-weight:600; padding:8px 12px; border-radius:var(--r-pill); transition:.15s}
.nav-links a:hover{color:var(--text); background:var(--raised)}
.nav-cta{margin-left:8px}
@media(max-width:820px){.nav-links{display:none}}

/* ---------- BUTTONS ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:9px;
  font-family:var(--sans); font-weight:700; font-size:15px; border-radius:var(--r-md);
  padding:11px 18px; border:1.5px solid transparent; cursor:pointer; transition:.15s; line-height:1; white-space:nowrap}
.btn:focus-visible{outline:none; box-shadow:var(--ring)}
.btn-primary{background:var(--gold); color:var(--on-gold); box-shadow:var(--shadow-cta)}
.btn-primary:hover{filter:brightness(1.06); transform:translateY(-1px)}
.btn-secondary{background:transparent; color:var(--gold); border-color:var(--gold)}
.btn-secondary:hover{background:rgba(245,197,24,.08)}
.btn-ghost{background:transparent; color:var(--gold); border-color:transparent; padding:11px 8px}
.btn-ghost:hover{text-decoration:underline}
.btn-sm{padding:8px 13px; font-size:13px}
.btn-lg{padding:14px 24px; font-size:16px}
.btn svg{flex:none}

/* ---------- BADGES / CHIPS ---------- */
.badge{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700;
  border-radius:var(--r-sm); padding:3px 7px; letter-spacing:.02em}
.badge-app{background:var(--blurple); color:#fff}
.badge-free{background:rgba(78,205,196,.14); color:var(--teal); border:1px solid rgba(78,205,196,.3)}
.badge-gold{background:rgba(245,197,24,.14); color:var(--gold); border:1px solid rgba(245,197,24,.32)}
.chip{display:inline-flex; align-items:center; gap:5px; font-family:var(--mono); font-size:12px; font-weight:500; border-radius:var(--r-pill); padding:3px 10px}
.chip-pos{background:rgba(165,214,167,.12); color:var(--pos)}
.chip-neg{background:rgba(239,83,80,.12); color:var(--neg)}

/* ---------- SECTIONS / GRID / CARDS ---------- */
.section{padding:72px 0; border-top:1px solid var(--border)}
.section h2{font-size:clamp(26px,4.4vw,36px)}
.lead{color:var(--muted); margin:12px 0 34px; max-width:720px; font-size:17px}
.grid{display:grid; gap:16px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:900px){.g3,.g4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.g2,.g3,.g4{grid-template-columns:1fr}}
.card{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:22px; box-shadow:var(--shadow-card)}
.card h3{font-size:18px; margin-bottom:8px}
.card h4{font-size:16px; margin-bottom:6px}
.card p{color:var(--muted); font-size:14px; margin:0}
.icon-badge{width:40px; height:40px; border-radius:11px; background:rgba(245,197,24,.12); display:flex; align-items:center; justify-content:center; flex:none; margin-bottom:14px}
.icon-badge.teal{background:rgba(78,205,196,.12)}

/* ---------- HERO ---------- */
.hero{padding:80px 0 40px}
.hero-grid{display:grid; grid-template-columns:1fr; gap:44px; align-items:center}
@media(min-width:940px){.hero-grid{grid-template-columns:1.05fr .95fr}}
.hero h1{font-size:clamp(34px,5.4vw,54px); line-height:1.06; letter-spacing:-.02em}
.hero h1 .g{color:var(--gold)}
.hero .sub{color:var(--muted); font-size:19px; margin:18px 0 26px; max-width:560px}
.hero .cta-row{display:flex; gap:12px; flex-wrap:wrap}
.hero .trust{margin-top:22px; color:var(--muted); font-size:13px; display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.hero .trust b{color:var(--teal); font-weight:600}

/* ---------- DISCORD MESSAGE MOCK ---------- */
.dmsg{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg);
  padding:16px 18px; display:flex; gap:14px; box-shadow:var(--shadow-card)}
.dmsg .av{width:44px; height:44px; border-radius:50%; flex:none; overflow:hidden; box-shadow:0 0 0 1px var(--border)}
.dmsg .body{min-width:0; flex:1}
.dmsg .head{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.dmsg .who{font-weight:700; color:#fff}
.dmsg .ts{font-size:12px; color:var(--muted)}
.embed{margin-top:10px; background:var(--code); border-left:3px solid var(--gold); border-radius:6px; padding:14px 16px}
.embed.teal{border-left-color:var(--teal)}
.embed .etitle{font-weight:700; font-size:14px; color:var(--text)}
.embed .esub{font-size:13px; color:var(--muted); margin-top:3px}
.codeblock{background:var(--code); border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin-top:10px; overflow:auto}
.codeblock pre{margin:0; font-family:var(--mono); font-size:12.5px; line-height:1.6; color:var(--text)}
.pos{color:var(--pos)} .neg{color:var(--neg)} .lilac{color:var(--lilac)} .z{color:var(--deemph)} .gold{color:var(--gold)} .teal{color:var(--teal)}

/* ---------- DATA TABLES ---------- */
.dtable{width:100%; border-collapse:collapse; font-family:var(--mono); font-size:12.5px}
.dtable th{text-align:left; color:var(--muted); font-weight:500; padding:7px 10px; border-bottom:1px solid var(--border); background:var(--raised)}
.dtable td{padding:6px 10px; border-bottom:1px solid var(--border); white-space:nowrap}
.dtable td.num,.dtable th.num{text-align:right}
.dtable tr:last-child td{border-bottom:0}
.you{background:rgba(245,197,24,.09); box-shadow:inset 3px 0 0 var(--gold)}
.overtake{font-family:var(--mono); font-size:12.5px; margin-top:12px; display:flex; flex-direction:column; gap:6px}
.htable{width:100%; border-collapse:collapse; font-family:var(--mono); font-size:11px}
.htable th,.htable td{padding:5px 7px; text-align:right; border-bottom:1px solid var(--border)}
.htable th:first-child,.htable td:first-child{text-align:left; color:var(--text); position:sticky; left:0; background:var(--surface)}
.htable th{color:var(--muted); font-weight:500; background:var(--raised)}
.legend{display:flex; gap:16px; flex-wrap:wrap; margin-top:14px; font-size:12px; color:var(--muted)}
.legend span{display:inline-flex; align-items:center; gap:6px}
.legend b{width:11px; height:11px; border-radius:3px; display:inline-block}
.chartbox{background:var(--bg); border:1px solid var(--border); border-radius:var(--r-md); padding:14px}

/* ---------- STEPS (real sequence -> numbered) ---------- */
.steps{counter-reset:step; display:grid; gap:16px; grid-template-columns:repeat(3,1fr)}
@media(max-width:800px){.steps{grid-template-columns:1fr}}
.step{position:relative; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px 22px 22px}
.step::before{counter-increment:step; content:"0" counter(step); font-family:var(--mono); font-size:13px; color:var(--gold); font-weight:700; letter-spacing:.1em}
.step h3{margin:12px 0 8px; font-size:18px}
.step p{color:var(--muted); font-size:14px; margin:0}
.cmd{background:var(--code); border:1px solid var(--border); border-radius:10px; margin-top:14px; overflow:hidden; font-family:var(--mono); font-size:12.5px}
.cmd .line{padding:9px 12px; color:var(--text)}
.cmd .line .slash{color:var(--gold)}
.cmd .line .arg{color:var(--teal)}
.cmd .ac{border-top:1px solid var(--border); background:var(--surface)}
.cmd .ac-row{padding:7px 12px; color:var(--muted); display:flex; justify-content:space-between; gap:12px}
.cmd .ac-row.sel{background:rgba(245,197,24,.08); color:var(--text)}

/* ---------- PRICING ---------- */
.price{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; position:relative; display:flex; flex-direction:column}
.price.feat{border-color:rgba(245,197,24,.45); box-shadow:0 0 0 1px rgba(245,197,24,.15), var(--shadow-card)}
.price .plan{font-family:var(--mono); font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted)}
.price .amt{font-size:40px; font-weight:800; margin:10px 0 2px; letter-spacing:-.02em}
.price .amt span{font-size:14px; font-weight:500; color:var(--muted)}
.price .cap{color:var(--text); font-size:14px; margin:10px 0 0; font-weight:600}
.price ul{list-style:none; padding:0; margin:16px 0 20px; font-size:14px; color:var(--muted); flex:1}
.price li{display:flex; gap:8px; padding:5px 0}
.price li::before{content:"›"; color:var(--gold); font-weight:700}
.price .popular{position:absolute; top:16px; right:16px}

/* ---------- FAQ ---------- */
.faq{border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; background:var(--surface)}
.faq details{border-bottom:1px solid var(--border)}
.faq details:last-child{border-bottom:0}
.faq summary{list-style:none; cursor:pointer; padding:18px 20px; font-weight:600; display:flex;
  justify-content:space-between; align-items:center; gap:16px; transition:background .2s ease, color .2s ease}
.faq summary::-webkit-details-marker{display:none}
.faq summary:hover{background:rgba(245,197,24,.05); color:var(--gold)}
.faq details[open] summary{color:var(--gold)}
/* "+" rotates 45° into an "×"-like "−" tick; one glyph, so the swap can be animated. */
.faq summary::after{content:"+"; color:var(--gold); font-size:22px; font-weight:400; line-height:1; flex:none;
  transition:transform .28s cubic-bezier(.4,0,.2,1)}
.faq details[open] summary::after{transform:rotate(135deg)}
.faq .ans{padding:0 20px 20px; color:var(--muted); font-size:15px}

/* Height animation: modern browsers can transition to `auto` via ::details-content + interpolate-size.
   Elsewhere the panel just snaps open and only the fade-in below plays — progressive enhancement. */
@supports selector(::details-content){
  .faq details::details-content{
    block-size:0; overflow:hidden;
    transition:block-size .3s cubic-bezier(.4,0,.2,1), content-visibility .3s allow-discrete;
  }
  .faq details[open]::details-content{block-size:auto}
}
.faq details[open] .ans{animation:faq-in .3s cubic-bezier(.4,0,.2,1) both}
@keyframes faq-in{from{opacity:0; transform:translateY(-6px)} to{opacity:1; transform:none}}

@media (prefers-reduced-motion:reduce){
  .faq summary::after{transition:none}
  .faq details[open] .ans{animation:none}
  @supports selector(::details-content){ .faq details::details-content{transition:none} }
}

/* ---------- NOTES ---------- */
.note{background:rgba(78,205,196,.06); border:1px solid rgba(78,205,196,.22); border-radius:var(--r-md); padding:16px 18px; color:var(--text); font-size:14px}
.note.warn{background:rgba(239,83,80,.06); border-color:rgba(239,83,80,.25)}
.note b{color:var(--text)}
.kv{display:grid; grid-template-columns:auto 1fr; gap:8px 18px; font-family:var(--mono); font-size:13px}
.kv dt{color:var(--gold)} .kv dd{margin:0; color:var(--muted)}

/* ---------- CTA BAND ---------- */
.cta-band{background:linear-gradient(180deg,#0e1d2c,#0b1622); border:1px solid var(--border); border-radius:var(--r-xl); padding:48px 32px; text-align:center; box-shadow:var(--shadow-card)}
.cta-band h2{font-size:clamp(24px,4vw,34px)}
.cta-band p{color:var(--muted); margin:12px auto 26px; max-width:520px}

/* ---------- FOOTER ---------- */
.footer{border-top:1px solid var(--border); padding:48px 0 60px; margin-top:16px}
.footer-grid{display:flex; justify-content:space-between; gap:28px; flex-wrap:wrap; align-items:flex-start}
.footer .brand{margin-bottom:12px}
.footer .tag{color:var(--muted); font-size:13px; max-width:300px}
.footer nav{display:flex; gap:22px; flex-wrap:wrap}
.footer nav a{color:var(--muted); font-size:14px; font-weight:600}
.footer nav a:hover{color:var(--text)}
.footer .fine{color:var(--deemph); font-size:12px; margin-top:26px; line-height:1.6; max-width:640px}

/* ---------- LEGAL PROSE ---------- */
.prose{max-width:760px; margin:0 auto; padding:56px 0}
.prose h1{font-size:clamp(30px,5vw,40px); margin-bottom:8px}
.prose .updated{color:var(--muted); font-size:13px; font-family:var(--mono); margin-bottom:36px}
.prose h2{font-size:22px; margin:36px 0 12px; color:var(--text)}
.prose h3{font-size:17px; margin:24px 0 8px; color:var(--text)}
.prose p{color:var(--muted); margin:0 0 14px}
.prose ul{color:var(--muted); margin:0 0 16px; padding-left:20px}
.prose li{margin:6px 0}
.prose a{color:var(--gold)}
.prose strong{color:var(--text)}
.prose .note{margin:20px 0}

/* ---------- 404 ---------- */
.err{min-height:70vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:60px 24px}
.err .code{font-family:var(--mono); font-size:80px; font-weight:700; color:var(--gold); line-height:1}
.err h1{font-size:26px; margin:12px 0 8px}
.err p{color:var(--muted); margin:0 0 24px; max-width:420px}

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