/* ==========================================================================
   Conveyancing Prices — Design System
   Colours derived from brand logo: navy #1B2A44 + teal #3DC9B5.
   Font: Poppins throughout (matches ci5 design language).
   ========================================================================== */

:root {
  /* Palette — navy primary (logo dark colour) */
  --blue: #1B2A44;
  --blue-700: #111d30;
  --blue-600: #1B2A44;
  --blue-100: #e8edf5;
  --blue-50: #f2f5fa;
  --blue-mist: #8fa3c4;

  /* CTA teal (logo bright colour) */
  --green: #3DC9B5;
  --green-600: #2cb09d;
  --green-100: #e2f8f4;
  --green-50: #f0fcfa;

  /* Neutrals */
  --paper: #ffffff;
  --light: #f8faff;
  --light-2: #f3f6fd;
  --ink: #111827;
  --ink-soft: #374151;
  --ink-muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;

  /* Accents */
  --gold: #f59e0b;
  --red: #dc2626;
  --red-bg: #fef2f2;

  /* Typography — Poppins only */
  --font: "Poppins", ui-sans-serif, system-ui, sans-serif;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows — ci5 shadow-outer style */
  --shadow-sm: 0px 2px 12px 0px rgba(112,144,176,.10);
  --shadow-md: 0px 2px 30px 0px rgba(112,144,176,.14);
  --shadow-lg: 0px 8px 40px 0px rgba(112,144,176,.20);

  /* Layout */
  --wrap: 1160px;
  --wrap-narrow: 820px;
  --space: clamp(1rem, 0.6rem + 1.6vw, 1.6rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .4em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 1rem + .8vw, 1.4rem); font-weight: 600; }
p { margin: 0 0 1rem; }
ul { margin: 0; }

/* ---------- Helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--space); }
.narrow { max-width: var(--wrap-narrow); }
.eyebrow {
  font-family: var(--font);
  font-weight: 600; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 .8rem; display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--green); border-radius: 2px; }
.lead { font-size: 1.1rem; color: var(--ink-soft); font-weight: 400; }
.center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent-text { color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--blue); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem; border: 0; border-radius: 9999px;
  background: var(--bg); color: var(--fg);
  font-weight: 700; font-size: 1rem; letter-spacing: 0;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow-sm); text-decoration: none; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-accent { --bg: var(--green); --fg: var(--blue); }
.btn-accent:hover { background: var(--green-600); }
.btn-ghost { --bg: transparent; --fg: var(--blue); box-shadow: inset 0 0 0 2px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .7rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font); font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: var(--font); font-size: .6rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-top: 1px; }
.header-nav { display: flex; align-items: center; gap: 1.6rem; }
.header-nav a:not(.btn) { color: var(--ink-soft); font-weight: 500; font-size: .92rem; }
.header-nav a:not(.btn):hover { color: var(--blue); text-decoration: none; }
.header-phone { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink); }
.header-phone svg { width: 18px; height: 18px; color: var(--blue); }
@media (max-width: 820px) {
  .header-nav .nav-link { display: none; }
}

/* ---------- Trust strip ---------- */
.trustbar { background: var(--blue-700); color: #c5d4f0; font-size: .8rem; }
.trustbar__inner { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; justify-content: center; padding-block: .5rem; text-align: center; }
.trustbar b { color: #fff; }
.trustbar span { display: inline-flex; align-items: center; gap: .4rem; }
.trustbar svg { width: 15px; height: 15px; color: #93b8f0; }

/* ==========================================================================
   HERO (landing)
   ========================================================================== */
.hero {
  position: relative; overflow: clip;
  padding-block: clamp(1.8rem, 1.2rem + 2vw, 2.8rem) clamp(1.6rem, 1rem + 1.5vw, 2.4rem);
  background:
    linear-gradient(100deg, var(--paper) 38%, rgba(255,255,255,.92) 52%, rgba(255,255,255,.4) 70%, transparent 88%),
    url('/assets/images/happy-estate-agent-medium-detailed.webp') right top / cover no-repeat;
}
.hero h1 .accent { color: var(--blue); position: relative; white-space: nowrap; }
.hero h1 .accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .12em; background: var(--green); opacity: .5; border-radius: 4px; }

/* Left-aligned intro — content lives on the white side of the gradient */
.hero__intro { max-width: 560px; text-align: left; margin-bottom: 1.6rem; }
.hero__intro h1 { font-size: clamp(1.7rem, 1.1rem + 2.5vw, 2.6rem); margin-bottom: .4rem; }
.hero__intro .lead { font-size: 1rem; margin-bottom: 0; }

/* Rating line below type cards */
.hero__rating { display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.2rem; font-size: .88rem; color: var(--ink-soft); }
.hero__rating .stars { color: var(--gold); }

/* Transaction type cards */
.types__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.type-card {
  display: flex; flex-direction: column; gap: .5rem; text-align: left;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 1rem 1rem 1.1rem; text-decoration: none; color: var(--ink);
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative; overflow: hidden;
}
.type-card::after { content: "Get quotes →"; font-size: .8rem; font-weight: 700; color: var(--blue); margin-top: .1rem; }
.type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue); text-decoration: none; }
.type-card__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-100); color: var(--blue); display: grid; place-items: center; }
.type-card__icon svg { width: 24px; height: 24px; }
.type-card h3 { font-size: 1rem; margin: 0; }
.type-card p { font-size: .83rem; color: var(--ink-muted); margin: 0; line-height: 1.45; }
@media (max-width: 860px) {
  .hero {
    background:
      linear-gradient(180deg, var(--blue-50) 0%, var(--paper) 100%);
  }
  .hero__intro { max-width: 100%; text-align: center; }
  .hero__rating { width: 100%; justify-content: center; }
  .types__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) { .types__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Generic sections
   ========================================================================== */
.section { padding-block: clamp(2.6rem, 1.6rem + 4vw, 5rem); }
.section--tint { background: var(--light); border-block: 1px solid var(--line); }
.section--ink { background: var(--blue-700); color: #c5d4f0; }
.section--ink h2, .section--ink h3 { color: #fff; }
.section__head { max-width: 640px; margin-bottom: 2.2rem; }
.section--center .section__head { margin-inline: auto; text-align: center; }

/* Steps / how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.4rem; position: relative; box-shadow: var(--shadow-sm); }
.step__num { counter-increment: step; font-family: var(--font); font-size: 2.2rem; font-weight: 700; color: var(--blue-mist); line-height: 1; }
.step__num::before { content: "0" counter(step); }
.step h3 { margin-top: .4rem; font-size: 1.1rem; }
.step p { margin: 0; color: var(--ink-muted); font-size: .92rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Feature/benefit grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { display: flex; gap: .9rem; align-items: flex-start; }
.feature__ic { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--blue-100); color: var(--blue); display: grid; place-items: center; }
.feature__ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.05rem; margin: .1rem 0 .25rem; }
.feature p { font-size: .9rem; color: var(--ink-muted); margin: 0; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } }

/* Stat band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat__n { font-family: var(--font); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 700; color: #fff; line-height: 1; }
.stat__l { font-size: .83rem; color: #93b8f0; margin-top: .4rem; font-weight: 300; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; } }

/* FAQ */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 600; font-family: var(--font); font-size: 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--blue); transition: transform .2s; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); font-size: .95rem; }
.faq details > div p { margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%); color: #fff; border-radius: var(--r-xl); padding: clamp(2rem, 1.4rem + 3vw, 3.5rem); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 200px at 80% 0%, rgba(109,194,38,.3), transparent 60%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c5d4f0; max-width: 520px; margin-inline: auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #9ca3af; padding-block: 3rem 2rem; font-size: .9rem; }
.site-footer a { color: #d1d5db; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-grid h4 { color: #fff; font-family: var(--font); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-brand p { color: #6b7280; max-width: 32ch; font-weight: 300; }
.footer-bottom { border-top: 1px solid #1f2937; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; color: #6b7280; font-size: .8rem; }
.footer-legal { max-width: 70ch; color: #4b5563; font-size: .76rem; line-height: 1.6; margin-top: 1rem; font-weight: 300; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   QUOTE FORM PAGE
   ========================================================================== */
.form-page { background: var(--light); min-height: 100vh; }
.form-shell { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; padding-block: clamp(1.6rem, 1rem + 2vw, 2.8rem) 4rem; }
@media (max-width: 940px) { .form-shell { grid-template-columns: 1fr; } }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-md); overflow: hidden; }
.form-card__head { padding: 1.4rem clamp(1.2rem, .8rem + 2vw, 2.2rem) 0; }
.form-card__body { padding: 1rem clamp(1rem, .6rem + 1.8vw, 1.8rem) 1.4rem; }

/* Progressive form sections */
.form-sections { display: flex; flex-direction: column; gap: 1rem; }
.form-section {
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  scroll-margin-top: 80px;
}
.form-section--active {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}
.form-section--done {
  border-color: var(--line);
  background: var(--light);
}
.form-section__head {
  padding: 1rem 1.4rem .5rem;
}
.form-section__head--done {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1.4rem;
  cursor: default;
}
.form-section__check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--green); color: var(--blue);
  display: grid; place-items: center; flex: none;
}
.form-section__check svg { width: 12px; height: 12px; stroke-width: 3; }
.form-section__title {
  font-size: 1rem; font-weight: 600; margin: 0; color: var(--blue);
}
.form-section--done .form-section__title { color: var(--ink-soft); font-weight: 500; font-size: .9rem; }
.form-section__sub { color: var(--ink-muted); font-size: .88rem; margin: .2rem 0 0; }
.form-section__body { padding: .2rem 1.4rem .4rem; }
.form-section__foot { padding: .8rem 1.4rem 1.2rem; border-top: 1px solid var(--line); }

/* Completed section field summaries */
.section-summary { padding: 0 1.4rem .85rem; display: flex; flex-direction: column; gap: 0; }
.field-summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}
.field-summary:last-child { border-bottom: 0; }
.field-summary__label { color: var(--ink-muted); flex: none; min-width: 160px; font-size: .8rem; }
.field-summary__val { flex: 1; font-weight: 500; color: var(--ink); line-height: 1.3; }
.field-summary__edit {
  background: none; border: 0; padding: 4px; cursor: pointer; flex: none;
  color: var(--ink-muted); display: flex; align-items: center;
  border-radius: 6px; transition: color .15s, background .15s;
}
.field-summary__edit:hover { color: var(--blue); background: var(--blue-50); }
.field-summary__edit svg { width: 13px; height: 13px; }
.field-summary__editor { flex: 1; display: flex; }
.inline-input {
  width: 100%; font-size: .85rem; padding: .2rem .5rem;
  border: 1.5px solid var(--blue); border-radius: 6px;
  font-family: var(--font); color: var(--ink); background: var(--paper);
  outline: none;
}
.inline-input-wrap { display: flex; align-items: center; }
.inline-input-wrap span { padding: 0 .35rem 0 .5rem; font-size: .85rem; color: var(--ink-muted); }
.inline-bool { display: flex; gap: .75rem; align-items: center; }
.inline-bool__opt { display: flex; align-items: center; gap: .3rem; font-size: .85rem; cursor: pointer; white-space: nowrap; }

/* Progress */
.progress { padding: 0 clamp(1.2rem, .8rem + 2vw, 2.2rem); }
.progress__track { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-700)); border-radius: 99px; transition: width .4s cubic-bezier(.4,0,.2,1); }
.progress__meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-muted); margin-top: .55rem; font-weight: 600; }

.step-title { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.7rem); margin-bottom: .25rem; }
.step-sub { color: var(--ink-muted); margin-bottom: 1.4rem; font-size: .95rem; font-weight: 400; }

/* Fields */
.field { margin-bottom: 1.15rem; }
.field > label, .field-group > .field-legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .45rem; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--ink-muted); font-size: .8rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .field-row, .field-row--3 { grid-template-columns: 1fr; } }

.input, select.input, textarea.input {
  width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9ca3af; }
.input:hover, select.input:hover { border-color: var(--blue); }
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-100);
}
textarea.input { resize: vertical; min-height: 96px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231B2A44' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.6rem; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-muted); font-weight: 500; pointer-events: none; }
.input-prefix .input { padding-left: 2rem; }

.field.invalid .input { border-color: var(--red); background: var(--red-bg); }
.field-error { color: var(--red); font-size: .8rem; margin-top: .4rem; display: none; font-weight: 600; }
.field.invalid .field-error { display: block; }

/* Choice cards (radio / toggle) */
.choice-grid { display: grid; gap: .7rem; }
.choice-grid--2 { grid-template-columns: 1fr 1fr; }
.choice-grid--auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 480px) { .choice-grid--2 { grid-template-columns: 1fr; } }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice__face {
  display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem;
  border: 2px solid var(--line-strong); border-radius: var(--r-sm); background: var(--paper);
  transition: border-color .15s, background .15s, box-shadow .15s; font-weight: 600; font-size: .92rem;
}
.choice__face .tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; transition: .15s; }
.choice__face .tick svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.choice__ic { width: 38px; height: 38px; border-radius: 10px; background: var(--blue-100); border: 1px solid var(--line); display: grid; place-items: center; color: var(--blue); flex: none; }
.choice__ic svg { width: 22px; height: 22px; }
.choice input:hover + .choice__face { border-color: var(--blue); }
.choice input:checked + .choice__face { border-color: var(--blue); background: var(--blue-100); box-shadow: 0 0 0 3px var(--blue-50); }
.choice input:checked + .choice__face .tick { background: var(--blue); border-color: var(--blue); }
.choice input:checked + .choice__face .tick svg { opacity: 1; }
.choice input:focus-visible + .choice__face { box-shadow: 0 0 0 4px var(--blue-100); }
.choice__face small { display: block; font-weight: 400; color: var(--ink-muted); font-size: .8rem; }

.field-group { margin-bottom: 1.15rem; }
.field-legend { font-family: var(--font); }

/* Stepper (number input with +/− buttons) */
.stepper { display: flex; align-items: stretch; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; width: 100%; }
.stepper__btn {
  width: 44px; flex: none; background: var(--light-2); border: 0;
  font-size: 1.3rem; font-weight: 400; color: var(--blue);
  cursor: pointer; transition: background .15s;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.stepper__btn:hover { background: var(--blue-100); }
.stepper__val {
  flex: 1; border: 0; text-align: center; font-size: 1.1rem; font-weight: 600;
  color: var(--ink); background: var(--paper); min-width: 0;
  -moz-appearance: textfield;
}
.stepper__val::-webkit-outer-spin-button,
.stepper__val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--inline { width: auto; display: inline-flex; }
.stepper--inline .stepper__val { width: 48px; }

/* Combo (searchable select) — reuses addr-dropdown styles */
.combo-wrap { position: relative; }
.combo-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  background: var(--paper); border: 1.5px solid var(--blue); border-top: 0;
  border-radius: 0 0 var(--r-sm) var(--r-sm); max-height: 240px; overflow-y: auto;
  box-shadow: var(--shadow-md); }

/* Autofill badge — shown when a field is prefilled from the address API */
.autofill-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  margin-left: .5rem; padding: .1rem .45rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--green-100); color: var(--green-600);
  border: 1px solid var(--green); border-radius: 999px;
  vertical-align: middle;
}
.autofill-badge::before {
  content: "✦"; font-size: .6rem;
}

/* Compact yes/no toggle buttons */
.yn-group { margin-bottom: 1.15rem; }
.yn-btns { display: flex; gap: .5rem; margin-top: .4rem; }
.yn-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: .45rem .7rem; border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm); background: var(--paper);
  font-size: .88rem; font-weight: 500; color: var(--ink-soft);
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}
.yn-btn input { position: absolute; opacity: 0; pointer-events: none; }
.yn-btn:hover { border-color: var(--blue); color: var(--blue); }
.yn-btn--on { border-color: var(--blue); background: var(--blue-100); color: var(--blue); font-weight: 600; }

/* Nav buttons */
.form-nav { display: flex; gap: .8rem; margin-top: 1.6rem; }
.form-nav .btn { flex: 1; }
.form-nav .btn-back { flex: 0 0 auto; }

.subform { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 1.2rem; margin-bottom: 1.3rem; background: var(--light); }
.subform > h4 { font-family: var(--font); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }

/* Aside / reassurance rail */
.rail { position: sticky; top: 72px; display: grid; gap: 1rem; align-self: start; max-height: calc(100vh - 80px); overflow-y: auto; }
.rail-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.rail-card h4 { font-size: 1rem; margin-bottom: .8rem; }
.rail-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.rail-list li { display: flex; gap: .6rem; font-size: .88rem; color: var(--ink-soft); align-items: flex-start; }
.rail-list svg { width: 18px; height: 18px; color: var(--blue); flex: none; margin-top: 2px; }
.rail-quote { background: var(--blue-700); color: #c5d4f0; border-radius: var(--r-lg); padding: 1.3rem; }
.rail-quote p { font-family: var(--font); font-size: 1rem; font-weight: 300; line-height: 1.5; margin: 0 0 .8rem; }
.rail-quote footer { font-size: .8rem; color: #93b8f0; display: flex; align-items: center; gap: .5rem; }
.rail-secure { display: flex; align-items: center; gap: .55rem; font-size: .8rem; color: var(--ink-muted); justify-content: center; }
.rail-secure svg { width: 16px; height: 16px; color: var(--blue); }
@media (max-width: 940px) { .rail { position: static; grid-template-columns: 1fr; } .rail-quote { display: none; } }

/* Property card (sidebar) */
.prop-card { padding: 0; overflow: hidden; }
.prop-card__head { display: flex; align-items: center; justify-content: space-between; padding: .7rem .9rem .5rem; }
.prop-card__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.prop-card__popout { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink-muted); display: flex; border-radius: var(--r-sm); }
.prop-card__popout:hover { color: var(--blue); background: var(--blue-100); }
.prop-card__popout svg { width: 16px; height: 16px; }
.prop-card__media { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--light-2); overflow: hidden; }
.prop-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-card__sv { width: 100%; height: 100%; }
.prop-card__map { width: 100%; height: 100%; }
.prop-card__placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-muted); }
.prop-card__placeholder svg { width: 40px; height: 40px; }
.prop-card__toggle { position: absolute; bottom: .5rem; right: .5rem; width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,.9); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.prop-card__toggle svg { width: 16px; height: 16px; color: var(--blue); }
.prop-card__toggle:hover { background: var(--blue); }
.prop-card__toggle:hover svg { color: #fff; }
.prop-card__desc { padding: .6rem .9rem .8rem; font-size: .82rem; font-weight: 500; color: var(--ink); line-height: 1.4; border-top: 1px solid var(--line); }

/* Property modal */
.prop-modal-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(10,20,40,.55); display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(2px); }
.prop-modal { background: var(--paper); border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(0,0,0,.3); width: min(860px, 100%); height: min(600px, 100%); overflow: hidden; display: flex; flex-direction: column; }
.prop-modal__head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.prop-modal__label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.prop-modal__actions { display: flex; gap: .4rem; }
.prop-modal__view-toggle, .prop-modal__close { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px; cursor: pointer; display: grid; place-items: center; color: var(--ink-muted); }
.prop-modal__view-toggle:hover, .prop-modal__close:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-100); }
.prop-modal__view-toggle svg, .prop-modal__close svg { width: 18px; height: 18px; }
.prop-modal__media { flex: 1; min-height: 300px; position: relative; background: var(--light-2); overflow: hidden; }
.prop-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-modal__map { width: 100%; height: 100%; min-height: 340px; }
.prop-modal__sv { width: 100%; height: 100%; min-height: 300px; }
.prop-modal__desc { padding: .75rem 1rem; font-size: .9rem; font-weight: 500; color: var(--ink); border-top: 1px solid var(--line); }

/* Broadband widget */
.rail-broadband { padding: 1.2rem; }
.rail-broadband h4 { margin: 0 0 1rem; font-size: .9rem; font-weight: 600; color: var(--blue); }
.bb-gauges { display: flex; gap: 1rem; justify-content: center; margin-bottom: .6rem; }
.bb-gauge { display: flex; flex-direction: column; align-items: center; flex: 1; }
.bb-gauge svg { width: 100%; max-width: 96px; }
.bb-gauge__val { font-size: .95rem; font-weight: 700; color: var(--blue); margin-top: -.2rem; }
.bb-gauge__label { font-size: .72rem; color: var(--ink-muted); margin-top: .1rem; text-transform: uppercase; letter-spacing: .04em; }
.bb-tech { margin: .4rem 0 0; font-size: .8rem; color: var(--ink-soft); text-align: center; }
.bb-note { margin: .3rem 0 0; font-size: .72rem; color: var(--ink-muted); text-align: center; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .84rem; color: var(--ink-soft); padding: .9rem 1rem; background: var(--light); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: .8rem; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--blue); flex: none; }

/* ==========================================================================
   RESULTS PAGE
   ========================================================================== */
.results-page { background: var(--light); min-height: 100vh; }
.results-head { background: var(--blue-700); color: #c5d4f0; padding-block: 1.6rem; }
.results-head h1 { color: #fff; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); margin-bottom: .35rem; }
.results-summary { display: flex; flex-wrap: wrap; gap: .5rem .9rem; font-size: .88rem; color: #93b8f0; }
.results-summary .chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: .2rem .7rem; border-radius: 99px; color: #e5edff; }
.results-summary .chip b { color: #fff; }

.results-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.results-count { font-weight: 600; }
.results-count b { color: var(--blue); }
.sort-control { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }
.sort-control select { padding: .5rem .8rem; border-radius: 99px; border: 2px solid var(--line-strong); background: #fff; font: inherit; font-size: .88rem; }

.quote-list { display: grid; gap: 1.1rem; padding-block: 1.5rem 3rem; }
.quote-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, border-color .2s;
}
.quote-card:hover { box-shadow: var(--shadow-md); }
.quote-card.is-featured { border-color: var(--blue); box-shadow: 0 0 0 1.5px var(--blue-100), var(--shadow-md); }
.quote-card__ribbon { background: var(--blue); color: #fff; font-size: .73rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .35rem 1.3rem; display: flex; align-items: center; gap: .5rem; }
.quote-card__ribbon svg { width: 14px; height: 14px; }
.quote-card__inner { display: grid; grid-template-columns: 1.1fr 1.5fr auto; gap: 1.3rem; padding: 1.3rem; align-items: center; }
@media (max-width: 800px) { .quote-card__inner { grid-template-columns: 1fr; gap: 1rem; } }

.qc-company { display: flex; gap: .9rem; align-items: center; }
.qc-logo { width: 60px; height: 60px; border-radius: 12px; background: #fff; border: 1px solid var(--line); object-fit: contain; padding: 6px; flex: none; }
.qc-logo--fallback { display: grid; place-items: center; font-family: var(--font); font-weight: 700; font-size: 1.4rem; color: var(--blue); background: var(--blue-100); }
.qc-company h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.qc-rating { display: flex; align-items: center; gap: .4rem; font-size: .83rem; color: var(--ink-soft); }
.qc-rating .stars { color: var(--gold); letter-spacing: 1px; }
.qc-rating b { color: var(--ink); }
.qc-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.tag { font-size: .7rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; letter-spacing: .02em; }
.tag--cheapest { background: var(--green-100); color: #2e7d09; }
.tag--rated { background: #fef3c7; color: #92400e; }
.tag--nearest { background: var(--blue-100); color: var(--blue-700); }
.tag--distance { background: var(--light-2); color: var(--ink-soft); border: 1px solid var(--line); }

.qc-breakdown { font-size: .84rem; }
.qc-breakdown dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.qc-breakdown dt { color: var(--ink-muted); }
.qc-breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.qc-breakdown .row-total dt, .qc-breakdown .row-total dd { padding-top: .4rem; border-top: 1px dashed var(--line-strong); margin-top: .2rem; }

.qc-action { text-align: center; display: grid; gap: .5rem; min-width: 190px; }
.qc-price { font-family: var(--font); font-size: 2rem; font-weight: 700; color: var(--blue); line-height: 1; }
.qc-price small { display: block; font-family: var(--font); font-size: .7rem; color: var(--ink-muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: .3rem; }
.qc-toggle { background: none; border: 0; color: var(--blue); font-weight: 600; font-size: .83rem; padding: .3rem; }
.qc-toggle:hover { text-decoration: underline; }

.qc-details { display: none; padding: 0 1.3rem 1.4rem; border-top: 1px solid var(--line); margin-top: -.2rem; }
.qc-details.open { display: block; }
.qc-details__grid { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; padding-top: 1.3rem; }
@media (max-width: 760px) { .qc-details__grid { grid-template-columns: 1fr; } }
.qc-desc { font-size: .9rem; color: var(--ink-soft); }
.qc-desc p { margin: 0 0 .7rem; }
.qc-desc ul { padding-left: 1.1rem; margin: 0 0 .7rem; }
.qc-desc li { margin-bottom: .35rem; }
.qc-contact { background: var(--light); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem; font-size: .88rem; }
.qc-contact h4 { font-family: var(--font); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .7rem; }
.qc-contact a { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; color: var(--ink); }
.qc-contact svg { width: 16px; height: 16px; color: var(--blue); flex: none; }

/* Loading state */
.loading { text-align: center; padding: 4rem 1rem; }
.loading__ring { width: 56px; height: 56px; margin: 0 auto 1.4rem; border-radius: 50%; border: 5px solid var(--blue-100); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--ink-muted); }
.loading h2 { margin-bottom: .4rem; }
.skeleton { background: linear-gradient(90deg, #eef4ff 25%, #f4f8ff 50%, #eef4ff 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 3.5rem 1rem; }
.empty-state svg { width: 64px; height: 64px; color: var(--line-strong); margin-bottom: 1rem; }

/* Disclaimer note */
.note { font-size: .8rem; color: var(--ink-muted); background: var(--light); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.2rem; margin-bottom: 1.5rem; display: flex; gap: .7rem; }
.note svg { width: 20px; height: 20px; color: var(--blue); flex: none; margin-top: 1px; }

/* ---------- Reveal-on-load animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); animation: reveal .7s cubic-bezier(.16,1,.3,1) forwards; }
  .reveal-1 { animation-delay: .05s; }
  .reveal-2 { animation-delay: .15s; }
  .reveal-3 { animation-delay: .25s; }
  .reveal-4 { animation-delay: .35s; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
}

/* ==========================================================================
   ADDRESS LOOKUP WIDGET
   ========================================================================== */
.addr-search { position: relative; }

/* Loading spinner on input */
.addr-input--loading { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23d1d5db' stroke-width='3'/%3E%3Cpath d='M12 2a10 10 0 0 1 10 10' stroke='%231B2A44' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.7s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") !important; background-repeat: no-repeat; background-position: right .9rem center; background-size: 20px; padding-right: 2.8rem !important; }

/* Dropdown */
.addr-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40;
  background: var(--paper); border: 2px solid var(--blue); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); overflow: hidden; max-height: 300px; overflow-y: auto;
}
.addr-dropdown-item {
  padding: .72rem 1rem; cursor: pointer; font-size: .9rem; color: var(--ink);
  border-bottom: 1px solid var(--line); line-height: 1.4;
  transition: background .1s;
}
.addr-dropdown-item:last-child { border-bottom: 0; }
.addr-dropdown-item:hover,
.addr-dropdown-item.is-active { background: var(--blue-50); color: var(--blue); }

/* Confirmed address card */
.addr-card {
  display: flex; align-items: stretch; border: 2px solid var(--blue);
  border-radius: var(--r-md); overflow: hidden; background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.addr-card__img-wrap { width: 200px; height: 120px; flex: none; }
.addr-card__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.addr-card__img--placeholder {
  width: 100%; height: 100%; min-height: 100px;
  background: var(--blue-100); display: grid; place-items: center;
  color: var(--blue-mist);
}
.addr-card__img--placeholder svg { width: 36px; height: 36px; }
.addr-card__body {
  padding: .9rem 1rem; flex: 1; display: flex; flex-direction: column;
  justify-content: center; gap: .5rem;
}
.addr-card__desc { font-weight: 600; font-size: .95rem; line-height: 1.4; }
.addr-card__change {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--blue); font-size: .82rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 2px;
  align-self: flex-start;
}
.addr-card__change:hover { color: var(--blue-700); }
@media (max-width: 480px) {
  .addr-card { flex-direction: column; }
  .addr-card__img-wrap { width: 100%; height: 130px; }
}

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta { display: none; }
@media (max-width: 720px) {
  .mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: .7rem var(--space); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: var(--shadow-md); display: block; }
  body.has-mobile-cta { padding-bottom: 84px; }
}

/* ---------- Instruct confirmation modal ---------- */
.instruct-modal-overlay { position: fixed; inset: 0; z-index: 900; background: rgba(10,20,40,.55); display: grid; place-items: center; padding: 1rem; backdrop-filter: blur(2px); }
.instruct-modal { background: var(--paper); border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(0,0,0,.3); width: min(480px, 100%); overflow: hidden; display: flex; flex-direction: column; }
.instruct-modal__head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.instruct-modal__title { font-size: 1rem; font-weight: 700; color: var(--blue); }
.instruct-modal__close { background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px; cursor: pointer; display: grid; place-items: center; color: var(--ink-muted); }
.instruct-modal__close:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-100); }
.instruct-modal__close svg { width: 18px; height: 18px; }
.instruct-modal__firm { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.1rem .8rem; border-bottom: 1px solid var(--line); }
.instruct-modal__firm .qc-logo { width: 60px; height: 60px; flex: none; }
.instruct-modal__firm .qc-logo--fallback { font-size: 1.1rem; }
.instruct-modal__firm-info h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .25rem; color: var(--ink); }
.instruct-modal__pricing { padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); display: grid; gap: .5rem; }
.instruct-modal__total, .instruct-modal__deposit { display: flex; align-items: center; justify-content: space-between; font-size: .92rem; }
.instruct-modal__total span, .instruct-modal__deposit span { color: var(--ink-muted); }
.instruct-modal__total strong { font-size: 1.35rem; font-weight: 700; color: var(--blue); }
.instruct-modal__deposit strong { font-size: 1rem; font-weight: 600; color: var(--ink); }
.deposit--tbc { color: var(--ink-muted) !important; font-style: italic; font-weight: 400 !important; }
.instruct-modal__disclaimer { display: flex; gap: .65rem; padding: .85rem 1.1rem; background: var(--light); border-bottom: 1px solid var(--line); }
.instruct-modal__disclaimer svg { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 1px; }
.instruct-modal__disclaimer p { margin: 0; font-size: .78rem; color: var(--ink-muted); line-height: 1.5; }
.instruct-modal__actions { display: flex; gap: .75rem; padding: 1rem 1.1rem; justify-content: flex-end; }
.instruct-modal__actions .btn { min-width: 120px; text-align: center; }
