/* Best HVAC Repair Guide — blueprint (dark) / whiteprint (light) drawing system */

:root,
[data-theme="dark"] {
  --ground: #050b16;
  --ground-2: #08111f;
  --panel: #0c1a2e;
  --panel-2: #10223b;
  --surface: linear-gradient(160deg, rgba(31, 66, 112, 0.42) 0%, rgba(13, 28, 50, 0.55) 55%, rgba(8, 18, 34, 0.6) 100%);
  --surface-solid: #0b1829;
  --glow-a: rgba(52, 120, 235, 0.42);
  --glow-b: rgba(70, 190, 255, 0.2);
  --glow-c: rgba(255, 176, 74, 0.09);
  --shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --ink: #edf4fc;
  --ink-2: #a8bfd8;
  --ink-3: #7f97b3;
  --rule: rgba(150, 190, 240, 0.14);
  --rule-strong: rgba(170, 205, 245, 0.32);
  --red: #ff8f75;
  --red-bg: rgba(255, 122, 92, 0.1);
  --hi: #ffd84a;
  --hi-2: #ffb547;
  --hi-ink: #0b1626;
  --ac: #6fd3ff;
  --furnace: #ffb25b;
  --heatpump: #7ee6b4;
  --ok: #7ee6b4;
  --focus: #ffd84a;
  --sel-bg: #ffd84a;
  --sel-ink: #0b1626;
  color-scheme: dark;
}

[data-theme="light"] {
  --ground: #f2f6fb;
  --ground-2: #e8eef6;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --surface: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 253, 0.92) 100%);
  --surface-solid: #ffffff;
  --glow-a: rgba(80, 140, 240, 0.18);
  --glow-b: rgba(111, 211, 255, 0.16);
  --glow-c: rgba(255, 210, 90, 0.12);
  --shadow: 0 30px 70px -40px rgba(23, 47, 110, 0.35);
  --ink: #142a63;
  --ink-2: #41557f;
  --ink-3: #5b6d92;
  --rule: rgba(30, 60, 134, 0.14);
  --rule-strong: rgba(23, 47, 110, 0.3);
  --red: #c2361d;
  --red-bg: rgba(194, 54, 29, 0.07);
  --hi: #ffd84a;
  --hi-2: #ffb547;
  --hi-ink: #142a63;
  --ac: #0a6fae;
  --furnace: #a85a06;
  --heatpump: #0b7d51;
  --ok: #0b7d51;
  --focus: #c2361d;
  --sel-bg: #142a63;
  --sel-ink: #ffd84a;
  color-scheme: light;
}

:root {
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", monospace;
  --maxw: 1400px;
  --r: 18px;
  --r-sm: 10px;
  --gut: clamp(16px, 4vw, 40px);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 160ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--ground);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sel-bg); color: var(--sel-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 var(--s4); text-wrap: pretty; }
.mono { font-family: var(--mono); font-size: max(0.86em, 11px); letter-spacing: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { scrollbar-color: var(--ink-3) var(--ground-2); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ground-2); }
::-webkit-scrollbar-thumb { background: var(--ink-3); border: 3px solid var(--ground-2); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--hi); color: var(--hi-ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); height: 68px; display: flex; align-items: center; gap: var(--s5); }
.wordmark { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; border: 1.5px solid var(--ink); padding: 6px 9px 5px; text-transform: uppercase; flex-shrink: 0; }
.wm-top { font-stretch: 125%; font-weight: 800; font-size: 0.86rem; letter-spacing: 0.06em; }
.wm-bot { font-stretch: 100%; font-weight: 500; font-size: 0.7rem; letter-spacing: 0.22em; margin-top: 3px; border-top: 1px solid var(--rule-strong); padding-top: 3px; }
.mainnav { margin-left: auto; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.mainnav a { display: flex; flex-direction: column; text-decoration: none; padding: 8px 10px; font-size: 0.875rem; font-weight: 600; line-height: 1.15; color: var(--ink-2); border-bottom: 2px solid transparent; transition: color var(--t-fast), border-color var(--t-fast); }
.mainnav a:hover { color: var(--ink); }
.mainnav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--hi); }
.nav-sheet { font-family: var(--mono); font-size: 0.7rem; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; }
.topbar-tools { display: flex; align-items: center; gap: var(--s2); }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: 1px solid var(--rule); text-decoration: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; }
.lang-switch svg, .icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lang-switch:hover, .icon-btn:hover { border-color: var(--rule-strong); }
.icon-btn { width: 44px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle .moon, .theme-toggle svg:last-child { display: none; }
[data-theme="light"] .theme-toggle svg:first-child { display: none; }
[data-theme="light"] .theme-toggle svg:last-child { display: block; }
.menu-toggle { display: none; }

@media (max-width: 1100px) {
  .mainnav .nav-sheet { display: none; }
  .mainnav a { padding: 8px 7px; font-size: 0.82rem; }
}
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .mainnav { position: fixed; inset: 68px 0 auto 0; background: var(--ground); border-bottom: 1px solid var(--rule); display: none; max-height: calc(100dvh - 68px); overflow: auto; }
  .mainnav.open { display: block; }
  .mainnav ul { flex-direction: column; padding: var(--s3) var(--gut) var(--s5); }
  .mainnav a { flex-direction: row; gap: 14px; align-items: baseline; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule); color: var(--ink); }
  .mainnav .nav-sheet { display: inline; min-width: 3.4em; }
  .mainnav a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 3px 0 0 var(--hi); padding-left: 12px; }
  .topbar-tools { margin-left: auto; }
}

/* ---------- Page frame ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut) var(--s8); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: var(--s5) 0 0; font-size: 0.8rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }

.sheet-head { padding: var(--s7) 0 var(--s6); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); align-items: end; }
.sheet-head h1 { grid-column: 1 / span 8; font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.02; }
.sheet-head .lede { grid-column: 1 / span 7; font-size: 1.18rem; color: var(--ink-2); max-width: 62ch; margin: 0; }
.sheet-head .answer { grid-column: 9 / span 4; grid-row: 1 / span 2; align-self: stretch; border-left: 1px solid var(--rule-strong); padding-left: var(--s5); font-size: 0.98rem; color: var(--ink-2); display: flex; flex-direction: column; justify-content: flex-end; }
.answer strong { color: var(--ink); }
.answer-k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 700; color: var(--ink-3); margin-bottom: 6px; }
@media (max-width: 860px) {
  .sheet-head { padding-top: var(--s6); }
  .sheet-head h1, .sheet-head .lede, .sheet-head .answer { grid-column: 1 / -1; grid-row: auto; }
  .sheet-head .answer { border-left: 0; border-top: 1px solid var(--rule-strong); padding: var(--s4) 0 0; }
}

/* Drawing frame: hairline with corner registration ticks */
.frame { position: relative; border: 1px solid var(--rule-strong); background: color-mix(in srgb, var(--panel) 88%, transparent); }
.frame::before, .frame::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--ink); border-style: solid; pointer-events: none; }
.frame::before { top: -5px; left: -5px; border-width: 1.5px 0 0 1.5px; }
.frame::after { bottom: -5px; right: -5px; border-width: 0 1.5px 1.5px 0; }
.frame-label { position: absolute; top: -0.72em; left: 16px; padding: 0 8px; background: var(--ground); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-2); line-height: 1.4; }

/* ---------- Tool workspace ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; }
.workspace > .inputs { padding: var(--s6) var(--s6) var(--s6); border-right: 1px solid var(--rule); }
.workspace > .result { padding: var(--s6); display: flex; flex-direction: column; gap: var(--s5); min-height: 100%; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .workspace > .inputs { border-right: 0; border-bottom: 1px solid var(--rule); padding: var(--s6) var(--s4) var(--s5); }
  .workspace > .result { padding: var(--s5) var(--s4) var(--s6); }
}

.field { border: 0; margin: 0 0 var(--s5); padding: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > legend, .field > label, .lbl { display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); margin-bottom: var(--s2); padding: 0; }
.hint { font-size: 0.85rem; color: var(--ink-3); margin: 6px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--rule-strong); font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); user-select: none; }
.chip span::before { content: ""; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50%; flex-shrink: 0; }
.chip input:checked + span { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip input:checked + span::before { background: var(--hi); border-color: var(--hi); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip span:hover { border-color: var(--ink); }
.chip[data-sys="ac"] span::before { color: var(--ac); }
.chip[data-sys="furnace"] span::before { color: var(--furnace); }
.chip[data-sys="heatpump"] span::before { color: var(--heatpump); }

.input, .select { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; font-family: var(--mono); font-size: 1rem; color: var(--ink); background: var(--ground-2); border: 1px solid var(--rule-strong); border-radius: 0; caret-color: var(--hi); appearance: none; }
.select { font-family: var(--font); font-weight: 600; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.select option { background: var(--panel-2); color: var(--ink); }
.input:hover, .select:hover { border-color: var(--ink-2); }
.input:focus, .select:focus { outline: none; border-color: var(--hi); box-shadow: 0 0 0 1px var(--hi); }
.input-unit { display: grid; grid-template-columns: 1fr auto; }
.input-unit .unit { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--rule-strong); border-left: 0; font-family: var(--mono); font-size: 0.8rem; color: var(--ink-2); background: var(--ground); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.range { width: 100%; accent-color: var(--hi); height: 32px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; cursor: pointer; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--hi); margin: 2px 0 0; flex-shrink: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; font: inherit; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; color: var(--hi-ink); background: var(--hi); border: 1px solid var(--hi); cursor: pointer; text-decoration: none; transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Results ---------- */
.result-k { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
.result-main { font-stretch: 112%; font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1; }
.result-main small { font-size: 0.42em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); font-stretch: 100%; margin-left: 4px; }
.result-sub { color: var(--ink-2); margin: 0; }
.result-live { min-height: 1px; }

.legend { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: 0.8rem; color: var(--ink-3); margin: 0; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 26px; height: 0; border-top: 2px solid var(--ink-2); }
.legend i.dash { border-top-style: dashed; }

/* Dimension string — the signature move */
.dim { width: 100%; height: auto; overflow: visible; color: var(--ink); }
.dim .ext { stroke: var(--ink-2); stroke-width: 1; }
.dim .line { stroke: currentColor; stroke-width: 1.6; fill: none; }
.dim .line.est { stroke-dasharray: 7 5; }
.dim .arrow { fill: currentColor; }
.dim .lbl-v { font-family: var(--mono); font-size: 15px; fill: var(--ink); font-weight: 600; }
.dim .lbl-k { font-family: var(--font); font-size: 11px; fill: var(--ink-3); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
.dim .typ-mark { fill: var(--hi); }
.dim .typ-lead { stroke: var(--hi); stroke-width: 1.3; fill: none; }
.dim .typ-tag rect { fill: var(--hi); }
.dim .typ-tag text { fill: var(--hi-ink); font-family: var(--mono); font-size: 14px; font-weight: 600; }
.dim .scale-tick { stroke: var(--rule-strong); stroke-width: 1; }
.dim .scale-lbl { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); }
.dim[data-sys="ac"] { color: var(--ac); }
.dim[data-sys="furnace"] { color: var(--furnace); }
.dim[data-sys="heatpump"] { color: var(--heatpump); }
.dim .draw { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .dim.animate .draw { animation: dim-draw 700ms var(--ease) both; }
  .dim.animate .fade { animation: dim-fade 500ms 380ms var(--ease) both; }
  @keyframes dim-draw { from { stroke-dashoffset: var(--len); } }
  @keyframes dim-fade { from { opacity: 0; transform: translateY(4px); } }
}

.verdict { border: 1px solid var(--rule-strong); padding: var(--s4) var(--s5); display: grid; grid-template-columns: auto 1fr; gap: 4px var(--s4); align-items: start; }
.verdict-tag { grid-row: 1 / span 2; font-family: var(--mono); font-size: 0.72rem; font-weight: 600; padding: 6px 8px; border: 1.5px solid currentColor; letter-spacing: 0.04em; white-space: nowrap; }
.verdict h3 { font-size: 1.2rem; font-weight: 800; font-stretch: 108%; }
.verdict p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.verdict[data-v="replace"] .verdict-tag { color: var(--red); }
.verdict[data-v="repair"] .verdict-tag { color: var(--ok); }
.verdict[data-v="close"] .verdict-tag { color: var(--hi); }

.redline { border: 1.5px solid var(--red); background: var(--red-bg); padding: var(--s3) var(--s4); display: flex; gap: var(--s3); align-items: flex-start; font-size: 0.95rem; }
.redline svg { width: 20px; height: 20px; flex-shrink: 0; stroke: var(--red); fill: none; stroke-width: 2; margin-top: 2px; }
.redline strong { color: var(--red); }
.redline p { margin: 0; }

.meta-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); }
.meta-list > div { padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--rule); }
.meta-list dt { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.meta-list dd { margin: 2px 0 0; font-family: var(--mono); font-size: 1rem; font-weight: 600; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule-strong); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tbl caption { text-align: left; padding: var(--s3) var(--s4); font-size: 0.85rem; color: var(--ink-3); caption-side: bottom; border-top: 1px solid var(--rule); }
.tbl th, .tbl td { text-align: left; padding: 12px var(--s4); border-bottom: 1px solid var(--rule); vertical-align: top; }
.tbl thead th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; color: var(--ink-2); background: var(--ground-2); position: sticky; top: 0; }
.tbl tbody th { font-weight: 700; }
.tbl td.num, .tbl th.num { font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--hi) 7%, transparent); }
.tbl tr.is-hit { background: color-mix(in srgb, var(--hi) 16%, transparent); }
.tbl tr.is-hit th { box-shadow: inset 3px 0 0 var(--hi); }
.tbl tr:last-child td, .tbl tr:last-child th { border-bottom: 0; }
.sys-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.sys-dot.ac { background: var(--ac); } .sys-dot.furnace { background: var(--furnace); } .sys-dot.heatpump { background: var(--heatpump); }

/* ---------- Prose sections ---------- */
.section { padding: var(--s8) 0 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); }
.section > h2 { grid-column: 1 / span 4; font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; font-stretch: 108%; letter-spacing: -0.015em; position: sticky; top: 96px; align-self: start; }
.section > .prose { grid-column: 5 / span 8; }
.section.wide > h2 { grid-column: 1 / -1; position: static; }
.section.wide > .prose { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .section { padding-top: var(--s7); }
  .section > h2, .section > .prose { grid-column: 1 / -1; position: static; }
}
.prose { max-width: 72ch; }
.section.wide > .prose { max-width: none; }
.prose h3 { font-size: 1.2rem; font-weight: 700; margin: var(--s6) 0 var(--s2); }
.prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 var(--s4); }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 700; }
.prose .tbl-wrap { margin: var(--s4) 0 var(--s5); }
.callout-answer { font-size: 1.12rem; border-left: 1px solid var(--hi); padding-left: var(--s4); margin-bottom: var(--s5); }
.formula { font-family: var(--mono); font-size: 0.92rem; border: 1px dashed var(--rule-strong); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); overflow-x: auto; }

/* ---------- Troubleshooter ---------- */
.ts-progress { display: flex; gap: 4px; margin-bottom: var(--s4); }
.ts-progress span { flex: 1; height: 3px; background: var(--rule); }
.ts-progress span.done { background: var(--ok); }
.ts-progress span.cur { background: var(--hi); }
.ts-step { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: start; }
.bubble { width: 44px; height: 44px; border: 1.5px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 600; font-size: 0.9rem; position: relative; }
.bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 18px; background: var(--rule-strong); }
.ts-step h3 { font-size: 1.35rem; font-weight: 800; font-stretch: 106%; margin-bottom: var(--s2); }
.ts-step p { color: var(--ink-2); }
.ts-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.ts-safe { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ok); display: inline-flex; gap: 6px; align-items: center; margin-bottom: var(--s2); }
.ts-safe.pro { color: var(--red); }
.ts-causes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.ts-causes li { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.ts-causes .c-name { font-weight: 700; }
.ts-causes .c-why { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.92rem; }
.ts-causes .c-cost { font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; }
.ts-causes .c-diy { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.ts-done { color: var(--ok); }

/* ---------- Home ---------- */
.home-hero { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s5); padding: var(--s8) 0 var(--s7); align-items: stretch; }
.home-hero .hh-text { grid-column: 1 / span 7; display: flex; flex-direction: column; gap: var(--s5); }
.home-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); font-weight: 800; font-stretch: 116%; letter-spacing: -0.025em; line-height: 0.98; }
.home-hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 54ch; margin: 0; }
.home-hero .hh-plate { grid-column: 8 / span 5; padding: var(--s6) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s4); }
.quickstart { display: flex; flex-direction: column; gap: var(--s4); }
@media (max-width: 960px) {
  .home-hero { padding-top: var(--s6); }
  .home-hero .hh-text, .home-hero .hh-plate { grid-column: 1 / -1; }
}

.index-tbl th:first-child { width: 220px; }
.index-tbl a.row-link { font-weight: 800; font-stretch: 106%; font-size: 1.12rem; text-decoration: none; }
.index-tbl a.row-link:hover { text-decoration: underline; }
.index-tbl .demand { white-space: nowrap; }

.next-sheet { margin-top: var(--s8); display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: var(--s5); flex-wrap: wrap; }
.next-sheet .ns-k { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); display: block; }
.next-sheet .ns-t { font-size: 1.4rem; font-weight: 800; font-stretch: 108%; }

/* ---------- FAQ ---------- */
.faq { padding-top: var(--s8); max-width: 900px; }
.faq > h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 800; font-stretch: 108%; margin-bottom: var(--s5); }
.faq-item { border-top: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item summary { list-style: none; cursor: pointer; padding: var(--s4) 40px var(--s4) 0; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: translateY(-70%) rotate(45deg); transition: transform var(--t-fast) var(--ease); }
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item h3 { font-size: 1.08rem; font-weight: 700; display: inline; }
.faq-a { padding: 0 0 var(--s5); color: var(--ink-2); max-width: 72ch; }
.faq-a p:last-child { margin-bottom: 0; }

/* ---------- Title block ---------- */
.titleblock { margin-top: var(--s8); display: grid; grid-template-columns: 2fr 1fr 1.4fr; border: 1.5px solid var(--ink); }
.tb-cell { padding: 10px 14px; border-right: 1px solid var(--rule-strong); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-cell:nth-child(3) { border-right: 0; }
.tb-k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
.tb-v { font-weight: 700; font-size: 0.95rem; }
.tb-sheet .tb-v { font-size: 1.4rem; }
.tb-src { grid-column: 1 / -1; border-top: 1px solid var(--rule-strong); border-right: 0; }
.tb-src ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-weight: 500; font-size: 0.85rem; }
.tb-note { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-top: 1px solid var(--rule-strong); font-size: 0.82rem; color: var(--ink-2); }
@media (max-width: 760px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .tb-cell { border-bottom: 1px solid var(--rule-strong); }
  .tb-cell:nth-child(2) { border-right: 0; }
  .tb-title { order: -1; grid-column: 1 / -1; border-right: 0; }
}

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--rule); background: var(--ground-2); }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: var(--s7) var(--gut) var(--s5); display: grid; grid-template-columns: 2fr 1.4fr 1fr; gap: var(--s6); }
.foot-brand p { color: var(--ink-2); font-size: 0.92rem; max-width: 42ch; margin-top: var(--s4); }
.foot-h { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); margin-bottom: var(--s3); }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.foot-list a { text-decoration: none; }
.foot-list a:hover { text-decoration: underline; }
.foot-legal { max-width: var(--maxw); margin: 0 auto; padding: var(--s4) var(--gut) var(--s6); font-size: 0.8rem; color: var(--ink-3); border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* Ads: invisible until enabled (html.ads-on), then space is reserved to avoid layout shift */
.ad-slot { display: none; }
.ads-on .ad-slot { display: block; min-height: 280px; margin: var(--s7) 0; }

.stack > * + * { margin-top: var(--s5); }
.mt7 { margin-top: var(--s7); }
.reveal { opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; } }

/* Paired tables collapse on narrow screens */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

/* Sheet index: stacked rows on phones */
@media (max-width: 700px) {
  .index-tbl thead { display: none; }
  .index-tbl tr { display: grid; grid-template-columns: 1fr; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
  .index-tbl tr:last-child { border-bottom: 0; }
  .index-tbl td, .index-tbl th { border: 0; padding: 2px 0; }
  .index-tbl .demand { color: var(--ink-3); font-size: 0.85rem; }
}

/* =====================================================================
   v2 skin — deeper night ground, gradients, softer geometry, motion
   ===================================================================== */

/* Ambient light: slow-drifting gradient field behind everything */
body { position: relative; isolation: isolate; overflow-x: hidden; }
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; }
body::before {
  inset: -8%;
  background:
    radial-gradient(1100px 720px at 14% 0%, var(--glow-a), transparent 66%),
    radial-gradient(900px 620px at 96% 4%, var(--glow-b), transparent 62%),
    radial-gradient(1000px 700px at 78% 96%, var(--glow-c), transparent 62%),
    radial-gradient(820px 620px at 2% 82%, var(--glow-b), transparent 62%);
}
body::after { content: none; }
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: aurora 38s ease-in-out infinite alternate; }
  @keyframes aurora {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-3%, 2%, 0) scale(1.04); }
    100% { transform: translate3d(2%, -2%, 0) scale(1.02); }
  }
}

/* Top bar: glass over the glow */
.topbar { background: color-mix(in srgb, var(--ground) 72%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--rule); }
.topbar-in { height: 72px; }
.wordmark { border-radius: 8px; border-width: 1.5px; }
.mainnav a { border-radius: 8px 8px 0 0; }
.lang-switch, .icon-btn { border-radius: 12px; background: color-mix(in srgb, var(--panel) 40%, transparent); }

/* Panels: gradient surface, rounded, soft depth (corner ticks retired) */
.frame { border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.frame::before, .frame::after { content: none; }
.frame-label { top: -0.85em; left: 20px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface-solid); }
.workspace > .inputs { border-right-color: var(--rule); }
@media (max-width: 900px) { .workspace > .inputs { border-bottom-color: var(--rule); } }
.next-sheet { transition: transform 400ms var(--ease), border-color 200ms; }
.next-sheet:hover { transform: translateY(-3px); border-color: var(--ink-2); }

/* Controls */
.chip span { border-radius: 999px; border-color: var(--rule-strong); background: color-mix(in srgb, var(--panel) 35%, transparent); }
.chip input:checked + span { background: linear-gradient(135deg, var(--ink) 0%, color-mix(in srgb, var(--ink) 82%, var(--ac)) 100%); border-color: transparent; }
.input, .select { border-radius: var(--r-sm); background-color: color-mix(in srgb, var(--ground) 70%, transparent); border-color: var(--rule-strong); }
.input-unit .input { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-unit .unit { border-radius: 0 var(--r-sm) var(--r-sm) 0; background: color-mix(in srgb, var(--panel) 60%, transparent); border-color: var(--rule-strong); }
.btn { border-radius: 999px; border: 0; background: linear-gradient(135deg, var(--hi) 0%, var(--hi-2) 100%); box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--hi-2) 70%, transparent); padding: 12px 22px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--hi-2) 80%, transparent); }
.btn-ghost { background: transparent; border: 1px solid var(--rule-strong); box-shadow: none; }
.btn-ghost:hover { box-shadow: none; border-color: var(--ink-2); }
.btn svg { transition: transform 300ms var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* Content blocks */
.tbl-wrap { border-radius: var(--r); border-color: var(--rule-strong); background: color-mix(in srgb, var(--panel) 45%, transparent); }
.tbl thead th { background: color-mix(in srgb, var(--panel-2) 85%, transparent); }
.verdict { border-radius: 14px; background: color-mix(in srgb, var(--panel) 50%, transparent); }
.verdict-tag { border-radius: 8px; }
.redline { border-radius: 14px; }
.formula { border-radius: 12px; }
.callout-answer { border-left: 0; padding: var(--s4) var(--s5); border-radius: 14px; background: linear-gradient(120deg, color-mix(in srgb, var(--hi) 14%, transparent) 0%, transparent 70%); }
.titleblock { border-radius: var(--r); border: 1px solid var(--rule-strong); overflow: hidden; background: var(--surface); }
.sheet-head .answer { border-left-color: var(--rule-strong); }
.dim .typ-tag rect { rx: 5px; }
.typ-tag rect { rx: 5px; }
.ts-progress span { border-radius: 99px; }
.faq-item summary { transition: color 200ms; }
.faq-item summary:hover { color: var(--ink); }
.site-foot { background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--ground-2) 90%, transparent) 40%); border-top-color: var(--rule); }

/* Headline: a quiet light sweep under the main heading (the heading itself stays solid ink) */
.home-hero h1, .sheet-head h1 { position: relative; }
.home-hero h1::after, .sheet-head h1::after {
  content: ""; display: block; height: 3px; width: min(220px, 40%); margin-top: 22px; border-radius: 3px;
  background: linear-gradient(90deg, var(--hi) 0%, var(--hi-2) 40%, transparent 100%);
  transform-origin: left center;
}

/* Scroll reveal — only armed when JS is running (content is visible without it) */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: var(--d, 0ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .home-hero h1::after, .js .sheet-head h1::after { transform: scaleX(0); transition: transform 1200ms 250ms var(--ease); }
  .js .in h1::after, .js .home-hero.in h1::after, .js .sheet-head.in h1::after { transform: scaleX(1); }
  .tbl tbody tr { transition: background 200ms; }
  .chip span { transition: background 250ms var(--ease), color 250ms, border-color 250ms, transform 250ms var(--ease); }
  .chip span:active { transform: scale(0.97); }
  .result-main.bump { animation: bump 600ms var(--ease); }
  @keyframes bump { 0% { opacity: 0.35; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
}
.home-hero .hh-plate { align-self: start; }

/* Result facts: readable sans for mixed text, tabular numerals */
.meta-list dd { font-family: var(--font); font-size: 1.02rem; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
.meta-list > div { padding-right: var(--s4); }
.workspace .row2 .field > label { min-height: 2.6em; display: flex; align-items: flex-end; }

/* =====================================================================
   Icon system — one stroke family (src/icons.mjs)
   ===================================================================== */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: inline-block; vertical-align: -3px; }
.ico-tile { width: 44px; height: 44px; border-radius: 13px; display: inline-grid; place-items: center; flex-shrink: 0; position: relative;
  color: var(--hi);
  background: linear-gradient(140deg, color-mix(in srgb, var(--hi) 20%, transparent) 0%, color-mix(in srgb, var(--ac) 12%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--hi) 35%, var(--rule-strong));
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--hi-2) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.ico-tile .ico { width: 22px; height: 22px; }
.ico-tile.lg { width: 60px; height: 60px; border-radius: 17px; }
.ico-tile.lg .ico { width: 30px; height: 30px; stroke-width: 1.6; }
[data-theme="light"] .ico-tile { color: #b07a00; }

/* Nav */
.mainnav a { flex-direction: row; align-items: center; gap: 8px; }
.mainnav a .ico { width: 17px; height: 17px; opacity: 0.75; transition: opacity 200ms, color 200ms; }
.mainnav a:hover .ico, .mainnav a[aria-current="page"] .ico { opacity: 1; color: var(--hi); }
@media (min-width: 961px) and (max-width: 1240px) { .mainnav a .ico { display: none; } }

/* Page head with icon tile */
.sheet-head .sh-title { grid-column: 1 / span 8; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.sheet-head .sh-title h1 { grid-column: auto; }
@media (max-width: 860px) { .sheet-head .sh-title { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: no-preference) {
  .js .sheet-head .ico-tile.lg { transform: scale(0.6) rotate(-12deg); opacity: 0; transition: transform 900ms 120ms var(--ease), opacity 600ms 120ms; }
  .js .sheet-head.in .ico-tile.lg { transform: none; opacity: 1; }
}

/* Panel labels */
.frame-label { display: inline-flex; align-items: center; gap: 7px; }
.frame-label .ico { width: 14px; height: 14px; color: var(--hi); }

/* System chips: the icon replaces the dot */
.chip[data-sys] span::before { content: none; }
.chip span .ico { width: 18px; height: 18px; }
.chip[data-sys="ac"] span .ico { color: var(--ac); }
.chip[data-sys="furnace"] span .ico { color: var(--furnace); }
.chip[data-sys="heatpump"] span .ico { color: var(--heatpump); }
.chip[data-sys] input:checked + span .ico { color: var(--ground); }

/* Index table + next tool */
.index-tbl a.row-link { display: inline-flex; align-items: center; gap: 14px; }
.index-tbl tbody tr:hover .ico-tile { transform: translateY(-2px) rotate(-4deg); }
.ico-tile { transition: transform 400ms var(--ease); }
.next-sheet .ns-main { display: flex; align-items: center; gap: 16px; }
.next-sheet:hover .ico-tile { transform: rotate(-6deg) scale(1.06); }

/* Footer + title block */
.foot-list a { display: inline-flex; align-items: center; gap: 9px; }
.foot-list .ico { width: 16px; height: 16px; color: var(--ink-3); }
.foot-list a:hover .ico { color: var(--hi); }
.tb-k { display: inline-flex; align-items: center; gap: 6px; }
.tb-k .ico { width: 13px; height: 13px; }

/* Troubleshooter status + causes */
.ts-safe .ico { width: 16px; height: 16px; }
.c-diy .ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* Option cards — icon + title + hint, only for decisions that change the answer */
.opt-cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .opt-cards { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt-in { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; align-items: center; height: 100%;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rule-strong); cursor: pointer;
  background: color-mix(in srgb, var(--panel) 35%, transparent);
  transition: border-color 220ms, background 220ms, transform 220ms var(--ease), box-shadow 220ms; }
.opt-ico { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2);
  background: color-mix(in srgb, var(--ink) 7%, transparent); border: 1px solid var(--rule); transition: color 220ms, background 220ms, border-color 220ms; }
.opt-ico .ico { width: 19px; height: 19px; }
.opt-t { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.opt-h { font-size: 0.8rem; color: var(--ink-3); line-height: 1.3; }
.opt-in:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.opt input:checked + .opt-in { border-color: color-mix(in srgb, var(--hi) 70%, transparent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--hi) 14%, transparent) 0%, color-mix(in srgb, var(--panel) 40%, transparent) 100%);
  box-shadow: 0 12px 28px -18px color-mix(in srgb, var(--hi-2) 90%, transparent); }
.opt input:checked + .opt-in .opt-ico { color: var(--hi); background: color-mix(in srgb, var(--hi) 14%, transparent); border-color: color-mix(in srgb, var(--hi) 45%, transparent); }
.opt input:focus-visible + .opt-in { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-theme="light"] .opt input:checked + .opt-in .opt-ico { color: #b07a00; }
/* in narrow form columns, stack cards when 3 don't fit */
.workspace > .inputs .opt-cards[style*="--cols:3"] { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }

/* Quick-fill presets */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--s4); }
.presets-k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-right: 4px; }
.preset { font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); background: transparent; border: 1px dashed var(--rule-strong); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: color 200ms, border-color 200ms, background 200ms; }
.preset span { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); margin-left: 4px; }
.preset:hover, .preset[aria-pressed="true"] { color: var(--ink); border-style: solid; border-color: var(--hi); background: color-mix(in srgb, var(--hi) 10%, transparent); }

/* Symptom chips carry a small icon instead of the dot */
.chip span:has(> .ico)::before { content: none; }
.chip span > .ico { width: 17px; height: 17px; color: var(--ink-3); transition: color 200ms; }
.chip input:checked + span > .ico { color: var(--ground); }

/* Tool layout: give the controls more room now that choices are cards */
.workspace { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 900px) { .workspace { grid-template-columns: 1fr; } }
/* Three-way cards stack icon over text so they stay one row */
.opt-cards[style*="--cols:3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.opt-cards[style*="--cols:3"] .opt-in { grid-template-columns: 1fr; grid-template-rows: auto auto auto; justify-items: start; row-gap: 6px; padding: 12px; }
.opt-cards[style*="--cols:3"] .opt-ico { grid-row: auto; }
@media (max-width: 380px) { .opt-cards[style*="--cols:3"] .opt-h { display: none; } }

/* =====================================================================
   Light theme pass — separation, layered shadows, legible golds
   ===================================================================== */
[data-theme="light"] {
  --ground: #e9eef6;
  --ground-2: #e1e8f2;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --surface: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  --surface-solid: #ffffff;
  --rule: rgba(20, 42, 99, 0.11);
  --rule-strong: rgba(20, 42, 99, 0.2);
  --glow-a: rgba(70, 130, 235, 0.16);
  --glow-b: rgba(90, 190, 245, 0.14);
  --glow-c: rgba(255, 196, 70, 0.14);
  --shadow: 0 1px 2px rgba(18, 38, 84, 0.06), 0 10px 24px -12px rgba(18, 38, 84, 0.16), 0 36px 70px -36px rgba(18, 38, 84, 0.3);
  --ink: #12265a;
  --ink-2: #3b4f7a;
  --ink-3: #56688f;
  --gold: #9a6a00;
  --gold-bg: #fff6d8;
  --gold-line: #e8c96a;
}
[data-theme="light"] body { background-color: var(--ground); }
[data-theme="light"] .topbar { background: color-mix(in srgb, #ffffff 78%, transparent); border-bottom-color: rgba(20, 42, 99, 0.1); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6), 0 6px 20px -16px rgba(18, 38, 84, 0.35); }
[data-theme="light"] .frame { border-color: rgba(20, 42, 99, 0.14); }
[data-theme="light"] .frame-label { background: #ffffff; border-color: rgba(20, 42, 99, 0.16); box-shadow: 0 2px 6px -3px rgba(18, 38, 84, 0.25); color: var(--ink-2); }
[data-theme="light"] .frame-label .ico { color: var(--gold); }
[data-theme="light"] .workspace > .inputs { border-right-color: rgba(20, 42, 99, 0.09); background: linear-gradient(180deg, #f7f9fd 0%, #f2f5fa 100%); border-radius: var(--r) 0 0 var(--r); }
@media (max-width: 900px) { [data-theme="light"] .workspace > .inputs { border-radius: var(--r) var(--r) 0 0; } }

/* Controls */
[data-theme="light"] .chip span, [data-theme="light"] .opt-in { background: #ffffff; border-color: rgba(20, 42, 99, 0.16); box-shadow: 0 1px 2px rgba(18, 38, 84, 0.06); }
[data-theme="light"] .chip span:hover, [data-theme="light"] .opt-in:hover { border-color: rgba(20, 42, 99, 0.35); }
[data-theme="light"] .chip input:checked + span { background: linear-gradient(135deg, #12265a 0%, #1d3a82 100%); color: #ffffff; box-shadow: 0 8px 18px -10px rgba(18, 38, 90, 0.6); }
[data-theme="light"] .chip input:checked + span > .ico, [data-theme="light"] .chip[data-sys] input:checked + span .ico { color: #ffd84a; }
[data-theme="light"] .opt input:checked + .opt-in { background: linear-gradient(140deg, #fffaea 0%, #ffffff 100%); border-color: var(--gold-line); box-shadow: 0 10px 24px -14px rgba(154, 106, 0, 0.45), 0 0 0 1px var(--gold-line); }
[data-theme="light"] .opt-ico { background: #f1f4f9; border-color: rgba(20, 42, 99, 0.1); color: var(--ink-2); }
[data-theme="light"] .opt input:checked + .opt-in .opt-ico { background: var(--gold-bg); border-color: var(--gold-line); color: var(--gold); }
[data-theme="light"] .input, [data-theme="light"] .select { background-color: #ffffff; border-color: rgba(20, 42, 99, 0.2); box-shadow: inset 0 1px 2px rgba(18, 38, 84, 0.05); }
[data-theme="light"] .input:focus, [data-theme="light"] .select:focus { border-color: #1d3a82; box-shadow: 0 0 0 3px rgba(29, 58, 130, 0.15); }
[data-theme="light"] .input-unit .unit { background: #f1f4f9; border-color: rgba(20, 42, 99, 0.2); }
[data-theme="light"] .btn { color: #3a2a00; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 22px -10px rgba(190, 130, 0, 0.55); }
[data-theme="light"] .btn-ghost { color: var(--ink); background: #ffffff; border-color: rgba(20, 42, 99, 0.2); box-shadow: 0 1px 2px rgba(18, 38, 84, 0.06); }
[data-theme="light"] .preset { background: #ffffff; }
[data-theme="light"] .preset:hover, [data-theme="light"] .preset[aria-pressed="true"] { background: var(--gold-bg); border-color: var(--gold-line); color: var(--ink); }
[data-theme="light"] .lang-switch, [data-theme="light"] .icon-btn { background: #ffffff; border-color: rgba(20, 42, 99, 0.16); }

/* Icon tiles */
[data-theme="light"] .ico-tile { color: var(--gold); background: linear-gradient(140deg, #fff7da 0%, #f3f7ff 100%); border-color: var(--gold-line); box-shadow: 0 8px 18px -10px rgba(154, 106, 0, 0.45), inset 0 1px 0 #ffffff; }
[data-theme="light"] .mainnav a:hover .ico, [data-theme="light"] .mainnav a[aria-current="page"] .ico, [data-theme="light"] .foot-list a:hover .ico { color: var(--gold); }
[data-theme="light"] .mainnav a[aria-current="page"] { border-bottom-color: #e0b52a; }
[data-theme="light"] .home-hero h1::after, [data-theme="light"] .sheet-head h1::after { background: linear-gradient(90deg, #e0b52a 0%, #f2a93b 45%, transparent 100%); }

/* Content blocks */
[data-theme="light"] .tbl-wrap { background: #ffffff; border-color: rgba(20, 42, 99, 0.14); box-shadow: var(--shadow); }
[data-theme="light"] .tbl thead th { background: #f3f6fb; color: var(--ink-2); }
[data-theme="light"] .tbl tbody tr:hover { background: #fffbec; }
[data-theme="light"] .tbl tr.is-hit { background: #fff4c7; }
[data-theme="light"] .tbl tr.is-hit th { box-shadow: inset 3px 0 0 #e0b52a; }
[data-theme="light"] .callout-answer { background: linear-gradient(120deg, #fff4cc 0%, rgba(255, 244, 204, 0) 75%); box-shadow: inset 3px 0 0 #e0b52a; }
[data-theme="light"] .verdict { background: #ffffff; border-color: rgba(20, 42, 99, 0.14); box-shadow: 0 6px 16px -10px rgba(18, 38, 84, 0.25); }
[data-theme="light"] .verdict[data-v="close"] .verdict-tag { color: var(--gold); }
[data-theme="light"] .redline { background: #fff3f0; border-color: #e3826f; }
[data-theme="light"] .titleblock { background: #ffffff; border-color: rgba(20, 42, 99, 0.16); box-shadow: var(--shadow); }
[data-theme="light"] .tb-cell, [data-theme="light"] .tb-src, [data-theme="light"] .tb-note { border-color: rgba(20, 42, 99, 0.12); }
[data-theme="light"] .faq-item { border-color: rgba(20, 42, 99, 0.12); }
[data-theme="light"] .site-foot { background: linear-gradient(180deg, transparent 0%, #e3e9f3 35%); }
[data-theme="light"] .ts-progress span { background: rgba(20, 42, 99, 0.12); }
[data-theme="light"] .ts-progress span.cur { background: #e0b52a; }
[data-theme="light"] .bubble { background: #ffffff; border-color: var(--ink); box-shadow: 0 4px 10px -6px rgba(18, 38, 84, 0.4); }

/* Drawings on white: stronger lines, gold callouts */
[data-theme="light"] .dim .ext { stroke: rgba(20, 42, 99, 0.45); }
[data-theme="light"] .dim .line { stroke-width: 1.8; }
[data-theme="light"] .dim .typ-mark { fill: #e0b52a; }
[data-theme="light"] .dim .typ-lead { stroke: #e0b52a; }
[data-theme="light"] .dim .typ-tag rect, [data-theme="light"] .typ-tag rect { fill: #ffd84a; }
[data-theme="light"] .dim .scale-tick { stroke: rgba(20, 42, 99, 0.25); }
.tbl thead th.num { font-family: var(--font); font-size: 0.72rem; }
.tbl th .hint { font-weight: 400; }

/* Share row under each tool result */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: var(--s4); border-top: 1px solid var(--rule); }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); background: transparent; border: 1px solid var(--rule-strong); border-radius: 999px; cursor: pointer; transition: color 200ms, border-color 200ms, background 200ms; }
.share-btn .ico { width: 16px; height: 16px; }
.share-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.share-btn.ok { color: var(--ok); border-color: var(--ok); }
[data-theme="light"] .share-btn { background: #ffffff; }

/* Equipment types that fit the BTU result */
.fit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fit-k { width: 100%; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); margin-bottom: 2px; }
.fit-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px solid color-mix(in srgb, var(--hi) 45%, var(--rule-strong)); background: color-mix(in srgb, var(--hi) 9%, transparent); transition: transform 200ms var(--ease), border-color 200ms; }
.fit-chip .ico { width: 15px; height: 15px; color: var(--hi); }
.fit-chip:hover { transform: translateY(-1px); border-color: var(--hi); }
[data-theme="light"] .fit-chip { background: #fffaea; border-color: #e8c96a; }
[data-theme="light"] .fit-chip .ico { color: #9a6a00; }

/* AC types guide */
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--s4); margin: var(--s4) 0 var(--s3); }
.type-card { border: 1px solid var(--rule-strong); border-radius: var(--r); padding: var(--s5); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: var(--s3); transition: transform 400ms var(--ease); }
.type-card:hover { transform: translateY(-3px); }
.type-head { display: flex; align-items: center; gap: 14px; }
.type-card h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.type-btu { margin: 2px 0 0; color: var(--ink-3); }
.type-card > p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.type-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; border-top: 1px solid var(--rule); padding-top: var(--s3); }
.type-facts dt { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.type-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 0.92rem; }
.type-best { margin: 0 !important; font-size: 0.9rem !important; }
.section.wide > .prose .types + .hint { max-width: 72ch; }
.types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .types { grid-template-columns: 1fr; } }
