/* Buy This For — design system. Editorial frame, instrument-grade data.
   Self-hosted variable fonts, zero external requests. See docs/redesign-plan.md §5. */

@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 400 600;
  font-display: swap; src: url("/assets/fonts/source-serif-4-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Public Sans"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/public-sans-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
  --paper: #F1F4F5; --surface: #FFFFFF; --ink: #0F1619; --ink-2: #54626B; --ink-3: #7C8992;
  --rule: #DBE2E5; --rule-2: #EDF1F2;
  --accent: #0E4C61; --accent-soft: #DCE9ED; --on-accent: #FFFFFF;
  --pos: #1C6B4A; --pos-soft: #E3F2E8; --warn: #8A5A12;
  --radius: 10px; --radius-sm: 5px;
  --serif: "Source Serif 4", Georgia, "Iowan Old Style", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1316; --surface: #141D21; --ink: #E7EDEF; --ink-2: #A0AEB5; --ink-3: #7C8992;
    --rule: #26333A; --rule-2: #1C272C;
    --accent: #66AFC7; --accent-soft: #16323C; --on-accent: #08171D;
    --pos: #5FB98C; --pos-soft: #123324; --warn: #D2A354;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { color: var(--accent); }
.muted { color: var(--ink-2); font-size: .92em; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 20px; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-size: 20px; letter-spacing: -.015em; color: var(--ink); text-decoration: none; }
.wordmark i { font-style: normal; color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 13.5px; }
.site-header nav a { color: var(--ink-2); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); padding-bottom: 2px; }
.nav-toggle { display: none; font: 13.5px var(--sans); background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm); color: var(--ink); padding: 7px 12px; cursor: pointer; }
.lang-switch { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 3px 8px; text-decoration: none; white-space: nowrap; }
.lang-switch b { color: var(--ink); font-weight: 500; }

/* ---------- homepage ---------- */
/* padding-block only — a `padding` shorthand here would cancel .wrap's horizontal
   padding and run the hero text into the screen edge on mobile. */
.home-hero { padding-top: 44px; padding-bottom: 8px; }
.home-hero .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.home-hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 10px; text-wrap: balance; max-width: 16ch; }
.home-hero .sub { font-size: 16px; color: var(--ink-2); max-width: 56ch; margin: 0 0 28px; }

.wizard { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; background: var(--surface); border: 1px solid var(--rule); padding: 20px; border-radius: var(--radius); }
.wizard label { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.wizard select { font: 15px var(--sans); padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--rule); background: var(--paper); color: var(--ink); min-width: 180px; }
.wizard button { background: var(--accent); color: var(--on-accent); border: 0; padding: 11px 20px; font: 600 15px var(--sans); border-radius: var(--radius-sm); cursor: pointer; }
.wizard button:hover { opacity: .9; }
.wizard-note { margin: 10px 0 0; font-size: 13.5px; }
.coming-note { margin: 18px 0 40px; }

/* ---------- consent banner ---------- */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgb(0 0 0 / .14); padding: 16px 18px; font-size: 13.5px;
}
.consent-banner p { margin: 0 0 12px; color: var(--ink-2); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions button {
  font: 600 13.5px var(--sans); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
}
#consent-accept { background: var(--accent); color: var(--on-accent); border: 0; }
#consent-reject { background: transparent; color: var(--ink-2); border: 1px solid var(--rule); }
.consent-actions button:hover { opacity: .9; }

.section-title { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 48px 0 16px; letter-spacing: -.01em; }
.cat-search { width: 100%; max-width: 380px; padding: 10px 14px; font: 14.5px var(--sans); border: 1px solid var(--rule); border-radius: var(--radius-sm); margin-bottom: 16px; background: var(--surface); color: var(--ink); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.cat-tile { background: var(--surface); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; padding: 16px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cat-tile:hover { background: var(--accent-soft); }
.cat-tile .cat-emoji { font-size: 20px; }
.cat-tile .cat-name { font-weight: 600; font-size: 14px; line-height: 1.25; }
.cat-tile .cat-from { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.cat-tile.is-vpn .cat-from { color: var(--accent); }

/* ---------- category / band page ---------- */
.crumbs { margin: 22px 0 6px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .03em; color: var(--ink-3); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.titleblock { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
h1.answer-title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.08; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.verified { font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--ink-2); text-align: right; white-space: nowrap; }
.verified b { color: var(--ink); font-weight: 500; }

.band-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.band-links a { font-family: var(--mono); font-size: 12.5px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 13px; background: var(--surface); }
.band-links a[aria-current="page"] { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.band-links a:hover:not([aria-current="page"]) { border-color: var(--accent); color: var(--ink); }

/* ranked podium — rank encodes order (1 → 2 → 3), not price. see redesign-plan.md §5 */
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.rank-col { background: var(--surface); display: flex; flex-direction: column; padding: 18px; }
.rank-col.pick { background: var(--accent-soft); }
.rank-tier { display: flex; align-items: baseline; gap: 9px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.rank-col.pick .rank-tier { color: var(--accent); }
.rank-tier em { font-style: normal; font-weight: 600; }
.rank-sub { margin-left: auto; }
.rank-num { font-family: var(--serif); font-size: 21px; line-height: 1; letter-spacing: -.03em; color: var(--ink-3); text-transform: none; }
.rank-col.pick .rank-num { color: var(--accent); }

.rank-shot-wrap { display: flex; align-items: center; justify-content: center; padding: 18px 0 20px; }
.rank-shot { width: 184px; height: 184px; display: block; color: var(--ink-3); object-fit: cover; object-position: center; }
.rank-col.pick .rank-shot { color: var(--accent); }
.rank-shot.placeholder { opacity: .65; }
/* no researched photo anywhere in this ladder: the build drops the image row entirely,
   so the card leads with name + price. Restores the breathing room the photo gave. */
.ladder.no-photos .rank-body { padding-top: 14px; }

.rank-body { display: flex; flex-direction: column; gap: 11px; flex: 1; }
.rank-name { font-family: var(--serif); font-size: 17.5px; line-height: 1.25; margin: 0; text-wrap: balance; }
.rank-price { font-family: var(--mono); font-size: 21px; font-weight: 500; letter-spacing: -.02em; color: var(--ink); margin: 0; font-variant-numeric: tabular-nums; }
.rank-col.pick .rank-price { color: var(--accent); }
.rank-specs { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.rank-verdict { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.rank-overage { font-size: 12.5px; color: var(--warn); margin: 0; font-weight: 600; }

.rank-scores { display: flex; flex-direction: column; gap: 4px; padding: 11px 0 4px; border-top: 1px solid var(--rule-2); }
.score-row { display: grid; grid-template-columns: 62px 1fr 22px; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.score-track { height: 3px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.score-track i { display: block; height: 3px; background: var(--ink-3); border-radius: 2px; }
.rank-col.pick .score-track i { background: var(--accent); }
.score-row b { color: var(--ink-2); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.rank-total { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding-top: 10px; border-top: 1px solid var(--rule-2); }
.rank-scores + .rank-total { border-top: 0; padding-top: 0; }
.rank-total b { font-size: 14px; letter-spacing: -.01em; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }

.buy-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
/* shared solid button — used by the VPN section (.btn) and anywhere a primary CTA is needed */
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; padding: 9px 14px; border-radius: var(--radius-sm); font-weight: 600; font-size: 13.5px; text-align: center; border: 1px solid var(--accent); }
.btn:hover { opacity: .9; }

.buy { flex: 1; min-width: 120px; display: block; text-align: center; text-decoration: none; font-size: 13.5px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.rank-col.pick .buy { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.buy small { display: block; font-family: var(--mono); font-size: 10px; opacity: .75; letter-spacing: .03em; margin-top: 2px; }

/* category → tool interlink: the return path for tools' own category CTA */
.cat-tools { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 16px 20px 18px; margin: 16px 0; }
.cat-tools h2 { font-family: var(--serif); font-weight: 400; font-size: 18px; margin: 0 0 4px; }
.cat-tools p { font-size: 13px; margin: 0 0 10px; }
.cat-tools ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tools a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 13.5px; border: 1px solid var(--rule-2); border-radius: var(--radius-sm); padding: 8px 12px; }
.cat-tools a:hover { background: var(--accent-soft); border-color: var(--accent); }
.cat-tool-emoji { font-size: 15px; }

/* ---------- below the fold: proof, collapsed by default ---------- */
.proof { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); margin-bottom: 16px; overflow: hidden; }
.proof summary { cursor: pointer; list-style: none; padding: 14px 20px; font-weight: 600; font-size: 14.5px; display: flex; align-items: center; justify-content: space-between; }
.proof summary::-webkit-details-marker { display: none; }
.proof summary::after { content: "+"; font-family: var(--mono); color: var(--ink-3); font-size: 16px; }
.proof[open] summary::after { content: "–"; }
.proof summary:hover { background: var(--rule-2); }
.proof-body { padding: 4px 20px 20px; border-top: 1px solid var(--rule-2); }

.reason-block { margin-bottom: 18px; }
.reason-block:last-child { margin-bottom: 0; }
.reason-block h4 { font-family: var(--serif); font-size: 15.5px; margin: 0 0 6px; }
.reason-block ul { margin: 0 0 6px; padding-left: 18px; font-size: 14px; }
.reason-block ul li { margin-bottom: 3px; }
.reason-block .giveup { font-size: 13.5px; color: var(--ink-2); margin: 6px 0 0; }
.reason-block .giveup b { color: var(--ink); }

.also-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.also-card { border: 1px solid var(--rule-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.also-card b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.also-score { font-family: var(--mono); font-size: 11.5px; color: var(--accent); margin-left: 7px; font-variant-numeric: tabular-nums; }
.also-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); }

.source-list, .weight-list, .commission-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.source-list li, .commission-list li { padding: 7px 0; border-bottom: 1px solid var(--rule-2); }
.source-list li:last-child, .commission-list li:last-child { border-bottom: 0; }
.weight-row { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.weight-track { height: 5px; background: var(--rule-2); border-radius: 3px; overflow: hidden; }
.weight-track i { display: block; height: 5px; background: var(--accent); border-radius: 3px; }

.comparison, .methodology { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; }
.comparison h2, .methodology h2, .faq h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0 0 14px; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.faq { max-width: 760px; }
.faq h3 { font-family: var(--serif); font-size: 16.5px; margin: 0 0 4px; }
.faq p { margin: 4px 0 0; color: var(--ink-2); }

.prose { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 30px 34px; margin: 28px auto; max-width: 760px; }
.prose h1 { font-family: var(--serif); font-weight: 400; margin-top: 0; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 20px; }

.site-footer { background: var(--surface); border-top: 1px solid var(--rule); color: var(--ink-2); margin-top: 52px; padding: 28px 0; font-size: 13.5px; }
.site-footer .muted { color: var(--ink-3); margin-bottom: 6px; }

@media (max-width: 640px) {
  .wizard { padding: 16px; gap: 12px; }
  .wizard label { width: 100%; }
  .wizard select { min-width: 100%; width: 100%; }
  .wizard button { width: 100%; }

  .header-inner { position: relative; }
  .nav-toggle { display: block; order: 1; margin-left: auto; }
  .lang-switch { order: 2; }
  .site-header nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 2px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--rule); }
  .site-header.nav-open nav { display: flex; }
  .site-header nav a { padding: 8px 0; }

  .home-hero { padding-top: 30px; }
  .home-hero h1 { max-width: none; font-size: 30px; }
  .home-hero .sub { margin-bottom: 22px; }
  .section-title { margin: 34px 0 14px; font-size: 21px; }

  .titleblock { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .verified { text-align: left; }
  h1.answer-title { font-size: 29px; }

  .rank-shot-wrap { padding: 14px 0 16px; }
  .rank-shot { width: 152px; height: 152px; }
  .proof summary { padding: 13px 16px; }
  .proof-body { padding: 4px 16px 18px; }
  .comparison, .methodology { padding: 18px 16px; }
  .prose { padding: 22px 20px; }
}

@media (max-width: 400px) {
  .wrap { padding: 0 16px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
