/* ==========================================================================
   CostToRunIt design system.

   Concept: the appliance RATING PLATE - the stamped metal label on the back of
   every appliance giving volts, watts and amps. Data is set in monospace like
   a stamped plate; prose is set in IBM Plex Sans. Palette comes from an
   electrical panel: slate ink, cool statement white, filament amber, live teal.

   Rules this file must keep:
   - Pure ASCII. No raw multibyte glyphs (an editor with the wrong encoding
     corrupts them and every page breaks).
   - No @font-face, no CDN, no imports. One request, system-font fallbacks.
   - Mobile first. Every layout rule scales UP from a 320px viewport; the
     desktop rules live in min-width queries, so a phone downloads no
     desktop-only layout work it has to override.
   ========================================================================== */

:root {
  color-scheme: light;

  /* palette */
  --ink:        #131A22;   /* panel slate */
  --ink-soft:   #4A5663;
  --ink-faint:  #6E7A86;
  --paper:      #F5F7F9;   /* cool statement white, not cream */
  --plate:      #FFFFFF;   /* nameplate face */
  --wire:       #D3D9DF;   /* hairline */
  --wire-soft:  #E7EBEF;
  --filament:   #B96D0D;   /* amber signal - the glow. used sparingly */
  --filament-b: #E9A63B;
  --filament-w: rgba(201,122,20,.10);
  --live:       #0B6E6E;   /* live terminal teal - links, data */
  --live-b:     #0E8A8A;
  --live-w:     rgba(11,110,110,.10);
  --live-ring:  rgba(11,110,110,.18);
  --hi:         #A33C1B;   /* above average */
  --lo:         #176B4A;   /* below average */

  --plate-shadow: 0 1px 2px rgba(19,26,34,.06), 0 8px 24px -12px rgba(19,26,34,.14);
  --pop-shadow:   0 4px 8px -4px rgba(19,26,34,.14), 0 18px 40px -18px rgba(19,26,34,.32);

  /* type */
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI Semibold", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* spacing rhythm - one scale, used everywhere */
  --s1: .25rem;  --s2: .5rem;   --s3: .75rem;  --s4: 1rem;
  --s5: 1.5rem;  --s6: 2rem;    --s7: 2.75rem; --s8: 4rem;

  --wrap: 68rem;
  --gut: 1.15rem;             /* page gutter, widened on larger screens */
  --r: 3px;                   /* plates have square corners; 3px keeps it from looking broken */
  --head-h: 56px;             /* used for scroll-margin under the sticky header */
  --tap: 44px;                /* minimum comfortable touch target */
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink:        #E6EBF0;
  --ink-soft:   #AEBAC6;
  --ink-faint:  #8794A1;
  --paper:      #0D1319;
  --plate:      #161F28;
  --wire:       #2E3B48;
  --wire-soft:  #1E2832;
  --filament:   #EDAD45;
  --filament-b: #F2BC63;
  --filament-w: rgba(233,166,59,.12);
  --live:       #4FC4C4;
  --live-b:     #6FD8D8;
  --live-w:     rgba(79,196,196,.12);
  --live-ring:  rgba(79,196,196,.28);
  --hi:         #F0A07A;
  --lo:         #6FCFA2;
  --plate-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.6);
  --pop-shadow:   0 4px 10px -4px rgba(0,0,0,.5), 0 20px 44px -18px rgba(0,0,0,.75);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --ink:#E6EBF0; --ink-soft:#AEBAC6; --ink-faint:#8794A1;
    --paper:#0D1319; --plate:#161F28; --wire:#2E3B48; --wire-soft:#1E2832;
    --filament:#EDAD45; --filament-b:#F2BC63; --filament-w:rgba(233,166,59,.12);
    --live:#4FC4C4; --live-b:#6FD8D8; --live-w:rgba(79,196,196,.12); --live-ring:rgba(79,196,196,.28);
    --hi:#F0A07A; --lo:#6FCFA2;
    --plate-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -14px rgba(0,0,0,.6);
    --pop-shadow:   0 4px 10px -4px rgba(0,0,0,.5), 0 20px 44px -18px rgba(0,0,0,.75);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;      /* long slugs and figures never widen the page */
}
/* Anything the header could cover when jumped to. */
:target { scroll-margin-top: calc(var(--head-h) + 1rem); }
h1, h2, h3, section[id], [id] { scroll-margin-top: calc(var(--head-h) + 1rem); }

img, svg, table { max-width: 100%; }
img { height: auto; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gut), env(safe-area-inset-left));
  padding-right: max(var(--gut), env(safe-area-inset-right));
}
.narrow { max-width: 46rem; }

a { color: var(--live); text-decoration: none; text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--filament); outline-offset: 2px; border-radius: 2px; }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: .5rem; left: .5rem; width: auto; height: auto;
  clip: auto; margin: 0; padding: .6rem 1rem; z-index: 99;
  background: var(--ink); color: var(--paper); border-radius: var(--r);
}

/* ==========================================================================
   HEADER
   Mobile: brand + theme + hamburger on one 56px row, nav in a drop panel.
   Desktop (>=64rem): everything inline, hamburger gone.
   Without JS the .no-js rules below leave the nav permanently open and hide
   the button, so the site is fully navigable with scripting off.
   ========================================================================== */
.site-head {
  border-bottom: 1px solid var(--wire);
  background: var(--plate);
  position: sticky; top: 0; z-index: 30;
}
.head-inner {
  display: flex; align-items: center; gap: var(--s3);
  min-height: var(--head-h);
}
.brand {
  display: inline-flex; align-items: center; gap: .45rem; color: var(--ink);
  font-family: var(--cond); font-weight: 700; font-size: 1.16rem; letter-spacing: -.01em;
  margin-right: auto; padding: .35rem 0;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 20px; height: 20px; color: var(--filament); flex: 0 0 auto; }

.head-actions { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }

.icon-btn {
  background: none; border: 1px solid var(--wire); color: var(--ink-soft);
  min-width: var(--tap); height: var(--tap); border-radius: var(--r); cursor: pointer;
  line-height: 1; font-size: 1rem; display: grid; place-items: center; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { border-color: var(--filament); color: var(--filament); }
.icon-btn:active { transform: translateY(1px); }
.theme-btn { font-size: 1.05rem; }

/* hamburger drawn in CSS - no icon font, no extra request */
.menu-ico { display: block; width: 18px; height: 12px; position: relative; }
.menu-ico span {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .18s ease, opacity .12s ease, top .18s ease;
}
.menu-ico span:nth-child(1) { top: 0; }
.menu-ico span:nth-child(2) { top: 5px; }
.menu-ico span:nth-child(3) { top: 10px; }
.menu-btn[aria-expanded="true"] .menu-ico span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-ico span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-ico span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* the nav panel */
.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: none; flex-direction: column; gap: 0;
  background: var(--plate); border-bottom: 1px solid var(--wire);
  box-shadow: var(--pop-shadow);
  padding: var(--s2) max(var(--gut), env(safe-area-inset-left)) var(--s4);
  max-height: calc(100vh - var(--head-h)); overflow-y: auto;
}
.site-nav.is-open { display: flex; }
.site-nav a {
  color: var(--ink); font-size: 1rem; font-weight: 500;
  padding: .7rem .25rem; border-bottom: 1px solid var(--wire-soft);
  display: flex; align-items: center; min-height: var(--tap);
}
.site-nav a:last-child { border-bottom: 0; }
.site-nav a:hover { color: var(--live); text-decoration: none; }

/* header search sits at the top of the mobile panel */
.nav-search { display: flex; gap: .4rem; margin: var(--s2) 0 var(--s3); }
.nav-search .ac-wrap { flex: 1 1 auto; min-width: 0; }

.no-js .menu-btn { display: none; }
.no-js .site-nav {
  display: flex; position: static; box-shadow: none; border-bottom: 0;
  padding: 0 0 var(--s3); flex-direction: row; flex-wrap: wrap; gap: var(--s4);
}
.no-js .site-nav a { border-bottom: 0; padding: .35rem 0; min-height: 0; }
.no-js .nav-search { display: none; }

@media (min-width: 64rem) {
  .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center;
    gap: var(--s5); background: none; border-bottom: 0; box-shadow: none;
    padding: 0; max-height: none; overflow: visible;
  }
  .site-nav a {
    color: var(--ink-soft); font-size: .93rem; border-bottom: 0;
    padding: .25rem 0; min-height: 0;
  }
  .menu-btn { display: none; }
  .nav-search { display: none; }
  .head-actions { order: 3; margin-left: var(--s4); }
}

/* ---------- breadcrumbs ---------- */
.crumbs { border-bottom: 1px solid var(--wire-soft); background: var(--paper); }
.crumbs ol {
  list-style: none; display: flex; flex-wrap: nowrap; gap: .4rem; margin: 0;
  padding: .5rem 0; font-size: .8rem; font-family: var(--mono);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.crumbs ol::-webkit-scrollbar { display: none; }
.crumbs li { white-space: nowrap; }
.crumbs li + li::before { content: "/"; color: var(--ink-faint); margin-right: .4rem; }
.crumbs a { color: var(--ink-faint); }
.crumbs span { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--wire); background: var(--plate);
  padding: var(--s7) 0 var(--s6);
}
.hero h1 {
  font-family: var(--cond); font-size: clamp(2.05rem, 8.2vw, 3.9rem); line-height: 1.04;
  letter-spacing: -.025em; font-weight: 700; margin: 0 0 var(--s4); max-width: 30ch;
}
.hero h1 em {
  font-style: normal; position: relative; white-space: nowrap;
  background-image: linear-gradient(var(--filament-b), var(--filament-b));
  background-repeat: no-repeat; background-position: 0 88%; background-size: 100% .16em;
}
.hero-sub {
  font-size: clamp(1rem, 2.6vw, 1.12rem); color: var(--ink-soft);
  max-width: 56ch; margin: 0 0 var(--s5);
}

.hero-search { display: flex; gap: .5rem; max-width: 34rem; margin: 0 0 var(--s6); }
.hero-search .ac-wrap { flex: 1 1 auto; min-width: 0; }
.hero-search button {
  padding: 0 1.15rem; min-height: var(--tap); font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; background: var(--ink); color: var(--plate);
  border: 1px solid var(--ink); border-radius: var(--r); flex: 0 0 auto;
}
.hero-search button:hover { background: var(--live); border-color: var(--live); }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: var(--s4) var(--s5); max-width: 34rem;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--mono); font-size: clamp(1.4rem, 5vw, 1.75rem); font-weight: 600;
  letter-spacing: -.02em; color: var(--filament); line-height: 1.2;
}
.hero-stats span { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-faint); }

/* ==========================================================================
   SEARCH AUTOCOMPLETE (combobox)
   ========================================================================== */
.ac-wrap { position: relative; }
.ac-input, .hero-search input[type="search"], .nav-search input[type="search"] {
  width: 100%; min-width: 0; padding: .6rem .8rem; min-height: var(--tap);
  font: inherit; font-size: 1rem; border: 1px solid var(--wire); border-radius: var(--r);
  background: var(--paper); color: var(--ink); -webkit-appearance: none; appearance: none;
}
.ac-input:focus, .hero-search input:focus, .nav-search input:focus {
  border-color: var(--live); outline: none; box-shadow: 0 0 0 3px var(--live-ring);
}
.ac-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: .25rem; list-style: none;
  background: var(--plate); border: 1px solid var(--wire); border-radius: var(--r);
  box-shadow: var(--pop-shadow); max-height: 19rem; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ac-list[hidden] { display: none; }
.ac-opt {
  display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem;
  border-radius: 2px; cursor: pointer; min-height: 40px; color: var(--ink);
}
.ac-opt[aria-selected="true"], .ac-opt:hover { background: var(--live-w); }
.ac-opt-name { flex: 1 1 auto; font-size: .95rem; line-height: 1.3; }
.ac-opt-name b { color: var(--live); font-weight: 700; }
.ac-opt-kind {
  font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-faint); border: 1px solid var(--wire); border-radius: 2px;
  padding: .05rem .3rem; flex: 0 0 auto;
}
.ac-opt-v { font-family: var(--mono); font-size: .78rem; color: var(--ink-faint); flex: 0 0 auto; }
.ac-note {
  padding: .5rem .6rem; font-size: .84rem; color: var(--ink-faint);
  border-top: 1px solid var(--wire-soft); margin-top: .25rem;
}
.ac-empty { padding: .7rem .6rem; font-size: .9rem; color: var(--ink-faint); }

/* "did you mean" on the results page */
.didyoumean {
  background: var(--plate); border: 1px solid var(--wire); border-left: 3px solid var(--filament);
  border-radius: var(--r); padding: var(--s3) var(--s4); margin: 0 0 var(--s5); font-size: .95rem;
}
.didyoumean a { font-weight: 600; }

/* ---------- page scaffold ---------- */
.page { padding: var(--s6) var(--gut) var(--s8); }
.page-head { margin: 0 0 var(--s6); }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); margin: 0 0 .55rem;
}
.eyebrow a { color: var(--ink-faint); }
.page-head h1 {
  font-family: var(--cond); font-size: clamp(1.72rem, 6.2vw, 2.85rem); line-height: 1.1;
  letter-spacing: -.02em; font-weight: 700; margin: 0 0 .8rem; max-width: 34ch;
}
.lede { font-size: clamp(1rem, 2.4vw, 1.09rem); color: var(--ink-soft); max-width: 64ch; margin: 0; }
.lede strong, .prose strong { color: var(--ink); font-weight: 600; }

/* ---------- THE SIGNATURE: rating plate ---------- */
.answer {
  position: relative; background: var(--plate); border: 1px solid var(--wire);
  border-radius: var(--r); padding: var(--s5) var(--s4) var(--s4); margin: 0 0 var(--s6);
  box-shadow: var(--plate-shadow);
}
/* corner screws, like a stamped metal plate */
.answer::before, .answer::after {
  content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: var(--wire); top: 8px;
}
.answer::before { left: 8px; }
.answer::after  { right: 8px; }
.answer-h {
  font-family: var(--mono); font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .16em; color: var(--ink-faint); margin: 0 0 var(--s4);
  padding-bottom: .65rem; border-bottom: 1px solid var(--wire-soft);
}
/* 2-up on phones, auto-fit from 30rem. A 4-across grid at 320px made every
   figure wrap mid-number. */
.stat-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--wire-soft);
}
.stat { background: var(--plate); padding: .8rem .85rem; display: flex; flex-direction: column; gap: .1rem; }
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }
.stat-value {
  font-family: var(--mono); font-size: clamp(1.2rem, 5vw, 1.5rem); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.15; color: var(--ink);
}
.stat-sub { font-family: var(--mono); font-size: .74rem; color: var(--ink-faint); }
.answer-note { font-size: .86rem; color: var(--ink-faint); margin: var(--s4) 0 0; }

@media (min-width: 34rem) {
  .stat-row { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
  .answer { padding: var(--s5) var(--s5) var(--s4); }
}

/* ---------- calculator ---------- */
.calc {
  background: var(--plate); border: 1px solid var(--wire); border-left: 3px solid var(--filament);
  border-radius: var(--r); padding: var(--s5) var(--s4); margin: 0 0 var(--s6);
}
.calc h2 { font-family: var(--cond); font-size: clamp(1.25rem, 4.4vw, 1.45rem); letter-spacing: -.015em; margin: 0 0 .3rem; }
.calc-intro { font-size: .88rem; color: var(--ink-faint); margin: 0 0 var(--s5); }
.calc-grid { display: grid; grid-template-columns: 1fr; gap: var(--s4); margin-bottom: var(--s5); }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field-label { font-size: .85rem; font-weight: 600; }
.field-unit { font-weight: 400; color: var(--ink-faint); font-family: var(--mono); font-size: .74rem; }
.field input, .field select {
  padding: .55rem .7rem; min-height: var(--tap); font-family: var(--mono); font-size: 1.02rem;
  color: var(--ink); background: var(--paper); border: 1px solid var(--wire);
  border-radius: var(--r); width: 100%; -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 2rem; color: var(--ink);
}
.field input:focus, .field select:focus {
  border-color: var(--live); outline: none; box-shadow: 0 0 0 3px var(--live-ring);
}
.field-hint { font-size: .76rem; color: var(--ink-faint); line-height: 1.45; }

.calc-out { border-top: 1px solid var(--wire-soft); padding-top: var(--s4); }
.calc-out-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--wire-soft); }
.calc-out-cell {
  background: var(--plate); padding: .7rem .4rem; text-align: center;
  display: flex; flex-direction: column; gap: .1rem;
}
.calc-out-cell span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }
.calc-out-cell strong {
  font-family: var(--mono); font-size: clamp(1.05rem, 4.6vw, 1.3rem); font-weight: 600; letter-spacing: -.02em;
}
.calc-out-cell.is-year strong { color: var(--filament); font-size: clamp(1.2rem, 5.4vw, 1.55rem); }
.calc-kwh { font-family: var(--mono); font-size: .82rem; color: var(--ink-faint); text-align: center; margin: .85rem 0 0; }
.noscript-note { font-size: .86rem; color: var(--hi); margin: var(--s4) 0 0; }

@media (min-width: 34rem) {
  .calc { padding: var(--s5); }
  .calc-grid { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.1rem; }
  .calc-out-row { grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); }
}

/* ---------- prose ---------- */
.prose { margin: 0 0 var(--s7); max-width: 68ch; }
.prose.faq, .prose.wide { max-width: none; }
.prose h2 {
  font-family: var(--cond); font-size: clamp(1.35rem, 5vw, 1.65rem); letter-spacing: -.018em;
  line-height: 1.2; margin: var(--s6) 0 .75rem;
}
.prose h3 { font-family: var(--cond); font-size: clamp(1.12rem, 4vw, 1.22rem); letter-spacing: -.01em; margin: var(--s5) 0 .5rem; }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.05rem; }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.15rem; }
.prose li { margin-bottom: .45rem; }
.tips { list-style: none; padding: 0; }
.tips li { position: relative; padding-left: 1.5rem; margin-bottom: .75rem; }
.tips li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: .7rem; height: 1px; background: var(--filament);
}
.formula {
  font-family: var(--mono); font-size: .9rem; background: var(--plate); color: var(--ink);
  border: 1px solid var(--wire); border-radius: var(--r); padding: .8rem .9rem;
  overflow-x: auto; line-height: 1.7; -webkit-overflow-scrolling: touch;
}
.caveat {
  font-size: .9rem; color: var(--ink-soft); border-left: 2px solid var(--wire);
  padding: .1rem 0 .1rem 1rem; margin: var(--s5) 0 0;
}

/* Pair-context blocks. Set slightly apart from body prose because they say
   something specific to this appliance in this state, not general guidance. */
.ctx-season {
  margin: 0 0 var(--s5); padding: var(--s3) var(--s4);
  background: var(--plate); border: 1px solid var(--wire);
  border-left: 3px solid var(--live); border-radius: var(--r);
  font-size: .95rem; color: var(--ink-soft); max-width: 68ch;
}
.ctx-market {
  font-size: .93rem; color: var(--ink-soft);
  border-left: 2px solid var(--filament); padding: .1rem 0 .1rem 1rem;
  margin: var(--s4) 0 0;
}

/* ==========================================================================
   TABLES
   Under 40rem every .data-table collapses to one card per row, using the
   data-label attribute on each cell as its heading. A 51-row x 5-column table
   cannot be read on a 360px screen any other way, and horizontal scroll hides
   the column that matters. Cells marked data-hide-sm drop out entirely.
   ========================================================================== */
.table-wrap {
  margin: 0 0 var(--s5); border: 1px solid var(--wire); border-radius: var(--r); background: var(--plate);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.data-table caption {
  text-align: left; font-family: var(--mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .13em; color: var(--ink-faint); padding: .75rem .9rem;
  border-bottom: 1px solid var(--wire-soft);
}
.data-table th, .data-table td { padding: .6rem .9rem; text-align: left; border-bottom: 1px solid var(--wire-soft); }
.data-table thead th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint);
  font-weight: 600; white-space: nowrap; background: var(--paper);
}
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody th { font-weight: 500; }
.data-table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: var(--wire-soft); }
.row-mine { background: var(--filament-w); }
.rank { color: var(--ink-faint); width: 3rem; }
.v-hi { color: var(--hi); }
.v-lo { color: var(--lo); }
.tag {
  font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em;
  padding: .1rem .35rem; border: 1px solid var(--wire); border-radius: 2px; color: var(--ink-faint);
  margin-left: .35rem; white-space: nowrap; display: inline-block;
}
.tag-hi { color: var(--hi); border-color: var(--hi); }
.tag-lo { color: var(--lo); border-color: var(--lo); }
.col-bar { width: 8rem; }
.bar { display: block; height: 6px; background: var(--wire-soft); border-radius: 3px; overflow: hidden; min-width: 4rem; }
.bar-fill { display: block; height: 100%; background: var(--filament); }

/* --- stacked card mode --- */
@media (max-width: 39.99rem) {
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table caption { padding: .7rem .85rem; }
  .data-table tbody tr {
    border-bottom: 1px solid var(--wire); padding: .7rem .85rem .8rem;
  }
  .data-table tbody tr:last-child { border-bottom: 0; }
  .data-table tbody tr:hover { background: none; }
  .data-table tbody th[scope="row"] {
    border-bottom: 0; padding: 0 0 .45rem; font-weight: 600; font-size: 1rem; line-height: 1.35;
  }
  .data-table tbody td {
    border-bottom: 0; padding: .18rem 0; display: flex; align-items: baseline;
    justify-content: space-between; gap: 1rem; font-size: .9rem;
  }
  .data-table tbody td::before {
    content: attr(data-label); font-family: var(--sans); font-size: .74rem;
    text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint);
    flex: 0 0 auto; font-variant-numeric: normal;
  }
  .data-table tbody td:empty { display: none; }
  .data-table td[data-hide-sm] { display: none; }
  .data-table .rank { width: auto; }
  .row-mine { border-left: 3px solid var(--filament); }
}
@media (min-width: 40rem) {
  .data-table td { white-space: nowrap; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---------- charts ---------- */
.chart-box { background: var(--plate); border: 1px solid var(--wire); border-radius: var(--r); padding: var(--s4); }
.spark { display: block; width: 100%; height: auto; }
.spark-line { fill: none; stroke: var(--filament); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--filament-w); stroke: none; }
.spark-dot { fill: var(--filament); }
.chart-cap { font-family: var(--mono); font-size: .74rem; color: var(--ink-faint); margin: .55rem 0 0; }

/* ---------- cards ---------- */
.cat-block { margin: 0 0 var(--s7); }
.cat-head { margin-bottom: var(--s4); max-width: 62ch; }
.cat-head h2 { font-family: var(--cond); font-size: clamp(1.25rem, 4.6vw, 1.5rem); letter-spacing: -.015em; margin: 0 0 .25rem; }
.cat-head h2 a { color: var(--ink); }
.cat-head p { font-size: .91rem; color: var(--ink-soft); margin: 0; }
.card-grid {
  list-style: none; padding: 0; margin: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .6rem;
}
.card-grid.wide { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.card a {
  display: flex; flex-direction: column; gap: .18rem; height: 100%;
  background: var(--plate); border: 1px solid var(--wire); border-radius: var(--r);
  padding: .8rem .9rem; color: var(--ink);
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.card a:hover {
  border-color: var(--filament); text-decoration: none;
  box-shadow: var(--plate-shadow); transform: translateY(-1px);
}
.card-name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.card-meta { font-family: var(--mono); font-size: .73rem; color: var(--ink-faint); }
.card-cost { font-family: var(--mono); font-size: 1.1rem; font-weight: 600; color: var(--filament); margin-top: .3rem; }
.card-cost small { font-size: .68rem; font-weight: 400; color: var(--ink-faint); margin-left: .15rem; }
.card-blurb { font-size: .8rem; color: var(--ink-soft); line-height: 1.5; margin-top: .35rem; }

@media (min-width: 34rem) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
  .card-grid.wide { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
}

/* ---------- chips ---------- */
.chips { list-style: none; padding: 0; margin: 0 0 var(--s4); display: flex; flex-wrap: wrap; gap: .4rem; }
.chips a {
  display: inline-flex; align-items: baseline; gap: .4rem;
  border: 1px solid var(--wire); border-radius: var(--r); padding: .45rem .7rem;
  font-size: .88rem; color: var(--ink); background: var(--plate);
  transition: border-color .14s ease, color .14s ease;
}
.chips a:hover { border-color: var(--live); color: var(--live); text-decoration: none; }
.chips.big a { padding: .5rem .85rem; font-size: .93rem; }
.chip-v { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); }
.more { font-size: .9rem; font-weight: 500; }
.linkouts { display: grid; grid-template-columns: 1fr; gap: var(--s5); margin: 0 0 var(--s6); }
.linkout h2 { font-family: var(--cond); font-size: 1.12rem; letter-spacing: -.01em; margin: 0 0 .6rem; }
@media (min-width: 44rem) {
  .linkouts { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: var(--s6); }
}

/* ---------- callout ---------- */
.callout {
  background: var(--plate); border: 1px solid var(--wire); border-left: 3px solid var(--live);
  border-radius: var(--r); padding: var(--s5) var(--s4); margin: 0 0 var(--s7); max-width: 68ch;
}
.callout h2 { font-family: var(--cond); font-size: clamp(1.15rem, 4.4vw, 1.3rem); letter-spacing: -.012em; margin: 0 0 .45rem; }
.callout p { margin: 0; color: var(--ink-soft); }

/* ---------- faq ---------- */
.faq details {
  border: 1px solid var(--wire); border-radius: var(--r); background: var(--plate);
  margin-bottom: .5rem;
}
.faq details[open] { border-color: var(--live); }
.faq summary {
  cursor: pointer; padding: .8rem .9rem; font-weight: 600; font-size: .95rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: var(--tap); -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-family: var(--mono); color: var(--filament); font-size: 1.2rem;
  line-height: 1; flex: 0 0 auto;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--live); }
.faq-body { padding: 0 .9rem .9rem; }
.faq-body p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- compare ---------- */
.compare-form {
  display: grid; grid-template-columns: 1fr; gap: var(--s4); align-items: end;
  background: var(--plate); border: 1px solid var(--wire); border-radius: var(--r);
  padding: var(--s4); margin: 0 0 var(--s6);
}
.compare-form button {
  padding: 0 1.2rem; min-height: var(--tap); font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; background: var(--ink); color: var(--plate);
  border: 1px solid var(--ink); border-radius: var(--r); width: 100%;
}
.compare-form button:hover { background: var(--live); border-color: var(--live); }
@media (min-width: 40rem) {
  .compare-form { grid-template-columns: 1fr 1fr auto; }
  .compare-form button { width: auto; }
}

/* ---------- pills ---------- */
.pill { font-family: var(--mono); font-size: .78rem; padding: .15rem .45rem; border-radius: 2px; border: 1px solid var(--wire); white-space: nowrap; }
.pill-hi { color: var(--hi); border-color: var(--hi); }
.pill-lo { color: var(--lo); border-color: var(--lo); }
.pill-mid { color: var(--ink-faint); }

/* ---------- ads ---------- */
.ad-slot { margin: var(--s6) 0; min-height: 90px; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--wire); background: var(--plate);
  padding: var(--s7) 0 var(--s5); margin-top: var(--s6); font-size: .92rem;
}
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); margin-bottom: var(--s6); }
.foot-about { grid-column: 1 / -1; }
.foot-about p { color: var(--ink-soft); margin: .7rem 0 0; font-size: .87rem; max-width: 40ch; }
.foot-src { font-family: var(--mono); font-size: .76rem !important; color: var(--ink-faint) !important; }
.foot-col h2 {
  font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-faint); margin: 0 0 .7rem; font-weight: 600;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin-bottom: .3rem; }
.foot-col a { color: var(--ink-soft); font-size: .88rem; display: inline-block; padding: .2rem 0; }
.foot-col a:hover { color: var(--live); }
.foot-legal {
  border-top: 1px solid var(--wire-soft); padding-top: var(--s5); margin: 0;
  font-size: .79rem; color: var(--ink-faint); max-width: 90ch;
}
@media (min-width: 52rem) {
  .foot-grid { grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--s6); }
  .foot-about { grid-column: auto; }
}

/* ---------- calculator reset + list filter ---------- */
.calc-reset { margin: var(--s4) 0 0; text-align: center; font-size: .82rem; }
.calc-reset a { color: var(--ink-faint); border-bottom: 1px dotted var(--wire); text-decoration: none; }
.calc-reset a:hover { color: var(--live); border-bottom-color: var(--live); }

.list-filter {
  display: grid; grid-template-columns: 1fr; gap: .5rem;
  margin: 0 0 var(--s6); padding: var(--s4); background: var(--plate);
  border: 1px solid var(--wire); border-radius: var(--r);
}
.filter-count {
  font-family: var(--mono); font-size: .78rem; color: var(--ink-faint);
  margin: 0; white-space: nowrap;
}
@media (min-width: 40rem) {
  .list-filter { grid-template-columns: 1fr auto; align-items: end; gap: var(--s4); }
  .filter-count { margin-bottom: .55rem; }
}

/* ---------- wider gutters once there is room ---------- */
@media (min-width: 40rem) {
  :root { --gut: 1.5rem; }
  body { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-head, .site-foot, .calc, .ad-slot, .crumbs, .linkouts, .list-filter, .ac-list { display: none; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .answer { border: 1px solid #000; box-shadow: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: revert; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .card a[href]::after, .chips a[href]::after, .crumbs a[href]::after { content: ""; }
}
