:root {
  --bg: #fafaf8; --surface: #ffffff; --surface-2: #f3f3f0; --fg: #14161a; --muted: #5d6470;
  --faint: #8a909b; --border: #e4e4df; --accent: #3043c9; --accent-fg: #ffffff; --accent-soft: #eceefc;
  --good: #1f7a4d; --good-soft: #e6f4ec; --warn: #9a5b00; --warn-soft: #fbf0dc; --bad: #b42318; --bad-soft: #fde8e6;
  --code-bg: #f1f1ed; --code-fg: #1f2329;
  --radius: 10px; --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e11; --surface: #15171c; --surface-2: #1b1e24; --fg: #eceef2; --muted: #a2a8b3;
    --faint: #737a86; --border: #272a31; --accent: #8e9dff; --accent-fg: #0d0e11; --accent-soft: #1d2140;
    --good: #5ccf95; --good-soft: #13291f; --warn: #f0b45a; --warn-soft: #2d2412; --bad: #ff8a80; --bad-soft: #321a19;
    --code-bg: #111318; --code-fg: #dfe3ea; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: 1.6rem; margin-top: 0; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- header */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; color: var(--fg); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 24px; height: 24px; }
.nav nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.nav nav a { color: var(--muted); font-size: .95rem; white-space: nowrap; }
.nav nav a:hover, .nav nav a[aria-current="page"] { color: var(--fg); text-decoration: none; }

/* ---------------------------------------------------------------- buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--fg);
  font: 500 .95rem var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { height: 32px; padding: 0 12px; font-size: .85rem; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.nav .btn { height: 34px; }
input[type=email], input[type=password], input[type=text] { width: 100%; height: 42px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--fg); font: 1rem var(--sans); }
input:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: .875rem; font-weight: 550; margin: 14px 0 6px; }

/* ---------------------------------------------------------------- landing */
.hero { padding: 72px 0 48px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 0 var(--border), 0 18px 40px -24px rgba(20, 22, 26, .35); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border);
  font: 500 .8rem var(--mono); color: var(--muted); background: var(--surface-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.sheet-body { padding: 16px 18px; font: .82rem/1.65 var(--mono); }
.sheet-body .q { color: var(--fg); margin-bottom: 10px; }
.sheet-sec { color: var(--faint); margin-top: 10px; }
.tag { display: inline-block; font: 600 .7rem var(--sans); padding: 1px 7px; border-radius: 5px; margin-right: 6px;
  vertical-align: 1px; }
.tag.cur { color: var(--good); background: var(--good-soft); }
.tag.old { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.tag.ext { color: var(--warn); background: var(--warn-soft); }
.tag.ask { color: var(--accent); background: var(--accent-soft); }
.strike { color: var(--faint); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin: 8px 0 12px; }
.stat { padding: 20px 22px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -0.02em; font-weight: 650; }
.stat span { color: var(--muted); font-size: .9rem; }
.footnote { font-size: .8rem; color: var(--faint); }

section.block { padding: 64px 0 8px; }
.section-head { max-width: 640px; margin-bottom: 28px; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 14px; }
.card .icon svg { width: 17px; height: 17px; }
.connect .card { display: flex; flex-direction: column; }
.connect .card pre { margin-top: auto; }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }
.band { margin: 72px 0 0; padding: 48px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band h2 { margin: 0; }
.cta.flush { margin: 0; }
footer.foot { padding: 32px 0 48px; color: var(--faint); font-size: .875rem; }
footer.foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
footer.foot a { color: var(--muted); }

/* ---------------------------------------------------------------- code, tables, notices */
code { font: .88em var(--mono); background: var(--code-bg); color: var(--code-fg); padding: .12em .38em; border-radius: 5px; }
pre { position: relative; margin: 0 0 1.1em; background: var(--code-bg); color: var(--code-fg); border: 1px solid var(--border);
  border-radius: 9px; padding: 14px 16px; overflow-x: auto; font: .83rem/1.6 var(--mono); }
pre code { background: none; padding: 0; font-size: inherit; }
pre .copy { position: absolute; top: 8px; right: 8px; height: 26px; padding: 0 9px; font-size: .75rem;
  border-radius: 6px; opacity: 0; transition: opacity .15s; }
pre:hover .copy, pre .copy:focus { opacity: 1; }
@media (hover: none) { pre .copy { opacity: 1; } }
table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 0 1.2em; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; background: var(--surface-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.2em; }
.table-wrap table { margin: 0; }
.table-wrap tr:last-child td { border-bottom: 0; }
.notice { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--surface);
  border-radius: 8px; padding: 12px 16px; margin: 0 0 1.2em; font-size: .93rem; }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); background: var(--bad-soft); }
.notice.good { border-left-color: var(--good); background: var(--good-soft); }

/* ---------------------------------------------------------------- docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding: 40px 0 64px; }
.side { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .92rem; }
.side .group { font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint);
  margin: 18px 0 6px; }
.side .group:first-child { margin-top: 0; }
.side a { display: block; color: var(--muted); padding: 4px 0; }
.side a:hover, .side a.on { color: var(--fg); text-decoration: none; }
.content { max-width: 760px; }
.content section { padding-top: 8px; margin-bottom: 44px; }
.content h2 { padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.content section:first-of-type h2 { border-top: 0; padding-top: 0; }
.content h3 { margin-top: 1.6em; }
.content ol, .content ul { padding-left: 1.3em; margin: 0 0 1em; }
.content li { margin-bottom: .35em; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; margin-bottom: -1px;
  font: 500 .9rem var(--sans); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tabpanel { display: none; }
.tabpanel.on { display: block; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: calc(100vh - 61px); display: grid; place-items: center; padding: 40px 20px; }
.auth .card { width: 100%; max-width: 420px; padding: 30px; }
.auth h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.auth .btn.primary { width: 100%; margin-top: 22px; height: 44px; }
.auth .switch { margin-top: 18px; font-size: .9rem; color: var(--muted); text-align: center; }
.form-error { color: var(--bad); font-size: .9rem; margin-top: 12px; min-height: 1.2em; }
.hint { font-size: .8rem; color: var(--faint); margin-top: 6px; }

/* ---------------------------------------------------------------- dashboard */
.dash { padding: 36px 0 64px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 1.8rem; margin: 0; }
.dash .grid.two { align-items: start; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin: 10px 0 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; }
.big { font-size: 2rem; font-weight: 650; letter-spacing: -0.02em; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; }
.keybox { margin: 14px 0 4px; padding: 14px; border-radius: 9px; border: 1px solid var(--good); background: var(--good-soft); }
.keybox code { display: block; word-break: break-all; margin: 8px 0 10px; padding: 8px 10px; background: var(--surface); font-size: .85rem; }
.pill { font-size: .75rem; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.pill.on { color: var(--good); border-color: var(--good); }
.empty { color: var(--faint); font-size: .92rem; padding: 6px 0; }
.mono { font-family: var(--mono); font-size: .85rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; gap: 32px; }
  .grid.three { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; }
  .side { position: static; max-height: none; display: flex; gap: 14px; overflow-x: auto; white-space: nowrap;
    padding: 10px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
  .side .group { display: none; }
  .side a { padding: 2px 0; }
}
@media (max-width: 640px) {
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .nav nav a.hide-sm { display: none; }
  .nav .wrap { gap: 12px; }
}
.table-wrap.mt { margin-top: 18px; }
.dash-row { margin-top: 16px; }
.spaces { list-style: none; padding: 0; margin: 0 0 1em; }
.spaces li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.spaces li:last-child { border-bottom: 0; }
.dash .card pre { font-size: .78rem; }
/* grid and flex children may shrink below their content (long code lines scroll inside <pre>) */
.grid > *, .hero > *, .docs > * { min-width: 0; }

/* ---------------------------------------------------------------- updates */
.updates { padding: 48px 20px 64px; }
.updates-head { max-width: 680px; margin-bottom: 36px; }
.updates-head h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.scores { margin-bottom: 56px; }
.scores h2 { font-size: 1.25rem; }
.scores .pill { margin-left: 6px; }
.timeline { border-left: 1px solid var(--border); margin-left: 6px; }
.release { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 32px; padding: 0 0 44px 28px; position: relative; }
.release::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); }
.release:first-child::before { background: var(--accent); }
.release-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding-top: 2px; }
.release-meta time { color: var(--muted); font-size: .9rem; }
.ver { font: 600 .78rem var(--sans); color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 6px; }
.ver.platform { color: var(--good); background: var(--good-soft); }
.release-body { max-width: 720px; }
.release-body h2 { font-size: 1.3rem; }
.release-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.release-body li { margin-bottom: .45em; }
.release-body .result { font-size: .92rem; border-left: 3px solid var(--good); background: var(--surface); padding: 8px 12px;
  border-radius: 6px; margin: 0; }
@media (max-width: 640px) {
  .release { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-left: 20px; }
  .release-meta { flex-direction: row; align-items: center; }
}
.scores td, .scores th { white-space: nowrap; }

/* ---------------------------------------------------------------- benchmark */
.bench { padding: 48px 20px 64px; }
.bench-block { margin-bottom: 64px; }
.bench-block h2 { font-size: 1.45rem; }
.barchart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 22px 14px; margin: 18px 0 20px; }
.bar-row, .bar-axis { display: grid; grid-template-columns: 150px minmax(0, 1fr) 56px; gap: 14px; align-items: center; }
.bar-row { margin-bottom: 12px; }
.bar-label { font-size: .92rem; }
.bar-val { font-size: .92rem; text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { display: block; width: 100%; height: 22px; overflow: visible; }
.bar-track .bar { fill: var(--faint); opacity: .45; }
.bar-track .bar.mine { fill: var(--accent); opacity: 1; }
.bar-track .bar:hover { opacity: .8; }
.bar-track .bar.mine:hover { opacity: .85; }
.axis-scale { display: flex; justify-content: space-between; font-size: .75rem; color: var(--faint); border-top: 1px solid var(--border); padding-top: 4px; }
.bar-caption { font-size: .8rem; color: var(--faint); margin: 10px 0 0; }
.bench-table td { font-variant-numeric: tabular-nums; }
.bench-table tr.mine td { background: var(--accent-soft); }
.bench-table.cats td:not(:first-child), .bench-table.cats th:not(:first-child) { text-align: right; }
.findings { margin-top: 8px; }
ul.plain { padding-left: 1.2em; margin: 0 0 1em; }
ul.plain li { margin-bottom: .5em; }
h3.mt { margin-top: 28px; }
@media (max-width: 640px) {
  .bar-row, .bar-axis { grid-template-columns: 104px minmax(0, 1fr) 46px; gap: 10px; }
  .bar-label, .bar-val { font-size: .85rem; }
}
.bench-table.results td, .bench-table.results th { white-space: nowrap; }
