:root {
  --bg: #0d0f13;
  --surface: #151820;
  --surface-2: #1c2029;
  --line: #262b36;
  --text: #e9ecf2;
  --muted: #9aa3b2;
  --accent: #2563eb; /* buttons/selection: 5.2:1 with white text (WCAG AA) */
  --accent-2: #7aa4ff;
  --ok: #3ccf8e;
  --radius: 14px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent-2); }
a:hover { color: #fff; }
img, svg { max-width: 100%; height: auto; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(13, 15, 19, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.nav { margin-left: auto; display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--accent-2); background: rgba(61, 123, 255, .12); border: 1px solid rgba(61, 123, 255, .35); padding: 4px 12px; border-radius: 999px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); }
h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -.025em; margin: 18px 0 16px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }

/* Signup */
.signup { display: flex; gap: 10px; flex-wrap: wrap; max-width: 480px; }
.signup input[type=email] { flex: 1 1 220px; min-width: 0; padding: 13px 14px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.signup input[type=email]::placeholder { color: #6d7586; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; font: inherit; font-weight: 600; color: #fff; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #1d4ed8; color: #fff; }
.btn[disabled] { opacity: .6; cursor: default; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 14px; color: var(--muted); margin-top: 10px; }
.form-msg { font-size: 15px; margin-top: 10px; min-height: 1.4em; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: #ff8a8a; }

/* App mockup (illustration, not a screenshot) */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; font-size: 13px; }
.mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a404d; }
.mock-body { display: grid; grid-template-columns: 38% 62%; min-height: 290px; }
.mock-groups { border-right: 1px solid var(--line); padding: 10px 8px; }
.mock-groups div { padding: 7px 10px; border-radius: 7px; color: var(--muted); }
.mock-groups .on { background: rgba(61, 123, 255, .18); color: var(--text); font-weight: 600; }
.mock-list { padding: 10px 10px; }
.row { display: grid; grid-template-columns: 26px 26px 1fr; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.row .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.row .logo { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #2b3242, #39425a); }
.row b { font-weight: 600; display: block; }
.row small { color: var(--muted); display: block; line-height: 1.3; }
.row .bar { height: 3px; background: #2a3040; border-radius: 2px; margin-top: 4px; }
.row .bar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.row.sel { background: var(--accent); }
.row.sel small, .row.sel .n { color: rgba(255, 255, 255, .85); }
.row.sel .bar { background: rgba(255, 255, 255, .25); }
.row.sel .bar span { background: #fff; }
.mock-caption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px; }

/* Sections */
section { padding: 56px 0; }
h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.02em; margin: 0 0 12px; line-height: 1.2; }
.section-lead { color: var(--muted); max-width: 40em; margin: 0 0 32px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(61, 123, 255, .14); color: var(--accent-2); }
.icon svg { width: 20px; height: 20px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; list-style: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 16px; }

.notice { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 10px; padding: 18px 20px; color: var(--muted); }
.notice strong { color: var(--text); }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Article pages */
.article { max-width: 760px; padding: 56px 20px 24px; margin: 0 auto; }
.article h1 { font-size: clamp(30px, 4.4vw, 42px); }
.article h2 { font-size: 24px; margin-top: 36px; }
.article p, .article li { color: #c9cfda; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; }
.article th, .article td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--text); background: var(--surface-2); }
.article code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.disclaimer { margin-top: 18px; max-width: 60em; }

@media (max-width: 860px) {
  .hero { padding-top: 44px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .grid, .steps { grid-template-columns: 1fr; }
  .nav a:not(.keep) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Tables become stacked cards on phones */
@media (max-width: 600px) {
  .article thead { position: absolute; left: -9999px; }
  .article table, .article tbody, .article tr, .article td { display: block; width: 100%; }
  .article tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 4px 0; background: var(--surface); }
  .article td { border: 0; padding: 6px 14px; }
  .article td:nth-child(2)::before { content: "What it means"; display: block; font-size: 13px; color: var(--muted); }
  .article td:nth-child(3)::before { content: "What to try"; display: block; font-size: 13px; color: var(--muted); }
}
