/* Boiler "Get a Quote" wizard — standalone, per-client themeable.
   Colours come from CSS custom properties injected from src/config.ts (see
   BaseLayout); the :root values here are DK Gas defaults / fallbacks. */

:root {
  --brand: #10243f; --brand-dark: #0a1830; --accent: #8cc63f; --accent-text: #0a1830;
  --accent-ink: #5d8f24; --cta-shadow: #6fa52f; --shadow-rgb: 8,20,40; --line-rgb: 16,36,63;
  --accent-rgb: 140,198,63; /* r,g,b of --accent for tinted backgrounds (selected tile, focus ring); overridable per client */
  --bg: #eef2f7; --surface: #ffffff; --text: #10243f; --muted: #5b6b80;
  /* fonts — default to the system stack; clients can override via src/config.ts → fonts */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-body);
  --radius: 16px; --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(var(--shadow-rgb),.28); --shadow-sm: 0 2px 10px rgba(var(--line-rgb),.08);
  --line: rgba(var(--line-rgb),.14); --maxw: 1100px; --cardw: 1000px; --cardh: 660px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.5; }
.intro__title, .step__title, .results__title, .done h2, .logo { font-family: var(--font-heading); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }

/* Header / footer */
.site-header { background: var(--brand-dark); color: #fff; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: .5px; color: #fff; text-decoration: none; }
.phone { color: #fff; text-decoration: none; font-weight: 600; opacity: .92; }
.phone::before { content: "\260E  "; }
/* Optional logo image (in a white chip, for black-on-transparent brand logos) — used when config sets logoImg */
.logo--img { background: #fff; border-radius: 9px; padding: 6px 11px; line-height: 0; }
.logo--img img { height: 34px; width: auto; display: block; }
.site-footer { padding: 22px 0; color: var(--muted); font-size: .85rem; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent; border-radius: 999px; padding: 11px 22px; text-decoration: none; transition: transform .06s, box-shadow .15s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); color: var(--accent-text); box-shadow: var(--shadow-sm); }
.btn--accent:hover { filter: brightness(1.03); box-shadow: var(--shadow); }
.btn--lg { padding: 15px 32px; font-size: 1.1rem; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--block { width: 100%; }

/* Stage — swaps intro → wizard → results in place */
.stage-wrap { background: linear-gradient(160deg, var(--stage-from, var(--brand)) 0%, var(--stage-to, var(--brand-dark)) 100%); padding: 48px 20px 64px; }
.stage { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 620px; }
#quote-app { width: 100%; }
.view { width: 100%; }

/* Intro */
.view--intro { text-align: center; color: var(--intro-text, #fff); max-width: 880px; margin-inline: auto; }
.intro__eyebrow { text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; opacity: .85; margin: 0 0 12px; }
.intro__title { font-size: clamp(2rem,5vw,3.1rem); font-weight: 800; line-height: 1.08; margin: 0 0 14px; }
.intro__sub { font-size: 1.08rem; opacity: .92; margin: 0 auto 26px; max-width: 600px; }
.intro__steps { list-style: none; padding: 0; margin: 44px auto 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; max-width: 820px; }
.intro__step { display: flex; flex-direction: column; gap: 6px; }
.intro__step-arrow { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; }
.intro__step strong { text-transform: uppercase; font-size: .82rem; letter-spacing: .5px; }
.intro__step span { font-size: .82rem; opacity: .82; }
/* Optional trust/social-proof line under the intro CTA (shown only when config provides intro.trust) */
.intro__trust { list-style: none; padding: 0; margin: 20px auto 0; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: .82rem; font-weight: 600; color: var(--muted); }
.intro__trust li { display: inline-flex; align-items: center; gap: 5px; }
.intro__trust li::before { content: "\2605"; color: var(--accent-ink); }
/* AAA Roofing — slightly larger intro (first page) typography; scoped so other clients are unchanged */
body[data-client="aaaroofing"] .intro__eyebrow { font-size: .86rem; }
body[data-client="aaaroofing"] .intro__title { font-size: clamp(2.3rem, 5.4vw, 3.5rem); }
body[data-client="aaaroofing"] .intro__sub { font-size: 1.24rem; max-width: 660px; }
body[data-client="aaaroofing"] .intro__trust { font-size: .92rem; }
body[data-client="aaaroofing"] .intro__step strong { font-size: .92rem; }
body[data-client="aaaroofing"] .intro__step span { font-size: .9rem; }
/* AAA Roofing — wizard polish: 4-option steps as a balanced 2×2 (fills the card like the 6-option step), tuned card height + slightly larger step text */
body[data-client="aaaroofing"] { --cardh: 588px; }
body[data-client="aaaroofing"] .options[data-count="4"] { grid-template-columns: repeat(2,1fr); max-width: 620px; margin-inline: auto; }
body[data-client="aaaroofing"] .step__title { font-size: 1.62rem; }
body[data-client="aaaroofing"] .step__sub { font-size: 1.02rem; }
body[data-client="aaaroofing"] .opt__label { font-size: 1.02rem; }
/* Mick O'Byrne Roofing — match the main site: dark hero, gold heading underline, larger intro, balanced 2×2 steps */
body[data-client="obyrne"] .intro__eyebrow { font-size: .86rem; }
body[data-client="obyrne"] .intro__title { font-size: clamp(2.3rem, 5.4vw, 3.4rem); display: inline-block; }
body[data-client="obyrne"] .intro__title::after { content: ""; display: block; width: 130px; height: 4px; background: var(--accent); border-radius: 2px; margin: 16px auto 0; }
body[data-client="obyrne"] .intro__sub { font-size: 1.18rem; max-width: 640px; }
body[data-client="obyrne"] .intro__trust { color: rgba(255,255,255,.85); font-size: .9rem; }
body[data-client="obyrne"] .intro__trust li::before { color: var(--accent); }
body[data-client="obyrne"] .intro__step strong { font-size: .9rem; }
body[data-client="obyrne"] .intro__step span { font-size: .88rem; opacity: .9; }
body[data-client="obyrne"] { --cardh: 588px; }
body[data-client="obyrne"] .options[data-count="4"] { grid-template-columns: repeat(2,1fr); max-width: 620px; margin-inline: auto; }
body[data-client="obyrne"] .step__title { font-size: 1.62rem; }
body[data-client="obyrne"] .step__sub { font-size: 1.02rem; }
body[data-client="obyrne"] .opt__label { font-size: 1.02rem; }

/* Wizard card */
.view--wizard { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); max-width: var(--cardw); width: 100%; margin-inline: auto; padding: 30px 40px 40px; min-height: var(--cardh); display: flex; flex-direction: column; }
.wizard__top { display: flex; justify-content: flex-end; min-height: 8px; }
.callus { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.callus span { font-size: .62rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.callus strong { color: var(--brand); font-size: 1.05rem; }
.callus::before { content: "\260E"; color: var(--accent-ink); float: left; margin: 6px 8px 0 0; font-size: 1.2rem; }

.progress { margin: 6px 0 20px; }
.progress__track { height: 7px; background: rgba(var(--line-rgb),.1); border-radius: 999px; overflow: hidden; }
.progress__fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s; }
.progress__row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.progress__label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.wizard__back { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 0; }
.wizard__back:hover { color: var(--text); }
.wizard__top--nav { justify-content: space-between; align-items: flex-start; }
.view__back { background: none; border: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; padding: 2px 0; }
.view__back:hover { color: var(--text); }

.step { margin: auto 0; }
.step__title { font-size: 1.5rem; font-weight: 800; text-align: center; margin: 6px 0 6px; }
.step__sub { text-align: center; color: var(--muted); margin: 0 auto 22px; max-width: 560px; }
.step__help { text-align: center; color: var(--muted); font-size: .85rem; max-width: 600px; margin: 20px auto 0; }
.step__help b { color: var(--text); }

/* Option tiles — icon (grey+green) above label, laid out by count */
.options { display: grid; gap: 12px; grid-template-columns: repeat(2,1fr); }
@media (min-width: 440px) and (max-width: 619px) { .options[data-count="5"], .options[data-count="6"] { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 620px) {
  .options[data-count="2"] { grid-template-columns: repeat(2,1fr); max-width: 460px; margin-inline: auto; }
  .options[data-count="3"] { grid-template-columns: repeat(3,1fr); }
  .options[data-count="4"] { grid-template-columns: repeat(4,1fr); }
  .options[data-count="5"] { grid-template-columns: repeat(5,1fr); }
  .options[data-count="6"] { grid-template-columns: repeat(3,1fr); max-width: 720px; margin-inline: auto; }
}
.opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; padding: 16px 8px; cursor: pointer; text-align: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--text); font-weight: 700; transition: border-color .12s, box-shadow .12s, transform .06s, background .12s; }
.opt:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.opt:active { transform: translateY(1px); }
.opt--selected { border-color: var(--accent); background: rgba(var(--accent-rgb),.1); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.28); }
.opt__icon { color: var(--accent); line-height: 0; }
.opt__icon svg { width: 90px; height: 90px; display: block; }
.opt__label { font-size: .96rem; line-height: 1.15; }
.opt__meta { font-size: .76rem; font-weight: 600; color: var(--muted); }

/* Flue "View examples" */
.examples { text-align: center; margin-top: 18px; }
.examples__toggle { background: none; border: none; color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }
.examples__toggle::before { content: "\1F5BC  "; }
.examples__grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 16px; }
.ex { width: 210px; }
.ex__img svg { width: 100%; height: auto; border-radius: 10px; display: block; border: 1px solid var(--line); }
.ex figcaption { text-align: center; font-weight: 700; color: var(--muted); font-size: .85rem; margin-top: 8px; }
.ex figcaption small { display: block; font-weight: 400; font-size: .78rem; }

/* Results */
.view--results { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); max-width: var(--cardw); margin-inline: auto; padding: 30px 40px 40px; width: 100%; min-height: 520px; }
.results__title { text-align: center; font-size: 1.7rem; font-weight: 800; margin: 4px 0 6px; }
.results__title span { color: var(--muted); font-weight: 600; font-size: .95rem; }
.results__sub { text-align: center; color: var(--muted); margin: 0 auto 16px; max-width: 600px; font-size: .92rem; }
.addons { text-align: center; background: rgba(var(--accent-rgb),.14); border: 1px solid rgba(var(--accent-rgb),.4); border-radius: var(--radius-sm); padding: 10px 16px; margin: 0 auto 22px; max-width: 720px; font-size: .9rem; }

.boilers { display: flex; flex-direction: column; gap: 18px; }
.boiler { display: grid; grid-template-columns: 150px 1fr 210px; gap: 24px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.boiler__media { position: relative; }
.boiler-illus { width: 130px; height: auto; display: block; margin: 4px auto 0; }
.boiler__badge { position: absolute; z-index: 2; top: -10px; left: -10px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 1.4rem; line-height: 1; text-align: center; box-shadow: var(--shadow-sm); }
.boiler__badge small { font-size: .4rem; font-weight: 800; letter-spacing: .3px; margin-top: 2px; }
.boiler__name { font-size: 1.35rem; font-weight: 800; color: var(--brand); margin: 0 0 6px; text-transform: uppercase; }
.boiler__desc { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.boiler__pkg-title { color: var(--accent-ink); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .5px; margin: 0 0 8px; }
.boiler__pkg { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.boiler__pkg li { position: relative; padding-left: 24px; font-size: .85rem; }
.boiler__pkg li::before { content: "\2713"; position: absolute; left: 2px; color: var(--accent-ink); font-weight: 800; }
.boiler__buy { display: flex; flex-direction: column; gap: 12px; }
.boiler__finance { background: rgba(var(--accent-rgb),.14); border-radius: 10px; padding: 8px 12px; text-align: center; }
.boiler__finance span { display: block; font-size: .6rem; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 700; }
.boiler__finance strong { font-size: 1.25rem; color: var(--brand); }
.boiler__price { font-size: 2.1rem; font-weight: 800; color: var(--brand); line-height: 1; text-align: center; }
.boiler__price span { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-top: 3px; }
.boiler__continue { width: 100%; }
.results__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin-top: 26px; }

@media (max-width: 760px) {
  .boiler { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .boiler__media { justify-self: center; }
  .boiler__pkg { text-align: left; max-width: 360px; margin-inline: auto; }
  .boiler__name { text-align: center; }
}
@media (max-width: 600px) {
  .stage { min-height: 0; } .stage-wrap { padding: 30px 12px 44px; }
  .view--wizard, .view--results { padding: 18px 14px 26px; }
  .intro__steps { grid-template-columns: 1fr; gap: 18px; max-width: 360px; }
}

/* Post-selection views share the white-card look */
.view--upsell, .view--contact, .view--done { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); max-width: var(--cardw); width: 100%; margin-inline: auto; padding: 30px 40px 40px; min-height: 520px; }

/* Chunky CTA (matches the original's bold green buttons) */
.btn--cta { box-shadow: 0 4px 0 var(--cta-shadow); }
.btn--cta:hover { box-shadow: 0 4px 0 var(--cta-shadow), var(--shadow); }
.btn--cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cta-shadow); }
.results__foot { text-align: center; color: var(--muted); font-size: .82rem; margin: 20px 0 0; }
.linkbtn { background: none; border: none; color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; }

/* Filter upsell */
.filters { display: flex; flex-direction: column; gap: 16px; max-width: 820px; margin: 0 auto; }
.filter { display: grid; grid-template-columns: 110px 1fr 180px; gap: 20px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.filter--included { border-color: var(--accent); }
.filter__img svg { width: 64px; height: auto; display: block; margin: 0 auto; }
.filter__info h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--brand); }
.filter__info p { margin: 0; color: var(--muted); font-size: .86rem; }
.filter__buy { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.filter__label { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--accent-ink); }
.filter__price { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.filter__skip { text-align: center; margin-top: 18px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; max-width: 860px; margin: 0 auto; }
.contact__form { display: grid; gap: 14px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { display: grid; gap: 5px; }
.fld span { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.fld--req span::after { content: " *"; color: #d9534f; }
.fld input, .fld textarea { font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.fld textarea { resize: vertical; min-height: 76px; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.25); }
.consent { display: flex; align-items: center; gap: 9px; font-size: .9rem; }
.consent input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #c0392b; font-size: .85rem; font-weight: 600; margin: 0; }
.contact__privacy { font-size: .76rem; color: var(--muted); margin: 4px 0 0; }

/* Quote summary */
.summary { background: #f7f9fb; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.summary__head { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.summary__head strong { color: var(--brand); }
.summary__head span { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.summary__table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.summary__table td { padding: 5px 0; vertical-align: top; }
.summary__table td:first-child { color: var(--muted); width: 40%; }
.summary__table td:last-child { font-weight: 600; text-align: right; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid var(--line); margin-top: 10px; padding-top: 10px; }
.summary__total span { font-size: .8rem; color: var(--muted); }
.summary__total strong { font-size: 1.5rem; color: var(--brand); }

/* Done */
.done { text-align: center; max-width: 520px; margin: 0 auto; padding: 30px 10px; }
.done__tick { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.done h2 { font-size: 1.7rem; margin: 0 0 10px; }
.done p { color: var(--muted); margin: 0 0 14px; }
.done__call a { color: var(--accent-ink); font-weight: 700; }

@media (max-width: 760px) {
  .filter { grid-template-columns: 1fr; text-align: center; gap: 12px; }
  .contact { grid-template-columns: 1fr; }
  .summary { order: -1; }
}
@media (max-width: 480px) { .fld-row { grid-template-columns: 1fr; } }

/* Real images sit on top of the placeholder; if a file is missing the <img> removes
   itself (onerror) and the placeholder shows through. Drop photos into /public/img/. */
.media-frame { position: relative; display: block; }
.media-frame .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.boiler__media .media-frame { width: 130px; margin: 4px auto 0; }
.filter__img .media-frame { width: 64px; margin: 0 auto; }
.ex__img .media-frame { width: 100%; border-radius: 10px; overflow: hidden; }
.ex__img .photo { object-fit: cover; }
