/* Home Value Page: styles (#3 Visual design). Tokens and class list: docs/ARCHITECTURE.md §3. Mobile first; desktop at >= 768px. */

:root {
  /* color */
  --color-brand:        #5a0e14;  /* Aegis maroon (logo wordmark) */
  --color-brand-ink:    #ffffff;
  --color-accent:       #ab1f22;  /* Aegis red (logo roof): progress bar, highlights */
  --color-cta:          #ab1f22;
  --color-cta-hover:    #8a171a;
  --color-cta-ink:      #ffffff;
  --color-bg:           #f6f7f9;
  --color-surface:      #ffffff;
  --color-text:         #1d2530;
  --color-text-muted:   #5b6675;
  --color-border:       #cfd5dd;
  --color-focus:        #2f6fde;
  --color-error:        #b42318;
  --color-error-bg:     #fef3f2;
  --color-success:      #1f7a4d;
  --color-sold:         #1f7a4d;
  --color-active:       #2f6fde;
  --color-pending:      #9a6700;
  /* type */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: .8125rem; --fs-sm: .9375rem; --fs-base: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: 2.25rem;
  --fw-regular: 400; --fw-semibold: 600; --fw-bold: 700;
  --lh-tight: 1.2; --lh-base: 1.5;
  /* space */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem;
  /* shape */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-full: 9999px;
  --shadow-card: 0 2px 12px rgba(90, 14, 20, .08);
  /* layout */
  --container-max: 560px;
  --hero-height: 220px;
  --tap-min: 48px;
  --progress-height: 6px;
  --headshot-size: 112px;
  --transition: 150ms ease;

  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --hero-height: 320px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--color-brand); text-underline-offset: 2px; }
a:hover { color: var(--color-cta-hover); }
strong { font-weight: var(--fw-bold); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
.step__title:focus { outline: none; }          /* programmatic focus on step change */
.step__title:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------- Layout ---------- */
.app {
  flex: 1 0 auto;
  width: 100%;
}
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.card {
  background: var(--color-surface);
  padding-block: var(--space-5) var(--space-6);
}
.card > * + * { margin-top: var(--space-4); }

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  color: var(--color-brand);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.skip-link:focus { top: var(--space-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-screen (bots still see it), never display:none */
.hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 64px;
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  color: var(--color-brand);
  border-bottom: 3px solid var(--color-accent);
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  border-radius: var(--radius-sm);
}
.site-header__logo { width: 136px; height: auto; }
/* Broker logo: TREC requires the broker name at least half the size of the team name. */
.site-header__broker { width: 128px; height: auto; margin-right: auto; }
/* Phones: call button shows the icon only so the logos can be larger (number stays in aria-label and footer). */
@media (max-width: 559px) {
  .site-header { gap: var(--space-2); padding-inline: var(--space-3); }
  .site-header .site-header__phone { width: var(--tap-min); justify-content: center; padding-inline: 0; }
  .site-header .site-header__phone::before { width: 22px; height: 22px; margin-right: 0; }
  .site-header__phone-num { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.site-header__phone {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding-inline: var(--space-3);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  color: var(--color-brand);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition), border-color var(--transition);
}
.site-header__phone::before {
  content: "";
  width: 14px; height: 14px;
  margin-right: var(--space-2);
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.site-header__phone:hover {
  color: var(--color-cta-ink);
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ---------- Progress ---------- */
.progress {
  height: var(--progress-height);
  background: #e3e8ef;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: var(--progress, 20%);
  background: var(--color-accent);
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: width 300ms ease;
}
.progress__label {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

/* ---------- Hero ---------- */
.hero {
  display: block;
  width: 100%;
  background: #c9d3de;  /* shows while the image decodes */
}
.hero__img {
  width: 100%;
  height: var(--hero-height);
  object-fit: cover;
  object-position: center;
}

/* ---------- Steps ---------- */
.step__title {
  color: var(--color-brand);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -.01em;
}
h1.step__title { font-size: var(--fs-2xl); }
.step__subhead {
  color: var(--color-text);
  font-size: var(--fs-base);
}
.step__lead {
  padding: var(--space-3) var(--space-4);
  background: #f8f3e8;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-brand);
  font-size: var(--fs-sm);
}
.step__note {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); min-width: 0; }
.field--combobox { display: block; position: relative; }   /* block so the absolute list's static position is right under the input */
.field--combobox > .field__label { display: block; margin-bottom: var(--space-1); }
.field--combobox > .field-error { margin-top: var(--space-1); }
.field__label {
  color: var(--color-text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.field__input {
  width: 100%;
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-3);
  background: var(--color-surface);
  border: 1px solid #8a95a3;            /* >= 3:1 against white */
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);              /* 16px: prevents iOS zoom on focus */
  line-height: var(--lh-tight);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: #7a8594; }
.field__input:hover { border-color: var(--color-text-muted); }
.field__input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-color: var(--color-focus);
}
select.field__input {
  padding-right: var(--space-6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235b6675' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  background-size: 12px 8px;
}
.field__hint {
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}

[aria-invalid="true"].field__input,
.field__input[aria-invalid="true"] {
  border-color: var(--color-error);
  background-color: var(--color-error-bg);
  box-shadow: inset 0 0 0 1px var(--color-error);
}
fieldset[aria-invalid="true"] .radio { border-color: var(--color-error); }
.checkbox:has(input[aria-invalid="true"]) { border-color: var(--color-error); background: var(--color-error-bg); }

.field-error {
  display: flex;
  gap: var(--space-1);
  align-items: flex-start;
  color: var(--color-error);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.field-error::before {
  content: "!";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.1em; height: 1.1em;
  margin-top: .2em;
  border-radius: var(--radius-full);
  background: var(--color-error);
  color: #fff;
  font-size: .8em;
  line-height: 1;
}
.field-error:empty { display: none; }

.form-error {
  padding: var(--space-3) var(--space-4);
  background: var(--color-error-bg);
  border: 1px solid #f3c1bb;
  border-radius: var(--radius-sm);
  color: var(--color-error);
  font-size: var(--fs-sm);
}
.form-error:empty { display: none; }

/* radios: three tap-friendly pills */
.radio-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.radio-group > legend {
  float: left;           /* lets legend sit inside the grid flow */
  width: 100%;
  padding: 0;
  margin-bottom: var(--space-1);
  grid-column: 1 / -1;
}
.radio-group > legend + * { clear: both; }
.radio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid #8a95a3;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
}
.radio input, .checkbox input {
  flex: none;
  width: 20px; height: 20px;
  margin: 0;
  accent-color: var(--color-brand);
  cursor: pointer;
}
.radio:has(input:checked) {
  border-color: var(--color-brand);
  background: #eaf0f6;
  box-shadow: inset 0 0 0 1px var(--color-brand);
}
.radio:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.radio input:focus-visible { outline: none; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--tap-min);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  cursor: pointer;
}
.checkbox input { margin-top: 2px; }
.checkbox:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.checkbox input:focus-visible { outline: none; }
.consent { gap: var(--space-2); }
.consent__text {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);                /* >= 14px (COMPLIANCE §4.2) */
  line-height: var(--lh-base);
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  min-height: 56px;
  background: var(--color-cta);
  color: var(--color-cta-ink);
  box-shadow: 0 2px 0 var(--color-accent);
}
.btn--primary:hover { background: var(--color-cta-hover); color: var(--color-cta-ink); }
.btn--secondary {
  background: var(--color-surface);
  border-color: var(--color-brand);
  color: var(--color-brand);
}
.btn--secondary:hover { background: #eaf0f6; color: var(--color-brand); }
.btn--block { display: flex; width: 100%; }
.btn:disabled { cursor: not-allowed; opacity: .7; }
.btn.is-loading,
.btn.is-loading:disabled { opacity: 1; color: transparent; cursor: progress; }  /* text stays in the DOM for screen readers */
.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 22px; height: 22px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: var(--color-cta-ink);
  border-radius: var(--radius-full);
  animation: spin 700ms linear infinite;
}
.btn--secondary.is-loading::after { border-color: rgba(90, 14, 20, .25); border-top-color: var(--color-brand); }

.link-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-1);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-brand);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--color-cta-hover); }

/* ---------- Choices (Step 2, Step 4) ---------- */
.choice-list { display: grid; gap: var(--space-3); }
.choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid #8a95a3;
  border-radius: var(--radius-md);
  color: var(--color-brand);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
}
.choice::after {
  content: "";
  flex: none;
  width: 10px; height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .6;
}
.choice:hover { border-color: var(--color-brand); background: #f3f6fa; }
.choice[aria-pressed="true"],
.choice[aria-expanded="true"] {
  border-color: var(--color-brand);
  background: #eaf0f6;
  box-shadow: inset 0 0 0 1px var(--color-brand), inset 4px 0 0 var(--color-accent);
}
.choice[aria-pressed="true"]::after {
  width: 7px; height: 13px;
  border-top: 0;
  border-right: 2px solid var(--color-success);
  border-bottom: 2px solid var(--color-success);
  opacity: 1;
}
.choice[aria-expanded="true"]::after { transform: rotate(135deg); }

/* ---------- Address suggestions ---------- */
.suggestions {
  position: absolute;
  z-index: 20;
  /* no top: the list sits at its static position, directly under the input */
  margin-top: var(--space-1);
  left: 0;
  right: 0;
  max-height: min(60vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 28px rgba(90, 14, 20, .18);
}
.suggestion {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--tap-min);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  line-height: var(--lh-tight);
}
.suggestion + .suggestion { border-top: 1px solid #eef1f4; }
.suggestion:hover,
.suggestion.is-active,
.suggestion[aria-selected="true"] {
  background: #eaf0f6;
  box-shadow: inset 3px 0 0 var(--color-brand);
}
.suggestion__main {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}
.suggestion__secondary {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}
.suggestion--manual,
.suggestion + .suggestion--manual {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-brand);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.suggestions > .suggestion--manual:only-child { border-top: 0; }
.suggestions__attribution {
  padding: var(--space-1) var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  text-align: right;
  list-style: none;
}

/* ---------- Estimate (Step 3) ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.spinner {
  display: inline-block;
  flex: none;
  width: 32px; height: 32px;
  border: 3px solid #dbe2ea;
  border-top-color: var(--color-accent);
  border-radius: var(--radius-full);
  animation: spin 800ms linear infinite;
}
.waiting {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid #e3e8ef;
  border-radius: var(--radius-md);
}
.waiting__text { color: var(--color-text); font-size: var(--fs-sm); }
/* decorative skeleton of the result (range line + two comp rows) */
.waiting::after {
  content: "";
  grid-column: 1 / -1;
  height: 132px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%) 0 0 / 200% 100%,
    linear-gradient(#d3dae3, #d3dae3) 0 0 / 70% 36px,
    linear-gradient(#dde3ea, #dde3ea) 0 52px / 40% 14px,
    linear-gradient(#dde3ea, #dde3ea) 0 80px / 100% 20px,
    linear-gradient(#dde3ea, #dde3ea) 0 112px / 100% 20px;
  background-repeat: no-repeat;
  animation: shimmer 1.6s linear infinite;
}

.estimate > * + * { margin-top: var(--space-3); }
.estimate__range {
  color: var(--color-brand);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  padding-bottom: var(--space-2);
  border-bottom: 3px solid var(--color-accent);
  display: inline-block;
}
.estimate__ppsf {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}
.estimate__facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin-top: var(--space-4);
  border-top: 1px solid #e3e8ef;
  font-size: var(--fs-sm);
}
.estimate__facts:empty { display: none; }
.estimate__facts dt,
.estimate__facts dd {
  padding: var(--space-2) 0;
  border-bottom: 1px solid #e3e8ef;
}
.estimate__facts dt { padding-right: var(--space-4); color: var(--color-text-muted); }
.estimate__facts dd { font-weight: var(--fw-semibold); text-align: right; font-variant-numeric: tabular-nums; }
.estimate__confidence {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}
.estimate__confidence:empty { display: none; }

.comps__title {
  margin-top: var(--space-5) !important;
  color: var(--color-brand);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.comps { display: grid; gap: var(--space-2); }
.comp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "addr  badge"
    "price price"
    "meta  meta";
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid #e3e8ef;
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.comp--sold    { border-left-color: var(--color-sold); }
.comp--active  { border-left-color: var(--color-active); }
.comp--pending { border-left-color: var(--color-pending); }
.comp__address {
  grid-area: addr;
  align-self: center;
  min-height: 24px;
  color: var(--color-brand);
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}
.comp__price {
  grid-area: price;
  color: var(--color-text);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}
.comp__meta {
  grid-area: meta;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.comp__meta:empty { display: none; }

.badge {
  grid-area: badge;
  align-self: start;
  justify-self: end;
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-text-muted);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  white-space: nowrap;
}
.badge--sold    { background: var(--color-sold); }
.badge--active  { background: var(--color-active); }
.badge--pending { background: var(--color-pending); }

.notice {
  padding: var(--space-4);
  background: #f8f3e8;
  border: 1px solid #ead9b5;
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  color: var(--color-text);
}
.notice > * + * { margin-top: var(--space-2); }
body > noscript .notice,
body > .notice { margin: var(--space-4); }

.disclaimer {
  padding-top: var(--space-3);
  border-top: 1px solid #e3e8ef;
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
  line-height: var(--lh-base);
}

/* ---------- Confirmation (Step 5) ---------- */
.agent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid #e3e8ef;
  border-radius: var(--radius-md);
}
.headshot {
  flex: none;
  width: var(--headshot-size);
  height: var(--headshot-size);
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: center top;
  background: #e3e8ef;
  box-shadow: 0 0 0 3px var(--color-surface), 0 0 0 5px var(--color-accent);
}
.agent-card__body { display: grid; gap: 2px; min-width: 0; justify-items: center; }
.family-photo { display: grid; justify-items: center; gap: var(--space-2); margin: 0; }
.family-photo__caption { display: grid; gap: 2px; }
.family-photo__quote { color: var(--color-text-muted); font-size: var(--fs-sm); font-style: italic; }
.agent-card__name {
  color: var(--color-brand);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.agent-card__org {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}
.agent-card__phone {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  color: var(--color-brand);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  text-decoration: none;
}
.agent-card__phone:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  flex: none;
  margin-top: var(--space-6);
  padding-block: var(--space-5) var(--space-6);
  background: #e9edf2;
  border-top: 3px solid var(--color-accent);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);                /* IABS/CPN links >= 10pt at every width (TREC) */
  line-height: 1.7;
  text-align: center;
}
.site-footer a {
  color: var(--color-brand);
  /* comfortable tap height for inline links without breaking the text flow */
  display: inline-block;
  padding-block: var(--space-2);
}
.footer__line + .footer__links { margin-top: var(--space-2); }
.footer__line span { white-space: nowrap; }
.footer__links a { font-weight: var(--fw-semibold); }
/* Phones: one link per line; the " · " separators stay in the text for screen readers/tests but are not drawn. */
@media (max-width: 767px) {
  .footer__links { font-size: 0; }
  .footer__links > * { display: block; width: fit-content; margin-inline: auto; font-size: var(--fs-sm); }
  .footer__links > .eho { display: flex; }
}
.eho {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  vertical-align: middle;
}
.eho__mark { width: 20px; height: 20px; }

/* ---------- Desktop (>= 768px) ---------- */
@media (min-width: 768px) {
  .site-header { padding-inline: var(--space-6); min-height: 72px; }
  .site-header__logo { width: 160px; }
  .site-header__broker { width: 150px; }
  .site-header__phone { font-size: var(--fs-base); padding-inline: var(--space-4); }

  .app { padding-bottom: var(--space-6); }
  .step > .container.card {
    margin-top: var(--space-6);
    padding: var(--space-6);
    border: 1px solid #e3e8ef;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
  }
  /* Step 1: card overlaps the bottom of the hero */
  .hero + .container.card {
    position: relative;
    margin-top: calc(var(--space-7) * -1.5);
  }
  .card > * + * { margin-top: var(--space-5); }

  h1.step__title { font-size: var(--fs-3xl); }
  .step__title { font-size: var(--fs-2xl); }
  .step__subhead { font-size: var(--fs-lg); }

  .estimate__range { font-size: var(--fs-3xl); }
  .site-footer > .container { max-width: 760px; }
}

/* very narrow screens (320px) */
@media (max-width: 359px) {
  .site-header__logo { width: 112px; }
  .site-header__broker { width: 104px; }
  .radio-group { grid-template-columns: 1fr; }
  .radio { justify-content: flex-start; padding-inline: var(--space-3); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .spinner { border-top-color: var(--color-accent); border-right-color: var(--color-accent); }
  .btn.is-loading::after { border-right-color: var(--color-cta-ink); }
}

/* ---------- Forced colors (Windows high contrast) ---------- */
@media (forced-colors: active) {
  .progress__bar { background: Highlight; }
  .btn, .choice, .radio, .field__input { border: 1px solid ButtonText; }
  .badge { border: 1px solid CanvasText; }
}
