/* VacVersus — "spec sheet" visual system. Tokens first; everything below references them. */
:root {
  /* color */
  --paper: #f6f3ec;
  --surface: #fffdf8;
  --surface-sunk: #efeadf;
  --ink: #1b2224;
  --ink-2: #47524f;
  --ink-3: #6b7471;
  --rule: #d9d2c3;
  --rule-soft: #e7e1d4;
  --accent: #0f6b62;
  --accent-hover: #0b544d;
  --accent-ink: #ffffff;
  --accent-soft: #dcefe9;
  --mark: #b45309;
  --mark-soft: #fdf0dc;
  --grid: #e3ddcf;
  --shape-a: #0f6b62;
  --shape-b: #b45309;
  --focus: #1d4ed8;

  /* type */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --fs-caption: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  --fs-h1: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  --fs-display: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);

  /* space (8px system) */
  --s-1: 0.25rem; --s0: 0.5rem; --s1: 0.75rem; --s2: 1rem; --s3: 1.5rem; --s4: 2rem; --s5: 2.5rem; --s6: 3rem; --s8: 4rem;

  /* shape + motion */
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-full: 999px;
  --shadow-card: 0 1px 0 var(--rule), 0 6px 18px -12px rgba(27, 34, 36, 0.25);
  --t-fast: 150ms ease-out;
  --measure: 70ch;
  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14181a;
    --surface: #1b2023;
    --surface-sunk: #101315;
    --ink: #ece8df;
    --ink-2: #bfc6c2;
    --ink-3: #9aa29e;
    --rule: #333b3e;
    --rule-soft: #283033;
    --accent: #4fc2b1;
    --accent-hover: #74d3c5;
    --accent-ink: #0d1514;
    --accent-soft: #163632;
    --mark: #f2a65a;
    --mark-soft: #3a2a17;
    --grid: #262d30;
    --shape-a: #4fc2b1;
    --shape-b: #f2a65a;
    --focus: #93c5fd;
    --shadow-card: 0 1px 0 var(--rule);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-sm); }
code { font-family: var(--font-mono); font-size: 0.875em; background: var(--surface-sunk); padding: 0.1em 0.35em; border-radius: var(--r-sm); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 var(--s1); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: var(--s6); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s2); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }
.skip { position: absolute; left: -999px; top: var(--s0); background: var(--surface); padding: var(--s0) var(--s2); }
.skip:focus { left: var(--s2); z-index: 10; }

/* masthead */
.masthead { border-bottom: 2px solid var(--ink); background: var(--paper); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 4rem; flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.wordmark .vs { font-family: var(--font-mono); font-size: 0.6em; font-weight: 600; color: var(--accent-ink); background: var(--accent); border-radius: var(--r-sm); padding: 0.1em 0.35em; margin: 0 0.18em; vertical-align: 0.25em; letter-spacing: 0; }
.wordmark:hover { color: var(--ink); }
.masthead nav { display: flex; gap: var(--s3); flex-wrap: wrap; }
.masthead nav a { color: var(--ink-2); text-decoration: none; font-size: var(--fs-small); font-weight: 600; letter-spacing: 0.02em; padding: var(--s0) 0; }
.masthead nav a:hover { color: var(--accent); }

.crumbs { font-size: var(--fs-small); color: var(--ink-3); padding-top: var(--s2); display: flex; gap: var(--s0); flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); }

main { padding-bottom: var(--s8); }

/* page head */
.page-head { padding: var(--s4) 0 var(--s2); max-width: 52rem; }
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: var(--s1); }
.eyebrow a { color: inherit; }
.lede { font-size: 1.1875rem; color: var(--ink-2); max-width: var(--measure); }
.meta { font-size: var(--fs-small); color: var(--ink-3); font-family: var(--font-mono); }
.section-note { font-size: var(--fs-small); color: var(--ink-3); max-width: var(--measure); }

/* hero */
.hero { padding: var(--s6) 0 var(--s4); border-bottom: 1px solid var(--rule); max-width: 56rem; }
.hero h1 { font-size: var(--fs-display); line-height: 1.05; margin-bottom: var(--s3); }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }
.btn { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; transition: background var(--t-fast); }
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--surface-sunk); color: var(--ink); }

/* verdict */
.verdict { display: grid; grid-template-columns: 1fr; gap: var(--s2); margin: var(--s3) 0; }
@media (min-width: 720px) { .verdict { grid-template-columns: 1fr 1fr; } }
.pick { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--shape-a); border-radius: var(--r-lg); padding: var(--s3); box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.pick-2 { border-top-color: var(--shape-b); }
.pick h2 { margin: 0 0 var(--s1); font-size: var(--fs-h3); }
.pick h2 a { color: var(--ink); text-decoration: none; }
.pick h2 a:hover { color: var(--accent); }
.pick-label { font-family: var(--font-mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin: 0 0 var(--s-1); }
.pick-if { color: var(--ink-2); flex: 1; }

.buy-row { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s2); }
.buy { display: inline-flex; flex-direction: column; justify-content: center; align-self: flex-start; min-height: 2.75rem; padding: var(--s0) var(--s3); border-radius: var(--r-md); background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; line-height: 1.25; transition: background var(--t-fast); }
.buy:hover { background: var(--accent); color: var(--accent-ink); }
.buy-note { font-size: var(--fs-caption); font-weight: 400; opacity: 0.75; }
.buy-alt { background: transparent; color: var(--ink); border: 1.5px solid var(--rule); }
.buy-alt:hover { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.inline-buy { font-size: var(--fs-small); }

/* drawings */
.drawings figure { margin: var(--s3) 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s2); }
.drawings figcaption { font-size: var(--fs-small); color: var(--ink-3); margin-top: var(--s0); }
.scale-drawing { width: 100%; height: auto; display: block; }
.scale-drawing .grid { stroke: var(--grid); stroke-width: 1; }
.scale-drawing .floor { stroke: var(--ink); stroke-width: 2; }
.scale-drawing .axis { fill: var(--ink-3); font: 11px var(--font-mono); }
.scale-drawing .name { fill: var(--ink); font: 600 13px var(--font-body); }
.scale-drawing .dims { fill: var(--ink-3); font: 12px var(--font-mono); }
.scale-drawing .shape { fill-opacity: 0.16; stroke-width: 2; }
.scale-drawing .s0 { fill: var(--shape-a); stroke: var(--shape-a); }
.scale-drawing .s1 { fill: var(--shape-b); stroke: var(--shape-b); }

/* tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; font-size: 0.9875rem; }
.spec-table th, .spec-table td { text-align: left; vertical-align: top; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--rule-soft); }
.spec-table thead th { font-family: var(--font-mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); background: var(--surface-sunk); font-weight: 600; }
.spec-table tbody th { font-weight: 600; width: 38%; }
.spec-table.lineup tbody th { width: auto; }
.spec-table.single tbody th { width: 45%; }
.spec-table td { font-variant-numeric: tabular-nums; }
.spec-table th, .spec-table td, .note, .why { overflow-wrap: anywhere; }
.spec-table tr:last-child > * { border-bottom: 0; }
.why, .note { display: block; font-weight: 400; font-size: var(--fs-small); color: var(--ink-3); margin-top: var(--s-1); line-height: 1.45; }
.win { background: var(--mark-soft); }
.win-mark { color: var(--mark); font-size: 0.75em; margin-left: 0.4em; }
.src { font-family: var(--font-mono); font-size: 0.7em; vertical-align: super; margin-left: 0.15em; text-decoration: none; }
.compact th, .compact td { padding: var(--s0) var(--s2); }

details.same, details.faq { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); margin: var(--s2) 0; }
details > summary { cursor: pointer; padding: var(--s2); font-weight: 600; list-style-position: inside; min-height: 2.75rem; }
details.same[open] > summary, details.faq[open] > summary { border-bottom: 1px solid var(--rule-soft); }
details.faq p { padding: var(--s2); margin: 0; color: var(--ink-2); }
details.same .spec-table { border: 0; border-radius: 0; }

.callout { background: var(--mark-soft); border-left: 4px solid var(--mark); padding: var(--s2) var(--s3); border-radius: var(--r-md); margin-top: var(--s4); }
.callout h2 { margin-top: 0; font-size: var(--fs-h3); }
.callout ul { margin: 0; padding-left: var(--s3); }

.checklist { padding-left: var(--s3); max-width: var(--measure); }
.checklist li { margin-bottom: var(--s1); padding-left: var(--s0); }
.checklist li::marker { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }

.variants { list-style: none; padding: 0; }
.variants li { padding: var(--s1) 0; border-bottom: 1px dashed var(--rule); }
.chan { font-family: var(--font-mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); border: 1px solid currentColor; border-radius: var(--r-full); padding: 0 0.5em; }

.pair-list { padding-left: var(--s3); }
.pair-list li { margin-bottom: var(--s0); }
.pair-cards { list-style: none; padding: 0; display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.pair-cards a { display: flex; flex-direction: column; gap: var(--s0); height: 100%; padding: var(--s3); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); transition: border-color var(--t-fast), transform var(--t-fast); }
.pair-cards a:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
.pc-brand { font-family: var(--font-mono); font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.pc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; line-height: 1.25; }
.pc-sum { font-size: var(--fs-small); color: var(--ink-2); }

.sources { margin-top: var(--s6); border-top: 2px solid var(--ink); padding-top: var(--s2); }
.sources h2 { margin-top: var(--s1); font-size: var(--fs-h3); }
.sources ol { font-size: var(--fs-small); color: var(--ink-3); padding-left: var(--s3); word-break: break-word; }
.sources li { margin-bottom: var(--s-1); }
.src-type, .src-date { font-family: var(--font-mono); font-size: var(--fs-caption); }
.sources li:target { background: var(--mark-soft); }

.tag-warn { color: var(--mark); }

/* fit checker */
.fit-form { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: var(--s3); max-width: 28rem; margin: var(--s3) 0; }
.fit-form label { font-weight: 600; display: block; margin-bottom: var(--s0); }
.fit-input { display: flex; gap: var(--s0); }
.fit-input input, .fit-input select { min-height: 2.75rem; font: inherit; border: 1.5px solid var(--rule); border-radius: var(--r-md); background: var(--paper); color: var(--ink); padding: 0 var(--s1); }
.fit-input input { width: 7rem; font-family: var(--font-mono); font-size: 1.25rem; }
.fit-input input:focus, .fit-input select:focus { border-color: var(--accent); }
.hint { font-size: var(--fs-small); color: var(--ink-3); margin: var(--s0) 0 0; }
.fit-summary { font-size: 1.125rem; font-weight: 600; }
tr.fits .fit-cell { color: var(--accent); font-weight: 700; }
tr.nofit { opacity: 0.55; }

/* prose pages */
.prose { max-width: var(--measure); padding-top: var(--s4); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--s4); }
.prose li { margin-bottom: var(--s0); }

/* footer */
.footer { border-top: 2px solid var(--ink); background: var(--surface-sunk); padding: var(--s4) 0; font-size: var(--fs-small); color: var(--ink-2); }
.footer-links { display: flex; gap: var(--s3); flex-wrap: wrap; }
.fine { color: var(--ink-3); font-size: var(--fs-caption); }

@media (max-width: 560px) {
  .wrap { padding: 0 var(--s2); }
  .spec-table th, .spec-table td { padding: var(--s0) var(--s1); }
  .spec-table tbody th { width: 34%; }
  .why { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* scale drawings: wide on desktop, stacked on phones */
.draw-narrow { display: none; }
@media (max-width: 560px) {
  .draw-wide { display: none; }
  .draw-narrow { display: block; }
}
