/* ==========================================================================
   Heatpump Economics — Design System (shared across every page)
   Part of the OwnershipEconomics family. Same structural framework as
   DriveEconomics.com — recolored and re-themed for heating & cooling.
   ========================================================================== */

:root {
  /* Palette — warm "ember" (heat) + cool "frost" (AC) duality */
  --ink: #17140F;
  --ink-soft: #241F17;
  --paper: #FAF7F2;
  --card: #FFFFFF;
  --mute: #6E6459;
  --line: #E6DFD3;
  --line-strong: #CFC4B0;
  --ember: #D9661A;       /* primary accent — heating / CTAs */
  --ember-soft: #FBEADB;
  --frost: #2A6E8C;       /* secondary accent — cooling side only */
  --frost-soft: #E4EEF2;
  --credit: #12805A;      /* savings / money back — consistent w/ family */

  /* Typography — shared across the OwnershipEconomics family */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1.5rem;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --duration: 240ms;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.ink-mute { color: var(--mute); }

/* ==========================================================================
   Header & nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Logo mark: a square split diagonally between ember (heat) and frost (cool) */
.logo-mark {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: var(--ink);
  position: relative;
  flex: 0 0 auto;
}

.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
}

.logo-mark::before {
  top: 4px;
  left: 4px;
  background: var(--ember);
}

.logo-mark::after {
  bottom: 4px;
  right: 4px;
  background: var(--frost);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mute);
  transition: color var(--duration) var(--ease);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover { color: var(--ink); }

.nav-link.is-active { color: var(--ink); }

.nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ember);
}

.nav-item {
  position: relative;
}

/* Invisible hover bridge over the gap between the trigger and the menu,
   so moving the mouse down into the dropdown never registers as "leaving"
   the nav item. Desktop hover only — mobile uses click/accordion instead. */
@media (min-width: 901px) {
  .nav-item::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 0.75rem;
    display: none;
  }

  .nav-item.is-open::before {
    display: block;
  }
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  color: var(--mute);
}

.nav-dropdown-trigger:hover { color: var(--ink); }

.nav-caret {
  transition: transform var(--duration) var(--ease);
}

.nav-item.is-open .nav-caret { transform: rotate(180deg); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 245px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(23, 20, 15, 0.12);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), visibility var(--duration);
  z-index: 40;
}

.nav-item.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mute);
  border-radius: 4px;
  white-space: nowrap;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.nav-dropdown-link:hover { color: var(--ink); background: var(--paper); }
.nav-dropdown-link.is-active { color: var(--ink); }

.nav-dropdown-group {
  display: block;
  padding: 0.45rem 0.75rem 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.nav-dropdown-separator {
  display: block;
  height: 1px;
  margin: 0.35rem 0.5rem;
  background: var(--line);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding: var(--space-9) 0 var(--space-8); }
.hero-compact { padding: var(--space-8) 0 var(--space-6); }

/* Analysis variant — tinted band + accent rule to visually separate a manufacturer/model deep-dive hero from the article body below it */
.hero-analysis {
  background: var(--frost-soft);
  border-bottom: 3px solid var(--frost);
}
.hero-analysis .eyebrow { color: var(--frost); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: var(--space-5);
}

.hero-title {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 0.98;
  max-width: 20ch;
  margin-bottom: var(--space-5);
}

.hero-compact .hero-title { font-size: clamp(2.25rem, 5.5vw, 3.75rem); max-width: 24ch; }

.hero-lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 62ch;
  margin-bottom: var(--space-8);
}

/* ==========================================================================
   Compare component — the signature element
   ========================================================================== */

.compare {
  background: var(--card);
  border: 1px solid var(--line);
  margin-bottom: var(--space-7);
}

.compare-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.compare-meta-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.compare-meta-detail {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.compare-col {
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
}

.compare-col-head { margin-bottom: var(--space-5); }

.compare-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  margin-bottom: var(--space-3);
}

.compare-tag-heat { color: var(--ember); border-color: var(--ember); }
.compare-tag-cool { color: var(--frost); border-color: var(--frost); }

.compare-col-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.compare-total {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.25rem;
  font-feature-settings: "tnum";
}

.compare-total-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-5);
}

.compare-divider { width: 1px; background: var(--line); position: relative; }

.compare-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mute);
  padding: var(--space-2) 0;
}

.compare-foot { border-top: 1px solid var(--line); padding: var(--space-5); background: var(--paper); }

.compare-result {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.compare-result-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.compare-result-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--credit);
}

.compare-result-amount .ink-mute { font-size: 0.875rem; font-weight: 400; letter-spacing: 0; }

.compare-disclaimer { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); }

/* ==========================================================================
   Ledger (line item lists)
   ========================================================================== */

.ledger { display: flex; flex-direction: column; gap: 0; }

.ledger li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.625rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.9375rem;
}

.ledger li:first-child { border-top: 1px solid var(--ink); }

.ledger .num { font-family: var(--font-mono); font-weight: 500; font-feature-settings: "tnum"; color: var(--ink); }

.ledger-credit .num { color: var(--credit); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.hero-cta { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  transition: transform var(--duration) var(--ease), background-color var(--duration) var(--ease), color var(--duration) var(--ease);
  border: 1px solid transparent;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ember); color: var(--ink); }

.btn-ghost { border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn-secondary { border-color: var(--line-strong); color: var(--ink); background: var(--card); }
.btn-secondary:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ==========================================================================
   Crossover chart section
   ========================================================================== */

.crossover { background: var(--ink); color: var(--paper); padding: var(--space-9) 0; }

.eyebrow-light { color: var(--ember); }

.crossover-head { max-width: 62ch; margin-bottom: var(--space-7); }

.crossover-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: var(--space-4);
  color: var(--paper);
}

.crossover-lede { font-size: 1.0625rem; line-height: 1.6; color: rgba(250, 247, 242, 0.7); }

.crossover-chart { width: 100%; margin-bottom: var(--space-5); }
.crossover-chart svg { width: 100%; height: auto; overflow: visible; }

.crossover-chart .line { stroke-dasharray: 1500; stroke-dashoffset: 1500; transition: stroke-dashoffset 1800ms cubic-bezier(0.4, 0, 0.2, 1); }
.crossover-chart.is-visible .line { stroke-dashoffset: 0; }
.crossover-chart .line-b { transition-delay: 200ms; }

.crossover-chart .cross-dot, .crossover-chart .cross-pulse, .crossover-chart .cross-guide,
.crossover-chart .cross-label, .crossover-chart .endpoint-label {
  opacity: 0; transition: opacity 600ms ease; transition-delay: 1800ms;
}

.crossover-chart.is-visible .cross-dot, .crossover-chart.is-visible .cross-pulse,
.crossover-chart.is-visible .cross-guide, .crossover-chart.is-visible .cross-label,
.crossover-chart.is-visible .endpoint-label { opacity: 1; }

.crossover-chart.is-visible .cross-pulse {
  transform-origin: 765px 127px;
  animation: pulse 2.2s ease-out 2.4s infinite;
}

@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(3); opacity: 0; } }

.crossover-foot { border-top: 1px solid rgba(250, 247, 242, 0.15); padding-top: var(--space-4); }

.crossover-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: rgba(250, 247, 242, 0.5); max-width: 75ch; }

@media (max-width: 700px) {
  .crossover-chart .cross-label rect { display: none; }
  .crossover-chart .cross-label text { display: none; }
  .crossover-chart .endpoint-label text { font-size: 18px; }
}

/* ==========================================================================
   Sections (generic)
   ========================================================================== */

.section { padding: var(--space-9) 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: var(--space-7); max-width: 30ch; }
.section-rule { display: block; width: 56px; height: 2px; background: var(--ink); margin-bottom: var(--space-4); }
.section-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }

.section-body {
  max-width: 65ch;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.section-body .emphasis {
  font-weight: 600; color: var(--ink); font-size: 1.125rem;
  border-left: 3px solid var(--ember); padding-left: var(--space-4); margin-top: var(--space-3);
}

.methodology-followup { margin-top: var(--space-5); font-family: var(--font-mono); font-size: 0.875rem; letter-spacing: 0.02em; }
.methodology-followup a { color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: border-color var(--duration) var(--ease); }
.methodology-followup a:hover { border-bottom-color: var(--ember); }

/* ==========================================================================
   Included (cost ledger cards)
   ========================================================================== */

.ledger-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }

.ledger-card { background: var(--card); border: 1px solid var(--line); padding: var(--space-6) var(--space-5); }
.ledger-card-credit { background: var(--ember-soft); border-color: var(--ember); }

.ledger-card-title {
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--space-4);
}

.ledger-card .ledger li { font-size: 1rem; }

/* ==========================================================================
   Tools grid
   ========================================================================== */

.tool-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}

.tool-card {
  background: var(--card); padding: var(--space-6) var(--space-5);
  display: flex; flex-direction: column; min-height: 240px; position: relative;
  transition: background-color var(--duration) var(--ease);
}

.tool-card:hover { background: var(--paper); }

.tool-card-featured { background: var(--ink); color: var(--paper); }
.tool-card-featured:hover { background: var(--ink-soft); }

.tool-card-eyebrow {
  font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); margin-bottom: var(--space-3);
}

.tool-card-featured .tool-card-eyebrow { color: var(--ember); }

.tool-card-title { font-size: 1.625rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: var(--space-3); }
.tool-card-desc { font-size: 0.9375rem; line-height: 1.5; color: var(--mute); margin-bottom: auto; }
.tool-card-featured .tool-card-desc { color: rgba(250, 247, 242, 0.7); }

.tool-card-arrow { font-family: var(--font-mono); font-size: 1.25rem; margin-top: var(--space-5); transition: transform var(--duration) var(--ease); align-self: flex-start; }
.tool-card:hover .tool-card-arrow { transform: translateX(6px); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { background: var(--ink); color: var(--paper); padding-top: var(--space-8); margin-top: var(--space-9); }

.footer-inner {
  display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-7);
  padding-bottom: var(--space-6); border-bottom: 1px solid rgba(250, 247, 242, 0.15);
}

.footer-brand .logo-text { color: var(--paper); }
.footer-brand .logo-mark { background: var(--paper); }
.footer-brand .logo-mark::before { background: var(--ember); }
.footer-brand .logo-mark::after { background: var(--frost); }

.footer-tag { margin-top: var(--space-4); color: rgba(250, 247, 242, 0.7); font-size: 0.9375rem; max-width: 32ch; }

.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.footer-col { display: flex; flex-direction: column; gap: var(--space-2); }

.footer-col-title {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(250, 247, 242, 0.5); margin-bottom: var(--space-2);
}

.footer-col a { font-size: 0.9375rem; color: rgba(250, 247, 242, 0.85); transition: color var(--duration) var(--ease); padding: 2px 0; }
.footer-col a:hover { color: var(--ember); }

.footer-fineprint { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.6; color: rgba(250, 247, 242, 0.6); }

/* Platform / family-of-sites strip */
.footer-platform {
  padding: var(--space-5) 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
}
.footer-platform-label {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(250, 247, 242, 0.5);
}
.footer-platform-links { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer-platform-links a { font-size: 0.875rem; color: rgba(250, 247, 242, 0.85); border-bottom: 1px dashed rgba(250,247,242,0.3); }
.footer-platform-links a:hover { color: var(--ember); border-bottom-color: var(--ember); }
.footer-platform-links .is-soon { color: rgba(250, 247, 242, 0.4); border-bottom: none; cursor: default; }

.footer-meta {
  padding: var(--space-5) var(--container-pad);
  font-family: var(--font-mono); font-size: 0.75rem; color: rgba(250, 247, 242, 0.5);
  margin: 0 auto; border-top: 1px solid rgba(250,247,242,0.1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }

  .primary-nav.is-open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: var(--space-3) var(--container-pad);
  }

  .primary-nav.is-open .nav-link { width: 100%; padding: var(--space-3) 0; border-top: 1px solid var(--line); font-size: 1rem; }
  .primary-nav.is-open .nav-link:first-child { border-top: none; }
  .primary-nav.is-open .nav-link.is-active::after { display: none; }

  .primary-nav.is-open .nav-item { width: 100%; }
  .primary-nav.is-open .nav-dropdown-trigger { justify-content: space-between; }

  .primary-nav.is-open .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    min-width: 0;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 var(--space-2) var(--space-4);
  }

  .primary-nav.is-open .nav-item.is-open .nav-dropdown { display: flex; }
  .primary-nav.is-open .nav-dropdown-link { padding: var(--space-2) 0; font-size: 0.9375rem; }
  .primary-nav.is-open .nav-dropdown-group { padding: var(--space-3) 0 var(--space-1); }
  .primary-nav.is-open .nav-dropdown-separator { margin: var(--space-2) 0; }

  .compare-grid { grid-template-columns: 1fr; }
  .compare-divider { width: auto; height: 1px; background: var(--line); }
  .compare-divider span { top: 50%; left: 50%; padding: 0 var(--space-3); }
  .compare-col { padding: var(--space-5); }

  .ledger-cards { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-platform { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  :root { --container-pad: 1.25rem; --space-9: 4rem; }
  .header-inner { height: 60px; }
  .primary-nav.is-open { top: 60px; }
  .hero { padding: var(--space-7) 0 var(--space-7); }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   About / Methodology / Contact — long-form article pages
   ========================================================================== */

.ink-mute { color: var(--mute); }

.hero-compact { padding: var(--space-6) 0 var(--space-4); }
.hero-lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 62ch;
  margin-bottom: var(--space-8);
}

.about-article { padding: var(--space-7) 0 var(--space-9); background: var(--paper); }
.about-section { margin-bottom: var(--space-9); max-width: 78ch; }
.about-h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--space-5);
  border-top: 2px solid var(--ink);
  padding-top: var(--space-4);
}
.about-section p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.about-section p:last-child { margin-bottom: 0; }
.about-section a { color: var(--ember); border-bottom: 1px solid transparent; transition: border-color var(--duration) var(--ease); }
.about-section a:hover { border-bottom-color: var(--ember); }
.about-emphasis {
  font-weight: 500;
  color: var(--ink) !important;
  font-size: 1.125rem !important;
  border-left: 3px solid var(--ember);
  padding-left: var(--space-4);
  margin-top: var(--space-5) !important;
}

.commitments-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  max-width: 100%;
}
@media (max-width: 800px) { .commitments-grid { grid-template-columns: 1fr; } }
.commitment-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--duration) var(--ease);
}
.commitment-card:hover { border-color: var(--line-strong); }
.commitment-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--ember);
  margin-bottom: var(--space-2);
}
.commitment-title {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.commitment-body {
  font-size: 0.9375rem !important;
  line-height: 1.55 !important;
  color: var(--mute) !important;
  margin-bottom: 0 !important;
}

.data-sources-list { margin-top: var(--space-5); margin-bottom: var(--space-5); display: flex; flex-direction: column; gap: 0; }
.data-source {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-top: 1px dashed var(--line);
}
.data-source:first-child { border-top: 1px solid var(--ink); }
.data-source:last-child { border-bottom: 1px solid var(--line); }
.data-source dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  padding-top: 3px;
}
.data-source dd { font-size: 0.9375rem; line-height: 1.6; color: var(--mute); margin: 0; }
.data-sources-note { font-family: var(--font-mono) !important; font-size: 0.8125rem !important; color: var(--mute) !important; }

.founder-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  padding: var(--space-7) var(--space-6);
  max-width: 100%;
}
.founder-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: var(--space-3);
}
.founder-block .about-h2 { border-top: none; padding-top: 0; margin-bottom: var(--space-2); font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.founder-title { font-family: var(--font-mono) !important; font-size: 0.875rem !important; color: var(--mute) !important; margin-bottom: var(--space-6) !important; letter-spacing: 0.02em; }
.founder-content { margin-bottom: var(--space-6); }
.founder-content p { font-size: 1.0625rem; line-height: 1.65; }
.founder-expertise { border-top: 1px solid var(--line); padding-top: var(--space-5); }
.founder-expertise-label {
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: var(--ink) !important;
  margin-bottom: var(--space-3) !important;
}
.expertise-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.expertise-tags li {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-1) var(--space-3);
}

.about-cta { background: var(--ink); color: var(--paper); padding: var(--space-7) var(--space-6); margin-top: var(--space-9); }
.about-cta-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.015em; color: var(--paper); margin-bottom: var(--space-3); }
.about-cta-lede { font-size: 1.0625rem !important; line-height: 1.6 !important; color: rgba(250, 247, 242, 0.75) !important; margin-bottom: var(--space-5) !important; max-width: 60ch; }
.about-cta-buttons { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.about-cta .btn-ghost { border-color: rgba(250, 247, 242, 0.3); color: var(--paper); }
.about-cta .btn-secondary { background: transparent; border-color: rgba(250, 247, 242, 0.3); color: var(--paper); }
.about-cta .btn-secondary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.about-cta .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Methodology page — formula blocks, TOC */
.meth-toc { background: var(--card); border: 1px solid var(--line); padding: var(--space-5); margin-bottom: var(--space-8); max-width: 78ch; }
.meth-toc-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mute); margin-bottom: var(--space-3); }
.meth-toc ol { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2); }
.meth-toc a { color: var(--ink); font-weight: 500; }
.meth-toc a:hover { color: var(--ember); }
.meth-formula {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.7;
  padding: var(--space-5);
  margin: var(--space-5) 0;
  overflow-x: auto;
  white-space: pre;
}
.meth-note { background: var(--ember-soft); border-left: 3px solid var(--ember); padding: var(--space-4) var(--space-5); margin: var(--space-5) 0; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.meth-source-list { margin: var(--space-4) 0 var(--space-5); padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-2); font-size: 0.9375rem; }
.meth-source-list a { word-break: break-word; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); max-width: 1000px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--card); border: 1px solid var(--line); padding: var(--space-6); }
.contact-card h3 { font-size: 1.1875rem; font-weight: 600; margin-bottom: var(--space-3); color: var(--ink); }
.contact-card p { font-size: 0.9375rem; line-height: 1.6; color: var(--mute); margin-bottom: var(--space-4); }
.contact-card p:last-child { margin-bottom: 0; }
.contact-email { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--ember); font-weight: 500; }

@media (max-width: 800px) {
  .data-source { grid-template-columns: 1fr; gap: var(--space-2); }
}

.about-section code, .meth-note code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--ember-soft);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
.meth-note code { background: rgba(255,255,255,0.5); }

/* ==========================================================================
   Guide articles (long-form, numbered TOC + sections)
   ========================================================================== */

.method-article { padding: var(--space-7) 0 var(--space-9); background: var(--paper); }

.method-toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-9);
  max-width: 60ch;
}
.method-toc-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: var(--space-3);
}
.method-toc-list {
  list-style: decimal-leading-zero;
  padding-left: var(--space-5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.method-toc-list li {
  padding-left: var(--space-2);
  color: var(--mute);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}
.method-toc-list a {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.method-toc-list a:hover { border-bottom-color: var(--ink); }

.method-section {
  margin-bottom: var(--space-9);
  max-width: 78ch;
  scroll-margin-top: var(--space-6);
}
.method-h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: var(--space-5);
  padding-top: var(--space-4);
  border-top: 2px solid var(--ink);
  color: var(--ink);
}
.method-h3 {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}
.method-section p {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
}
.method-section p:last-child { margin-bottom: 0; }
.method-section a { color: var(--ember); border-bottom: 1px solid transparent; transition: border-color 200ms ease; }
.method-section a:hover { border-bottom-color: var(--ember); }
.method-section strong { color: var(--ink); font-weight: 600; }

.method-list, .method-list-ordered {
  margin: var(--space-3) 0 var(--space-4) var(--space-5);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.method-list-ordered { padding-left: var(--space-3); }
.method-list li, .method-list-ordered li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  padding-left: var(--space-2);
}
.method-list-ordered li { list-style-type: decimal; }
.method-list li::marker { color: var(--ember); }

.method-inline-code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 2px 6px;
  color: var(--ink);
  letter-spacing: 0;
}

.method-example {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-6);
  max-width: 100%;
}
.method-example .method-h2 { border-top: none; padding-top: 0; }
.method-example-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
}
@media (max-width: 780px) { .method-example-grid { grid-template-columns: 1fr; } }
.method-example-block {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: var(--space-4);
}
.method-example-block .method-h3 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember);
  margin-top: 0;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--line);
}
.method-example-block p {
  font-size: 0.9375rem !important;
  line-height: 1.55 !important;
  margin-bottom: var(--space-2) !important;
}
.method-example-block p:last-child { margin-bottom: 0 !important; }
.method-example-note {
  font-style: italic;
  color: var(--mute) !important;
  border-top: 1px dashed var(--line);
  padding-top: var(--space-2);
  margin-top: var(--space-3) !important;
}
.method-example-note strong { color: var(--mute) !important; font-style: normal; }

/* ==========================================================================
   Balance-point chart — light card, inline within an article section
   ========================================================================== */

.balance-chart-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5) var(--space-5) var(--space-4);
  margin: var(--space-5) 0 var(--space-6);
}
.balance-chart-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-4);
}
.balance-chart { width: 100%; }
.balance-chart svg { width: 100%; height: auto; overflow: visible; display: block; }

.balance-chart .bp-line { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1400ms cubic-bezier(0.4, 0, 0.2, 1); }
.balance-chart.is-visible .bp-line { stroke-dashoffset: 0; }
.balance-chart .bp-line-cap { transition-delay: 180ms; }

.balance-chart .bp-dot, .balance-chart .bp-pulse, .balance-chart .bp-guide,
.balance-chart .bp-callout, .balance-chart .bp-zone-label {
  opacity: 0; transition: opacity 500ms ease; transition-delay: 1300ms;
}
.balance-chart.is-visible .bp-dot, .balance-chart.is-visible .bp-pulse,
.balance-chart.is-visible .bp-guide, .balance-chart.is-visible .bp-callout,
.balance-chart.is-visible .bp-zone-label { opacity: 1; }

.balance-chart.is-visible .bp-pulse {
  transform-origin: 350px 155px;
  animation: pulse 2.2s ease-out 1.6s infinite;
}

.balance-chart-foot {
  border-top: 1px dashed var(--line);
  padding-top: var(--space-3);
  margin-top: var(--space-4);
}
.balance-chart-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--mute); max-width: 80ch; }

.balance-chart .bp-axis { font-size: 13px; }
.balance-chart .bp-zone-label { font-size: 14px; }

.balance-chart-legend {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--mute);
}
.balance-chart-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }

/* Figure / image-with-caption block — used for embedding sourced screenshots (maps, charts) inside articles */
.method-figure {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5);
  margin: var(--space-5) 0 var(--space-6);
}
.method-figure-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-4);
}
.method-figure img {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--paper);
}
.method-figure figcaption {
  margin-top: var(--space-4);
}
.method-figure-caption {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--mute);
  max-width: 80ch;
  margin: 0 auto;
}
.method-figure-caption a { color: var(--frost); }

/* Wide variant — for landscape diagrams that should not be squeezed to the 620px figure default */
.method-figure-wide img {
  max-width: 100%;
}

/* Plain variant — full-width diagram with no card background/border/padding, for large labeled illustrations that need every pixel for legibility */
.method-figure-plain {
  margin: var(--space-5) 0 var(--space-6);
}
.method-figure-plain img {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}
.method-figure-plain figcaption {
  margin-top: var(--space-4);
}

/* Simple data table — state/program comparisons inside articles */
.method-table-wrap {
  overflow-x: auto;
  margin: var(--space-5) 0 var(--space-6);
  border: 1px solid var(--line);
}
.method-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.method-table caption { display: none; }
.method-table th,
.method-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.method-table thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mute);
  background: var(--paper);
}
.method-table tbody tr:last-child td { border-bottom: none; }
.method-table tbody tr:hover { background: var(--paper); }
.method-table td.is-num, .method-table th.is-num { text-align: right; font-family: var(--font-mono); }
.method-table-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.method-table-status.is-live { background: var(--frost-soft); color: var(--frost); }
.method-table-status.is-approved { background: var(--ember-soft); color: var(--ember); }
.method-table-status.is-pending { background: var(--line); color: var(--mute); }
.balance-chart-legend .legend-swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.balance-chart-legend .legend-swatch-loss { background: var(--frost); }
.balance-chart-legend .legend-swatch-cap { background: var(--ember); }
.balance-chart-legend .legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: inline-block; }

@media (max-width: 700px) {
  .balance-chart .bp-callout rect { display: none; }
  .balance-chart .bp-callout text { display: none; }
  .balance-chart .bp-zone-label { display: none; }
  .balance-chart .bp-axis { font-size: 30px; }
  .balance-chart-legend { display: flex; }
}

/* ==========================================================================
   Sizing chart — light card, U-curve, inline within an article section
   ========================================================================== */

.sizing-chart-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5) var(--space-5) var(--space-4);
  margin: var(--space-5) 0 var(--space-6);
}
.sizing-chart-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-4);
}
.sizing-chart { width: 100%; }
.sizing-chart svg { width: 100%; height: auto; overflow: visible; display: block; }

.sizing-chart .sz-zone-band { opacity: 0; transition: opacity 700ms ease; }
.sizing-chart.is-visible .sz-zone-band { opacity: 1; }

.sizing-chart .sz-line { stroke-dasharray: 1500; stroke-dashoffset: 1500; transition: stroke-dashoffset 1400ms cubic-bezier(0.4, 0, 0.2, 1); }
.sizing-chart.is-visible .sz-line { stroke-dashoffset: 0; }

.sizing-chart .sz-dot, .sizing-chart .sz-pulse, .sizing-chart .sz-callout, .sizing-chart .sz-zone-label {
  opacity: 0; transition: opacity 500ms ease; transition-delay: 1300ms;
}
.sizing-chart.is-visible .sz-dot, .sizing-chart.is-visible .sz-pulse,
.sizing-chart.is-visible .sz-callout, .sizing-chart.is-visible .sz-zone-label { opacity: 1; }

.sizing-chart.is-visible .sz-pulse {
  transform-origin: 535px 402px;
  animation: pulse 2.2s ease-out 1.6s infinite;
}

.sizing-chart-foot { border-top: 1px dashed var(--line); padding-top: var(--space-3); margin-top: var(--space-4); }
.sizing-chart-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--mute); max-width: 80ch; }
.sizing-chart .sz-axis { font-size: 13px; }
.sizing-chart .sz-zone-label { font-size: 14px; }

.sizing-chart-legend {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--mute);
}
.sizing-chart-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sizing-chart-legend .legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); display: inline-block; }
.sizing-chart-legend .legend-swatch-zone { width: 14px; height: 10px; background: var(--credit); opacity: 0.18; border: 1px solid var(--credit); display: inline-block; }

@media (max-width: 700px) {
  .sizing-chart .sz-callout rect { display: none; }
  .sizing-chart .sz-callout text { display: none; }
  .sizing-chart .sz-zone-label { display: none; }
  .sizing-chart .sz-axis { font-size: 30px; }
  .sizing-chart-legend { display: flex; }
}

/* ==========================================================================
   Compare chart — light card, horizontal bar comparison (ducted vs ductless)
   ========================================================================== */

.compare-chart-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5);
  margin: var(--space-5) 0 var(--space-6);
}
.compare-chart-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-5);
}
.compare-chart { display: flex; flex-direction: column; gap: var(--space-4); }
.compare-row { display: flex; flex-direction: column; gap: var(--space-2); }
.compare-row-head { display: flex; justify-content: space-between; align-items: baseline; }
.compare-row-title { font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.compare-row-sub { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute); }
.compare-track { position: relative; height: 28px; background: var(--paper); border: 1px solid var(--line); }
.compare-fill {
  position: absolute; top: 0; left: 0; bottom: 0; width: 0;
  transition: width 1200ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 10px;
}
.compare-fill span {
  font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; color: #fff;
  white-space: nowrap;
}
.compare-fill.is-frost { background: var(--frost); }
.compare-fill.is-ember { background: var(--ember); }
.compare-chart.is-visible .compare-fill { width: var(--pct, 0%); }

.compare-chart-foot { border-top: 1px dashed var(--line); padding-top: var(--space-3); margin-top: var(--space-1); }
.compare-chart-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--mute); max-width: 80ch; }

@media (max-width: 700px) {
  .compare-fill span { font-size: 0.6875rem; }
}

/* ==========================================================================
   State deep-dive stories — compact editorial status, charts and documents
   ========================================================================== */

.state-story-article { padding: var(--space-5) 0 var(--space-9); }
.state-story-article .container { max-width: 1040px; }
.state-story-prose { max-width: 78ch; }
.state-story-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute);
  margin-top: calc(var(--space-5) * -1);
  margin-bottom: var(--space-5);
}
.state-story-section {
  max-width: 78ch;
  margin-bottom: var(--space-8);
  scroll-margin-top: 88px;
}
.state-story-section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  border-top: 2px solid var(--ink);
  padding-top: var(--space-4);
  margin-bottom: var(--space-4);
}
.state-story-section h3 {
  font-size: 1.125rem;
  margin: var(--space-5) 0 var(--space-3);
}
.state-story-section p,
.state-story-section li {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.state-story-section p { margin-bottom: var(--space-4); }
.state-story-section a,
.state-story-hero a {
  color: var(--ember);
  border-bottom: 1px solid transparent;
}
.state-story-section a:hover,
.state-story-hero a:hover { border-bottom-color: currentColor; }
.state-story-list {
  list-style: square;
  margin: 0 0 var(--space-5) var(--space-5);
}
.state-story-list li { padding-left: var(--space-2); margin-bottom: var(--space-3); }
.state-story-list li::marker { color: var(--ember); }
.state-story-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  gap: 1px;
  margin: var(--space-5) 0;
}
.state-story-status-item { background: var(--card); padding: var(--space-4); }
.state-story-status-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-2);
}
.state-story-status-value { display: block; font-weight: 600; line-height: 1.35; }
.state-story-status-note { display: block; font-size: 0.8125rem; color: var(--mute); margin-top: var(--space-2); }
.state-story-callout {
  background: var(--ember-soft);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}
.state-story-callout-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.state-story-math {
  font-family: var(--font-mono);
  font-size: 0.875rem !important;
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-3);
}
.state-story-chart {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5);
  margin: var(--space-5) 0 var(--space-6);
}
.state-story-chart-title {
  font-family: var(--font-mono);
  font-size: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute) !important;
}
.state-story-chart .compare-fill.is-neutral { background: var(--mute); }
.state-story-table-hint { display: none; }
.state-story-chart .compare-row-head { gap: var(--space-3); }
.state-story-chart .compare-row-sub { text-align: right; }
.state-story-chart .compare-fill span {
  opacity: 0;
  transition: opacity 200ms ease;
}
.state-story-chart .compare-chart.is-visible .compare-fill span {
  opacity: 1;
  transition-delay: 350ms;
}
.state-story-chart figcaption {
  border-top: 1px dashed var(--line);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--mute);
}
.state-story-docs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--line);
  gap: 1px;
}
.state-story-docs li { background: var(--card); padding: var(--space-4); list-style: none; }
.state-story-docs a { display: inline; font-weight: 600; }
.state-story-docs span { display: block; font-size: 0.875rem; color: var(--mute); margin-top: var(--space-1); }
.state-story-caution {
  background: var(--frost-soft);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

@media (max-width: 700px) {
  .state-story-status,
  .state-story-docs { grid-template-columns: 1fr; }
  .state-story-docs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .state-story-table-hint {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--mute);
    margin: calc(var(--space-4) * -1) 0 var(--space-5);
  }
  .state-story-chart { padding: var(--space-4); }
  .state-story-chart .compare-row-head { align-items: flex-start; flex-direction: column; gap: var(--space-1); }
  .state-story-chart .compare-row-sub { text-align: left; }
}

/* ==========================================================================
   Lockout chart — light card, horizontal temperature scale (backup heat)
   ========================================================================== */

.lockout-chart-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  padding: var(--space-5) var(--space-5) var(--space-4);
  margin: var(--space-5) 0 var(--space-6);
}
.lockout-chart-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: var(--space-4);
}
.lockout-chart { width: 100%; }
.lockout-chart svg { width: 100%; height: auto; overflow: visible; display: block; }

.lockout-chart .lk-zone-band { opacity: 0; transition: opacity 700ms ease; }
.lockout-chart.is-visible .lk-zone-band { opacity: 1; }

.lockout-chart .lk-marker { opacity: 0; transition: opacity 500ms ease; transition-delay: 600ms; }
.lockout-chart.is-visible .lk-marker { opacity: 1; }

.lockout-chart .lk-callout { opacity: 0; transition: opacity 500ms ease; transition-delay: 1100ms; }
.lockout-chart.is-visible .lk-callout { opacity: 1; }

.lockout-chart-foot { border-top: 1px dashed var(--line); padding-top: var(--space-3); margin-top: var(--space-4); }
.lockout-chart-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--mute); max-width: 80ch; }
.lockout-chart .lk-axis { font-size: 13px; }
.lockout-chart .lk-label { font-size: 13px; }

.lockout-chart-legend {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--mute);
}
.lockout-chart-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.lockout-chart-legend .legend-swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

@media (max-width: 700px) {
  .lockout-chart .lk-callout rect { display: none; }
  .lockout-chart .lk-callout text { display: none; }
  .lockout-chart .lk-label { display: none; }
  .lockout-chart .lk-axis { font-size: 30px; }
  .lockout-chart-legend { display: flex; }
}

/* ==========================================================================
   Retention chart — horizontal bar comparison, dark full-bleed section
   ========================================================================== */

.retention {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-9) 0;
}
.retention-head { max-width: 68ch; margin-bottom: var(--space-7); }
.retention-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--paper);
  margin-bottom: var(--space-4);
}
.retention-lede { font-size: 1.0625rem; line-height: 1.6; color: rgba(250, 247, 242, 0.7); }

.retention-chart { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-6); }

.retention-row {
  display: grid;
  grid-template-columns: 220px 1fr 64px;
  align-items: center;
  gap: var(--space-4);
}
@media (max-width: 700px) { .retention-row { grid-template-columns: 130px 1fr 52px; gap: var(--space-2); } }

.retention-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.3;
}
.retention-label .retention-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: rgba(250, 247, 242, 0.5);
  margin-top: 2px;
  text-transform: none;
letter-spacing: 0.01em;
}

.retention-track {
  position: relative;
  height: 22px;
  background: rgba(250, 247, 242, 0.08);
}
.retention-track::before {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 76.9%;
  width: 0;
  border-left: 1px dashed rgba(217, 102, 26, 0.65);
}
.retention-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  background: var(--ember);
  transition: width 1200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.retention-fill.is-listed { background: var(--credit); }
.retention-track.is-na {
  background-image: repeating-linear-gradient(135deg, rgba(250,247,242,0.14) 0 6px, transparent 6px 12px);
}

.retention-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--paper);
  text-align: right;
  font-feature-settings: "tnum";
}
.retention-value.is-na { color: rgba(250, 247, 242, 0.4); font-size: 0.6875rem; letter-spacing: 0.02em; }

.retention.is-visible .retention-fill { width: var(--pct, 0%); }

.retention-foot { border-top: 1px solid rgba(250, 247, 242, 0.15); padding-top: var(--space-4); margin-top: var(--space-2); }
.retention-caption { font-family: var(--font-mono); font-size: 0.8125rem; color: rgba(250, 247, 242, 0.5); max-width: 78ch; line-height: 1.6; }
.retention-caption a { color: rgba(250, 247, 242, 0.75); }
