/* One stylesheet, no framework, no web fonts. Light and dark follow the visitor's system. */
:root {
  --bg: #f7f8fa; --panel: #ffffff; --ink: #0f172a; --muted: #5b6475; --line: #e3e7ee;
  --accent: #16a34a; --accent-ink: #ffffff; --accent-soft: #e8f7ee; --warn-bg: #fff7e0; --warn-ink: #7a5300;
  --win: #15803d; --loss: #b91c1c; --flat: #5b6475; --code-bg: #0f172a; --code-ink: #d6f5e0;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --panel: #111a2e; --ink: #e6ebf5; --muted: #9aa5b8; --line: #1f2a44;
    --accent: #22c55e; --accent-ink: #06240f; --accent-soft: #0f2a1b; --warn-bg: #2a2206; --warn-ink: #f5d27a;
    --win: #4ade80; --loss: #f87171; --flat: #9aa5b8; --code-bg: #060b16; --code-ink: #b9f3cd;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin: .2em 0 .3em; }
h2 { font-size: 1.5rem; margin: 2em 0 .6em; }
h3 { font-size: 1.05rem; margin: 0 0 .4em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--muted); }
.fine { font-size: .85rem; color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--accent); font-weight: 600; margin: 0; }

.banner { background: var(--warn-bg); color: var(--warn-ink); text-align: center; padding: 8px 16px; font-size: .9rem; }
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent);
  box-shadow: inset 0 0 0 5px color-mix(in srgb, var(--accent) 60%, white); }
nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; border: 1px solid var(--accent); cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn.disabled { opacity: .55; cursor: default; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.hero { padding: 64px 0 32px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--accent); }
/* grid children default to min-width:auto, so the signal's <pre> would force the column wider than a
   phone; let it scroll inside its own box instead */
.hero-grid > *, .two > *, .grid4 > *, .plans > * { min-width: 0; }
.hero-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.caption { font-size: .85rem; color: var(--muted); margin: 10px 4px 0; }
.signal { background: var(--code-bg); color: var(--code-ink); border-radius: 10px; padding: 18px; margin: 0;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.steps { list-style: none; counter-reset: s; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px 16px 64px; position: relative; display: grid; }
.steps li::before { content: counter(s); position: absolute; left: 20px; top: 16px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }
.steps span { color: var(--muted); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.fields dt { font-weight: 700; margin-top: 12px; }
.fields dd { margin: 2px 0 0; color: var(--muted); }
.rule li { margin: 6px 0; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 24px; margin: 24px auto; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan ul { padding-left: 18px; color: var(--muted); flex: 1; }
.price { font-size: 2.4rem; font-weight: 800; margin: .2em 0; }
.price span { font-size: 1rem; font-weight: 400; color: var(--muted); margin-left: 6px; }

details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }
.prose p, .prose li { color: var(--ink); }

.summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; }
.stat b { display: block; font-size: 1.3rem; }
.stat span { font-size: .8rem; color: var(--muted); }
.stat.ok b { color: var(--win); } .stat.bad b { color: var(--loss); }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 8px 0 12px; }
.filters #csv { margin-left: auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.win { color: var(--win); font-weight: 600; } .loss { color: var(--loss); font-weight: 600; } .flat, .pending { color: var(--flat); }

footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-links a { color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
  .hero-grid, .two { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  nav { display: none; }
  .row { justify-content: space-between; }
}
@media (max-width: 560px) {
  .grid4, .plans { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .signal { font-size: 11.5px; padding: 14px; }
}
