:root {
  --color-bg: #fbfbfa;
  --color-surface: #ffffff;
  --color-input-bg: #f1f3f5;
  --color-input-bg-hover: #e9ecef;
  --color-border: #e5e7eb;
  --color-text: #1a1a1a;
  --color-text-muted: #5e6675;
  --color-text-subtle: #6b7280;
  --color-primary: #1e3a8a;
  --color-primary-hover: #172554;
  --color-primary-soft: #eff6ff;
  --color-primary-soft-border: #bfdbfe;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 15px;
  /* Force native controls (the <select> option list, number spinners, etc.)
     to render in light mode. Without this, a phone in OS dark mode paints the
     native dropdown popup dark — clashing with our light form. Matches EDEN. */
  color-scheme: light;
}

.estimator {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) 88px;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* "Talk to a real human" help affordance — soft-blue pill in the bottom bar, sitting
   just above the Step x / 4 row (steps 1-3; hidden on the results step). */
.help-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-soft-border);
  border-radius: 999px;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.help-btn svg { width: 15px; height: 15px; }
.help-btn:hover { background: #e0ecfd; border-color: var(--color-primary); }
.help-btn[hidden] { display: none; }

/* ---- Callout banner ---- */
.callout {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4);
  border: 1px solid var(--color-primary-soft-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  margin-bottom: var(--space-7);
}

.callout__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-primary);
}

.callout__icon svg {
  width: 22px;
  height: 22px;
}

.callout__title {
  display: block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.callout__text {
  display: block;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.45;
}

/* ---- Step ---- */
.step__title {
  margin: 0 0 var(--space-6);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--color-text);
}

.step__subtitle {
  margin: -16px 0 var(--space-6);
  color: var(--color-text-muted);
  font-size: 14px;
}

/* ---- Results hero headline (the recommendation, made prominent) ---- */
.results-kicker {
  margin: 0 0 var(--space-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.results-headline {
  margin: 0 0 var(--space-6);
  font-family: var(--font-serif);
  font-size: 32px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

@media (max-width: 480px) {
  .results-headline { font-size: 26px; }
}

/* ---- "Move the grid" size control on results ---- */
.size-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-input-bg);
  border-radius: var(--radius-md);
}

.size-control__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.size-control__stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.size-control__btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.size-control__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.size-control__value {
  min-width: 70px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}

.size-control__hint {
  font-size: 12px;
  color: var(--color-text-muted);
}

.size-control__reset {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* Heating & A/C system-type switch (segmented, above the cards). Reuses .seg/.seg__btn
   from the Sq-Ft toggle, sized up for a primary results-page control. */
.heatcool-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0 0 var(--space-4);
}

.heatcool-switch__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.heatcool-switch__seg {
  padding: 3px;
}

.heatcool-switch__seg .seg__btn {
  font-size: 13px;
  padding: 7px 16px;
}

/* Shown in place of the size stepper for ductless paths (representative sizing). */
.size-note {
  margin: 0 0 var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-input-bg);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
}

/* ---- Field ---- */
.field {
  margin-bottom: var(--space-5);
}

.field__label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text);
}

/* Header label stacked above its Exact|Range toggle. Stacking (rather than
   placing the toggle inline-right) gives the label the full column width, so a
   longer label like "Year Built / Renovated" stays on one line and both fields
   in the desktop 2-col grid stay vertically aligned. */
.field__label-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Mobile: stack the label above the Exact/Range toggle (one column is too narrow
   to sit them side by side). Desktop keeps them on one row, toggle right-aligned. */
@media (max-width: 480px) {
  .field__label-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.field__label-row .field__label {
  margin-bottom: 0;
}

/* Segmented toggle (pill) */
.seg {
  display: inline-flex;
  background: var(--color-input-bg);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.seg__btn {
  appearance: none;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 3px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg__btn.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.field__hint {
  margin: -4px 0 var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Hint placed BELOW its input (e.g. Year Built in the 2-col grid, where an
   above-input hint would push the field down and misalign it with Square Feet). */
.field__hint--below {
  margin: var(--space-2) 0 0;
}

.field__label-opt {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 13px;
  margin-left: 4px;
}

.input--narrow {
  max-width: 160px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.field-grid .field {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .field-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Card group ---- */
.card-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.card-group--two {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 480px) {
  .card-group {
    grid-template-columns: 1fr;
  }
  .card-group--two {
    grid-template-columns: 1fr;
  }
}

/* `.card { display:flex }` would otherwise override the UA hidden attribute. */
.card[hidden] { display: none; }

.card {
  appearance: none;
  background: var(--color-input-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  min-height: 92px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.card:hover {
  background: var(--color-input-bg-hover);
}

.card:active {
  transform: scale(0.98);
}

.card.is-selected {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.card.is-selected .card__label {
  color: var(--color-primary);
}

.card__icon {
  color: var(--color-text-muted);
  display: inline-flex;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card.is-selected .card__icon {
  color: var(--color-primary);
}

.card__label {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.2;
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  /* 16px (not 15) so iOS Safari doesn't auto-zoom the page on input focus. */
  font-size: 16px;
  color: var(--color-text);
  background-color: var(--color-input-bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.input::placeholder {
  color: var(--color-text-muted);
}

.input:hover {
  background-color: var(--color-input-bg-hover);
}

.input:focus {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
}

/* Strip the native +/- spinner buttons from number inputs — they're tiny,
   hover-only, and trigger ±1 increments which is the wrong granularity for
   sqft (need ±100s) and year-built (typing is faster than clicking 40 times). */
input[type="number"].input {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"].input::-webkit-inner-spin-button,
input[type="number"].input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  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' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 38px;
  cursor: pointer;
}

/* ---- Custom dropdown (replaces native <select>) ---- */
.cselect {
  position: relative;
}

.cselect[hidden] {
  display: none;
}

.cselect__native {
  display: none;
}

.cselect__trigger {
  appearance: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-right: 38px;
  position: relative;
}

.cselect__trigger::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  background: 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' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 12px;
  transition: transform 0.15s ease;
}

.cselect.is-open .cselect__trigger {
  border-color: var(--color-primary);
  background-color: var(--color-surface);
}

.cselect.is-open .cselect__trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.cselect__value.is-placeholder {
  color: var(--color-text-muted);
}

.cselect__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  max-height: 244px;
  overflow-y: auto;
  z-index: 50;
}

.cselect__menu[hidden] {
  display: none;
}

.cselect__option {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.3;
}

.cselect__option:hover {
  background: var(--color-input-bg);
}

.cselect__option.is-active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.cselect__option--placeholder {
  color: var(--color-text-subtle);
}

/* Keep the "Select…" placeholder muted even while it's the active (empty) value
   — it shouldn't look like a real selected option. */
.cselect__option--placeholder.is-active {
  background: transparent;
  color: var(--color-text-subtle);
  font-weight: 400;
}

/* ---- Path confirmation callout (shown after binary choice) ---- */
.path-callout {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  margin-top: var(--space-4);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-soft-border);
  border-radius: var(--radius-md);
}

.path-callout[hidden] {
  display: none;
}

.path-callout__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.path-callout__icon svg {
  width: 18px;
  height: 18px;
}

.path-callout__title {
  display: block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.path-callout__text {
  display: block;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.5;
}

/* ---- Help callout (in-step "talk to us" affordance) ---- */
.help-callout {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.help-callout__title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  margin-bottom: 4px;
}

.help-callout__text {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
}

.help-callout a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.help-callout a:hover {
  text-decoration: underline;
}

/* ---- Error state ---- */
.input--error,
.input--error:hover,
.input--error:focus {
  border-color: #dc2626;
}

/* ---- Room stepper ---- */
.rooms {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-input-bg);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease;
}

.room-row.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.room-row__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-row__title {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

.room-row__hint {
  font-size: 13px;
  color: var(--color-text-muted);
}

.stepper {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.stepper__btn {
  appearance: none;
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}

.stepper__btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.stepper__btn:active:not(:disabled) {
  transform: scale(0.94);
}

.stepper__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stepper__value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.rooms__total {
  margin-top: var(--space-4);
  font-size: 14px;
  color: var(--color-text-muted);
  text-align: center;
}

/* ---- Results sections (Step 4) ---- */
.results-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  margin-bottom: var(--space-5);
}

.results-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
}

.results-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.results-section__compare {
  appearance: none;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.results-section__compare:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.results-section__compare svg {
  width: 14px;
  height: 14px;
}

.results-section__subtitle {
  display: block;
  margin: 0 0 var(--space-3);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ---- Tier cards (live inside each section) ---- */
.tier-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tier-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tier-card:first-child {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.tier-card--empty {
  background: var(--color-input-bg);
  color: var(--color-text-muted);
  text-align: center;
  font-size: 14px;
}

.tier-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.tier-card__goal {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.tier-card__sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.tier-card__brand {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 4px 10px;
  background: var(--color-input-bg);
  border-radius: 999px;
}

.tier-card:first-child .tier-card__brand {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* Brand mark: logo when available, brand name as fallback. */
.brandmark {
  display: inline-flex;
  align-items: center;
}

.brandmark__logo {
  display: none;
  max-height: 22px;
  max-width: 96px;
  object-fit: contain;
  vertical-align: middle;
}

.brandmark.has-logo .brandmark__logo {
  display: inline-block;
}

.brandmark.has-logo .brandmark__name {
  display: none;
}

/* When a logo is showing, drop the name-pill chrome so the logo sits clean. */
.tier-card__brand:has(.brandmark.has-logo),
.compare-head__brand:has(.brandmark.has-logo) {
  background: none;
  padding: 0;
}

.tier-card__price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tier-card__price-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.tier-card__price-label {
  font-size: 12px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Ductless coverage badge — explains a multi-zone price (N indoor heads). */
.tier-card__zones {
  margin: var(--space-2) 0 0;
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-input-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.tier-card__financing {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: -2px;
}

.tier-card__financing-amount strong {
  color: var(--color-text);
  font-weight: 600;
}

.tier-card__finance-link {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  font-family: inherit;
}

.tier-card__finance-link:hover {
  color: var(--color-primary-hover);
}

.tier-card__savings {
  appearance: none;
  background: transparent;
  border: none;
  padding: var(--space-3) 0 0;
  margin: 0;
  cursor: pointer;
  color: var(--color-primary);
  text-align: center;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  border-top: 1px dashed var(--color-border);
}

/* Each savings row (Cooling / Heating) is its own centered value+label stack. */
.tier-card__savings-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tier-card__savings-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.tier-card__savings-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.tier-card__savings-hint {
  color: var(--color-text-subtle);
  font-weight: 400;
}

/* Static strip (no clickable figure to explain — e.g. heating not yet calculated). */
.tier-card__savings--static {
  cursor: default;
}

/* "Not calculated" placeholder for a heating savings the homeowner hasn't enabled. */
.tier-card__savings-pending {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-subtle);
}

/* The (?) info chip — explains WHY the figure is missing, on hover/focus. */
.tier-card__savings-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  line-height: 1;
}
.tier-card__savings-info:hover,
.tier-card__savings-info:focus-visible {
  background: var(--color-primary);
  color: #fff;
  outline: none;
}

/* Hover/focus tooltip: explains in plain terms WHY the figure is missing. The (?) is
   purely informational — clicking it does nothing (the methodology modal is reserved for
   real, computed figures). */
.tier-card__savings-info { position: relative; }
.tier-card__savings-row--pending { cursor: default; }
.tier-card__savings-info::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 210px;
  white-space: normal;
  text-align: center;
  background: #1f2433;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  padding: 8px 11px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 50;
  pointer-events: none;
}
.tier-card__savings-info::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2433;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 50;
  pointer-events: none;
}
.tier-card__savings-info:hover::after,
.tier-card__savings-info:focus-visible::after,
.tier-card__savings-info:hover::before,
.tier-card__savings-info:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

/* ---- Rating bars (Comfort / Eco / Quietness / Savings) ---- */
/* Card "at a glance" strip: Comfort stars + efficiency numbers (the
   differentiators between the three options). Each row is label-left, value-right. */
.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  min-height: 340px;
  padding: var(--space-8) 0;
  text-align: center;
}
.results-loading[hidden] { display: none; }
#results-body[hidden] { display: none; }

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--color-input-bg);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.results-loading__text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; opacity: 0.6; }
}

.tier-card__highlights {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-3) 0;
  border-top: 1px dashed var(--color-border);
}

.hl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.hl__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.hl__val {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

/* Comfort row: stars sit above a plain-language stage note, right-aligned.
   The label tops-aligns with the stars since the right side is a stack. */
.hl--comfort {
  align-items: flex-start;
}

.hl__rating {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.hl__rating-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: right;
}

/* 0–5 star rating; filled stars shaded in brand color. */
.stars {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}

.star {
  color: var(--color-border);
}

.star.is-on {
  color: var(--color-primary);
}

.tier-card__description {
  margin: var(--space-2) 0 var(--space-3);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text);
}

.tier-card__details {
  font-size: 13px;
}

.tier-card__details summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--color-primary);
  padding: var(--space-2) 0;
  font-size: 13px;
  list-style: none;
  user-select: none;
}

.tier-card__details summary::after {
  content: " ▾";
  font-size: 10px;
}

.tier-card__details[open] summary::after {
  content: " ▴";
}

.tier-card__components {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 var(--space-3);
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.5;
}

.tier-card__components li {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.tier-card__components li:last-child {
  border-bottom: none;
}

.component-kind {
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.component-model {
  color: var(--color-text);
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  text-align: right;
  word-break: break-all;
}

.tier-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

@media (max-width: 380px) {
  .tier-card__specs {
    grid-template-columns: 1fr;
  }
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 12px;
  min-width: 0;
}

.spec-row__key {
  color: var(--color-text-muted);
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}

.spec-row__val {
  color: var(--color-text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

/* ---- Site visit disclaimer ---- */
.site-visit-disclaimer {
  margin: var(--space-4) 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-subtle);
  text-align: center;
}

/* Ductwork caveat (ducted results only). Honest notice, not alarming. */
.ductwork-note {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary-soft);
  border: 1px solid var(--color-primary-soft-border);
  border-radius: var(--radius-md);
}
.ductwork-note[hidden] { display: none; }
.ductwork-note__icon { flex-shrink: 0; color: var(--color-primary); display: inline-flex; }
.ductwork-note__icon svg { width: 22px; height: 22px; }
.ductwork-note__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ductwork-note__body strong { font-size: 13px; color: var(--color-text); }
.ductwork-note__body span { font-size: 12.5px; line-height: 1.45; color: var(--color-text-muted); }
.ductwork-note .btn { flex-shrink: 0; padding: 8px 12px; font-size: 13px; }
@media (max-width: 460px) {
  .ductwork-note { flex-wrap: wrap; }
  .ductwork-note .btn { width: 100%; }
}

/* ---- Results CTAs ---- */
.results-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

/* Explanatory line under the "Save my quote" CTA. */
.results-ctas__hint {
  margin: -2px 0 var(--space-3);
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: center;
}

.btn--block {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 15px;
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--secondary:disabled,
.btn--secondary[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Tonal secondary — soft-navy fill. Sits under the solid-navy primary without
   competing, and reads with presence on the warm canvas (not a white outline). */
.btn--tonal {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-soft-border);
}

.btn--tonal:hover:not(:disabled) {
  background: #e0ecfd;
  border-color: var(--color-primary);
}

.btn--tonal:active:not(:disabled) {
  transform: scale(0.98);
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn__icon svg {
  width: 18px;
  height: 18px;
}

/* ---- Modal (financing details) ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: var(--space-6) var(--space-5) var(--space-5);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
}

.modal__close:hover {
  background: var(--color-input-bg);
  color: var(--color-text);
}

.modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.modal__subtitle {
  margin: 0 0 var(--space-2);
  font-size: 13px;
  color: var(--color-text-muted);
}

.finance-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.finance-rows--breakdown {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}

.finance-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-3);
}

.finance-row:last-child {
  border-bottom: none;
}

.finance-rows--breakdown .finance-row {
  padding: 6px 0;
  border-bottom: none;
}

.finance-row dt {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  white-space: nowrap;
}

.finance-row dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.finance-row--featured {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-4);
  border: none;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
}

.finance-row--featured dt {
  color: var(--color-text);
  font-weight: 600;
  font-size: 14px;
}

.finance-row--featured dd {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.finance-row__unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: 2px;
}

.modal__body-text {
  margin: var(--space-3) 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text);
}

/* ---- Lead capture form (inside the modal) ---- */
.capture-field {
  margin-top: var(--space-3);
}

.capture-field--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.capture-field .field__label {
  margin-bottom: var(--space-1);
}

.capture-req {
  color: var(--color-primary);
}

#capture-form .btn--block {
  margin-top: var(--space-4);
}

.capture-error {
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
}

.capture-fineprint {
  margin: var(--space-3) 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-text-subtle);
  text-align: center;
}

/* TCPA consent — required opt-in for automated contact. Native checkbox (accent-themed)
   beside legible legal fine print; the whole label toggles it, links open in a new tab. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-4) 0 var(--space-2);
}

.consent__box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.consent__text {
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-subtle);
  cursor: pointer;
}

.consent__text a {
  color: var(--color-primary);
  text-decoration: underline;
  font-weight: 500;
}

/* Variant note in the capture modal (e.g. Talk-to-a-specialist context). */
.capture-note {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  background: var(--color-primary-soft);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-primary);
}
.capture-note[hidden] { display: none; }

[data-capture-success] {
  text-align: center;
}

.capture-success__check {
  width: 52px;
  height: 52px;
  margin: var(--space-2) auto var(--space-3);
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.capture-success__check svg {
  width: 28px;
  height: 28px;
}

[data-capture-success] .modal__body-text {
  text-align: center;
}

.modal__details {
  margin: var(--space-2) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
}

.modal__details summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--color-primary);
  list-style: none;
  padding: 4px 0;
}

.modal__details summary::after {
  content: " ▾";
  font-size: 10px;
}

.modal__details[open] summary::after {
  content: " ▴";
}

/* ---- Savings compare cards ---- */
.savings-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-2);
}

@media (max-width: 380px) {
  .savings-compare {
    grid-template-columns: 1fr;
  }
}

.savings-card {
  padding: var(--space-3);
  background: var(--color-input-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.savings-card--new {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-soft-border);
}

.savings-card__title {
  margin: 0 0 var(--space-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.savings-card--new .savings-card__title {
  color: var(--color-primary);
}

.savings-card__rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.savings-card__rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 12px;
}

.savings-card__rows dt {
  color: var(--color-text-muted);
  margin: 0;
}

.savings-card__rows dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.modal__disclaimer {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
  background: var(--color-input-bg);
  border-radius: var(--radius-sm);
}

/* ---- Compare Systems modal (wide) ---- */
.modal__panel--wide {
  max-width: 880px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.modal__head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.modal__head .modal__close {
  position: static;
}

.btn--sm {
  padding: 7px 12px;
  font-size: 13px;
}

.compare-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  display: grid;
  /* grid-template-columns set inline by JS: label col + one per system.
     The inline minmax(120px,1fr) per system enforces a min width (so the table
     scrolls horizontally on mobile) while letting long text (the Summary prose,
     model numbers) wrap inside each cell on desktop. Do NOT use
     min-width:max-content here — the long prose row would force giant columns. */
  border-top: 1px solid var(--color-border);
}

.compare-cell {
  overflow-wrap: anywhere;
}

.compare-cell {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.compare-cell--label {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: capitalize;
  /* Keep row labels visible while the table scrolls horizontally on mobile. */
  position: sticky;
  left: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  z-index: 1;
}

.compare-cell--corner {
  border-bottom-color: transparent;
  position: sticky;
  left: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  z-index: 2;
}

.compare-cell--head {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}

.compare-head__goal {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.2;
}

.compare-head__brand {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.compare-cell.is-featured {
  background: var(--color-primary-soft);
}

.compare-cell--head.is-featured .compare-head__goal,
.compare-cell--head.is-featured .compare-head__brand {
  color: var(--color-primary);
}

.compare-cell strong {
  font-weight: 700;
  font-size: 15px;
}

.compare-components {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.compare-components li {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.compare-components__kind {
  font-size: 11px;
  color: var(--color-text-muted);
  text-transform: capitalize;
}

.compare-components__model {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--color-text);
  word-break: break-all;
}

/* "What's included" rows are tall — top-align those cells. */
.compare-cell:has(.compare-components) {
  align-items: flex-start;
}

@media print {
  body * { visibility: hidden; }
  #compare-modal, #compare-modal * { visibility: visible; }
  #compare-modal { position: absolute; inset: 0; }
  .modal__backdrop, .modal__close, .modal__head-actions, #compare-modal .btn--block { display: none !important; }
  .modal__panel--wide { max-width: none; box-shadow: none; max-height: none; overflow: visible; }
  .compare-scroll { overflow: visible; }
}

/* ---- Powered by footer ---- */
.powered-by {
  margin-top: var(--space-7);
  font-size: 13px;
  color: var(--color-text-subtle);
}

.powered-by a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

/* ---- Sticky nav bar ---- */
.nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-3) var(--space-5) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 10;
}

/* "Not sure? Talk to a real human" — reassurance line anchored to the bottom of the
   content column (above the fixed footer) on the input steps; hidden on results. */
.step-help {
  margin-top: auto;
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.step-help[hidden] { display: none; }

.step-help__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-bar__inner {
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.nav-bar__back {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text-muted);
  font-weight: 500;
  padding: 8px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-bar__back:hover {
  color: var(--color-text);
}

.nav-bar__back:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-bar__step {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ---- Buttons ---- */
.btn {
  appearance: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

.btn--primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
