/* Duinwerk Installatie
   Layout: technical and direct, like the lettering on a work van. Navy blueprint band for the
   hero (navy in both themes), hi-vis yellow only where you can act or where it's urgent.
   Condensed Barlow for headings, mono for specs, prices and postcodes. */
:root {
  --bg: #F1F4F6;
  --surface: #FFFFFF;
  --ink: #0F2230;
  --muted: #51646F;
  --line: #D3DCE2;
  --navy: #15364A;       /* hero band, footer: stays navy in dark mode too */
  --navy-2: #1D4660;
  --on-navy: #EAF1F5;
  --on-navy-muted: #A6BCC9;
  --hivis: #FFC81E;      /* actions, urgency */
  --hivis-2: #FFD24D;
  --on-hivis: #0F2230;
  --ok: #2E8B57;
  --map-land: #E3EAEF;
  --map-sea: #C9D7E1;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --fs-h1: clamp(2.8rem, 1.6rem + 4.6vw, 5.4rem);
  --fs-h2: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem);
  --r: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1820; --surface: #12232E; --ink: #E6EEF2; --muted: #93A8B4; --line: #22394A;
    --navy: #0E2636; --navy-2: #163447; --map-land: #15293A; --map-sea: #0E1D29; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1820; --surface: #12232E; --ink: #E6EEF2; --muted: #93A8B4; --line: #22394A;
  --navy: #0E2636; --navy-2: #163447; --map-land: #15293A; --map-sea: #0E1D29; color-scheme: dark;
}

body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; line-height: .95; }
h3 { font-weight: 700; font-size: 1.6rem; }
.dw-mono { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; }

.dw-btn {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: 0; border-radius: var(--r);
  background: var(--hivis); color: var(--on-hivis); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  text-transform: uppercase; letter-spacing: .03em; padding: 13px 22px; transition: background .2s, transform .15s;
}
.dw-btn:hover { background: var(--hivis-2); }
.dw-btn:active { transform: translateY(2px); }
.dw-btn-sm { font-size: 1rem; padding: 10px 16px; }
.dw-btn-block { width: 100%; }

/* Emergency strip */
.dw-alert { background: repeating-linear-gradient(-45deg, var(--hivis) 0 18px, var(--hivis-2) 18px 36px); color: var(--on-hivis); font-size: 15px; }
.dw-alert-in { display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.dw-alert p { flex: 1; min-width: 0; }
.dw-demo-note { opacity: .7; font-size: 13px; }
.dw-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #D7263D; animation: dw-pulse 1.6s infinite; }
@keyframes dw-pulse { 0% { box-shadow: 0 0 0 0 rgba(215, 38, 61, .6); } 100% { box-shadow: 0 0 0 12px rgba(215, 38, 61, 0); } }

/* Header */
.dw-head { display: flex; align-items: center; gap: 28px; padding-block: 16px; }
.dw-logo { display: flex; align-items: baseline; gap: 8px; text-decoration: none; font-family: var(--font-display); text-transform: uppercase; line-height: 1; }
.dw-logo b { font-weight: 800; font-size: 2rem; letter-spacing: .01em; }
.dw-logo span { font-weight: 600; font-size: 1rem; letter-spacing: .14em; color: var(--muted); }
.dw-nav { display: flex; gap: 24px; margin-left: auto; font-weight: 600; }
.dw-nav a { text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; padding-block: 4px; transition: border-color .2s, color .2s; }
.dw-nav a:hover { color: var(--ink); border-color: var(--hivis); }
@media (max-width: 900px) { .dw-nav { display: none; } .dw-head > .dw-btn { margin-left: auto; } }
@media (max-width: 420px) { .dw-logo span { display: none; } }

/* Hero: navy blueprint */
.dw-hero {
  background-color: var(--navy); color: var(--on-navy);
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
}
.dw-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: center; padding-block: clamp(40px, 6vw, 88px); }
.dw-eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--hivis); }
.dw-hero h1 { font-size: var(--fs-h1); margin-top: 14px; max-width: 12ch; }
.dw-lead { font-size: 1.2rem; color: var(--on-navy-muted); margin-top: 20px; max-width: 42ch; }
.dw-proof { display: grid; gap: 0; margin-top: 32px; border-top: 1px solid rgba(255,255,255,.16); max-width: 440px; }
.dw-proof li { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.16); color: var(--on-navy-muted); }
.dw-proof b { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--hivis); min-width: 4.2ch; text-transform: uppercase; }
@media (max-width: 920px) { .dw-hero-in { grid-template-columns: minmax(0, 1fr); } }

/* Calculator */
.dw-calc { background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 22px; display: grid; gap: 18px; box-shadow: 0 0 0 6px rgba(255, 200, 30, .25), 0 30px 60px -30px rgba(0,0,0,.6); }
.dw-calc-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.dw-calc-head .dw-mono { font-size: 12px; color: var(--muted); text-transform: none; font-weight: 500; }
.dw-calc fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dw-calc legend, .dw-calc label { font-weight: 600; font-size: 14.5px; }
.dw-jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dw-jobs label { position: relative; cursor: pointer; }
.dw-jobs input { position: absolute; opacity: 0; pointer-events: none; }
.dw-jobs label > span { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r); transition: border-color .2s, background .2s; }
.dw-jobs b { font-size: 15px; line-height: 1.25; }
.dw-jobs small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.dw-jobs label:hover > span { border-color: var(--muted); }
.dw-jobs input:checked + span { border-color: var(--ink); background: color-mix(in srgb, var(--hivis) 22%, var(--surface)); }
.dw-jobs input:focus-visible + span { outline: 3px solid var(--hivis); outline-offset: 2px; }
.dw-calc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
.dw-calc-row label { display: grid; gap: 6px; }
.dw-calc-row label output { font-family: var(--font-mono); font-weight: 500; color: var(--muted); }
.dw-calc select { padding: 10px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dw-calc input[type="range"] { width: 100%; accent-color: var(--ink); margin: 10px 0 0; }
.dw-result { background: var(--bg); border-left: 6px solid var(--hivis); padding: 14px 16px; display: grid; gap: 4px; }
.dw-price { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.dw-price.flash { animation: dw-flash .5s var(--ease-out); }
@keyframes dw-flash { 0% { color: var(--muted); transform: translateY(4px); } }
.dw-result-sub { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.dw-subsidy { font-size: 14px; font-weight: 600; color: var(--ok); }
.dw-calc-msg { font-size: 14px; color: var(--muted); }
@media (max-width: 460px) { .dw-jobs { grid-template-columns: minmax(0, 1fr); } .dw-calc-row { grid-template-columns: minmax(0, 1fr); } .dw-calc { padding: 16px; } }

/* Sections */
.dw-section { padding-block: clamp(64px, 9vw, 112px); }
.dw-section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 36px; }
.dw-section-head h2, .dw-area h2 { font-size: var(--fs-h2); }
.dw-section-head p { color: var(--muted); max-width: 48ch; }
@media (max-width: 760px) { .dw-section-head { grid-template-columns: minmax(0, 1fr); } }

.dw-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.dw-services li { padding: 22px 20px 24px; display: grid; gap: 10px; align-content: start; position: relative; transition: background .25s; }
.dw-services li + li { border-left: 2px solid var(--ink); }
.dw-services li::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: repeating-linear-gradient(-45deg, var(--hivis) 0 10px, var(--ink) 10px 20px); transition: height .25s var(--ease-out); }
.dw-services li:hover::after { height: 8px; }
.dw-code { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.dw-services p { color: var(--muted); font-size: 15.5px; }
.dw-spec { font-family: var(--font-mono); font-weight: 500; font-size: 14px; margin-top: 6px; }
@media (max-width: 960px) {
  .dw-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dw-services li:nth-child(3) { border-left: 0; }
  .dw-services li:nth-child(n+3) { border-top: 2px solid var(--ink); }
}
@media (max-width: 540px) {
  .dw-services { grid-template-columns: minmax(0, 1fr); }
  .dw-services li + li { border-left: 0; border-top: 2px solid var(--ink); }
}

/* Service area */
.dw-area { background: var(--surface); border-block: 2px solid var(--ink); padding-block: clamp(64px, 9vw, 112px); }
.dw-area-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.dw-area-copy > p { color: var(--muted); margin-top: 16px; max-width: 40ch; }
.dw-pc { margin-top: 24px; display: grid; gap: 6px; max-width: 360px; }
.dw-pc label { font-weight: 600; font-size: 14.5px; }
.dw-pc div { display: flex; gap: 8px; }
.dw-pc input { flex: 1; min-width: 0; padding: 12px; border: 2px solid var(--line); border-radius: var(--r); background: var(--bg); font-family: var(--font-mono); font-size: 16px; text-transform: uppercase; }
.dw-pc input:focus { border-color: var(--ink); outline: none; }
.dw-area-card { margin-top: 20px; max-width: 360px; border: 2px solid var(--ink); border-radius: var(--r); padding: 14px 16px; }
.dw-area-card.is-out { border-color: #D7263D; }
.dw-area-place { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; text-transform: uppercase; line-height: 1.05; }
.dw-area-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.dw-area-card dt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dw-area-card dd { font-weight: 600; }
.dw-map-wrap { background: var(--map-land); border-radius: var(--r); border: 2px solid var(--ink); overflow: hidden; }
.dw-map { display: block; width: 100%; height: auto; }
.dw-sea { fill: url(#dw-sea); }
.dw-sea-line { stroke: var(--map-sea); stroke-width: 3; }
.dw-coast { fill: none; stroke: var(--ink); stroke-width: 2; }
.dw-sea-label { font-family: var(--font-mono); font-size: 13px; fill: var(--muted); }
.dw-ring { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 6; }
.dw-town { cursor: pointer; outline: none; }
.dw-town circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; transition: r .25s var(--ease-out), fill .2s; }
.dw-town text { font-family: var(--font-display); font-weight: 700; font-size: 15px; text-transform: uppercase; fill: var(--ink); paint-order: stroke; stroke: var(--map-land); stroke-width: 4px; stroke-linejoin: round; }
.dw-town.core circle { fill: var(--ink); }
.dw-town:hover circle, .dw-town:focus-visible circle, .dw-town.is-active circle { fill: var(--hivis); r: 10; }
.dw-town:focus-visible text { text-decoration: underline; }
@media (max-width: 860px) { .dw-area-in { grid-template-columns: minmax(0, 1fr); } }

/* Job log */
.dw-log-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.dw-log { width: 100%; border-collapse: collapse; min-width: 560px; }
.dw-log th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 12px 16px; border-bottom: 2px solid var(--ink); }
.dw-log td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dw-log tr:last-child td { border-bottom: 0; }
.dw-log td:first-child, .dw-log td:last-child { font-family: var(--font-mono); font-size: 14.5px; white-space: nowrap; }
.dw-log tbody tr { transition: background .2s; }
.dw-log tbody tr:hover { background: color-mix(in srgb, var(--hivis) 14%, var(--surface)); }

/* Footer */
.dw-foot { background: var(--navy); color: var(--on-navy); padding-block: 44px 28px; }
.dw-foot-in { display: flex; flex-wrap: wrap; gap: 24px 56px; justify-content: space-between; }
.dw-foot .dw-logo b { font-size: 2.6rem; color: var(--hivis); }
.dw-foot .dw-logo span { color: var(--on-navy-muted); }
.dw-foot-list { display: grid; gap: 6px; }
.dw-foot-list div { display: flex; gap: 20px; justify-content: space-between; min-width: 240px; }
.dw-foot-list dt { color: var(--on-navy-muted); }
.dw-foot-small { flex-basis: 100%; font-size: 13px; color: var(--on-navy-muted); }

/* ---------- Phase 2: shared features mapped to this brand ---------- */
:root {
  --ui-bg: var(--surface); --ui-fg: var(--ink); --ui-muted: var(--muted); --ui-line: var(--line); --ui-soft: var(--bg);
  --ui-accent: var(--hivis); --ui-on-accent: var(--on-hivis); --ui-radius: 3px;
  --ui-font: var(--font-body); --ui-font-display: var(--font-display); --ui-display-case: uppercase; --ui-display-weight: 800;
}
.dw-head .zd-ctl { margin-left: 6px; }
.dw-cta-short { display: none; }
@media (max-width: 900px) { .dw-head .zd-ctl { margin-left: auto; } .dw-head > .dw-btn { margin-left: 0; } }
@media (max-width: 560px) { .dw-cta-long { display: none; } .dw-cta-short { display: inline; } .dw-head { gap: 10px; } .dw-logo b { font-size: 1.7rem; } }
.dw-proof b span { font-variant-numeric: tabular-nums; }

/* How a breakdown works: a timeline. On wide screens with motion it pins and a clock runs (.is-pinned). */
.dw-flow { background: var(--navy); color: var(--on-navy); }
.dw-flow-pin { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding-block: clamp(64px, 9vw, 112px); }
.dw-flow-head h2 { font-size: var(--fs-h2); }
.dw-flow-head p { color: var(--on-navy-muted); margin-top: 14px; max-width: 46ch; }
.dw-clock { display: grid; justify-items: end; }
.dw-clock span { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 2rem + 8vw, 9rem); line-height: .85; color: var(--hivis); font-variant-numeric: tabular-nums; }
.dw-clock small { font-family: var(--font-mono); font-size: 13px; color: var(--on-navy-muted); }
.dw-flow-steps { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.dw-flow-steps li { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 3px solid var(--hivis); transition: opacity .4s, border-color .4s; }
.dw-flow-steps .dw-mono { color: var(--hivis); font-size: 14px; }
.dw-flow-steps h3 { font-size: 1.8rem; }
.dw-flow-steps p { color: var(--on-navy-muted); }
.dw-flow-line { display: none; }
@media (max-width: 760px) { .dw-flow-pin { grid-template-columns: minmax(0, 1fr); } .dw-clock { justify-items: start; } .dw-flow-steps { grid-template-columns: minmax(0, 1fr); } }
.dw-flow.is-pinned .dw-flow-pin { min-height: 100vh; min-height: 100svh; align-content: center; padding-block: calc(var(--zd-bar-h) + 24px) 32px; }
.dw-flow.is-pinned .dw-flow-steps li { opacity: .25; border-color: rgba(255, 255, 255, .2); }
.dw-flow.is-pinned .dw-flow-steps li.on { opacity: 1; border-color: var(--hivis); }
.dw-flow.is-pinned .dw-flow-line { display: block; grid-column: 1 / -1; height: 6px; background: rgba(255, 255, 255, .12); }
.dw-flow.is-pinned .dw-flow-line span { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: repeating-linear-gradient(-45deg, var(--hivis) 0 10px, var(--hivis-2) 10px 20px); }

/* =================== Phase 3: 3D hero + inner pages =================== */
.dw-3d { position: relative; height: clamp(240px, 30vw, 340px); margin-top: 24px; border: 1px solid rgba(255,255,255,.16); border-radius: var(--r); background: radial-gradient(ellipse at 50% 80%, rgba(255,200,30,.12), transparent 60%); }
.dw-3d-label { position: absolute; left: 12px; top: 10px; z-index: 2; font-family: var(--font-mono); font-size: 12.5px; color: var(--on-navy-muted); }
.dw-3d-label b { color: var(--hivis); font-weight: 500; }
.dw-3d .zd-3d-hint { --ui-bg: var(--navy-2); --ui-fg: var(--on-navy); --ui-line: rgba(255,255,255,.2); }
.dw-calc-more { justify-self: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.dw-proof-band { background: var(--surface); border-bottom: 2px solid var(--ink); }
.dw-proof-band .dw-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin: 0; border: 0; }
.dw-proof-band .dw-proof li { padding: 18px 16px; border-bottom: 0; color: var(--muted); }
.dw-proof-band .dw-proof li + li { border-left: 2px solid var(--ink); }
.dw-proof-band .dw-proof b { color: var(--ink); }
.dw-proof-band .dw-proof b span:first-child { color: var(--ink); background: var(--hivis); padding: 0 6px; }
@media (max-width: 640px) { .dw-proof-band .dw-proof { grid-template-columns: minmax(0, 1fr); } .dw-proof-band .dw-proof li + li { border-left: 0; border-top: 2px solid var(--ink); } }
.dw-nav a[aria-current] { color: var(--ink); border-color: var(--hivis); }
.dw-subnav { display: none; }
@media (max-width: 900px) {
  .dw-subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--gutter-r) 12px var(--gutter-l); }
  .dw-subnav::-webkit-scrollbar { display: none; }
  .dw-subnav a { flex: none; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: var(--r); border: 2px solid var(--line); }
  .dw-subnav a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
}

/* Page basics */
.dw-page-hero {
  background-color: var(--navy); color: var(--on-navy);
  background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 48px 48px;
}
.dw-page-hero-in { padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px); }
.dw-page-hero h1 { font-size: var(--fs-h1); margin-top: 12px; }
.dw-page-hero .dw-lead { max-width: 52ch; }
.dw-crumbs { font-family: var(--font-mono); font-size: 13px; color: var(--on-navy-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.dw-crumbs a { color: inherit; }
.dw-hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 28px; }
.dw-hero-facts li { color: var(--on-navy-muted); }
.dw-hero-facts b { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--hivis); margin-right: 6px; }
.dw-h2 { font-size: var(--fs-h2); margin-bottom: 32px; }
.dw-note { font-size: 14px; color: var(--muted); }
.dw-link { border: 0; background: none; padding: 0; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: inherit; }
.dw-seg { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.dw-seg button { border: 0; background: var(--surface); padding: 9px 16px; font-weight: 700; }
.dw-seg button + button { border-left: 2px solid var(--ink); }
.dw-seg button[aria-pressed="true"] { background: var(--hivis); color: var(--on-hivis); }

/* Heat pump: diagram */
.dw-diagram { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: center; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); padding: clamp(14px, 2.5vw, 24px); }
.dw-diagram svg { width: 100%; height: auto; display: block; }
.dg-out { fill: color-mix(in srgb, var(--navy) 12%, var(--surface)); }
.dg-in { fill: var(--surface); }
.dg-zone { font: 500 12px var(--font-mono); fill: var(--muted); letter-spacing: .1em; }
.dw-diagram text { font-family: var(--font-display); font-weight: 700; font-size: 15px; fill: var(--ink); text-transform: uppercase; }
.dg-pump rect, .dg-boiler rect:first-child { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.dg-fan-ring { fill: #1B2830; }
.dg-fan { fill: #A9B6C0; transform-origin: 140px 220px; animation: dg-spin var(--fan, 1s) linear infinite; }
.dg-screen { fill: #0F2230; }
.dg-boiler { opacity: calc(.35 + var(--cv, 0) * 1.3); transition: opacity .4s; }
.dg-rads rect { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.dg-rads path { stroke: var(--line); stroke-width: 2; }
.dg-pipe { fill: none; stroke: var(--line); stroke-width: 10; stroke-linejoin: round; }
.dg-flow { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 10 16; animation: dg-flow 1.2s linear infinite; }
.dg-flow-pump { stroke: #E8590C; opacity: calc(.25 + var(--wp, 1) * .75); }
.dg-flow-boiler { stroke: #D7263D; opacity: 0; transition: opacity .4s; }
.cv-on .dg-flow-boiler { opacity: calc(var(--cv) * 1.6); }
@keyframes dg-flow { to { stroke-dashoffset: -26; } }
@keyframes dg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dg-flow, .dg-fan { animation: none; } }
.dw-temp { display: grid; gap: 14px; }
.dw-temp label { display: grid; gap: 8px; font-weight: 600; }
.dw-temp output { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--ink); }
.dw-temp input { width: 100%; accent-color: #E8590C; }
.dw-share { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.dw-share p { display: grid; }
.dw-share b { font-family: var(--font-mono); font-weight: 500; font-size: 1.1rem; }
.dw-share-bar { height: 12px; background: #D7263D; border-radius: 99px; overflow: hidden; }
.dw-share-bar span { display: block; height: 100%; background: #E8590C; transition: width .3s; }
.dw-temp-note { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .dw-diagram { grid-template-columns: minmax(0, 1fr); } }

/* Heat pump: savings */
.dw-save { background: var(--navy); color: var(--on-navy); padding-block: clamp(64px, 9vw, 112px); scroll-margin-top: var(--zd-bar-h); }
.dw-save-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.dw-save h2 { font-size: var(--fs-h2); color: var(--hivis); }
.dw-save-in > div > p { color: var(--on-navy-muted); margin-top: 14px; max-width: 44ch; }
.dw-save .dw-note { color: var(--on-navy-muted); }
.dw-save-form { background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 22px; display: grid; gap: 18px; box-shadow: 0 0 0 6px rgba(255, 200, 30, .25); }
.dw-save-form label { display: grid; gap: 8px; font-weight: 600; }
.dw-save-form output { font-family: var(--font-mono); font-weight: 500; color: var(--muted); }
.dw-save-form input[type="range"] { width: 100%; accent-color: var(--ink); }
.dw-save-form fieldset { border: 0; padding: 0; margin: 0; }
.dw-save-form legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.dw-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: var(--r); }
.dw-results div { padding: 14px 16px; }
.dw-results div:nth-child(2n) { border-left: 2px solid var(--ink); }
.dw-results div:nth-child(n+3) { border-top: 2px solid var(--ink); }
.dw-results dt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dw-results dd { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .dw-save-in { grid-template-columns: minmax(0, 1fr); } }
.dw-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 6px solid var(--hivis); }
.dw-timeline li { padding: 18px 18px 0 0; display: grid; gap: 6px; align-content: start; position: relative; }
.dw-timeline li::before { content: ""; position: absolute; top: -12px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--hivis); }
.dw-timeline .dw-mono { font-size: 13px; color: var(--muted); margin-top: 10px; }
.dw-timeline h3 { font-size: 1.5rem; }
.dw-timeline p { color: var(--muted); }
@media (max-width: 860px) { .dw-timeline { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 6px solid var(--hivis); } .dw-timeline li { padding: 0 0 24px 24px; } .dw-timeline li::before { top: 2px; left: -12px; } .dw-timeline .dw-mono { margin-top: 0; } }
.dw-faq { border-top: 2px solid var(--ink); }
.dw-faq details { border-bottom: 2px solid var(--ink); }
.dw-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 2px; font-weight: 700; font-size: 1.1rem; }
.dw-faq summary::-webkit-details-marker { display: none; }
.dw-faq summary::after { content: "+"; font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: .7; color: var(--ink); background: var(--hivis); width: 28px; height: 28px; display: grid; place-items: center; flex: none; transition: transform .3s; }
.dw-faq details[open] summary::after { transform: rotate(45deg); }
.dw-faq details p { padding: 0 2px 18px; color: var(--muted); max-width: 64ch; }

/* Quote wizard */
.dw-wiz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 28px; align-items: start; padding-block: 40px 96px; }
.dw-wiz-main { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); padding: clamp(18px, 3vw, 30px); display: grid; gap: 18px; }
.dw-progress { height: 10px; background: var(--bg); border: 2px solid var(--ink); }
.dw-progress span { display: block; height: 100%; width: 25%; background: repeating-linear-gradient(-45deg, var(--hivis) 0 10px, var(--hivis-2) 10px 20px); transition: width .4s var(--ease-out); }
.dw-step-label { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.dw-qstep h2 { font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); margin-bottom: 16px; }
.dw-qstep h2 small { font-family: var(--font-body); font-weight: 500; font-size: 1rem; text-transform: none; color: var(--muted); }
.dw-jobs-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dw-jobs-lg label > span { padding: 16px; }
.dw-jobs-lg b { font-size: 1.05rem; }
@media (max-width: 520px) { .dw-jobs-lg { grid-template-columns: minmax(0, 1fr); } }
.dw-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dw-fields .span-2 { grid-column: 1 / -1; }
.dw-fields label { display: grid; gap: 6px; font-weight: 600; font-size: 14.5px; }
.dw-fields small { font-weight: 400; color: var(--muted); }
.dw-fields input:not([type="range"]), .dw-fields select, .dw-fields textarea { padding: 11px 12px; border: 2px solid var(--line); border-radius: var(--r); background: var(--bg); font-weight: 400; }
.dw-fields input:focus, .dw-fields select:focus, .dw-fields textarea:focus { outline: none; border-color: var(--ink); }
.dw-fields input[aria-invalid="true"] { border-color: #D7263D; }
.dw-fields output { font-family: var(--font-mono); font-weight: 500; color: var(--muted); }
.dw-fields input[type="range"] { accent-color: var(--ink); }
.dw-fields fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.dw-fields legend { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; padding: 0; }
@media (max-width: 520px) { .dw-fields { grid-template-columns: minmax(0, 1fr); } }
.dw-hint { color: var(--muted); margin-bottom: 14px; }
.dw-drop { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 3px dashed var(--line); border-radius: var(--r); background: var(--bg); cursor: pointer; transition: border-color .2s, background .2s; }
.dw-drop:hover, .dw-drop.is-over { border-color: var(--ink); background: color-mix(in srgb, var(--hivis) 14%, var(--bg)); }
.dw-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dw-drop:focus-within { outline: 3px solid var(--hivis); outline-offset: 2px; }
.dw-drop-ico { width: 44px; height: 44px; display: grid; place-items: center; background: var(--hivis); color: var(--on-hivis); font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; }
.dw-drop small { color: var(--muted); }
.dw-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.dw-thumbs li { position: relative; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--bg); }
.dw-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.dw-thumb-name { display: block; font-size: 11.5px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-thumbs button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; background: var(--ink); color: var(--bg); font-weight: 700; }
.dw-q-err { color: #D7263D; font-weight: 700; font-size: 14.5px; }
.dw-wiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 2px solid var(--line); }
.dw-wiz-actions .dw-btn { margin-left: auto; }
.dw-q-done { display: grid; gap: 14px; justify-items: start; }
.dw-q-ref { font-size: 13px; background: var(--hivis); color: var(--on-hivis); padding: 4px 10px; }
.dw-q-done h2 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.dw-q-done > p:not(.dw-q-ref) { color: var(--muted); max-width: 60ch; }
.dw-next { display: grid; gap: 0; width: 100%; border-top: 2px solid var(--ink); }
.dw-next li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dw-next b { font-family: var(--font-mono); font-weight: 500; font-size: 13.5px; color: var(--muted); }
@media (max-width: 520px) { .dw-next li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.dw-q-side { position: sticky; top: calc(var(--zd-bar-h) + 20px); background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; }
.dw-q-side h2 { font-size: 1.6rem; }
.dw-q-side dl { display: grid; }
.dw-q-side dl div { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dw-q-side dt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dw-q-side dd { font-weight: 600; }
@media (max-width: 960px) { .dw-wiz { grid-template-columns: minmax(0, 1fr); } .dw-q-side { position: static; order: -1; } }

/* Projects */
.dw-pfilter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.dw-pfilter button { border: 2px solid var(--ink); background: var(--surface); border-radius: var(--r); padding: 8px 16px; font-weight: 700; }
.dw-pfilter button[aria-pressed="true"] { background: var(--hivis); color: var(--on-hivis); }
.dw-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 760px) { .dw-projects { grid-template-columns: minmax(0, 1fr); } }
.dw-proj { border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.dw-ba { position: relative; aspect-ratio: 400 / 260; max-width: 100%; overflow: hidden; border-bottom: 2px solid var(--ink); user-select: none; }
.dw-ba svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dw-ba-after, .dw-ba-before { position: absolute; inset: 0; }
.dw-ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.dw-ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; translate: -50% 0; background: var(--hivis); pointer-events: none; }
.dw-ba-line span { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 38px; height: 38px; display: grid; place-items: center; background: var(--hivis); color: var(--on-hivis); font-weight: 800; border: 2px solid var(--ink); }
.dw-ba-tag { position: absolute; top: 10px; font-family: var(--font-mono); font-size: 12px; padding: 3px 8px; background: var(--ink); color: var(--bg); pointer-events: none; }
.dw-ba-tag-l { left: 10px; }
.dw-ba-tag-r { right: 10px; background: var(--hivis); color: var(--on-hivis); }
.dw-ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.dw-ba:has(.dw-ba-range:focus-visible) { outline: 3px solid var(--hivis); outline-offset: -3px; }
.dw-proj-body { padding: 18px 20px 20px; display: grid; gap: 8px; }
.dw-proj-body h3 { font-size: 1.6rem; }
.dw-proj-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin-top: 6px; }
.dw-proj-facts div { display: contents; }
.dw-proj-facts dt { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.dw-proj-facts dd { font-weight: 600; }
.dw-pcta { margin-top: 48px; padding: 28px; border: 2px solid var(--ink); border-radius: var(--r); background: repeating-linear-gradient(-45deg, var(--hivis) 0 18px, var(--hivis-2) 18px 36px); color: var(--on-hivis); display: grid; gap: 12px; justify-items: start; }
.dw-pcta h2 { font-size: var(--fs-h2); }
.dw-pcta .dw-btn { background: var(--ink); color: var(--bg); }

/* Sweep fixes */
.dw-pc { grid-template-columns: minmax(0, 1fr); }
.dw-pc input { width: 100%; }
@media (max-width: 380px) { .dw-logo b { font-size: 1.4rem; } .dw-head > .dw-btn { padding: 8px 10px; font-size: .9rem; } .dw-head { gap: 6px; } }
@media (max-width: 960px) { .dw-q-side { order: 1; } }
@media (max-width: 600px) { .dw-diagram text { font-size: 26px; } .dw-diagram .dg-zone { font-size: 20px; } }

/* Photos and reviews (phase 7) */
.dw-photo { margin: 32px 0 0; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.dw-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% 40%; }
.dw-photo figcaption { padding: 10px 16px; font: 500 13px/1.4 var(--font-mono); color: var(--muted); border-top: 2px solid var(--ink); }
.dw-photo-band { margin-top: clamp(32px, 5vw, 56px); }
.dw-photo-band img { aspect-ratio: 21 / 9; object-position: 50% 60%; }
.dw-reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.dw-reviews figure { margin: 0; padding: 24px 22px; display: grid; gap: 16px; align-content: space-between; }
.dw-reviews figure + figure { border-left: 2px solid var(--ink); }
.dw-reviews blockquote { margin: 0; font-size: 1.08rem; line-height: 1.45; font-weight: 600; }
.dw-reviews figcaption { font-size: 14px; color: var(--muted); }
.dw-reviews figcaption span { color: var(--hivis-2); margin-right: 6px; letter-spacing: 1px; }
@media (max-width: 860px) {
  .dw-reviews { grid-template-columns: minmax(0, 1fr); }
  .dw-reviews figure + figure { border-left: 0; border-top: 2px solid var(--ink); }
  .dw-photo img, .dw-photo-band img { aspect-ratio: 3 / 2; }
}
