/* HeatSpec Guide — submittal-sheet vernacular.
   Colour encodes one thing: ENERGY STAR cold-climate certification (--cold vs --temperate).
   --blueprint is structure (rules, headings, links). Nothing is decorative. */
:root {
  --paper: #eef0ea;
  --paper-2: #e3e7df;
  --plate: #f7f8f4;
  --graphite: #1d2327;
  --graphite-2: #525c60;
  --grid: #d7dbd5;
  --blueprint: #0f4c75;
  --blueprint-2: #15618f;
  --cold: #2a707f;
  --temperate: #a74c23;
  --focus: #0f4c75;
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 64ch;
  --wrap: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15191b; --paper-2: #1c2225; --plate: #1a1f22; --graphite: #e7ebe5; --graphite-2: #a3aca9;
    --grid: #2f383c; --blueprint: #7fb6dd; --blueprint-2: #a5cded; --cold: #5fb9c9; --temperate: #e08b5c; --focus: #7fb6dd;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* the attribute must beat any display rule below */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--graphite);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.6; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blueprint); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blueprint-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--plate); padding: 8px 12px; z-index: 10; }

h1, h2, h3, h4, .brand, nav, th, .button, legend, label, summary, .model, .figure, .plate-key, figcaption, .crumb, .post-card h2 {
  font-family: var(--font-display);
}
h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.06; letter-spacing: -0.015em; font-weight: 600; margin: 0 0 16px; max-width: 26ch; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.18; font-weight: 600; margin: 44px 0 12px; }
h3 { font-size: 1.1rem; line-height: 1.25; font-weight: 600; margin: 24px 0 8px; }
p, ul, ol { margin: 0 0 1.05em; max-width: var(--measure); }
.lede { font-size: 1.17rem; line-height: 1.5; color: var(--graphite-2); max-width: 56ch; }
.small { font-size: 0.88rem; color: var(--graphite-2); }
.crumb { font-size: 0.9rem; color: var(--graphite-2); margin: 0 0 10px; }
.crumb a { color: inherit; }
.model { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--paper-2); padding: 1px 5px; }

/* header / footer: a drawing border, not a card */
.site-header { border-bottom: 2px solid var(--graphite); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 26px; padding: 14px 16px; }
.brand { font-weight: 700; font-size: 1.22rem; letter-spacing: -0.01em; text-decoration: none; color: var(--graphite); display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 26px; height: 14px; flex: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.97rem; }
nav a { text-decoration: none; color: var(--graphite-2); }
nav a:hover { color: var(--graphite); text-decoration: underline; }
main { padding: 30px 16px 60px; }
.site-footer { border-top: 2px solid var(--graphite); padding: 22px 0 36px; }
.site-footer p { margin-bottom: 8px; max-width: 78ch; }

/* the plate: the one bold element */
.plate { margin: 18px 0 26px; padding: 0; background: var(--plate); border: 1px solid var(--grid); border-top: 3px solid var(--cold); }
.plate.nc { border-top-color: var(--temperate); }
.plate svg { width: 100%; height: auto; display: block; }
/* Two geometries, one shown at a time. Selectors carry the .plate svg specificity above,
   because a media query adds none and the rule above would otherwise win. */
.plate svg.plate-tall { display: block; }
.plate svg.plate-wide { display: none; }
@media (min-width: 641px) {
  .plate svg.plate-tall { display: none; }
  .plate svg.plate-wide { display: block; }
}
.plate figcaption { font-size: 0.78rem; line-height: 1.4; color: var(--graphite-2); padding: 9px 14px 11px; border-top: 1px solid var(--grid); max-width: 86ch; }
.plate-grid line { stroke: var(--grid); stroke-width: 1; }
.plate-tick { stroke: var(--graphite-2); stroke-width: 1.5; }
.plate-x, .plate-y, .plate-axis { font-family: var(--font-display); fill: var(--graphite-2); font-variant-numeric: tabular-nums; }
.plate-x { text-anchor: middle; }
.plate-y { text-anchor: end; }
.plate-axis { letter-spacing: 0.02em; }
.plate-axis-c { text-anchor: middle; }
.plate-line { fill: none; stroke: var(--cold); stroke-width: 1.5; opacity: 0.5; }
.plate-line.lead { stroke-width: 3.5; opacity: 1; }
.plate-dot { fill: var(--cold); opacity: 0.5; }
.plate-dot.lead { opacity: 1; }
.plate.nc .plate-line, .plate.nc .plate-dot { stroke: var(--temperate); fill: var(--temperate); }
.plate.nc .plate-line { fill: none; }
/* No text-anchor here: each value label sets its own, and CSS would override the attribute. */
.plate-val { font-family: var(--font-display); font-weight: 600; fill: var(--graphite); font-variant-numeric: tabular-nums; }

/* home hero: headline and lede left, the colour key as counterweight, then the plate full width */
.hero h1 { max-width: 30ch; }
.hero-plate { margin-top: 4px; }
/* At wide widths the hero is a two-column grid: headline and lede left, the colour key
   as a counterweight on the right, the plate and everything after it spanning both.
   Below that it is plain block flow, where the key reads better after the chart. */
@media (min-width: 900px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) 272px; column-gap: 56px; }
  .hero-text { grid-column: 1; grid-row: 1; }
  .hero-key { grid-column: 2; grid-row: 1; }
  .hero-plate, .hero > .small, .hero .actions { grid-column: 1 / -1; }
  .hero-plate { grid-row: 2; }
  .hero > .small { grid-row: 3; }
  .hero .actions { grid-row: 4; }
}
.hero-key { border-top: 2px solid var(--graphite); padding-top: 10px; margin: 8px 0 18px; }
@media (min-width: 900px) { .hero-key { margin-top: 10px; } }
.hero-key h2 { font-size: 0.92rem; margin: 0 0 8px; }
.hero-key dl { margin: 0; display: grid; gap: 7px 10px; grid-template-columns: auto minmax(0, 1fr); }
.hero-key dt { margin: 0; }
.hero-key dd { margin: 0; font-family: var(--font-display); font-size: 0.84rem; line-height: 1.35; color: var(--graphite-2); }
.hero-key .swatch { display: inline-block; width: 14px; height: 14px; margin-top: 3px; }
.hero-key .swatch.cold { background: var(--cold); }
.hero-key .swatch.std { background: var(--temperate); }
.hero-key .swatch.pt { background: var(--graphite); border-radius: 50%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin: 16px 0 6px; }

/* buttons: square, bordered, no shadow */
.button { display: inline-block; background: var(--blueprint); color: #fff; padding: 10px 16px; border-radius: 2px; text-decoration: none; font-weight: 600; font-size: 0.97rem; border: 2px solid var(--blueprint); cursor: pointer; line-height: 1.2; }
.button:hover { background: var(--blueprint-2); border-color: var(--blueprint-2); color: #fff; }
.button.secondary { background: transparent; color: var(--blueprint); }
.button.secondary:hover { background: var(--paper-2); color: var(--blueprint); }
@media (prefers-color-scheme: dark) { .button { color: #0f1518; } .button:hover { color: #0f1518; } }

/* figures row: ruled, not carded */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 0 24px; margin: 20px 0 6px; border-top: 2px solid var(--graphite); list-style: none; padding: 0; max-width: none; }
.figures > * { padding: 10px 0 9px; border-bottom: 1px solid var(--grid); margin: 0; }
.figures .label { font-family: var(--font-display); font-size: 0.82rem; color: var(--graphite-2); display: block; line-height: 1.3; }
.figures .figure { font-size: 1.55rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; font-variant-numeric: tabular-nums; display: block; }
.figures .unit { font-size: 0.8rem; font-weight: 400; color: var(--graphite-2); letter-spacing: 0; }

/* cold-climate badge: the colour key for the whole site */
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 0.84rem; font-weight: 600; padding: 2px 8px 3px; border: 1px solid var(--cold); color: var(--cold); border-radius: 2px; white-space: nowrap; }
.badge::before { content: ""; width: 8px; height: 8px; background: var(--cold); flex: none; }
.badge.nc { border-color: var(--temperate); color: var(--temperate); }
.badge.nc::before { background: var(--temperate); }
.badge.plain { border-color: var(--graphite-2); color: var(--graphite-2); }
.badge.plain::before { display: none; }

/* CTA */
.cta { border-top: 2px solid var(--blueprint); border-bottom: 1px solid var(--grid); padding: 16px 0 18px; margin: 36px 0; max-width: var(--measure); }
.cta-title { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; margin-bottom: 4px; }
/* On index pages the CTA runs the full column instead of stopping at the prose measure. */
.band .cta { max-width: none; }
.band .cta p { max-width: 68ch; }
@media (min-width: 860px) {
  .band .cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 48px; }
  .band .cta .cta-title, .band .cta p { grid-column: 1; }
  .band .cta p:last-of-type { margin-bottom: 0; }
  .band .cta .button { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
}
.cta p:last-of-type { margin-bottom: 12px; color: var(--graphite-2); }

.callout { background: var(--paper-2); border-left: 3px solid var(--blueprint); padding: 12px 16px; margin: 20px 0; max-width: var(--measure); }
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--temperate); }

/* tables: hairline rules, figures right-aligned, scroll inside their own box */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0 24px; border-top: 2px solid var(--graphite); }
table { border-collapse: collapse; width: 100%; min-width: 580px; font-family: var(--font-display); font-size: 0.93rem; }
th, td { text-align: left; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { font-weight: 600; color: var(--graphite-2); }
thead th { white-space: nowrap; border-bottom: 1px solid var(--graphite); }
tbody th { color: var(--graphite); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.model, th.model { white-space: nowrap; }
.table-note { font-size: 0.84rem; color: var(--graphite-2); margin: -14px 0 24px; max-width: 78ch; }
/* Under a full-width table, the note sets in two columns rather than leaving the right half empty. */
@media (min-width: 900px) { .table-note { max-width: none; columns: 2; column-gap: 44px; } }
.post-body table { display: block; overflow-x: auto; min-width: 0; border-top: 2px solid var(--graphite); margin: 16px 0 24px; }
.post-body table th { white-space: normal; }

/* model index: a ruled register, filterable */
.filters { border-top: 2px solid var(--graphite); border-bottom: 1px solid var(--grid); padding: 12px 0 14px; margin: 18px 0 0; }
.filters .row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }
.filters label { display: block; font-size: 0.88rem; color: var(--graphite-2); }
.filters select, .filters input[type="search"] { font: inherit; font-family: var(--font-display); font-size: 0.95rem; padding: 7px 10px; border: 1px solid var(--grid); border-radius: 2px; background: var(--plate); color: var(--graphite); margin-top: 3px; min-width: 190px; }
.filters .check { display: flex; align-items: center; gap: 7px; padding-bottom: 7px; }
.filters .check input { width: 16px; height: 16px; }
#count { font-family: var(--font-display); font-size: 0.88rem; color: var(--graphite-2); margin: 10px 0 0; }

.register { list-style: none; padding: 0; margin: 10px 0 24px; max-width: none; border-top: 1px solid var(--grid); }
.register li { border-bottom: 1px solid var(--grid); padding: 11px 0 10px; display: grid; gap: 2px 18px; grid-template-columns: 1fr; }
.register .line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.register a { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; text-decoration: none; color: var(--graphite); font-variant-numeric: tabular-nums; }
.register a:hover { color: var(--blueprint); text-decoration: underline; }
.register .brand-name { font-family: var(--font-display); font-size: 0.88rem; color: var(--graphite-2); }
.register .specs { font-family: var(--font-display); font-size: 0.88rem; color: var(--graphite-2); font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.register .specs b { font-weight: 600; color: var(--graphite); }
@media (min-width: 760px) { .register li { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; } .register .specs { justify-content: flex-end; } }

/* calculator */
.calc { border-top: 2px solid var(--graphite); padding: 16px 0 4px; margin: 18px 0 0; }
.calc fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.calc legend { font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; padding: 0; }
.calc label { display: block; margin-bottom: 10px; font-size: 0.92rem; color: var(--graphite-2); }
.calc input[type="number"], .calc select { font: inherit; font-family: var(--font-display); font-variant-numeric: tabular-nums; padding: 8px 10px; border: 1px solid var(--grid); border-radius: 2px; background: var(--plate); color: var(--graphite); width: 100%; max-width: 260px; margin-top: 3px; display: block; }
.calc .row { display: grid; gap: 10px 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.calc .hint { font-size: 0.82rem; color: var(--graphite-2); margin: 2px 0 0; max-width: 46ch; }
.result-verdict { font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 600; line-height: 1.25; margin: 4px 0 8px; max-width: 42ch; }
.result-verdict .n { font-variant-numeric: tabular-nums; }
.bars { margin: 12px 0 18px; max-width: 560px; }
.bar { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; margin-bottom: 7px; font-family: var(--font-display); font-size: 0.92rem; }
.bar .track { display: block; height: 20px; background: var(--paper-2); border: 1px solid var(--grid); }
.bar .fill { display: block; height: 100%; min-width: 2px; background: var(--blueprint); }
.bar.pump .fill { background: var(--cold); }
.bar .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; line-height: 1.7; white-space: pre-wrap; background: var(--paper-2); padding: 10px 12px; margin: 10px 0 14px; overflow-x: auto; border-left: 3px solid var(--grid); max-width: none; }

/* posts */
.post { max-width: 760px; }
.post-header { margin-bottom: 22px; }
.post .hero { margin-top: 16px; border: 1px solid var(--grid); }
.post-body { max-width: var(--measure); }
.post-body h2 { scroll-margin-top: 80px; }
.post-body ul, .post-body ol { padding-left: 1.2em; }
.post-body li { margin-bottom: 5px; }
.post-body blockquote { margin: 14px 0; padding: 4px 16px; border-left: 3px solid var(--grid); color: var(--graphite-2); }
.faq details { border-bottom: 1px solid var(--grid); padding: 9px 0; max-width: var(--measure); }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.02rem; }
.faq summary h3 { display: inline; margin: 0; font-size: inherit; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { margin: 7px 0 2px; }
.author-box, .related { margin-top: 40px; padding-top: 16px; border-top: 2px solid var(--graphite); max-width: var(--measure); }
.author-box h2, .related h2 { margin-top: 0; font-size: 1.1rem; }
.post-list { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.post-card { border-top: 1px solid var(--grid); padding: 16px 0; }
.post-card:first-child { border-top: 2px solid var(--graphite); }
.post-card h2 { margin: 2px 0 6px; font-size: 1.22rem; }
.post-card h2 a { text-decoration: none; color: var(--graphite); }
.post-card h2 a:hover { color: var(--blueprint); }

/* provenance block under data */
.prov { font-size: 0.85rem; color: var(--graphite-2); border-left: 3px solid var(--grid); padding: 8px 0 8px 14px; margin: 0 0 22px; max-width: 78ch; }
.prov strong { color: var(--graphite); font-family: var(--font-display); }

.linklist { list-style: none; padding: 0; max-width: none; }
.linklist li { border-bottom: 1px solid var(--grid); padding: 9px 0; }
.linklist li:first-child { border-top: 1px solid var(--grid); }
.linklist a { font-family: var(--font-display); font-weight: 600; text-decoration: none; color: var(--graphite); }
.linklist a:hover { color: var(--blueprint); text-decoration: underline; }
.linklist .specs { font-family: var(--font-display); font-size: 0.86rem; color: var(--graphite-2); font-variant-numeric: tabular-nums; }

@media print {
  .site-header, .site-footer, .cta, nav, .actions, .filters { display: none; }
  body { background: #fff; color: #000; }
  .plate { break-inside: avoid; }
}
