/* Home Lab in three steps (/home-lab). Tokens follow the public landing page. */
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --soft: #f5f7fa;
  --soft-2: #eef2f7;
  --ln: #e4e9f0;
  --ink: #0b1526;
  --txt: #3a4658;
  --mut: #677487;
  --brand: #1d4ed8;
  --brand-2: #1e40af;
  --brand-soft: #e9efff;
  --brand-ink: #ffffff;
  --ok: #007a33;
  --ok-soft: #e6f4ec;
  --warn: #b45309;
  --warn-soft: #fff4e5;
  --amber-soft: #fdf1e4;
  --shadow: 0 1px 2px rgba(11, 21, 38, .04), 0 18px 40px -28px rgba(11, 21, 38, .28);
  --radius: 22px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --display: Archivo, "Arial Narrow", Inter, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f18; --card: #0f1724; --soft: #0f1622; --soft-2: #141d2b; --ln: #212c3c;
    --ink: #eef2f8; --txt: #c3ccd9; --mut: #8f9bad; --brand: #5b8cff; --brand-2: #4b7bf0;
    --brand-soft: #16223d; --ok: #3fbf74; --ok-soft: #0f2a1c; --warn: #f0a24b; --warn-soft: #2d2010;
    --amber-soft: #2d2010; --shadow: 0 18px 40px -28px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f18; --card: #0f1724; --soft: #0f1622; --soft-2: #141d2b; --ln: #212c3c;
  --ink: #eef2f8; --txt: #c3ccd9; --mut: #8f9bad; --brand: #5b8cff; --brand-2: #4b7bf0;
  --brand-soft: #16223d; --ok: #3fbf74; --ok-soft: #0f2a1c; --warn: #f0a24b; --warn-soft: #2d2010;
  --amber-soft: #2d2010; --shadow: 0 18px 40px -28px rgba(0, 0, 0, .6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.hl3 {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.hl3-skip { position: absolute; left: -9999px; top: 8px; }
.hl3-skip:focus { left: 12px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 10px; }

/* ----------------------------------------------------------------- top bar */
.hl3-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--ln); }
.hl3-top-inner { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.hl3-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.hl3-logo b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--card); font-size: 13px; letter-spacing: .02em; }
.hl3-logo span { font-size: 15px; }
.hl3-steps { display: flex; justify-content: center; gap: 4px; }
.hl3-steps button {
  display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent;
  padding: 10px 12px; border-radius: 999px; color: var(--mut); font-weight: 600; font-size: 14px;
}
.hl3-steps button i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid currentColor; font-style: normal; font-size: 12px; font-weight: 700;
}
.hl3-steps button[aria-current="step"] { color: var(--ink); background: var(--soft-2); }
.hl3-steps button[aria-current="step"] i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.hl3-steps button.is-done { color: var(--brand); }
.hl3-steps button:disabled { opacity: .45; }
.hl3-ghost { border: 1px solid var(--ln); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.hl3-ghost:disabled { opacity: .45; }

/* ------------------------------------------------------------------- card */
.hl3-main { max-width: 1160px; margin: 0 auto; padding: 16px 16px 120px; }
.hl3-card { background: var(--card); border: 1px solid var(--ln); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* result band */
.hl3-band { background: linear-gradient(180deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 35%, var(--card))); border-bottom: 1px solid var(--ln); padding: 16px 18px 18px; min-height: 108px; }
.hl3-band-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.hl3-band-head .hl3-link { margin-left: auto; }
.hl3-band-empty { display: grid; gap: 8px; justify-items: start; }
.hl3-band-empty p { margin: 0; color: var(--txt); max-width: 52ch; }
.hl3-band-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px 16px; align-items: center; transition: opacity .2s; }
.hl3-band-grid.is-stale { opacity: .55; }
.hl3-band-class { grid-row: span 2; display: flex; align-items: center; gap: 8px; }
.hl3-arrow { color: var(--mut); font-size: 18px; }
.hl3-metric { min-width: 0; }
.hl3-metric small { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--mut); font-weight: 600; }
.hl3-metric b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.3; }
.hl3-metric b span { font-weight: 500; font-size: 12.5px; color: var(--mut); }
.hl3-metric-lead b { font-size: 17px; }
.hl3-band-break { display: none; }
.hl3-metric b.is-ok, .is-ok { color: var(--ok); }
.hl3-metric b.is-warn, .is-warn { color: var(--warn); }
.hl3-class {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px;
  background: var(--bg); color: var(--fg); font-weight: 800; font-size: 17px; font-family: var(--display);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.hl3-class.lg { min-width: 54px; height: 54px; border-radius: 15px; font-size: 24px; }

.hl3-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 0; background: var(--soft-2); color: var(--mut); }
.hl3-chip-brand { background: var(--brand); color: var(--brand-ink); }
.hl3-chip-amber { background: var(--amber-soft); color: var(--warn); }
.hl3-chip-green { background: var(--ok-soft); color: var(--ok); }
.hl3-chip-ok { background: var(--ok-soft); color: var(--ok); text-transform: none; letter-spacing: 0; }
.hl3-chip-warn { background: var(--warn-soft); color: var(--warn); text-transform: none; letter-spacing: 0; }
.hl3-chip-muted { text-transform: none; letter-spacing: 0; font-weight: 600; }
.hl3-link { border: 0; background: none; color: var(--brand); font-weight: 650; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 4px 2px; }

/* body columns */
.hl3-body { display: grid; }
.hl3-col { padding: 20px 18px; min-width: 0; }
.hl3-col-side { border-top: 1px solid var(--ln); background: color-mix(in srgb, var(--soft) 55%, var(--card)); display: grid; gap: 14px; align-content: start; }
.hl3-title { margin: 0 0 6px; color: var(--ink); font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.hl3-lead { margin: 0 0 16px; color: var(--txt); font-size: 15px; max-width: 62ch; }
.hl3-step-head { margin-bottom: 4px; }
.hl3-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; background: var(--soft-2); color: var(--mut); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.hl3-tag-pin { background: var(--amber-soft); color: var(--warn); }
.hl3-aside { margin: 18px 0 0; font-size: 14px; color: var(--mut); }
.hl3-note { margin: 12px 0 0; font-size: 13px; color: var(--mut); line-height: 1.5; }
.hl3-muted { color: var(--mut); font-size: 13px; }
.hl3-nowrap { white-space: nowrap; }
.hl3-print-head { display: none; }
.hl3-warn-text { color: var(--warn); }
.hl3-warn-note { margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 600; }

/* ------------------------------------------------------------------- form */
.hl3-form { display: grid; }
.hl3-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 6px 16px; padding: 12px 0; border-top: 1px solid var(--ln); }
.hl3-row:first-child { border-top: 0; }
.hl3-row > label, .hl3-label { color: var(--ink); font-weight: 600; font-size: 15px; }
.hl3-row-locality { grid-template-columns: 1fr; }
.hl3-hint { grid-column: 1 / -1; color: var(--mut); font-size: 12.5px; }
.hl3-row input, .hl3-row select {
  width: 100%; min-height: 46px; border: 1px solid var(--ln); border-radius: 12px; background: var(--card);
  padding: 10px 12px; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.hl3-row select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.hl3-row input:focus, .hl3-row select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.hl3-unit { position: relative; display: block; }
.hl3-unit input { padding-right: 48px; }
.hl3-unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--mut); font-size: 14px; pointer-events: none; }
.hl3-combo { position: relative; }
.hl3-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--ln); border-radius: 14px; box-shadow: var(--shadow); max-height: 320px; overflow: auto; }
.hl3-suggest li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: grid; }
.hl3-suggest li b { color: var(--ink); font-weight: 600; }
.hl3-suggest li small { color: var(--mut); font-size: 12.5px; }
.hl3-suggest li[aria-selected="true"], .hl3-suggest li:hover { background: var(--brand-soft); }

.hl3-seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--soft-2); border-radius: 999px; padding: 4px; justify-self: stretch; }
.hl3-seg button { border: 0; background: transparent; border-radius: 999px; min-height: 38px; font-weight: 650; color: var(--txt); }
.hl3-seg button[aria-checked="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 21, 38, .12); }

/* question groups (envelope, systems): open by themselves in turn; nothing
   is calculated until every question has an answer */
.hl3-group { margin-top: 10px; border: 1px solid var(--ln); border-radius: 16px; background: color-mix(in srgb, var(--soft) 60%, var(--card)); scroll-margin-top: 76px; }
.hl3-group[open] { background: var(--card); border-color: color-mix(in srgb, var(--brand) 35%, var(--ln)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 8%, transparent); }
.hl3-group.is-complete { border-color: color-mix(in srgb, var(--ok) 40%, var(--ln)); box-shadow: none; }
.hl3-group summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 14px 16px; cursor: pointer; color: var(--ink); font-weight: 700; font-size: 15.5px; }
.hl3-group summary::-webkit-details-marker { display: none; }
.hl3-group summary > small { grid-column: 1; color: var(--mut); font-weight: 500; font-size: 12.5px; }
.hl3-group.is-complete summary > small { color: var(--ok); font-weight: 650; }
.hl3-group.is-complete summary > small::before { content: "✓ "; }
.hl3-group summary::after { content: "+"; grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--ln); font-weight: 600; color: var(--mut); background: var(--card); }
.hl3-group[open] summary::after { content: "−"; }
.hl3-group-body { padding: 0 16px 6px; }
.hl3-group-lead { display: block; margin: -4px 0 4px; }
.hl3-group .hl3-row { grid-template-columns: 1fr; gap: 8px; }
.hl3-group .hl3-row:first-of-type { border-top: 0; }
.hl3-group .hl3-pills-wrap { justify-content: flex-start; max-width: none; }
.hl3-amount { max-width: 220px; }

/* --------------------------------------------------------------- works */
.hl3-works { display: grid; }
.hl3-work { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--ln); }
.hl3-work:first-child { border-top: 0; }
.hl3-work-text b { color: var(--ink); font-weight: 650; font-size: 15px; }
.hl3-work:not(.is-on) .hl3-work-text b { color: var(--txt); font-weight: 600; }
.hl3-work-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.hl3-impact { color: var(--brand); font-weight: 650; }
.hl3-work-why { display: block; margin-top: 4px; max-width: 62ch; color: var(--mut); font-size: 12.5px; line-height: 1.45; }
.hl3-cost { color: var(--mut); }
.hl3-work-control { justify-self: end; }
.hl3-stepper { display: inline-flex; align-items: center; gap: 6px; }
.hl3-stepper output { min-width: 74px; text-align: center; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.hl3-round { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--ln); background: var(--card); font-size: 20px; line-height: 1; color: var(--ink); }
.hl3-round:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.hl3-round:disabled { opacity: .35; }
.hl3-pills { display: inline-flex; gap: 6px; }
.hl3-pills button { border: 1px solid var(--ln); background: var(--card); border-radius: 999px; min-height: 40px; padding: 0 14px; font-size: 14px; font-weight: 600; color: var(--txt); }
.hl3-pills button[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.hl3-pills-wrap { flex-wrap: wrap; justify-content: flex-end; max-width: 420px; }
.hl3-work[data-work="heating"] { grid-template-columns: 1fr; }
.hl3-work[data-work="heating"] .hl3-work-control { justify-self: stretch; }
.hl3-work[data-work="heating"] .hl3-pills-wrap { justify-content: flex-start; max-width: none; }

.hl3-wait { display: grid; gap: 10px; padding: 26px 4px; }
.hl3-wait p { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.hl3-wait small { color: var(--mut); }
.hl3-progress { height: 8px; background: var(--soft-2); border-radius: 999px; overflow: hidden; }
.hl3-progress i { display: block; height: 100%; width: 4%; background: var(--brand); border-radius: inherit; transition: width .3s ease; }

/* ---------------------------------------------------------------- plan */
.hl3-plan { list-style: none; margin: 0; padding: 0; display: grid; }
.hl3-plan-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--ln); }
.hl3-plan-row:first-child { border-top: 0; }
.hl3-plan-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.hl3-plan-text b { display: block; color: var(--ink); font-weight: 650; }
.hl3-plan-text small, .hl3-plan-num small { display: block; color: var(--mut); font-size: 13px; }
.hl3-plan-num { text-align: right; font-variant-numeric: tabular-nums; }
.hl3-plan-num b { color: var(--ink); }
.hl3-plan-num small { color: var(--brand); font-weight: 600; }
.hl3-plan-total { border-top: 2px solid var(--ink); }
.hl3-plan-total .hl3-plan-n { background: var(--ink); color: var(--card); }
.hl3-plan-wait { list-style: none; }
.hl3-green { margin-top: 22px; padding: 18px; border-radius: 18px; background: var(--ok-soft); }
.hl3-green h3 { margin: 0 0 6px; color: var(--ink); font-size: 17px; }
.hl3-green .hl3-lead { font-size: 14px; margin-bottom: 10px; }
.hl3-green-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--ok) 18%, transparent); }
.hl3-green-row p { margin: 0; }
.hl3-green-row p b { display: block; color: var(--ink); }
.hl3-green-row p small { color: var(--mut); font-size: 12.5px; }

/* ---------------------------------------------------------------- side */
.hl3-side-block { background: var(--card); border: 1px solid var(--ln); border-radius: 16px; padding: 14px 16px; }
.hl3-side-block h3 { margin: 0 0 8px; color: var(--ink); font-size: 15px; font-weight: 700; }
.hl3-side-block h3 small { color: var(--mut); font-weight: 500; }
.hl3-side-block p { margin: 0 0 8px; }
.hl3-side-block p.hl3-note { margin: 10px 0 10px; }
.hl3-side-accent { border-color: color-mix(in srgb, var(--warn) 35%, var(--ln)); background: var(--amber-soft); }
.hl3-dl { margin: 0; display: grid; }
.hl3-dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--ln); font-size: 14px; }
.hl3-dl > div:first-child { border-top: 0; }
.hl3-dl dt { color: var(--txt); }
.hl3-dl dd { margin: 0; color: var(--ink); font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
.hl3-dl-wide > div { grid-template-columns: minmax(140px, .45fr) 1fr; }
.hl3-dl-wide dd { text-align: left; font-weight: 500; color: var(--txt); }
.hl3-howto { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.hl3-howto b { display: block; color: var(--ink); }
.hl3-switch { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.hl3-switch input { width: 20px; height: 20px; accent-color: var(--brand); }
.hl3-credit-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 8px; }
.hl3-credit-inputs label { display: grid; gap: 4px; font-size: 13px; color: var(--mut); }
.hl3-credit-inputs input { width: 100%; min-height: 42px; border: 1px solid var(--ln); border-radius: 10px; padding: 8px 40px 8px 10px; background: var(--card); color: var(--ink); font-size: 16px; }

.hl3-side-body { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* ------------------------------------------------- climate-zone map (laptop) */
/* Natural map: water, neighbouring countries, soft green land with relief
   (Natural Earth, public domain), and the five winter zones of Mc 001-2022
   fig. 2.1 as light warm-to-cold tints (orange for the mild zone I, blue for
   the cold zone V) separated by dashed lines. */
:root {
  --zm-1: #e2703a; --zm-2: #f0a24a; --zm-3: #f1d36a; --zm-4: #6fa6d6; --zm-5: #3f6db0;
  --zm-fill: .15; --zm-fill-on: .34; --zm-fill-off: .07;
  --zm-water: #b8dbf2; --zm-ctx: #edf1ea; --zm-ctx-line: #c3cbc4; --zm-land: #dfeedd;
  --zm-dash: rgba(38, 44, 52, .55); --zm-sel: rgba(25, 30, 36, .85); --zm-zone-ink: rgba(30, 36, 44, .72);
  --zm-outline: rgba(70, 78, 88, .8); --zm-river: #6aa3d6; --zm-terrain: none;
  --zm-sea: #b9d7ec; --zm-sea-ink: #4d7fa8; --zm-shadow: rgba(30, 40, 50, .18); --zm-halo: rgba(255, 255, 255, .92);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --zm-1: #f08a55; --zm-2: #f4b162; --zm-3: #f0d77e; --zm-4: #7fb4e2; --zm-5: #6d93d6;
    --zm-fill: .2; --zm-fill-on: .4; --zm-fill-off: .1;
    --zm-water: #173047; --zm-ctx: #1d2530; --zm-ctx-line: #334050; --zm-land: #24322b;
    --zm-dash: rgba(222, 230, 238, .5); --zm-sel: rgba(240, 244, 248, .9); --zm-zone-ink: rgba(232, 238, 244, .82);
    --zm-outline: rgba(200, 210, 222, .7); --zm-river: #4f8fc9; --zm-terrain: brightness(.42) saturate(.8) contrast(1.05);
    --zm-sea: #173a57; --zm-sea-ink: #8fbbe0; --zm-shadow: rgba(0, 0, 0, .55); --zm-halo: rgba(15, 23, 36, .9);
  }
}
:root[data-theme="dark"] {
  --zm-1: #f08a55; --zm-2: #f4b162; --zm-3: #f0d77e; --zm-4: #7fb4e2; --zm-5: #6d93d6;
  --zm-fill: .2; --zm-fill-on: .4; --zm-fill-off: .1;
  --zm-water: #173047; --zm-ctx: #1d2530; --zm-ctx-line: #334050; --zm-land: #24322b;
  --zm-dash: rgba(222, 230, 238, .5); --zm-sel: rgba(240, 244, 248, .9); --zm-zone-ink: rgba(232, 238, 244, .82);
  --zm-outline: rgba(200, 210, 222, .7); --zm-river: #4f8fc9; --zm-terrain: brightness(.42) saturate(.8) contrast(1.05);
  --zm-sea: #173a57; --zm-sea-ink: #8fbbe0; --zm-shadow: rgba(0, 0, 0, .55); --zm-halo: rgba(15, 23, 36, .9);
}
.hl3-zmap { padding: 14px 14px 12px; overflow: hidden; }
.hl3-zm-head h3 { margin: 0; }
.hl3-zm-head h3 b { font-weight: 800; }
.hl3-zm-sub { margin: 2px 0 0 !important; color: var(--mut); font-size: 13px; }
.hl3-zm-stage { position: relative; margin: 10px -6px 2px; }
.hl3-zm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.hl3-zm-sea0 { stop-color: var(--zm-sea); stop-opacity: .95; }
.hl3-zm-sea1 { stop-color: var(--zm-sea); stop-opacity: .5; }
.hl3-zm-sea2 { stop-color: var(--zm-sea); stop-opacity: 0; }
.hl3-zm-coast { fill: none; stroke: var(--zm-sea); stroke-width: 9px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-water { fill: var(--zm-water); }
.hl3-zm-ctx { fill: var(--zm-ctx); stroke: var(--zm-ctx-line); stroke-width: .7px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-land { fill: var(--zm-land); filter: drop-shadow(0 1px 1.5px var(--zm-shadow)); }
.hl3-zm-terrain { filter: var(--zm-terrain); }
.hl3-zm-z { fill-opacity: var(--zm-fill); stroke: var(--zm-dash); stroke-width: .75px; stroke-dasharray: 3 2.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: fill-opacity .25s ease; }
.hl3-zm-z[data-zone="I"] { fill: var(--zm-1); }
.hl3-zm-z[data-zone="II"] { fill: var(--zm-2); }
.hl3-zm-z[data-zone="III"] { fill: var(--zm-3); }
.hl3-zm-z[data-zone="IV"] { fill: var(--zm-4); }
.hl3-zm-z[data-zone="V"] { fill: var(--zm-5); }
.hl3-zm-svg[data-zone] .hl3-zm-z.is-on { fill-opacity: var(--zm-fill-on); }
.hl3-zm-svg[data-zone] .hl3-zm-z:not(.is-on) { fill-opacity: var(--zm-fill-off); }
.hl3-zm-sel { fill: none; stroke: var(--zm-sel); stroke-width: 1.3px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-outline { fill: none; stroke: var(--zm-outline); stroke-width: .9px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-river { fill: none; stroke: var(--zm-river); stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hl3-zm-stream { fill: none; stroke: var(--zm-river); stroke-width: .7px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .85; }
.hl3-zm-stream.is-major { stroke-width: 1.05px; opacity: 1; }
.hl3-zm-lake { fill: var(--zm-water); stroke: var(--zm-river); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.hl3-zm-zl { position: absolute; transform: translate(-50%, -50%); pointer-events: none; font-size: 10.5px; font-weight: 700; line-height: 1; letter-spacing: .04em; color: var(--zm-zone-ink); text-shadow: 0 0 2px var(--zm-halo), 0 0 3px var(--zm-halo); }
.hl3-zm-label, .hl3-zm-city, .hl3-zm-pin { position: absolute; pointer-events: none; white-space: nowrap; }
.hl3-zm-sea-label { transform: translate(-50%, -50%); font-size: 10.5px; line-height: 1.15; font-style: italic; text-align: center; color: var(--zm-sea-ink); }
.hl3-zm-city { transform: translate(-3px, -50%); padding-left: 9px; font-size: 11px; font-weight: 500; color: var(--txt); text-shadow: 0 0 2px var(--zm-halo), 0 0 3px var(--zm-halo), 0 0 4px var(--zm-halo); }
.hl3-zm-city::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--txt); box-shadow: 0 0 0 1.5px var(--zm-halo); }
.hl3-zm-city.is-end { transform: translate(calc(-100% + 3px), -50%); padding: 0 9px 0 0; }
.hl3-zm-city.is-end::before { left: auto; right: 0; }
.hl3-zm-pin { display: flex; align-items: center; gap: 6px; transform: translate(-8px, -50%); z-index: 1; }
.hl3-zm-pin.is-left { flex-direction: row-reverse; transform: translate(calc(-100% + 8px), -50%); }
.hl3-zm-pin i { position: relative; flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(11, 21, 38, .45); }
.hl3-zm-pin i::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: hl3-zm-pulse 2.2s ease-out 2; }
.hl3-zm-pin b { padding: 2px 8px; border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; font-weight: 700; box-shadow: 0 1px 6px rgba(11, 21, 38, .22); }
@keyframes hl3-zm-pulse { 0% { opacity: .7; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.3); } }
.hl3-zm-legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.hl3-zm-legend li { display: grid; justify-items: center; gap: 2px; padding: 6px 2px 5px; border-radius: 10px; color: var(--mut); font-size: 11.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hl3-zm-legend li i { width: 100%; max-width: 46px; height: 9px; border-radius: 5px; opacity: .55; box-shadow: inset 0 0 0 1px rgba(11, 21, 38, .14); }
.hl3-zm-legend li b { color: var(--txt); font-size: 12.5px; }
.hl3-zm-legend li.is-on { background: var(--soft-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.hl3-zm-legend li.is-on b { color: var(--ink); }
.hl3-zm-legend li[data-zone="I"] i { background: var(--zm-1); }
.hl3-zm-legend li[data-zone="II"] i { background: var(--zm-2); }
.hl3-zm-legend li[data-zone="III"] i { background: var(--zm-3); }
.hl3-zm-legend li[data-zone="IV"] i { background: var(--zm-4); }
.hl3-zm-legend li[data-zone="V"] i { background: var(--zm-5); }
.hl3-zm-src { margin: 10px 0 0 !important; color: var(--mut); font-size: 12px; line-height: 1.45; }
@media (max-width: 959px) {
  .hl3-zmap { display: none !important; }
}

/* ------------------------------------------------------------- actions */
.hl3-actions { position: sticky; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--ln); }
.hl3-actions-note { margin: 0 auto 0 0; font-size: 13px; color: var(--mut); }
.hl3-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 650; font-size: 15.5px; }
.hl3-btn:hover:not(:disabled) { background: var(--brand-2); border-color: var(--brand-2); }
.hl3-btn:disabled { opacity: .45; }
.hl3-btn-line { background: transparent; color: var(--ink); border-color: var(--ln); }
.hl3-btn-line:hover:not(:disabled) { background: var(--soft); border-color: var(--ln); }
.hl3-btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.hl3-back { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; margin-right: auto; border: 0; border-radius: 999px; background: transparent; color: var(--mut); font-weight: 650; font-size: 14.5px; }
.hl3-back:hover { color: var(--ink); background: var(--soft-2); }

/* ------------------------------------------------------------- details */
.hl3-details { margin-top: 16px; background: var(--card); border: 1px solid var(--ln); border-radius: var(--radius); }
.hl3-details summary { padding: 16px 18px; cursor: pointer; color: var(--ink); font-weight: 650; }
.hl3-details-body { padding: 0 18px 18px; }
.hl3-details code { font-size: 13px; background: var(--soft-2); padding: 2px 6px; border-radius: 6px; }

.hl3-footer { border-top: 1px solid var(--ln); margin-top: 8px; }
.hl3-footer-inner { max-width: 1160px; margin: 0 auto; padding: 18px 16px 100px; display: grid; gap: 10px; font-size: 13px; color: var(--mut); }
.hl3-footer-inner p { margin: 0; }
.hl3-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.hl3-footer a { color: var(--mut); }

.hl3-toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ------------------------------------------------------------- mobile */
@media (max-width: 640px) {
  .hl3-top-inner { grid-template-columns: auto 1fr auto; padding: 8px 12px; gap: 8px; }
  .hl3-logo span { display: none; }
  .hl3-steps button { padding: 8px 8px; font-size: 13px; gap: 6px; }
  .hl3-steps button:not([aria-current="step"]) span { display: none; }
  .hl3-save { padding: 7px 12px; font-size: 13px; }
  .hl3-main { padding: 10px 10px 110px; }
  .hl3-band { padding: 14px; min-height: 0; }
  .hl3-band-grid { grid-template-columns: auto 1fr 1fr; gap: 10px 12px; }
  .hl3-band-class { grid-row: span 2; }
  /* scenario band: both classes and the annual cost on one line, three figures below */
  .hl3-band-scenario { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; }
  .hl3-band-scenario .hl3-band-class { flex: 0 0 auto; }
  .hl3-band-scenario .hl3-band-break { display: block; flex: 0 0 100%; height: 0; }
  .hl3-band-scenario .hl3-metric { flex: 1 1 0; min-width: 0; }
  .hl3-metric-lead b { font-size: 16px; }
  .hl3-band-scenario .hl3-class.lg { min-width: 48px; height: 48px; font-size: 22px; }
  .hl3-col { padding: 16px 14px; }
  .hl3-title { font-size: 21px; }
  .hl3-lead { font-size: 14.5px; margin-bottom: 12px; }
  /* house form: label and control on one line; long selects keep their own line */
  .hl3-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 6px 12px; padding: 10px 0; }
  .hl3-row > label, .hl3-label { font-size: 14.5px; }
  .hl3-row-locality, .hl3-row-stack { grid-template-columns: 1fr; }
  body[data-step="house"] .hl3-col-side { display: none; }
  /* works: text and impact on the left, control on the right (as in the proposal) */
  .hl3-work { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 0; }
  .hl3-work-text b { font-size: 14.5px; }
  .hl3-work-meta { font-size: 12.5px; gap: 0 6px; }
  .hl3-stepper { gap: 4px; }
  .hl3-stepper output { min-width: 50px; font-size: 14.5px; }
  .hl3-round { width: 40px; height: 40px; font-size: 19px; }
  .hl3-pills { gap: 4px; }
  .hl3-pills button { min-height: 38px; padding: 0 11px; font-size: 13.5px; }
  .hl3-plan-row { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; }
  .hl3-green { padding: 14px; }
  .hl3-green-row { grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; }
  .hl3-green-row > .hl3-btn, .hl3-green-row > .hl3-tag { grid-column: 2; justify-self: start; }
  /* action bar: one line */
  .hl3-actions { flex-wrap: nowrap; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .hl3-actions .hl3-btn { flex: 1 1 auto; min-height: 48px; padding: 0 16px; font-size: 15px; white-space: nowrap; }
  .hl3-actions-note { flex: 1 1 0; min-width: 0; margin: 0; font-size: 12.5px; line-height: 1.35; }
  .hl3-actions-note:empty { display: none; }
  .hl3-actions-note:not(:empty) + .hl3-btn { flex: 0 0 auto; }
  .hl3-back { flex: 0 0 auto; padding: 0 10px; }
}
@media (max-width: 480px) {
  .hl3-wide { display: none; }
  body[data-step="report"] .hl3-back-text { display: none; }
  body[data-step="report"] .hl3-back { border: 1px solid var(--ln); }
}
@media (min-width: 641px) and (max-width: 959px) {
  .hl3-band-grid { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
  .hl3-band-class { grid-row: auto; }
}
@media (min-width: 960px) {
  .hl3-main { padding: 24px 24px 64px; }
  .hl3-band { padding: 20px 28px 22px; }
  .hl3-band-grid { grid-template-columns: auto repeat(4, minmax(0, 1fr)); gap: 16px 24px; }
  .hl3-band-class { grid-row: auto; }
  .hl3-body { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); }
  .hl3-col { padding: 26px 28px; }
  .hl3-col-side { border-top: 0; border-left: 1px solid var(--ln); }
  .hl3-actions { position: static; padding: 16px 28px; }
  .hl3-footer-inner { padding-bottom: 28px; }
  .hl3-toast { bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------- print */
@media print {
  @page { size: A4; margin: 14mm; }
  :root { --bg: #fff; --card: #fff; --soft: #fff; --soft-2: #f1f3f6; --shadow: none; }
  body.hl3 { background: #fff; color: #111; font-size: 11pt; }
  .hl3-top, .hl3-actions, .hl3-footer nav, .hl3-toast, .hl3-skip, .hl3-link, [data-action], .hl3-switch, .hl3-credit-inputs, .hl3-zmap { display: none !important; }
  .hl3-main { padding: 0; max-width: none; }
  .hl3-card, .hl3-details { border: 0; box-shadow: none; border-radius: 0; }
  .hl3-print-head { display: block; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 2px solid #111; }
  .hl3-print-head:empty { display: none; }
  .hl3-print-head div { display: flex; justify-content: space-between; font-size: 9.5pt; color: #444; }
  .hl3-print-head h1 { margin: 6px 0 2px; font-size: 18pt; color: #111; }
  .hl3-print-head p { margin: 0; font-size: 10.5pt; color: #333; }
  .hl3-print-hide { display: none !important; }
  .hl3-band { background: #fff; border-bottom: 1px solid #ccc; padding: 0 0 10px; }
  .hl3-band-grid { grid-template-columns: auto minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .hl3-body { grid-template-columns: 1fr; }
  .hl3-col { padding: 12px 0; }
  .hl3-col-side { border: 0; background: #fff; }
  .hl3-side-block, .hl3-green { break-inside: avoid; }
  .hl3-details summary { padding: 8px 0; }
  .hl3-details-body { padding: 0; }
  .hl3-class { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .hl3-footer { border: 0; }
  .hl3-footer-inner { padding: 8px 0 0; }
}
