:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #11151c;
  --muted: #5d6675;
  --border: #e2e5ea;
  --accent: #0a6cd6;
  --accent-soft: #e6f0fb;
  --good: #11804a;
  --warn: #a35d00;
  --bad: #b42318;
  --nvidia: #4f9a1a;
  --amd: #d1352b;
  --intel: #1f6fd1;
  --apple: #7a7f88;
  --other: #9a7bd0;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e13;
    --surface: #12161d;
    --surface-2: #1a1f28;
    --text: #e8ebf0;
    --muted: #8d96a5;
    --border: #232a35;
    --accent: #7cc4ff;
    --accent-soft: #14273a;
    --good: #4cc38a;
    --warn: #f0a34a;
    --bad: #ff7a6e;
    --nvidia: #76b900;
    --amd: #ff5a4f;
    --intel: #5aa2ff;
    --apple: #a9aeb7;
    --other: #b79cf0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
h1, h2 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h2 { font-size: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo { display: grid; gap: 2px; width: 18px; }
.logo i { display: block; height: 4px; border-radius: 1px; background: var(--accent); }
.logo i:nth-child(1) { opacity: .4; } .logo i:nth-child(2) { opacity: .7; }
nav { display: flex; gap: 18px; font-size: .9rem; }
nav a { color: var(--muted); }
nav a:hover { color: var(--text); text-decoration: none; }

/* hero */
.hero { padding: 56px 0 28px; }
.eyebrow { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 60ch; color: var(--muted); font-size: 1.05rem; margin: 16px 0 28px; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .85rem; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 20px 0; }
.section-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.section-head p { margin: 0; font-size: .9rem; }

/* form controls */
input, select, button { font: inherit; color: inherit; }
input, select {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; min-width: 0; width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .button {
  background: var(--accent); color: var(--bg); border: 0; border-radius: 10px; padding: 10px 18px;
  font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-block;
}
button:hover, .button:hover { filter: brightness(1.08); text-decoration: none; }

/* check */
.check h2 { margin-bottom: 16px; }
#check-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
#check-form label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
.check-out { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 22px; display: grid; gap: 18px; }
.verdict { display: flex; gap: 14px; align-items: flex-start; }
.badge { flex: none; font-family: var(--mono); font-size: .75rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.badge.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.verdict h3 { margin: 0 0 4px; font-size: 1.05rem; }
.verdict p { margin: 0; color: var(--muted); }
.speed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.speed { background: var(--surface-2); border-radius: 12px; padding: 14px 16px; }
.speed .q { font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.speed .v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.speed .v small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.speed .sub { font-size: .82rem; color: var(--muted); }

/* bars */
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.dot.nvidia, .bar.nvidia i { background: var(--nvidia); }
.dot.amd, .bar.amd i { background: var(--amd); }
.dot.intel, .bar.intel i { background: var(--intel); }
.dot.apple, .bar.apple i { background: var(--apple); }
.bar.other i { background: var(--other); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; font-size: .88rem; cursor: pointer; border-radius: 6px; padding: 2px 4px; }
.bar:hover { background: var(--surface-2); }
.bar .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font-family: var(--mono); font-size: .8rem; }
.bar .track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; transform-origin: left; animation: grow .6s cubic-bezier(.2,.7,.2,1) both; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
@keyframes grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .bar i { animation: none; } html { scroll-behavior: auto; } }

/* table */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 820px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; vertical-align: bottom; white-space: nowrap; }
th small { text-transform: none; font-weight: 400; }
th[aria-sort="ascending"]::after { content: " ↑"; }
th[aria-sort="descending"]::after { content: " ↓"; }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.date { white-space: nowrap; color: var(--muted); }
td.gpu b { text-transform: uppercase; font-family: var(--mono); font-size: .82rem; font-weight: 500; }
td.gpu .cpu, td .note { display: block; color: var(--muted); font-size: .78rem; max-width: 280px; }
td.fast { font-weight: 700; }
.chip { display: inline-block; font-family: var(--mono); font-size: .75rem; background: var(--surface-2); border-radius: 6px; padding: 1px 6px; }
.vendor-tick { display: inline-block; width: 3px; height: 14px; border-radius: 2px; margin-right: 8px; vertical-align: -2px; }

/* cta + footer */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.cta p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.foot { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .82rem; padding-top: 12px; padding-bottom: 40px; flex-wrap: wrap; }
.foot p { margin: 0; }

@media (max-width: 760px) {
  nav { display: none; }
  .hero { padding-top: 36px; }
  .card { padding: 18px; }
  #check-form { grid-template-columns: 1fr 1fr; }
  #check-form label:first-child, #check-form button { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input { grid-column: 1 / -1; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  .bar { grid-template-columns: 110px 1fr 52px; gap: 8px; }
  .cta { flex-direction: column; align-items: flex-start; }
}
