/* GPU Atlas — styles */
:root {
  --bg: #f5f6f4;
  --surface: #ffffff;
  --surface-2: #eceeeb;
  --border: #dfe2de;
  --border-strong: #c9cdc8;
  --text: #15171a;
  --text-2: #464b52;
  --muted: #6c7178;
  --accent: #0d6b7d;
  --accent-ink: #0a5563;
  --accent-soft: #e1eff1;
  --warn: #8a5a00;
  --warn-soft: #fbf3e2;
  --info: #1f4f86;
  --info-soft: #e9f0f9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 18, 15, .04), 0 1px 1px rgba(20, 18, 15, .03);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--sans);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f1113;
  --surface: #171a1d;
  --surface-2: #1f2327;
  --border: #2a2f34;
  --border-strong: #3a4046;
  --text: #eceef0;
  --text-2: #c0c5cb;
  --muted: #8b9198;
  --accent: #5ec4d6;
  --accent-ink: #8ad6e3;
  --accent-soft: #11292e;
  --warn: #e0b45a;
  --warn-soft: #2a2213;
  --info: #8fb8ea;
  --info-soft: #152131;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  font-feature-settings: "kern";
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--accent-soft); }
h1, h2, h3 { letter-spacing: -.015em; }
h1 { font-weight: 750; letter-spacing: -.025em; }
.num, td.n, .mono { font-variant-numeric: tabular-nums; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 58px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 18px; height: 18px; border-radius: 4px; align-self: center;
  background: var(--accent); box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 5px var(--surface), inset 0 0 0 9px var(--accent);
}
.brand-name { font-weight: 650; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
.nav a {
  text-decoration: none; color: var(--text-2); font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); font-weight: 550; }
.icon-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  height: 32px; padding: 0 10px; border-radius: 6px; font: 13px var(--sans); cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }

/* Page */
main { padding: 36px 0 80px; min-height: 70vh; }
.page-head { margin-bottom: 28px; }
.eyebrow { font-size: 13.5px; color: var(--accent-ink); font-weight: 600; margin: 0 0 8px; }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 680; }
h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 14px; font-weight: 650; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 650; }
.lead { font-size: 17px; color: var(--text-2); max-width: 760px; margin: 0; }
.meta { color: var(--muted); font-size: 13px; margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.section { margin-top: 44px; }

/* Developments strip */
.devs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 28px 0 8px; }
.dev { background: var(--surface); padding: 14px 16px; text-decoration: none; display: block; }
.dev:hover { background: var(--surface-2); }
.dev time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dev p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.dev strong { color: var(--text); font-weight: 600; }

/* Segment tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 32px 0 0; overflow-x: auto; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 10px 12px; font: 14px var(--sans); color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); font-weight: 560; }
.tab .count { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); margin-left: 6px; }

/* Toolbar */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 0; flex-wrap: wrap; }
.field {
  height: 34px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text);
  font: 14px var(--sans); padding: 0 10px;
}
.field:hover { border-color: var(--border-strong); }
.search { flex: 1 1 260px; max-width: 360px; padding-left: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2377726b' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px 50%; }
.toolbar .spacer { flex: 1; }
.result-count { color: var(--muted); font-size: 13px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--text-2); cursor: pointer; }

/* Brand + country controls */
.seg-ctl { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.seg-btn { border: 0; background: none; font: 14px var(--sans); color: var(--text-2); padding: 0 12px; height: 32px; cursor: pointer; border-left: 1px solid var(--border); }
.seg-btn:first-child { border-left: 0; }
.seg-btn:hover { color: var(--text); background: var(--surface-2); }
.seg-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.field.country { height: 32px; font-size: 13px; max-width: 210px; }
.brand-tag { display: inline-block; font: 600 11.5px/1 var(--sans); padding: 3px 6px; border-radius: 4px; margin-right: 4px; vertical-align: 1px; }
.brand-tag.nvidia { color: #3f6b0a; background: #eef4e4; }
.brand-tag.amd { color: #a3171b; background: #fbeaea; }
[data-theme="dark"] .brand-tag.nvidia { color: #9ccb5c; background: #1d2614; }
[data-theme="dark"] .brand-tag.amd { color: #f08a8d; background: #2c1617; }

/* Budget filter */
.budget { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.budget .cur { color: var(--text-2); }
.budget input { width: 110px; }
.brand-tag.intel { color: #0b5ca8; background: #e6f0fa; }
[data-theme="dark"] .brand-tag.intel { color: #8cc1f0; background: #142233; }

/* Static spec pages */
.checked { font-size: 13px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.checked .ok { color: var(--accent); }
.checked .warn { color: var(--warn); }
.street { width: 100%; border-collapse: collapse; font-size: 14px; }
.street th, .street td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); }
.street th { font-size: 13px; color: var(--muted); font-weight: 600; }
.street td.num { font-variant-numeric: tabular-nums; }
.up { color: var(--warn); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.guide-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.guide-list a { display: block; background: var(--surface); padding: 16px 18px; text-decoration: none; }
.guide-list a:hover { background: var(--surface-2); }
.guide-list b { display: block; font-weight: 600; }
.guide-list span { font-size: 14px; color: var(--text-2); }

/* Table */
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; background: var(--surface); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th, .data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data thead th {
  position: sticky; top: 0; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text-2); z-index: 1;
}
.data thead th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.data thead th button:hover { color: var(--text); }
.data thead th[aria-sort] button { color: var(--text); }
.data th.n, .data td.n { text-align: right; }
.data td:first-child { white-space: normal; min-width: 200px; max-width: 280px; }
.data td.w { white-space: normal; min-width: 120px; max-width: 220px; }
.data tbody tr { cursor: pointer; }
.data tbody tr:hover td { background: var(--surface-2); }
.data tbody tr:last-child td { border-bottom: 0; }
.data td:first-child, .data th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.data thead th:first-child { background: var(--surface-2); z-index: 2; }
.data tbody tr:hover td:first-child { background: var(--surface-2); }
.model-link { text-decoration: none; font-weight: 560; }
.model-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sub { color: var(--muted); font-size: 12.5px; }
.dim { color: var(--muted); }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-block; font-size: 11.5px; font-weight: 560; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.badge.current { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge.announced, .badge.roadmap { color: var(--info); background: var(--info-soft); border-color: transparent; }
.badge.rumored { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.legacy { color: var(--muted); }

/* Detail */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.detail-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .actions { display: flex; gap: 8px; }
.btn {
  height: 34px; padding: 0 14px; border-radius: 6px; font: 500 14px var(--sans); cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="dark"] .btn.primary { color: #071316; }
.btn.primary:hover { opacity: .88; }
.btn[disabled] { opacity: .5; cursor: default; }

.keystats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 28px 0; }
.keystat { background: var(--surface); padding: 16px 18px; box-shadow: 0.5px 0.5px 0 0.5px var(--border); }
.keystat .k { font-size: 13px; color: var(--muted); font-weight: 500; }
.keystat .v { font: 700 26px/1.2 var(--sans); margin-top: 4px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.keystat .v small { font: 500 13px var(--sans); color: var(--muted); margin-left: 4px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.spec-group { margin-bottom: 28px; }
.spec-group h3 { font-size: 15px; color: var(--text); font-weight: 650; letter-spacing: -.01em; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 0; }
dl.specs { margin: 0; display: grid; grid-template-columns: minmax(150px, 34%) 1fr; }
dl.specs dt, dl.specs dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
dl.specs dt { color: var(--text-2); }
dl.specs dd { font-size: 14px; }
dl.specs dd.num, .cmp td.num { font-variant-numeric: tabular-nums; font-weight: 500; }
dl.specs dd .note { font-family: var(--sans); color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; margin-bottom: 16px; }
.panel h3 { font-size: 13px; margin-bottom: 10px; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li { padding: 7px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.panel li:first-child { border-top: 0; padding-top: 0; }
.panel li a { text-decoration: none; }
.panel li a:hover { text-decoration: underline; }
.panel li.here { font-weight: 600; }
.panel .src { color: var(--text-2); word-break: break-word; }
.variant { padding: 12px 0; border-top: 1px solid var(--border); }
.variant:first-of-type { border-top: 0; }
.variant b { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.variant span { font-size: 14px; color: var(--text-2); }
.callout { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 14px; color: var(--text-2); margin: 20px 0; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }
.pager a { text-decoration: none; color: var(--text-2); }
.pager a:hover { color: var(--text); }
.pager .dir { display: block; font-size: 12px; color: var(--muted); }

/* Compare */
.compare-pick { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.compare-pick select { min-width: 280px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); padding: 4px 6px 4px 10px; border-radius: 999px; font-size: 13.5px; }
.chip button { all: unset; cursor: pointer; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.chip button:hover { background: var(--surface-2); color: var(--text); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cmp thead th { background: var(--surface-2); font-weight: 600; }
.cmp tbody th { font-weight: 500; color: var(--text-2); white-space: nowrap; width: 200px; }
.cmp td { font-size: 14px; }
.cmp td.best { color: var(--accent); font-weight: 650; }
.cmp tr.group th { background: var(--surface); font-size: 13.5px; color: var(--text); font-weight: 650; padding-top: 18px; }

.tray {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30;
  background: var(--text); color: var(--bg); border-radius: 10px; padding: 8px 8px 8px 16px;
  display: flex; align-items: center; gap: 14px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.18);
}
.tray[hidden] { display: none; }
.tray a { background: var(--bg); color: var(--text); text-decoration: none; padding: 6px 12px; border-radius: 6px; font-weight: 550; }
.tray button { all: unset; cursor: pointer; opacity: .7; font-size: 13px; }
.tray button:hover { opacity: 1; }

/* Prose pages */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--text-2); }
.prose h2 { margin-top: 36px; }
.cols-table th { width: auto; }

/* Crawlable index of all spec sheets (home page) */
.all-index { padding-bottom: 32px; font-size: 13px; color: var(--muted); }
.all-index h2 { font-size: 17px; color: var(--text); margin: 0 0 10px; }
.all-index h3 { font-size: 13px; margin: 14px 0 4px; color: var(--text-2); }
.all-index p { margin: 0; line-height: 1.9; }
.all-index a { color: var(--text-2); text-decoration: none; }
.all-index a:hover { color: var(--text); text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 13px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }

@media (max-width: 1440px) {
  .brand-sub { display: none; }
}
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .devs { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  h1 { font-size: 26px; }
  .site-header .container { gap: 8px 12px; height: auto; padding-top: 10px; flex-wrap: wrap; }
  .site-header .icon-btn { margin-left: 0; }
  .field.country { margin-left: auto; max-width: 150px; }
  .nav { order: 3; width: 100%; margin: 0 -8px; padding-bottom: 6px; }
  .nav a { padding: 6px 8px; font-size: 13.5px; }
  dl.specs { grid-template-columns: 1fr 1fr; }
  .compare-pick select { min-width: 0; flex: 1; }
}
@media print {
  .site-header, .tray, .actions, .toolbar, .tabs { display: none !important; }
}

.brand-tag.apple { color: #3a3a3c; background: #ececee; }
[data-theme="dark"] .brand-tag.apple { color: #d1d1d6; background: #2a2a2c; }

/* ---------- charts ---------- */
.viz { margin: 0; --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --viz-lo: #c9c6c0; }
[data-theme="dark"] .viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --viz-lo: #4a4844; }
.viz svg { width: 100%; height: auto; display: block; overflow: visible; font: 12px/1 var(--sans); }
.viz .t1 { fill: var(--text); } .viz .t2 { fill: var(--text-2); } .viz .t3 { fill: var(--muted); font-size: 11px; }
.viz .b { font-weight: 600; } .viz .num { font-variant-numeric: tabular-nums; }
.viz .grid { stroke: var(--border); stroke-width: 1; } .viz .axis { stroke: var(--muted); stroke-width: 1; }
.viz .ref { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.viz .m-hi { fill: var(--accent); } .viz .m-s1 { fill: var(--s1); } .viz .m-lo { fill: var(--viz-lo); }
.viz .m-s2 { fill: var(--s2); } .viz .m-s3 { fill: var(--s3); }
.viz .pt .m-s1, .viz .pt .m-s2, .viz .pt .m-s3 { stroke: var(--surface); stroke-width: 2; paint-order: stroke; }
.viz .hit { fill: transparent; }
.viz .row:hover .hit { fill: var(--surface-2); }
.viz a .row:hover .m-lo { fill: var(--accent); opacity: .5; }
.viz .pt:hover .m-s1, .viz .pt:hover .m-s2, .viz .pt:hover .m-s3 { stroke: var(--text); }
.viz figcaption { margin-top: 8px; }
.viz-legend { display: flex; gap: 18px; margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.viz-table { margin-top: 14px; } .viz-table summary { cursor: pointer; color: var(--text-2); font-size: 13px; }

/* ---------- GPU finder & comparisons ---------- */
ul.facts { padding-left: 18px; line-height: 1.6; color: var(--text-2); } ul.facts li { margin-bottom: 6px; }
ul.plain { list-style: none; padding: 0; } ul.plain li { margin: 4px 0; }
table.vs th[scope=row] { text-align: left; font-weight: 500; color: var(--text-2); white-space: nowrap; }
table.vs td.diff { font-weight: 600; color: var(--text); }

/* GPU finder */
.finder-hero { padding: 36px 0 8px; max-width: 760px; }
.finder-hero h1 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; margin: 0 0 12px; }
.finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 40px; align-items: start; margin-top: 24px; }
@media (max-width: 960px) { .finder { grid-template-columns: 1fr; gap: 28px; } }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 2px; background: var(--border); }
.step { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 18px; padding-bottom: 30px; }
.step[hidden] { display: none; }
.step-n { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 5px var(--bg); }
[data-theme="dark"] .step-n { color: #071316; }
.step h2 { font-size: 19px; margin: 4px 0 12px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.opts.two { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.opt { text-align: left; font: inherit; cursor: pointer; padding: 14px 15px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); display: flex; flex-direction: column; gap: 3px; transition: border-color .15s, background-color .15s; }
.opt b { font-size: 15px; font-weight: 650; }
.opt span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.opt:hover { border-color: var(--border-strong); }
.opt[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); }
.opt[aria-pressed=true] span { color: var(--text-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.seg button { font: inherit; font-size: 14px; font-weight: 500; border: 0; background: transparent; color: var(--text-2); padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--border); }
.hint { margin: 10px 0 0; }
.fbudget { border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); padding: 16px 18px; }
.fbudget-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fbudget select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface-2); border: 0; border-radius: 8px; padding: 7px 10px; }
.fbudget-out { font-size: 30px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fbudget input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 18px 0 14px; border-radius: 99px; background: linear-gradient(to right, var(--accent) var(--fill, 100%), var(--surface-2) var(--fill, 100%)); }
.fbudget input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: grab; }
.fbudget input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: grab; }
.fbudget-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fbudget-foot b { color: var(--text); font-size: 15px; }
.exact { display: inline-flex; align-items: center; gap: 8px; }
.money-in { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: var(--surface); }
.money-in input { font: inherit; font-size: 14px; width: 96px; border: 0; background: transparent; color: var(--text); padding: 6px 0; outline: none; }
.money-in:focus-within { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); margin-top: 12px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.shortlist { position: sticky; top: 76px; }
@media (max-width: 960px) { .shortlist { position: static; } }
.sl-head h2 { font-size: 21px; margin: 0; }
.sl-head p { margin: 4px 0 14px; }
#fres { display: flex; flex-direction: column; gap: 10px; }
.pick { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 14px 16px; }
.pick.top { border: 1.5px solid var(--accent); padding: 18px 18px 16px; }
.pick.flash { animation: pickflash .9s ease-out; }
@keyframes pickflash { from { box-shadow: 0 0 0 6px var(--accent-soft); } to { box-shadow: 0 0 0 0 var(--accent-soft); } }
.pick-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pick-rank { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pick.top .pick-rank { color: var(--accent-ink); }
.pick h3 { margin: 1px 0 0; font-size: 17px; letter-spacing: -.01em; line-height: 1.25; }
.pick.top h3 { font-size: 21px; }
.pick h3 a { color: var(--text); text-decoration: none; } .pick h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pick-price { text-align: right; flex: none; }
.pick-price b { display: block; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pick.top .pick-price b { font-size: 22px; }
.pick-price span { font-size: 12px; color: var(--muted); }
.meters { display: grid; gap: 7px; margin: 14px 0 6px; }
.meter { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.m-l { color: var(--muted); }
.m-bar { position: relative; height: 6px; border-radius: 99px; background: var(--surface-2); }
.m-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.m-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text-2); border-radius: 2px; }
.meter.bad .m-bar i { background: var(--warn); }
.m-v { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 500; min-width: 92px; text-align: right; }
.pick-warn { margin: 6px 0 0; font-size: 13px; color: var(--warn); }
.pick .why { margin: 8px 0 0; padding-left: 17px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.pick-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; }
.pick-links a { color: var(--text-2); text-underline-offset: 3px; } .pick-links a:hover { color: var(--accent-ink); }
.pick-links .rv { color: var(--muted); }
.note { margin: 0; padding: 11px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.empty { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 18px; color: var(--text-2); }
.empty p { margin: 6px 0 0; font-size: 14px; }
.finder-method { max-width: 760px; margin-top: 40px; }
@media (prefers-reduced-motion: reduce) { .opt, .pick.flash { transition: none; animation: none; } }

.data tbody tr { transition: background-color .12s; }
.data tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }

@media (max-width: 760px) { .site-header .nav { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); } .site-header .nav::-webkit-scrollbar { display: none; } .site-header .nav a { flex: none; } }
.step-body { min-width: 0; }
@media (max-width: 560px) {
  .step { grid-template-columns: 28px 1fr; gap: 12px; }
  .step-n { width: 28px; height: 28px; font-size: 13px; }
  .steps::before { left: 13px; }
  .opts, .opts.two { grid-template-columns: 1fr 1fr; gap: 8px; }
  .opt { padding: 12px; }
  .fbudget-out { font-size: 24px; }
  .meter { grid-template-columns: 64px 1fr auto; }
  .m-v { min-width: 0; }
}

/* FAQ, glossary, about, architecture facts */
.faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.faq summary { cursor: pointer; 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: "+"; color: var(--muted); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 8px 0 0; color: var(--text-2); max-width: 68ch; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 24px; }
.toc a { font-size: 13.5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--text); }
dl.glossary { max-width: 760px; margin: 0; }
dl.glossary > div { padding: 16px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
dl.glossary dt { font-weight: 650; font-size: 17px; }
dl.glossary dd { margin: 4px 0 0; color: var(--text-2); }
.prose { max-width: 720px; } .prose h2 { font-size: 20px; margin: 28px 0 6px; } .prose p { color: var(--text-2); }
dl.arch-facts { display: flex; flex-wrap: wrap; gap: 10px 36px; margin: 18px 0 0; }
dl.arch-facts dt { font-size: 13px; color: var(--muted); } dl.arch-facts dd { margin: 2px 0 0; font-weight: 600; }

/* Logo */
.brand { align-items: center; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-logo.on-dark { display: none; }
[data-theme="dark"] .brand-logo.on-light { display: none; }
[data-theme="dark"] .brand-logo.on-dark { display: block; }
@media (max-width: 640px) { .brand-logo { height: 26px; } }
