:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --border: #d9dee6;
  --text: #0f172a;
  --muted: #4b5563;
  --brand: #1d4ed8;
  --brand-strong: #1e40af;
  --on-brand: #ffffff;
  --cut: #b42318;
  --ai-bg: #fef3c7;
  --ai-text: #78350f;
  --warn-bg: #e0e7ff;
  --warn-text: #1e3a8a;
  --news-bg: #e7f5ec;
  --news-text: #14532d;
  --lock: #6b7280;
  --focus: #f59e0b;
  --radius: 10px;
  --maxw: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #121b2e;
    --border: #2a3650;
    --text: #e6eaf2;
    --muted: #a3adbf;
    --brand: #8fb0ff;
    --brand-strong: #b4caff;
    --on-brand: #0b1220;
    --cut: #ff9a8f;
    --ai-bg: #3b2f0b;
    --ai-text: #fcd34d;
    --warn-bg: #1e2a4f;
    --warn-text: #c7d4ff;
    --news-bg: #12301f;
    --news-text: #a7f3c4;
    --lock: #9ca3af;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
img, svg { max-width: 100%; height: auto; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 8px; z-index: 10; }

header.site { border-bottom: 1px solid var(--border); background: var(--bg); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand svg { width: 32px; height: 32px; }
.brand .l2 { color: var(--brand); }
nav.main { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: .95rem; }
nav.main a { color: var(--text); text-decoration: none; padding: 6px 0; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--brand); text-decoration: underline; }

main { padding: 24px 0 48px; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.2; margin: .2em 0 .4em; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 1.8em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
p.lede { font-size: 1.12rem; color: var(--muted); max-width: 46em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }

.hero { padding: 16px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 1.5rem; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: .875rem; }

.btn { display: inline-block; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn.secondary { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.secondary:hover { background: var(--surface); color: var(--brand-strong); }
.btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.filters { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 720px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; align-items: end; } }
.filters label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
input, select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin-top: 10px; }
.check input { width: auto; min-height: 0; }
.filter-note { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.date { white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: .82rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; vertical-align: 1px; }
.b-warn { background: var(--warn-bg); color: var(--warn-text); }
.b-news { background: var(--news-bg); color: var(--news-text); }
.b-ai { background: var(--ai-bg); color: var(--ai-text); }

.gate { border: 1px dashed var(--brand); border-radius: var(--radius); padding: 16px; margin: 16px 0; background: var(--surface); }
.gate h3 { margin-top: 0; }
.lock { color: var(--lock); }

.grid-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 16px; padding: 0; list-style: none; }
.grid-links li { padding: 3px 0; }
.grid-links .n { color: var(--muted); font-size: .85rem; }

.plans { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 20px 0; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.plan.pro { border: 2px solid var(--brand); }
.plan .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.plan ul { padding-left: 1.1em; }
.plan li { margin: 4px 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

form.waitlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
form.waitlist input[type=email] { flex: 1 1 220px; }
.form-msg { font-size: .9rem; margin-top: 6px; }

.prose { max-width: 46em; }
.prose li { margin: 4px 0; }
.callout { border-left: 4px solid var(--brand); background: var(--surface); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; }

footer.site { border-top: 1px solid var(--border); padding: 24px 0 40px; font-size: .9rem; color: var(--muted); }
footer.site .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
footer.site a { color: var(--muted); }
footer.site h4 { margin: 0 0 6px; font-size: .85rem; color: var(--text); }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin: 3px 0; }
.hidden { display: none !important; }
.check select { width: auto; margin-left: auto; min-width: 180px; }
.plan h2, .plan h3 { margin-top: 0; }
.check { flex-wrap: wrap; }
.filters > div { min-width: 0; }
td, .grid-links a, h1 { overflow-wrap: anywhere; }
