:root {
  --bg: #0a0c0b;
  --bg-2: #0f1311;
  --surface: #121614;
  --surface-2: #181d1a;
  --line: rgba(220, 240, 225, 0.08);
  --line-2: rgba(220, 240, 225, 0.14);
  --text: #e7ece8;
  --muted: #8b958f;
  --dim: #5f6963;
  --accent: #c8f169;
  --accent-ink: #12180a;
  --great: #5ee38f;
  --ok: #7fd4c1;
  --tight: #f1c35a;
  --slow: #f2995a;
  --crawl: #ef7a6a;
  --no: #4b544f;
  --radius: 18px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f7f4; --bg-2: #eef1ec; --surface: #ffffff; --surface-2: #f1f4ef;
  --line: rgba(20, 40, 25, 0.09); --line-2: rgba(20, 40, 25, 0.16);
  --text: #141a16; --muted: #5d6862; --dim: #8a948e;
  --accent: #4d7c0f; --accent-ink: #ffffff;
  --great: #15803d; --ok: #0f766e; --tight: #b45309; --slow: #c2410c; --crawl: #b91c1c; --no: #a3aba6;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f6f7f4; --bg-2: #eef1ec; --surface: #ffffff; --surface-2: #f1f4ef;
    --line: rgba(20, 40, 25, 0.09); --line-2: rgba(20, 40, 25, 0.16);
    --text: #141a16; --muted: #5d6862; --dim: #8a948e;
    --accent: #4d7c0f; --accent-ink: #ffffff;
    --great: #15803d; --ok: #0f766e; --tight: #b45309; --slow: #c2410c; --crawl: #b91c1c; --no: #a3aba6;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.grid-bg {
  position: absolute; inset: 0 0 auto 0; height: 640px; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* Nav */
.nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2; }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; z-index: 1; padding: 48px 0 28px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; color: var(--muted); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--great); box-shadow: 0 0 0 4px color-mix(in srgb, var(--great) 20%, transparent); }
.hero h1 { font-size: clamp(36px, 7vw, 68px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 600; margin: 18px auto 16px; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 46ch; margin: 0 auto; }

/* Picker */
.picker { position: relative; z-index: 1; margin: 30px auto 0; max-width: 860px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6); text-align: left; }
.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 5px; background: var(--bg-2); border-radius: 14px; border: 1px solid var(--line); }
.kinds button { border: 0; background: none; padding: 10px 6px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 8px; }
.kinds button svg { width: 18px; height: 18px; }
.kinds button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 var(--line-2) inset, 0 2px 8px rgba(0, 0, 0, 0.2); }
.fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-top: 14px; align-items: end; }
.field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px 2px; }
.field select {
  width: 100%; appearance: none; -webkit-appearance: none; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 38px 12px 14px; font-size: 16px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b958f' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select:focus-visible, .btn:focus-visible, .kinds button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface-2); border-color: var(--line-2); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn svg { width: 17px; height: 17px; }
.hint { margin: 12px 2px 0; font-size: 13px; color: var(--dim); }

/* Results */
.results { position: relative; z-index: 1; padding: 34px 0 10px; }
.score { display: flex; gap: 26px; align-items: center; padding: 26px; border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid var(--line-2); }
.score-num { display: flex; align-items: baseline; gap: 6px; font-family: var(--mono); flex: none; }
.score-num .big { font-size: clamp(56px, 10vw, 88px); line-height: 1; font-weight: 600; letter-spacing: -0.06em; color: var(--accent); }
.score-num .of { font-size: 22px; color: var(--muted); }
.kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.score h2 { margin: 4px 0 8px; font-size: clamp(20px, 3vw, 27px); line-height: 1.25; font-weight: 500; letter-spacing: -0.02em; }
.score h2 strong { font-weight: 650; }
.best { margin: 0; color: var(--muted); }
.best a { color: var(--text); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.share-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 22px 0 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 1px solid var(--line-2); background: var(--surface); padding: 8px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs .count { font-family: var(--mono); font-size: 12px; opacity: 0.7; margin-left: 4px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.model { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.model.no { opacity: 0.6; }
.model header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.model .cat { font-size: 12px; color: var(--dim); font-weight: 500; }
.model .dot { opacity: 0.6; }
.model h3 { margin: 2px 0 0; font-size: 18px; letter-spacing: -0.015em; font-weight: 600; }
.model h3 a { text-decoration: none; }
.model h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.verdict { flex: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid; }
.verdict.great { color: var(--great); border-color: color-mix(in srgb, var(--great) 40%, transparent); background: color-mix(in srgb, var(--great) 10%, transparent); }
.verdict.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.verdict.tight { color: var(--tight); border-color: color-mix(in srgb, var(--tight) 40%, transparent); background: color-mix(in srgb, var(--tight) 10%, transparent); }
.verdict.slow { color: var(--slow); border-color: color-mix(in srgb, var(--slow) 40%, transparent); background: color-mix(in srgb, var(--slow) 10%, transparent); }
.verdict.crawl { color: var(--crawl); border-color: color-mix(in srgb, var(--crawl) 40%, transparent); background: color-mix(in srgb, var(--crawl) 10%, transparent); }
.verdict.no { color: var(--muted); border-color: var(--line-2); }
.good { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.speed { display: flex; align-items: baseline; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.speed b { font-family: var(--mono); font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.speed .feel { color: var(--muted); font-size: 13px; }
.mem { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.mem i { display: block; height: 100%; border-radius: 6px; background: var(--no); }
.mem i.great { background: var(--great); } .mem i.ok { background: var(--ok); } .mem i.tight { background: var(--tight); }
.mem i.slow { background: var(--slow); } .mem i.crawl { background: var(--crawl); }
.mem-label { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-top: -4px; }
.dim { color: var(--dim); }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.cmd code { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.cmd:hover svg { color: var(--accent); }
.how { margin: 0; font-size: 13px; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.model footer { margin-top: auto; display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); }

/* Sections */
section.block { position: relative; z-index: 1; padding: 46px 0 6px; }
section.block > h2 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -0.03em; font-weight: 600; margin: 0 0 8px; }
section.block > p.sub { color: var(--muted); margin: 0 0 20px; max-width: 60ch; }
.ups { display: grid; gap: 10px; }
.up { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.up h4 { margin: 0 0 2px; font-size: 16px; }
.up p { margin: 0; color: var(--muted); font-size: 14px; }
.cloud { margin-top: 12px; padding: 16px 18px; border-radius: 16px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 14px; color: var(--muted); }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.links-grid a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-size: 14px; }
.links-grid a:hover { border-color: var(--line-2); }
.links-grid a span { display: block; font-size: 12px; color: var(--dim); }

/* Model page table */
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line); }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); border-top: 0; font-weight: 600; }
.table td.num { font-family: var(--mono); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.fact span { display: block; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.fact b { font-size: 18px; font-weight: 600; }

.page-head { position: relative; z-index: 1; padding: 36px 0 8px; }
.page-head h1 { font-size: clamp(30px, 5.5vw, 50px); line-height: 1.06; letter-spacing: -0.04em; margin: 10px 0 12px; font-weight: 600; max-width: 22ch; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; font-size: 17px; }
.crumbs { font-size: 13px; color: var(--dim); }
.crumbs a { text-decoration: none; color: var(--muted); }

.foot { margin-top: 60px; border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--dim); font-size: 13px; }
.foot p { margin: 4px 0; max-width: 80ch; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .kinds { grid-template-columns: repeat(2, 1fr); }
  .fields { grid-template-columns: 1fr 1fr; }
  .fields .field:first-child { grid-column: 1 / -1; }
  .fields .btn { grid-column: 1 / -1; }
  .score { flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; }
  .cards { grid-template-columns: 1fr; }
  .up, .cloud { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 28px; }
}

.disclosure { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

.buy { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.buy::after { content: "\2197"; font-size: 12px; }
.buy:hover { border-bottom-color: var(--accent); }
.prose-list { padding-left: 20px; }
.prose-list li { margin: 6px 0; }
