:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #142033;
  --muted: #5f6b7a;
  --brand: #0b5fff;
  --brand-dark: #0849c5;
  --line: #dbe2ec;
  --soft: #f8fbff;
  --surface-2: #eef5ff;
  --surface-3: #f7fbff;
  --focus-ring: rgba(11, 95, 255, 0.22);
  --control-shadow: 0 1px 0 rgba(20, 32, 51, 0.04);
  --shadow-soft: 0 16px 44px rgba(11, 46, 97, 0.08);
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --danger-bg: #fff5f5;
  --danger-border: #efb2b2;
  --danger-text: #9b1c1c;
  --status-bg: #0f172a;
  --status-text: #ddffe9;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0b1220;
  --card: #111b2e;
  --text: #e8eefc;
  --muted: #a9b6cb;
  --line: #24324b;
  --soft: #0f182b;
  --surface-2: #10203a;
  --surface-3: #12203a;
  --danger-bg: #2a1016;
  --danger-border: #6c2435;
  --danger-text: #ffced6;
  --status-bg: #08101f;
  --status-text: #d8ffe7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 30%); transition: background .2s ease, color .2s ease; }
:root[data-theme="dark"] body { background: linear-gradient(180deg, #0a1222 0%, var(--bg) 30%); }
.hero { padding: 2rem 1rem 1rem; }
.hero__inner { max-width: 960px; margin: 0 auto; position: relative; padding-right: 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); font-weight: 700; margin: 0 0 0.5rem; font-size: 0.78rem; }
h1 { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.lead { color: var(--muted); }
.container { max-width: 960px; margin: 0 auto 2rem; padding: 0 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow-soft); }
.scheduler {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  transition: grid-template-columns .28s ease;
}

.scheduler.scheduler--date-selected {
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, .9fr);
  align-items: start;
}

.calendar-wrap, .slots-wrap { border: 1px solid var(--line); border-radius: 10px; padding: .75rem; background: var(--soft); }

.slots-wrap {
  min-height: 180px;
}
.calendar-head {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.calendar-head h3 {
  margin: 0;
  text-align: center;
  white-space: nowrap;
}
.calendar-head .icon-btn:last-child {
  justify-self: end;
}
.icon-btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: .35rem .55rem; cursor: pointer; box-shadow: var(--control-shadow); transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.icon-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 28%, var(--line)); box-shadow: 0 8px 22px rgba(11, 46, 97, 0.08); }
.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: .8;
  box-shadow: none;
}
.theme-toggle:hover {
  color: var(--text);
  opacity: 1;
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.theme-toggle.is-dark {
  color: var(--brand);
  opacity: 1;
}
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.weekdays span { font-weight: 700; font-size: .85rem; color: var(--muted); text-align: center; }
.day-btn { border: 1px solid var(--line); background: var(--card); border-radius: 8px; min-height: 40px; cursor: pointer; transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.day-btn:hover:not(.muted) { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); box-shadow: 0 8px 20px rgba(11, 46, 97, 0.07); }
.day-btn.muted { opacity: .35; cursor: default; }
.day-btn.today { border-color: #7aa5ff; }
.day-btn.selected { background: var(--brand); color: #fff; border-color: var(--brand); }
.slot-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .55rem; }
.slot-option {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 48px;
  padding: .75rem;
  border: 1px solid #bfd0ea;
  border-radius: 8px;
  background: var(--surface-3);
  box-shadow: var(--control-shadow);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.slot-option:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 46, 97, 0.08); }
.slot-option:has(input:checked) { background: #0b5fff; color: #fff; border-color: #0b5fff; }
.slot-option input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #0b5fff;
}
.slot-btn { border: 1px solid #bfd0ea; border-radius: 8px; background: var(--surface-3); padding: .8rem; text-align: left; cursor: pointer; min-height: 48px; font-size: 1rem; box-shadow: var(--control-shadow); transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.slot-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 46, 97, 0.08); }
.slot-btn.selected { background: #0b5fff; color: #fff; border-color: #0b5fff; }
.muted { color: var(--muted); margin: 0 0 .6rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.col-2 { grid-column: span 2; }
label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.95rem; }
input, select, textarea, button { width: 100%; border: 1px solid #cfd9e6; border-radius: 9px; padding: 0.7rem 0.72rem; font-size: 0.95rem; background: var(--card); color: var(--text); }
input, select, textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
button {
  transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
button.theme-toggle { width: 28px; height: 28px; padding: 0; border: none; background: transparent; }

input[type="range"] {
  padding: 0;
  accent-color: var(--brand);
}

.range-field {
  gap: 0.55rem;
}

.range-field__summary,
.range-field__ticks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.range-field__summary .muted {
  margin: 0;
}

.range-field__ticks {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-section__head {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-bottom: 0.85rem;
}

.form-section__head h3 {
  margin: 0 0 0.25rem;
}

.nested-grid {
  gap: 0.85rem;
}

.flow-step {
  display: grid;
  gap: 0.85rem;
}

.flow-step--visible {
  animation: flowReveal 360ms ease both;
}

@keyframes flowReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes attentionPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.28), 0 10px 24px rgba(11, 46, 97, 0.08);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(217, 119, 6, 0), 0 14px 30px rgba(11, 46, 97, 0.12);
    transform: translateY(-1px);
  }
}

.needs-attention,
.attention-action {
  border-color: #d97706 !important;
  animation: attentionPulse 2.8s ease-in-out infinite;
}

.attention-action {
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .scheduler {
    transition: none;
  }

  .flow-step--visible,
  .needs-attention,
  .attention-action {
    animation: none;
  }
}

.customer-info {
  display: grid;
  gap: 0;
}

.addons {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .65rem .75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem .8rem;
  align-items: start;
  background: var(--soft);
}

.addons legend {
  padding: 0 .25rem;
  font-weight: 700;
}

.addons label {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 500;
}

.addons input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.addon-option {
  min-height: 48px;
  padding: .45rem .55rem;
  border: 1px solid transparent;
  border-radius: 12px;
  justify-content: flex-start;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.addon-option:hover {
  border-color: var(--brand-dark);
  background: var(--surface-2);
}

.addon-option--selected {
  border-color: var(--brand-dark);
  background: var(--surface-2);
}

.addon-option__content {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  flex: 1 1 auto;
}

.addon-option__emoji {
  display: none;
  font-size: 1.35rem;
  line-height: 1;
  flex: 0 0 auto;
}

.addon-option__text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.addon-option__slider {
  display: none;
  flex: 1 1 150px;
  min-width: 0;
}

.addon-option__slider-control {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
}

.addon-option__slider-control input[type="range"] {
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  accent-color: var(--brand-dark);
}

.addon-option__slider-value {
  flex: 0 0 auto;
  min-width: 96px;
  font-size: .8rem;
  color: var(--muted);
  text-align: right;
}

.addon-option--selected .addon-option__emoji {
  display: inline-flex;
}

.addon-option--selected .addon-option__text {
  display: none;
}

.addon-option--selected .addon-option__slider {
  display: inline-flex;
}

.addons--single-col {
  grid-template-columns: 1fr;
}

.estimate-box {
  border: 1px solid #bfd3fb;
  background: var(--surface-2);
  border-radius: 10px;
  padding: .7rem;
}

#estimateAmount {
  font-size: 1.1rem;
  color: var(--brand-dark);
}

:root[data-theme="dark"] #estimateAmount {
  color: #d8a6a0;
}

:root[data-theme="dark"] .estimate-page #estimateAmount {
  color: #e2b3ad;
}

.estimate-note {
  margin-top: .45rem;
}

.quote-summary {
  display: grid;
  gap: .4rem;
  margin-bottom: .7rem;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.quote-grid > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: .7rem;
}

.quote-summary__row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.quote-summary__meta {
  color: var(--muted);
  font-size: .9rem;
}

/* Keep utility buttons readable */
.icon-btn,
.day-btn,
.slot-btn {
  color: var(--text);
  font-weight: 600;
}

/* Only style the form submit as primary */
.grid button[type="submit"] {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.grid button[type="submit"]:hover {
  background: var(--brand-dark);
}

#status { margin-top: 0.85rem; min-height: 52px; background: var(--status-bg); color: var(--status-text); border-radius: 10px; padding: 0.75rem; white-space: pre-wrap; }

#status:empty {
  display: none;
}

.portal {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--soft);
}

.portal h3 {
  margin: 0 0 0.4rem;
}

.submission-complete {
  display: grid;
  gap: 0.85rem;
  text-align: center;
}

.submission-complete .quote-summary {
  text-align: left;
  margin: 0;
}

.icon-btn.danger {
  border-color: var(--danger-border);
  color: var(--danger-text);
  background: var(--danger-bg);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] button,
:root[data-theme="dark"] .slot-btn,
:root[data-theme="dark"] .quote-summary__row {
  border-color: #2a3b58;
}

:root[data-theme="dark"] .slot-btn {
  background: var(--surface-3);
  color: var(--text);
}

:root[data-theme="dark"] .slot-btn.selected {
  background: #3b82f6;
  color: #08101f;
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.35);
}

:root[data-theme="dark"] .slot-btn.selected:hover,
:root[data-theme="dark"] .slot-btn.selected:focus-visible {
  background: #60a5fa;
  border-color: #bfdbfe;
}

:root[data-theme="dark"] .portal .icon-btn:hover {
  background: #17305a;
}

:root[data-theme="dark"] .theme-toggle {
  color: var(--muted);
}

:root[data-theme="dark"] .theme-toggle:hover,
:root[data-theme="dark"] .theme-toggle.is-dark {
  color: #a8c6ff;
}

:root[data-theme="dark"] .portal .icon-btn.danger:hover {
  background: #3a1520;
}

@media (max-width: 860px) {
  .scheduler,
  .scheduler.scheduler--date-selected { grid-template-columns: 1fr; }

  .slots-wrap {
    min-height: 0;
  }

  .slot-buttons {
    gap: 0.65rem;
  }

  .slot-btn {
    padding: 0.95rem;
    min-height: 54px;
    font-size: 1rem;
  }
}

@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .col-2 { grid-column: span 1; }
  .addons,
  .quote-grid { grid-template-columns: 1fr; }
}

/* Modal overlay */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.modal__head .icon-btn {
  width: auto;
  flex-shrink: 0;
}

.modal__actions {
  margin-top: 0.75rem;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

:root[data-theme="dark"] .modal__backdrop {
  background: rgba(0, 0, 0, 0.72);
}

/* Narrow viewport hardening shared by estimate and legacy booking flows. */
body {
  min-width: 0;
  overflow-x: clip;
}

.hero,
.hero__inner,
.container,
.card,
.scheduler,
.calendar-wrap,
.slots-wrap,
.calendar-head,
.weekdays,
.calendar-grid,
.grid,
.addons,
.quote-grid,
.portal,
.modal__dialog {
  min-width: 0;
  max-width: 100%;
}

h1,
h2,
h3,
.lead,
.muted,
.status,
.quote-summary__row {
  overflow-wrap: anywhere;
}

@media (max-width: 320px) {
  .hero {
    padding: 0.85rem 0.5rem 0.65rem;
  }

  .hero__inner {
    padding-right: 1.9rem;
  }

  .hero h1 {
    font-size: 1.4rem;
    line-height: 1.18;
  }

  .lead {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .container {
    padding: 0 0.4rem;
  }

  .card {
    padding: 0.7rem;
    border-radius: 10px;
  }

  .calendar-wrap,
  .slots-wrap {
    padding: 0.38rem;
  }

  .calendar-head {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 0.25rem;
  }

  .calendar-head h3 {
    font-size: 0.88rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .calendar-head .icon-btn {
    width: 30px;
    min-width: 30px;
    min-height: 34px;
    padding: 0.25rem;
  }

  .weekdays,
  .calendar-grid {
    gap: 2px;
  }

  .weekdays span {
    min-width: 0;
    font-size: 0.58rem;
  }

  .day-btn {
    min-width: 0;
    min-height: 32px;
    padding: 0;
    border-radius: 6px;
    font-size: 0.7rem;
  }

  .slot-buttons {
    grid-template-columns: 1fr;
  }

  .range-field__summary,
  .range-field__ticks {
    align-items: stretch;
    flex-direction: column;
  }

  .addon-option__slider-control {
    align-items: stretch;
    flex-direction: column;
  }

  .addon-option__slider-value {
    min-width: 0;
    text-align: left;
  }

  .modal {
    padding: 0.35rem;
  }

  .modal__dialog {
    padding: 0.7rem;
  }
}

/* Public estimate portal: aligned with the Spruce Works cleaning site. */
.estimate-page {
  /* Aligned to the Spruce Works cleaning page (cleaning.html) palette:
     navy + teal-green + wine accents on cream paper. */
  --bg: #dbe7e5;            /* clean-green-soft */
  --card: #f6fbfb;          /* clean-paper */
  --text: #031217;          /* clean-ink */
  --muted: #2f5557;         /* clean-copy */
  --brand: #244D4B;         /* clean-green */
  --brand-dark: #7c2429;    /* clean-widget-red-deep (wine CTA) */
  --line: rgba(36, 77, 75, 0.22); /* clean-rule */
  --soft: rgba(221, 235, 233, 0.78);
  --surface-2: #edf5f4;     /* clean-cream */
  --surface-3: #f6fbfb;     /* clean-paper */
  --focus-ring: rgba(51, 103, 106, 0.26);
  --control-shadow: 0 1px 0 rgba(3, 18, 23, 0.06);
  --shadow-soft: 0 24px 70px rgba(3, 18, 23, 0.2);
  --danger-bg: #f7e9e6;
  --danger-border: #c98e86;
  --danger-text: #7c2429;
  --status-bg: #031217;
  --status-text: #edf5f4;
  --kicker: #8d2d31;        /* wine label accent (light) */
  --clean-border: #000000;  /* hard black outline used on the cleaning page */
  --clean-navy: #031217;
  --clean-green: #244D4B;
  --clean-wine: #7c2429;
  --clean-wine-deep: #5a1419;
  --clean-sage: rgba(166, 190, 188, 0.74);
  --aqua: #33676A;          /* legacy custom-addon buttons kept on-brand */
  --paper: #edf5f4;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(3, 18, 23, 0.78) 0, rgba(36, 77, 75, 0.58) 30rem, rgba(219, 231, 229, 0.78) 52rem),
    url("assets/cleaning-forest-placeholder.jpg") center top / 100% auto no-repeat,
    #dbe7e5;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] .estimate-page {
  --bg: #031217;            /* clean-navy */
  --card: #0b1d20;          /* clean-paper (dark) */
  --text: #c7d8d5;          /* clean-ink (dark) */
  --muted: #b8cdca;         /* clean-copy (dark) */
  --brand: #33676A;         /* clean-blue accent for dark */
  --brand-dark: #7c2429;    /* wine CTA */
  --line: rgba(51, 103, 106, 0.24);
  --soft: rgba(11, 29, 32, 0.86);
  --surface-2: #102527;     /* clean-green-soft (dark) */
  --surface-3: #0b1d20;
  --focus-ring: rgba(51, 103, 106, 0.28);
  --control-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 28px 80px rgba(0, 0, 0, 0.42);
  --danger-bg: #2a1413;
  --danger-border: #7c2429;
  --danger-text: #e6b8b2;
  --status-bg: #031217;
  --status-text: #c7d8d5;
  --kicker: #7fb3b6;        /* lightened clean-blue for dark readability */
  --aqua: #4f8a8d;
  --paper: #c7d8d5;
  background:
    linear-gradient(180deg, rgba(3, 18, 23, 0.72) 0, rgba(36, 77, 75, 0.42) 31rem, rgba(3, 18, 23, 0.97) 52rem),
    url("assets/cleaning-forest-placeholder.jpg") center top / 100% auto no-repeat,
    #031217;
}

.estimate-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 52rem);
}

.estimate-nav {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 2rem));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
}

.estimate-nav__brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
}

.estimate-brand-sign {
  gap: 0.45rem;
  padding: 0.72rem 1.18rem 0.72rem 0.34rem;
  isolation: isolate;
}

.estimate-brand-sign::before {
  content: "";
  position: absolute;
  inset: -0.36rem -0.58rem -0.42rem 1.12rem;
  z-index: -1;
  background: url("assets/wooden-sign-v1.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.estimate-nav__brand img {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border: 5px solid #3a0d12;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.28));
}

.estimate-nav__brand span {
  display: flex;
  min-width: 142px;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  text-align: center;
}

.estimate-nav__brand strong {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #d8e4e1;
  font-size: 1.24rem;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-shadow: 0 1px 4px rgba(3, 18, 23, 0.55);
  white-space: nowrap;
}

.estimate-nav__brand small {
  color: #b8c8c4;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-shadow: 0 1px 4px rgba(3, 18, 23, 0.55);
  text-transform: uppercase;
}

.estimate-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.estimate-nav__actions a,
.estimate-nav__link {
  position: static;
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  min-height: 40px;
  padding: 0.55rem 1rem;
  border: 1px solid #2a090d;
  border-radius: 999px;
  background: var(--clean-wine);
  color: #f0d8d3;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  opacity: 1;
  box-shadow: 0 8px 18px rgba(3, 18, 23, 0.22);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.estimate-nav__actions a:hover,
.estimate-nav__link:hover {
  transform: translateY(-1px);
  color: #fff;
  background: var(--clean-wine-deep);
  box-shadow: 0 12px 24px rgba(3, 18, 23, 0.28);
}

.estimate-nav__actions a:focus-visible,
.estimate-nav__link:focus-visible {
  outline: 2px solid #edf5f4;
  outline-offset: 3px;
}

.estimate-page .hero {
  padding: 3.25rem 1rem 6.25rem;
  color: #fff;
}

.estimate-page .hero__inner {
  max-width: 1120px;
  padding-right: 0;
}

.estimate-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.estimate-hero__copy {
  max-width: 700px;
}

.estimate-page .eyebrow,
.estimate-page .section-kicker {
  margin: 0 0 0.55rem;
  color: var(--kicker);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.estimate-page .hero h1,
.estimate-page h2,
.estimate-page h3 {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  letter-spacing: -0.025em;
}

.estimate-page .hero h1 {
  max-width: 680px;
  color: #d8e4e1;
  font-size: clamp(2.65rem, 7vw, 5.4rem);
  line-height: 0.94;
  text-wrap: balance;
}

.estimate-page .lead {
  max-width: 650px;
  margin: 1.25rem 0 0;
  color: rgba(199, 216, 213, 0.86);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.estimate-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.45rem;
}

.estimate-hero__trust span {
  padding: 0.52rem 0.82rem;
  border: 1px solid rgba(166, 190, 188, 0.32);
  border-radius: 999px;
  background: rgba(11, 29, 32, 0.42);
  color: var(--clean-sage);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.estimate-hero__note {
  padding: 1.4rem 1.45rem;
  border: 1px solid rgba(166, 190, 188, 0.28);
  border-radius: 4px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06), transparent 42%),
    rgba(11, 29, 32, 0.58);
  box-shadow: 0 20px 50px rgba(3, 18, 23, 0.28);
  backdrop-filter: blur(18px);
}

.estimate-hero__note-label {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.estimate-hero__note ol {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.estimate-hero__note li {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0.75rem;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  line-height: 1.4;
}

.estimate-hero__note li span {
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #f0d8d3;
  background: rgba(124, 36, 41, 0.35);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.estimate-page .container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin-top: -2.6rem;
  margin-bottom: 3rem;
}

.estimate-page .card {
  border-radius: 3px;
}

.estimate-card-shell {
  padding: clamp(1.15rem, 3vw, 2.15rem);
  border: 2px solid var(--clean-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), transparent 7rem),
    var(--card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    var(--shadow-soft);
}

:root[data-theme="dark"] .estimate-card-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 7rem),
    var(--card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    var(--shadow-soft);
}

.estimate-card-shell__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.estimate-card-shell__head h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  line-height: 1.02;
  color: var(--text);
  text-wrap: balance;
}

.estimate-card-shell__head .muted {
  max-width: 440px;
  margin: 0;
  line-height: 1.65;
  font-size: 0.92rem;
}

.estimate-page .section-kicker {
  color: var(--brand);
}

.estimate-page .scheduler {
  gap: 1.15rem;
  margin: 1.5rem 0 0;
  width: 100%;
  /* Calendar spans the form column; openings live later in the pipeline. */
  grid-template-columns: 1fr;
}

.estimate-page .scheduler.scheduler--date-selected {
  grid-template-columns: 1fr;
}

.estimate-page .calendar-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: clamp(0.95rem, 2vw, 1.45rem);
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 5rem),
    var(--soft);
  box-sizing: border-box;
}

:root[data-theme="dark"] .estimate-page .calendar-wrap {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 5rem),
    var(--soft);
}

.estimate-page .calendar-head {
  margin-bottom: 1.05rem;
}

.estimate-page .calendar-head h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  letter-spacing: -0.02em;
}

.estimate-page .calendar-head .icon-btn {
  width: clamp(36px, 4vw, 42px);
  min-width: clamp(36px, 4vw, 42px);
  height: clamp(36px, 4vw, 42px);
  padding: 0;
  border-radius: 50%;
  border-color: var(--line);
  background: var(--surface-3);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--text);
}

.estimate-page .calendar-head .icon-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--card);
}

.estimate-page .calendar-head .icon-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.estimate-page .calendar-head .icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.estimate-page .calendar-availability-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.estimate-page .calendar-availability-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.estimate-page .calendar-availability-legend__swatch {
  width: 0.72rem;
  height: 0.72rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-3);
}

.estimate-page .calendar-availability-legend__swatch--open {
  border-color: color-mix(in srgb, var(--clean-green) 72%, var(--line));
  background: color-mix(in srgb, var(--clean-green) 62%, var(--surface-3));
}

.estimate-page .calendar-availability-legend__swatch--closed {
  background: color-mix(in srgb, var(--muted) 20%, var(--surface-3));
  opacity: 0.72;
}

.estimate-page .calendar-availability-legend__swatch--selected {
  border-color: var(--clean-wine);
  background: var(--clean-wine);
}

.estimate-page .calendar-availability-status {
  min-height: 1.2rem;
  margin: 0 0 0.8rem;
  font-size: 0.76rem;
}

.estimate-page .weekdays,
.estimate-page .calendar-grid {
  width: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.28rem, 0.9vw, 0.6rem);
}

.estimate-page .weekdays {
  margin-bottom: 0.5rem;
}

.estimate-page .weekdays span {
  font-size: clamp(0.65rem, 1.1vw, 0.78rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.estimate-page .day-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  /* Grow with the form on desktop; stay square without a fixed 28rem cage. */
  aspect-ratio: 1 / 1;
  min-height: clamp(2.5rem, 6.2vw, 3.75rem);
  height: auto;
  padding: 0;
  border-radius: 2px;
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--surface-3);
  font-size: clamp(0.88rem, 1.25vw, 1.05rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}

.estimate-page .day-btn:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-3));
  box-shadow: 0 6px 16px rgba(3, 18, 23, 0.08);
}

.estimate-page .day-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.estimate-page .day-btn.today {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  font-weight: 800;
}

.estimate-page .day-btn.today::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.estimate-page .day-btn.availability-open:not(.selected) {
  border-color: color-mix(in srgb, var(--clean-green) 62%, var(--line));
  background: color-mix(in srgb, var(--clean-green) 18%, var(--surface-3));
  color: var(--text);
}

.estimate-page .day-btn.availability-open:not(.selected)::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clean-green);
}

.estimate-page .day-btn.availability-closed,
.estimate-page .day-btn.availability-pending {
  border-color: color-mix(in srgb, var(--line) 68%, transparent);
  background: color-mix(in srgb, var(--muted) 8%, var(--surface-3));
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.estimate-page .day-btn.availability-closed {
  opacity: 0.52;
}

.estimate-page .day-btn.availability-pending {
  opacity: 0.64;
}

.estimate-page .day-btn.selected {
  background: var(--clean-wine);
  color: #edf5f4;
  border-color: var(--clean-wine);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(3, 18, 23, 0.22);
}

.estimate-page .day-btn.selected:hover {
  background: color-mix(in srgb, var(--clean-wine) 88%, #000);
  border-color: color-mix(in srgb, var(--clean-wine) 88%, #000);
  color: #edf5f4;
}

.estimate-page .day-btn.selected::after {
  background: #fff;
}

/* Same openings widget chrome, full-width in the form pipeline after the plan. */
.estimate-page .slots-wrap {
  align-self: stretch;
  min-height: auto;
  margin-top: 1.15rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 2px;
  color: var(--clean-sage);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(51, 103, 106, 0.28), transparent 18rem),
    var(--clean-navy);
  border: 1px solid rgba(51, 103, 106, 0.42);
  border-left: 1px solid rgba(51, 103, 106, 0.42);
  box-shadow: 0 16px 40px rgba(3, 18, 23, 0.18);
}

.estimate-page .slots-wrap.flow-step {
  /* Keep navy panel look; ignore light step surface from .flow-step */
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(51, 103, 106, 0.28), transparent 18rem),
    var(--clean-navy);
  box-shadow: 0 16px 40px rgba(3, 18, 23, 0.18);
}

.estimate-page .slots-wrap .section-kicker {
  color: #a6bebc;
}

.estimate-page .slots-wrap h3 {
  margin: 0 0 0.45rem;
  color: #edf5f4;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

.estimate-page .slots-wrap .muted {
  margin-bottom: 0;
  color: rgba(166, 190, 188, 0.78);
  font-size: 0.88rem;
}

.estimate-page .slots-wrap__head {
  margin-bottom: 0;
  border-bottom-color: rgba(166, 190, 188, 0.18);
}

.estimate-page .slots-wrap__head .muted {
  padding-bottom: 0.75rem;
}

.estimate-page .slot-buttons {
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.estimate-page .slot-option {
  position: relative;
  min-height: 48px;
  padding: 0.7rem 0.8rem 0.7rem 2.35rem;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.055);
  color: #d7e8e5;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: none;
}

.estimate-page .slot-option:hover {
  border-color: rgba(166, 190, 188, 0.46);
  background: rgba(255, 255, 255, 0.1);
}

.estimate-page .slot-option:has(input:checked) {
  border-color: rgba(166, 190, 188, 0.7);
  background:
    linear-gradient(90deg, rgba(124, 36, 41, 0.55), rgba(124, 36, 41, 0.12)),
    rgba(255, 255, 255, 0.08);
  color: #f3e6e2;
  box-shadow: inset 4px 0 0 var(--clean-wine);
}

.estimate-page .slot-option:focus-within {
  outline: 2px solid rgba(166, 190, 188, 0.55);
  outline-offset: 2px;
}

.estimate-page .slot-option input {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  transform: translateY(-50%);
  accent-color: var(--clean-green);
}

.estimate-page #bookingForm {
  margin-top: 0;
  gap: 0;
}

.estimate-page .flow-step,
.estimate-page .customer-info {
  scroll-margin-top: 1rem;
  margin-top: 1.15rem;
  padding: clamp(1.05rem, 2.5vw, 1.55rem);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--brand) 55%, var(--line));
  border-radius: 2px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand) 5%, transparent), transparent 8rem),
    rgba(255, 252, 245, 0.45);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.estimate-page .estimate-step-continue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.estimate-page .estimate-step-continue .muted {
  max-width: 560px;
  margin: 0;
  line-height: 1.5;
}

.estimate-page .estimate-step-continue__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 12rem;
  min-height: 2.8rem;
  border-color: var(--clean-wine);
  border-radius: 2px;
  background: var(--clean-wine);
  color: #fff8f3;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(124, 36, 41, 0.24);
}

.estimate-page .estimate-painted-button__svg {
  display: block;
  width: 10.6rem;
  height: 1.75rem;
  overflow: visible;
  color: currentColor;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.estimate-page .estimate-painted-button__underlay,
.estimate-page .estimate-painted-button__text {
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.estimate-page .estimate-painted-button__underlay {
  fill: currentColor;
  opacity: 0;
}

.estimate-page .estimate-painted-button__letter {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: stroke fill;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-painted-button__underlay {
  opacity: 0.32;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-painted-button__letter {
  fill-opacity: 0;
  stroke-dasharray: var(--paint-dash);
  stroke-dashoffset: var(--paint-start);
  opacity: 0.12;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-step-continue__button.is-painting .estimate-painted-button__letter {
  animation: estimatePaintButtonLetter 460ms var(--paint-delay) cubic-bezier(0.42, 0, 0.32, 1) forwards;
}

.estimate-page .estimate-step-continue__button.is-painted .estimate-painted-button__underlay {
  opacity: 0;
}

.estimate-page .estimate-step-continue__button.is-painted .estimate-painted-button__letter {
  fill-opacity: 1;
  stroke-dashoffset: 0;
  opacity: 1;
}

.estimate-page .estimate-step-continue__button:hover {
  border-color: color-mix(in srgb, var(--clean-wine) 84%, #000);
  background: color-mix(in srgb, var(--clean-wine) 88%, #000);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 36, 41, 0.34);
}

.estimate-page .estimate-step-continue__button:hover .estimate-painted-button__svg {
  transform: scale(1.018);
}

.estimate-page .estimate-step-continue__button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--clean-wine) 70%, #fff);
  outline-offset: 3px;
}

@keyframes estimatePaintButtonLetter {
  0% {
    stroke-dashoffset: var(--paint-start);
    fill-opacity: 0;
    opacity: 0.12;
  }
  14% {
    fill-opacity: 0;
    opacity: 1;
  }
  70% {
    fill-opacity: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    opacity: 1;
  }
}

.estimate-page #serviceStep,
.estimate-page #conditionStep {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.95rem;
  row-gap: 0.85rem;
}

.estimate-page #serviceStep .form-section__head,
.estimate-page #conditionStep .form-section__head {
  grid-column: 1 / -1;
}

.estimate-page .estimate-plan-flex {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  align-items: start;
  overflow: hidden;
  margin-top: 0.2rem;
  padding: 1.08rem 1.1rem 1rem;
  border: 1px solid rgba(166, 190, 188, 0.34);
  border-radius: 2px;
  background:
    linear-gradient(120deg, rgba(51, 103, 106, 0.3), transparent 52%),
    rgba(18, 48, 45, 0.92);
  color: #edf5f4;
  box-shadow: inset 4px 0 0 rgba(90, 145, 140, 0.72);
}

.estimate-page .estimate-plan-flex[hidden] {
  display: none;
}

.estimate-page .estimate-plan-flex--visible {
  animation: flowReveal 360ms ease both;
}

.estimate-page .estimate-plan-flex::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #5a918c, #244d4b);
  pointer-events: none;
}

.estimate-page .estimate-plan-flex::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -20%;
  bottom: -20%;
  left: -48%;
  width: 34%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(213, 232, 229, 0.04) 28%,
    rgba(213, 232, 229, 0.16) 50%,
    rgba(213, 232, 229, 0.04) 72%,
    transparent
  );
  transform: skewX(-14deg);
  pointer-events: none;
}

.estimate-page .estimate-plan-flex--visible::after {
  animation: estimatePlanTextSweep 1.65s cubic-bezier(0.22, 1, 0.36, 1) 420ms 1 both;
}

@keyframes estimatePlanTextSweep {
  from { left: -48%; }
  to { left: 118%; }
}

.estimate-page .estimate-plan-flex__copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.28rem;
  min-width: 0;
}

.estimate-page .estimate-plan-flex__copy strong {
  color: #d5e8e5;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.3;
}

.estimate-page .estimate-plan-flex__copy p {
  max-width: 74ch;
  margin: 0;
  color: rgba(220, 237, 234, 0.82);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.58;
}

@media (prefers-reduced-motion: reduce) {
  .estimate-page .estimate-plan-flex--visible {
    animation: none;
  }

  .estimate-page .estimate-plan-flex::after {
    display: none;
    animation: none;
  }
}

:root[data-theme="dark"] .estimate-page .flow-step,
:root[data-theme="dark"] .estimate-page .customer-info {
  background:
    linear-gradient(90deg, rgba(51, 103, 106, 0.1), transparent 8rem),
    rgba(31, 52, 41, 0.42);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.estimate-page .form-section__head {
  padding-top: 0;
  margin-bottom: 1.05rem;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.estimate-page .form-section__head h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.estimate-page .form-section__head .muted {
  max-width: 720px;
  padding-bottom: 0.95rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

.estimate-page label {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.estimate-page input,
.estimate-page select,
.estimate-page textarea {
  min-height: 50px;
  border-color: var(--line);
  border-radius: 2px;
  background: var(--surface-3);
  box-shadow: var(--control-shadow);
  font-size: 0.95rem;
  font-weight: 500;
}

.estimate-page select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.1rem;
}

.estimate-page input:hover,
.estimate-page select:hover,
.estimate-page textarea:hover {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.estimate-page input:focus,
.estimate-page select:focus,
.estimate-page textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.estimate-page input:disabled,
.estimate-page select:disabled,
.estimate-page textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.estimate-page .estimate-address-field {
  position: relative;
}

.estimate-page .estimate-address-help {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.estimate-page .estimate-address-help.is-ready {
  color: var(--green);
}

.estimate-page .estimate-address-help.is-warning {
  color: var(--brick, #9c3d2e);
}

.estimate-page mapbox-address-autofill,
.estimate-page .mapboxgl-ctrl-geocoder {
  display: block;
  width: 100%;
}

.estimate-page .estimate-service-area-notice {
  border: 1px solid color-mix(in srgb, var(--brick, #9c3d2e) 38%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--brick, #9c3d2e) 8%, var(--surface, #fff));
  padding: 0.9rem 1rem;
  color: var(--ink, #172b2a);
}

.estimate-page .estimate-referral-banner {
  margin: 0 0 18px;
  padding: 20px 22px;
  border: 1px solid rgba(74, 154, 145, .38);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(24, 72, 70, .95), rgba(35, 57, 70, .96));
  color: #f7f0df;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

.estimate-page .estimate-referral-banner[hidden] { display: none; }
.estimate-page .estimate-referral-banner h2 { margin: 4px 0 8px; color: #fff8e9; font-family: var(--font-display, Georgia, serif); }
.estimate-page .estimate-referral-banner p { margin: 0 0 8px; line-height: 1.55; }
.estimate-page .estimate-referral-banner a { color: #bfe7dc; font-weight: 700; }

.estimate-page .estimate-service-area-notice[hidden] {
  display: none;
}

.estimate-page .estimate-service-area-notice strong {
  color: var(--brick, #9c3d2e);
}

.estimate-page .estimate-service-area-notice p {
  margin: 0.3rem 0 0;
  line-height: 1.5;
}

.estimate-page textarea {
  min-height: 118px;
  resize: vertical;
  line-height: 1.5;
}

.estimate-page #homeSizeHint {
  margin: 0.15rem 0 0;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  font-size: 0.84rem;
  line-height: 1.5;
}

.estimate-page .addons {
  gap: 0.65rem;
  padding: 0.9rem;
  border-radius: 2px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
}

.estimate-page .addons legend {
  padding: 0 0.35rem;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.estimate-page .addon-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.45rem 0.55rem;
  align-content: center;
  align-items: center;
  min-height: 60px;
  padding: 0.7rem 0.8rem;
  border-radius: 2px;
  border-color: transparent;
  background: var(--surface-3);
  box-shadow: var(--control-shadow);
}

.estimate-page .addon-option input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

/* Custom check sits in the first grid track */
.estimate-page .addon-option > .estimate-check-input + .estimate-check {
  grid-column: 1;
  grid-row: 1;
}

.estimate-page .addon-option__slider {
  grid-column: 1 / -1;
}

.estimate-page .addon-option__content {
  gap: 0.5rem;
}

.estimate-page .addon-option__emoji {
  margin-right: 0;
}

.estimate-page .addon-option--selected .addon-option__emoji,
.estimate-page .addon-option--selected .addon-option__text {
  display: inline-flex;
}

.estimate-page .addon-option__slider-control {
  min-width: 0;
}

.estimate-page .addon-option--custom {
  display: block;
  grid-template-columns: 1fr;
  align-items: stretch;
  min-height: auto;
}

.estimate-page .custom-addon-summary {
  display: grid;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  gap: 0.4rem;
}

.estimate-page .custom-addon-toggle {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 0.45rem 0.55rem;
  align-items: center;
  margin: 0;
}

.estimate-page .custom-addon-toggle input[type="checkbox"] {
  grid-column: 1;
}

.estimate-page .addon-option--custom.addon-option--selected .addon-option__text {
  display: inline-flex;
}

.estimate-page .custom-addon-fields {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.estimate-page .custom-addon-fields:not([hidden]) {
  display: grid;
}

.estimate-page .addon-option--custom.addon-option--selected .custom-addon-help {
  display: none;
}

.estimate-page .custom-addon-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.estimate-page .custom-addon-fields label {
  display: grid;
  gap: 0.35rem;
  font-weight: 700;
}

.estimate-page .custom-addon-fields input[type="text"],
.estimate-page .custom-addon-fields textarea {
  width: 100%;
  min-width: 0;
}

.estimate-page .custom-addon-fields textarea {
  min-height: 92px;
}

.estimate-page .custom-addon-dirty {
  gap: 0.5rem;
}

.estimate-page .custom-addon-dirty .addon-option__slider-control {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
}

.estimate-page .custom-addon-extra-list {
  display: grid;
  gap: 0.8rem;
}

.estimate-page .custom-addon-extra {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  background: rgba(8, 34, 32, 0.32);
}

.estimate-page .custom-addon-extra__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.estimate-page .custom-addon-add-btn,
.estimate-page .custom-addon-remove-btn {
  width: fit-content;
  border: 1px solid var(--aqua);
  background: transparent;
  color: var(--paper);
  padding: 0.45rem 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.estimate-page .custom-addon-remove-btn {
  border-color: var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.estimate-page .custom-addon-add-btn:disabled,
.estimate-page .custom-addon-remove-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.estimate-page .estimate-box {
  display: grid;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-left: 4px solid var(--brand);
  border-radius: 2px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 55%),
    var(--surface-2);
  box-shadow: 0 10px 28px rgba(3, 18, 23, 0.06);
}

.estimate-page .estimate-box__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
}

.estimate-page .estimate-box__label {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.estimate-page .estimate-box .muted {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.estimate-page .estimate-box .estimate-note {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  font-size: 0.8rem;
}

.estimate-page #estimateAmount,
.estimate-page .estimate-box__amount {
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clean-wine);
  line-height: 1;
}

.estimate-page .grid button[type="submit"],
.estimate-page .estimate-submit {
  min-height: 56px;
  margin-top: 0.35rem;
  border: 1px solid #2a090d;
  border-radius: 999px;
  background: var(--clean-wine);
  color: #f3e6e2;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 28px rgba(124, 36, 41, 0.28);
}

.estimate-page .grid button[type="submit"]:hover,
.estimate-page .estimate-submit:hover {
  background: var(--clean-wine-deep);
  box-shadow: 0 14px 32px rgba(124, 36, 41, 0.34);
}

.estimate-page .grid button[type="submit"]:focus-visible,
.estimate-page .estimate-submit:focus-visible {
  outline: 2px solid var(--clean-wine);
  outline-offset: 3px;
}

.estimate-page .grid button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.68;
  box-shadow: none;
}

.estimate-page #status,
.estimate-page .estimate-status {
  margin-top: 1rem;
  border-radius: 2px;
  border: 1px solid rgba(166, 190, 188, 0.18);
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.estimate-page .portal {
  margin-top: 1.15rem;
  padding: clamp(1.05rem, 2.5vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-2);
}

.estimate-page .portal .icon-btn,
.estimate-page .modal .icon-btn {
  min-height: 44px;
  border-radius: 2px;
  font-weight: 700;
}

.estimate-page .portal .icon-btn:focus-visible,
.estimate-page .modal .icon-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.estimate-page .quote-grid > div,
.estimate-page .quote-summary__row {
  border-radius: 2px;
}

.estimate-page .modal__backdrop {
  background: rgba(7, 22, 16, 0.76);
  backdrop-filter: blur(8px);
}

.estimate-page .modal__dialog {
  border-radius: 3px;
  border: 2px solid var(--clean-border);
  box-shadow: 0 28px 80px rgba(3, 18, 23, 0.35);
}

.estimate-assurance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--clean-border);
  border-top: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 4rem),
    color-mix(in srgb, var(--clean-green) 8%, rgba(247, 242, 232, 0.96));
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] .estimate-assurance {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 4rem),
    color-mix(in srgb, var(--clean-green) 42%, rgba(11, 29, 32, 0.96));
}

.estimate-assurance article {
  display: grid;
  gap: 0.4rem;
  padding: 1.45rem 1.35rem 1.55rem;
  align-content: start;
}

.estimate-assurance article + article {
  border-left: 1px solid color-mix(in srgb, var(--clean-green) 22%, var(--line));
}

.estimate-assurance__icon {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.2rem;
  color: var(--clean-green);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

/* Dark paper needs a lifted forest green so it still reads as clean-green, not teal-blue. */
:root[data-theme="dark"] .estimate-assurance__icon {
  color: color-mix(in srgb, var(--clean-green) 38%, #b8d4d0);
}

.estimate-assurance__title,
.estimate-assurance span:not(.estimate-assurance__icon) {
  display: block;
  margin-bottom: 0.12rem;
  /* Same wine family as CTAs, brightened a tad for titles */
  color: #94373d;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

:root[data-theme="dark"] .estimate-assurance__title,
:root[data-theme="dark"] .estimate-assurance span:not(.estimate-assurance__icon) {
  color: #c96a70;
}

.estimate-assurance p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.62;
  max-width: 34ch;
}

.estimate-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.25rem 0 2.4rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.estimate-footer__brand {
  display: grid;
  gap: 0.2rem;
}

.estimate-footer__brand strong {
  color: var(--text);
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.estimate-footer__brand span {
  opacity: 0.85;
}

.estimate-footer a,
.estimate-footer__email {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  transition: color 160ms ease, border-color 160ms ease;
}

.estimate-footer a:hover,
.estimate-footer__email:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

@media (max-width: 860px) {
  .estimate-page {
    background:
      linear-gradient(180deg, rgba(3, 18, 23, 0.72) 0, rgba(36, 77, 75, 0.62) 36rem, rgba(219, 231, 229, 0.78) 58rem),
      url("assets/cleaning-forest-placeholder.jpg") center top / auto 58rem no-repeat,
      #dbe7e5;
  }

  :root[data-theme="dark"] .estimate-page {
    background:
      linear-gradient(180deg, rgba(3, 18, 23, 0.7) 0, rgba(16, 37, 39, 0.82) 36rem, rgba(3, 18, 23, 0.98) 58rem),
      url("assets/cleaning-forest-placeholder.jpg") center top / auto 58rem no-repeat,
      #031217;
  }

  .estimate-page .hero {
    padding-top: 2.4rem;
    padding-bottom: 5rem;
  }

  .estimate-hero__inner,
  .estimate-card-shell__head {
    grid-template-columns: 1fr;
  }

  .estimate-page .scheduler.scheduler--date-selected {
    grid-template-columns: 1fr;
  }

  .estimate-hero__note {
    max-width: 560px;
  }

  .estimate-page .container {
    margin-top: -2rem;
  }

  .estimate-assurance {
    grid-template-columns: 1fr;
  }

  .estimate-assurance article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .estimate-nav {
    width: min(100% - 1rem, 1120px);
    min-height: 64px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.4rem 0;
  }

  .estimate-brand-sign {
    padding: 0.58rem 0.9rem 0.58rem 0.28rem;
  }

  .estimate-brand-sign::before {
    inset: -0.28rem -0.46rem -0.34rem 0.92rem;
  }

  .estimate-nav__brand img {
    width: 62px;
    height: 62px;
    min-width: 62px;
  }

  .estimate-nav__brand strong {
    font-size: 1rem;
  }

  .estimate-nav__brand small {
    font-size: 0.58rem;
  }

  .estimate-nav__actions {
    gap: 0.4rem;
  }

  .estimate-nav__actions a {
    min-height: 34px;
    padding: 0.42rem 0.62rem;
    font-size: 0.66rem;
  }

  .estimate-page .hero {
    padding: 2.25rem 0.65rem 4.25rem;
  }

  .estimate-page .hero h1 {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .estimate-hero__trust {
    gap: 0.4rem;
  }

  .estimate-hero__trust span {
    padding: 0.42rem 0.58rem;
    font-size: 0.66rem;
  }

  .estimate-page .container {
    padding: 0 0.5rem;
  }

  .estimate-card-shell {
    padding: 0.85rem;
  }

  .estimate-card-shell__head {
    gap: 0.8rem;
    padding: 0.35rem 0.25rem 1.1rem;
  }

  .estimate-page .calendar-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem;
  }

  .estimate-page .slots-wrap {
    padding: 0.75rem;
  }

  .estimate-page .slot-buttons {
    grid-template-columns: 1fr;
  }

  .estimate-page .day-btn {
    min-height: 40px;
    aspect-ratio: 1 / 1;
    padding: 0;
    font-size: 0.92rem;
  }

  .estimate-page .weekdays span {
    font-size: 0.6rem;
  }

  .estimate-page .flow-step,
  .estimate-page .customer-info {
    padding: 0.85rem;
  }

  .estimate-page #serviceStep,
  .estimate-page #conditionStep {
    grid-template-columns: 1fr;
  }

  .estimate-page .estimate-plan-flex {
    padding: 0.9rem;
  }

  .estimate-page .addons {
    grid-template-columns: 1fr;
    min-width: 0;
    padding: 0.7rem;
  }

  .estimate-page .addon-option {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }

  .estimate-page .addon-option__content {
    min-width: 0;
  }

  .estimate-page .addon-option__slider-control,
  .estimate-page .custom-addon-dirty .addon-option__slider-control {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .estimate-page .addon-option__slider-value {
    min-width: 0;
    text-align: left;
  }

  .estimate-page .custom-addon-fields {
    gap: 0.85rem;
  }

  .estimate-page .custom-addon-extra {
    padding: 0.75rem;
  }

  .estimate-page .custom-addon-extra__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .estimate-page .custom-addon-fields label {
    grid-template-columns: 1fr;
  }

  .estimate-page .custom-addon-fields input[type="text"],
  .estimate-page .custom-addon-fields textarea {
    box-sizing: border-box;
  }

  .estimate-page .estimate-box {
    gap: 0.4rem;
    padding: 1rem;
  }

  .estimate-page .estimate-box__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .estimate-page .estimate-step-continue {
    align-items: stretch;
    flex-direction: column;
  }

  .estimate-page .estimate-step-continue__button {
    width: 100%;
    min-width: 0;
  }

  .estimate-footer {
    width: calc(100% - 1rem);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 360px) {
  .estimate-nav {
    align-items: flex-start;
  }

  .estimate-nav__actions a {
    padding: 0.38rem 0.56rem;
    font-size: 0.62rem;
  }

  .estimate-page .hero h1 {
    font-size: 2.45rem;
  }

  .estimate-hero__note {
    padding: 1rem;
  }

  .estimate-page .calendar-head {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .estimate-page .calendar-head .icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }

  .estimate-page .calendar-grid,
  .estimate-page .weekdays {
    gap: 2px;
  }

  .estimate-page .day-btn {
    min-height: 34px;
    font-size: 0.72rem;
  }
}
.slot-option--reopened {
  border-color: #f85149 !important;
  box-shadow: inset 4px 0 0 #f85149;
}

.slot-option--reopened > span {
  color: #f85149;
  font-weight: 700;
}

.slot-reopen-note {
  display: block;
  margin-top: 0.2rem;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 500;
}

/* ── Estimate page motion ─────────────────────────────────────────────
   Load sequence, progressive-step polish, calendar/slot pop-ins, and
   scroll reveals. Armed only when html.estimate-motion-ready is set so
   a JS failure never leaves content stuck invisible. */

@keyframes estimateEnterUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes estimateEnterScale {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes estimateStepReveal {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
    box-shadow: 0 0 0 rgba(36, 77, 75, 0);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
    box-shadow: 0 16px 34px rgba(36, 77, 75, 0.14);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes estimateVeilOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes estimateDayIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes estimateSlotIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes estimateAmountPulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.08);
    color: var(--clean-wine);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes estimateSubmitReady {
  0%, 100% {
    box-shadow: 0 8px 22px rgba(124, 36, 41, 0.28);
  }
  50% {
    box-shadow: 0 12px 32px rgba(124, 36, 41, 0.48), 0 0 0 4px rgba(124, 36, 41, 0.14);
  }
}

@keyframes estimateSelectPop {
  0% {
    transform: scale(0.94);
  }
  55% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes estimateBrandBob {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Soft veil that lifts on first paint — gives a deliberate “page open” beat */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-load-veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(36, 77, 75, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(3, 18, 23, 0.42), rgba(3, 18, 23, 0.08) 55%, transparent);
  animation: estimateVeilOut 720ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

html.estimate-motion-reduced .estimate-load-veil,
.estimate-load-veil {
  display: none;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-load-veil {
  display: block;
}

/* Staggered first-paint enter for hero + shell */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-enter {
  opacity: 0;
  animation: estimateEnterUp 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--enter-delay, 0ms);
  will-change: opacity, transform;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-card-shell.estimate-enter {
  animation-name: estimateEnterScale;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-enter .estimate-enter-child {
  opacity: 0;
  animation: estimateEnterUp 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-enter .estimate-enter-child:nth-child(1) {
  animation-delay: calc(var(--enter-delay, 0ms) + 40ms);
}
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-enter .estimate-enter-child:nth-child(2) {
  animation-delay: calc(var(--enter-delay, 0ms) + 100ms);
}
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-enter .estimate-enter-child:nth-child(3) {
  animation-delay: calc(var(--enter-delay, 0ms) + 160ms);
}

/* Brand gnome soft bob after the load sequence settles */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-nav__brand img {
  animation: estimateBrandBob 3.6s ease-in-out 1.1s 2;
}

/* Trust chips + how-it-works hover micro-motion */
.estimate-page .estimate-hero__trust span {
  transition: transform 180ms var(--motion-ease), background 180ms ease, border-color 180ms ease;
}

.estimate-page .estimate-hero__trust span:hover {
  transform: translateY(-2px);
  border-color: rgba(166, 190, 188, 0.55);
  background: rgba(11, 29, 32, 0.58);
}

.estimate-page .estimate-hero__note li {
  transition: transform 180ms var(--motion-ease);
}

.estimate-page .estimate-hero__note li:hover {
  transform: translateX(3px);
}

/* Progressive steps: slightly richer reveal on this page */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible {
  animation: estimateStepReveal 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible .form-section__head .section-kicker,
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible .form-section__head h3,
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible .form-section__head .muted {
  animation: estimateEnterUp 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible .form-section__head h3 {
  animation-delay: 55ms;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .flow-step--visible .form-section__head .muted {
  animation-delay: 105ms;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-step-enter {
  animation: estimateEnterScale 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Calendar: cascade only when the month changes (class set from app.js),
   not on every day click re-render. Selected day still gets a soft pop. */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn {
  animation: estimateDayIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 1) { animation-delay: 0ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 2) { animation-delay: 18ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 3) { animation-delay: 36ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 4) { animation-delay: 54ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 5) { animation-delay: 72ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 6) { animation-delay: 90ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .calendar-grid.calendar-grid--enter .day-btn:nth-child(7n + 7) { animation-delay: 108ms; }

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .day-btn.selected {
  animation: estimateSelectPop 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.estimate-page .day-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

/* Slot options stagger when openings load */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option {
  animation: estimateSlotIn 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: transform 160ms var(--motion-ease), border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(1) { animation-delay: 0ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(2) { animation-delay: 45ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(3) { animation-delay: 90ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(4) { animation-delay: 135ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(5) { animation-delay: 180ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(6) { animation-delay: 225ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(7) { animation-delay: 270ms; }
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .slot-option:nth-child(8) { animation-delay: 315ms; }

.estimate-page .slot-option:hover {
  transform: translateY(-2px);
}

/* Addon tiles: light lift when selected */
.estimate-page .addon-option {
  transition: transform 180ms var(--motion-ease), border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.estimate-page .addon-option:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.estimate-page .addon-option--selected {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--surface-3));
  box-shadow: 0 8px 18px rgba(3, 18, 23, 0.08);
}

/* Live estimate amount pulse on change */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page #estimateAmount.estimate-amount--pulse,
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-box__amount.estimate-amount--pulse {
  display: inline-block;
  animation: estimateAmountPulse 480ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
}

/* Submit CTA soft pulse when contact step is ready */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .estimate-submit--ready {
  animation: estimateSubmitReady 2.4s ease-in-out 2;
}

.estimate-page .grid button[type="submit"] {
  transition: background 180ms ease, transform 180ms var(--motion-ease), box-shadow 180ms ease, opacity 180ms ease;
}

.estimate-page .grid button[type="submit"]:not(:disabled):hover {
  transform: translateY(-1px);
}

/* Scroll reveals (assurance + footer) */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal .estimate-reveal-child {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal.is-visible .estimate-reveal-child {
  opacity: 1;
  transform: translateY(0);
}

html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal.is-visible .estimate-reveal-child:nth-child(1) {
  transition-delay: 40ms;
}
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal.is-visible .estimate-reveal-child:nth-child(2) {
  transition-delay: 110ms;
}
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-reveal.is-visible .estimate-reveal-child:nth-child(3) {
  transition-delay: 180ms;
}

/* Portal / status appear softly when shown */
html.estimate-motion-ready:not(.estimate-motion-reduced) .estimate-page .portal:not([hidden]) {
  animation: estimateEnterScale 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Reduced motion: keep everything static and visible */
@media (prefers-reduced-motion: reduce) {
  .estimate-load-veil,
  html.estimate-motion-ready .estimate-load-veil {
    display: none !important;
  }

  .estimate-enter,
  .estimate-enter .estimate-enter-child,
  .estimate-reveal,
  .estimate-reveal .estimate-reveal-child,
  .estimate-page .flow-step--visible,
  .estimate-page .estimate-step-enter,
  .estimate-page .calendar-grid.calendar-grid--enter .day-btn,
  .estimate-page .day-btn.selected,
  .estimate-page .slot-option,
  .estimate-page #estimateAmount.estimate-amount--pulse,
  .estimate-page .estimate-submit--ready,
  .estimate-page .portal:not([hidden]),
  .estimate-page .estimate-nav__brand img,
  .estimate-page .estimate-plan-flex {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

html.estimate-motion-reduced .estimate-enter,
html.estimate-motion-reduced .estimate-enter .estimate-enter-child,
html.estimate-motion-reduced .estimate-reveal,
html.estimate-motion-reduced .estimate-reveal .estimate-reveal-child,
html.estimate-motion-reduced .estimate-page .flow-step--visible,
html.estimate-motion-reduced .estimate-page .estimate-step-enter,
html.estimate-motion-reduced .estimate-page .calendar-grid.calendar-grid--enter .day-btn,
html.estimate-motion-reduced .estimate-page .day-btn.selected,
html.estimate-motion-reduced .estimate-page .slot-option,
html.estimate-motion-reduced .estimate-page #estimateAmount.estimate-amount--pulse,
html.estimate-motion-reduced .estimate-page .estimate-submit--ready,
html.estimate-motion-reduced .estimate-page .portal:not([hidden]),
html.estimate-motion-reduced .estimate-page .estimate-nav__brand img,
html.estimate-motion-reduced .estimate-page .estimate-plan-flex {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── Estimate custom select (listbox) ─────────────────────────────────── */
.estimate-page .estimate-select {
  position: relative;
  display: block;
  width: 100%;
  z-index: 1;
}

/* Lift the open control (and its step) above following form sections.
   Later steps use translucent surfaces; without this the menu paints under them. */
.estimate-page .estimate-select.is-open {
  z-index: 200;
}

.estimate-page .flow-step:has(.estimate-select.is-open),
.estimate-page .customer-info:has(.estimate-select.is-open),
.estimate-page .portal:has(.estimate-select.is-open),
.estimate-page label:has(.estimate-select.is-open) {
  position: relative;
  z-index: 200;
}

/* Keep native select in the form (validation + app.js) but out of sight */
.estimate-page .estimate-select__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  appearance: none !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.estimate-page .estimate-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0.7rem 0.85rem 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background-color: #f6fbfb !important;
  background-image: none !important;
  color: var(--text);
  opacity: 1;
  box-shadow: var(--control-shadow);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    transform 160ms var(--motion-ease);
}

:root[data-theme="dark"] .estimate-page .estimate-select__trigger {
  background-color: #102527 !important;
  color: #e8f2f0;
}

.estimate-page .estimate-select__trigger:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.estimate-page .estimate-select__trigger:focus {
  outline: none;
}

.estimate-page .estimate-select__trigger:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.estimate-page .estimate-select.is-open .estimate-select__trigger {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.estimate-page .estimate-select.is-invalid .estimate-select__trigger {
  border-color: var(--danger-border, #c98e86);
  box-shadow: 0 0 0 3px rgba(124, 36, 41, 0.16);
}

.estimate-page .estimate-select.is-disabled .estimate-select__trigger,
.estimate-page .estimate-select__trigger:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.estimate-page .estimate-select__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.estimate-page .estimate-select.is-placeholder .estimate-select__value {
  color: var(--muted);
  font-weight: 500;
}

.estimate-page .estimate-select__chevron {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--muted);
  transition: transform 180ms var(--motion-ease), color 160ms ease;
}

.estimate-page .estimate-select.is-open .estimate-select__chevron {
  color: var(--brand);
  transform: rotate(180deg);
}

.estimate-page .estimate-select__list {
  position: absolute;
  z-index: 250;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(280px, 50vh);
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  border: 1px solid rgba(36, 77, 75, 0.35);
  border-radius: 2px;
  /* Solid opaque panel — never glass / never inherit parent alpha */
  background: #f6fbfb !important;
  background-color: #f6fbfb !important;
  background-image: none !important;
  opacity: 1 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
  isolation: isolate;
  box-shadow:
    0 18px 40px rgba(3, 18, 23, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  scrollbar-width: thin;
  scrollbar-color: rgba(36, 77, 75, 0.35) transparent;
}

/* Portaled list (appended to body while open) — escapes step stacking */
.estimate-select__list--portal {
  position: fixed !important;
  z-index: 10000 !important;
  right: auto;
  background: #102527 !important;
  background-color: #102527 !important;
  background-image: none !important;
  opacity: 1 !important;
  border: 1px solid rgba(51, 103, 106, 0.5);
  border-radius: 2px;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  max-height: min(280px, 50vh);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  mix-blend-mode: normal !important;
}

:root[data-theme="dark"] .estimate-page .estimate-select__list,
:root[data-theme="dark"] .estimate-select__list--portal {
  background: #102527 !important;
  background-color: #102527 !important;
  border-color: rgba(51, 103, 106, 0.5);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.estimate-page .estimate-select__option,
.estimate-select__list--portal .estimate-select__option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 0;
  border-radius: 2px;
  background-color: #102527;
  color: #e8f2f0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

:root:not([data-theme="dark"]) .estimate-page .estimate-select__option {
  background-color: #f6fbfb;
  color: #031217;
}

.estimate-page .estimate-select__option:hover,
.estimate-page .estimate-select__option.is-active,
.estimate-select__list--portal .estimate-select__option:hover,
.estimate-select__list--portal .estimate-select__option.is-active {
  background-color: #163338 !important;
  color: #edf5f4 !important;
}

.estimate-page .estimate-select__option.is-selected,
.estimate-select__list--portal .estimate-select__option.is-selected {
  background-color: #1a3c42 !important;
  color: #a6d0d3 !important;
  font-weight: 700;
}

.estimate-page .estimate-select__option.is-selected.is-active,
.estimate-page .estimate-select__option.is-selected:hover,
.estimate-select__list--portal .estimate-select__option.is-selected.is-active,
.estimate-select__list--portal .estimate-select__option.is-selected:hover {
  background-color: #214a51 !important;
  color: #d7ecee !important;
}

.estimate-page .estimate-select__option.is-disabled,
.estimate-select__list--portal .estimate-select__option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  font-weight: 500;
}

.estimate-page .estimate-select__option.is-disabled:hover,
.estimate-page .estimate-select__option.is-disabled.is-active,
.estimate-select__list--portal .estimate-select__option.is-disabled:hover,
.estimate-select__list--portal .estimate-select__option.is-disabled.is-active {
  background-color: #102527 !important;
  color: #e8f2f0 !important;
}

.estimate-page .estimate-select--drop-up .estimate-select__list {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Transform-only open motion — never animate opacity (looks like glass) */
.estimate-page .estimate-select.is-open .estimate-select__list,
.estimate-select__list--portal.is-open {
  animation: estimateSelectIn 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes estimateSelectIn {
  from {
    transform: translateY(-6px);
  }
  to {
    transform: translateY(0);
  }
}

.estimate-page .estimate-select--drop-up.is-open .estimate-select__list {
  animation-name: estimateSelectInUp;
}

@keyframes estimateSelectInUp {
  from {
    transform: translateY(6px);
  }
  to {
    transform: translateY(0);
  }
}

/* When custom selects are active, suppress the old native chevron styling noise */
.estimate-page .estimate-select select {
  background-image: none;
}

/* file:// local preview — native selects + soft notice (not shown on Render) */
.estimate-local-file-banner {
  margin: 0;
  padding: 0.65rem 1rem;
  background: #1a3c42;
  color: #d7ecee;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  border-bottom: 1px solid rgba(166, 208, 211, 0.28);
}

.estimate-local-file-banner[hidden] {
  display: none !important;
}

html.estimate-selects-native .estimate-page select:not([data-estimate-select-ignore]) {
  /* Ensure native menus are usable when custom listbox is skipped */
  pointer-events: auto;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .estimate-page .estimate-select.is-open .estimate-select__list,
  .estimate-page .estimate-select--drop-up.is-open .estimate-select__list,
  .estimate-select__list--portal.is-open,
  .estimate-page .estimate-select__chevron {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Estimate custom check / radio marks ─────────────────────────────── */
.estimate-page .estimate-check-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.estimate-page .estimate-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  min-width: 1.35rem;
  min-height: 1.35rem;
  pointer-events: none;
  color: var(--brand);
}

.estimate-page .estimate-check__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Checkbox box */
.estimate-page .estimate-check__box {
  fill: #102527;
  stroke: rgba(166, 190, 188, 0.55);
  stroke-width: 1.5;
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
  transform-box: fill-box;
}

/* Tick path — drawn on check */
.estimate-page .estimate-check__tick {
  stroke: #edf5f4;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 18;
  stroke-dashoffset: 18;
  opacity: 0;
  transition:
    stroke-dashoffset 280ms cubic-bezier(0.22, 1, 0.36, 1) 40ms,
    opacity 80ms ease;
}

/* Radio ring + dot */
.estimate-page .estimate-check__ring {
  fill: #102527;
  stroke: rgba(166, 190, 188, 0.55);
  stroke-width: 1.5;
  transition: fill 180ms ease, stroke 180ms ease;
}

.estimate-page .estimate-check__dot {
  fill: #edf5f4;
  transform-origin: center;
  transform-box: fill-box;
  transform: scale(0);
  opacity: 0;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 120ms ease;
}

/* Checked — checkbox */
.estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__box {
  fill: var(--clean-wine, #7c2429);
  stroke: var(--clean-wine, #7c2429);
}

.estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__tick {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* Checked — radio */
.estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__ring {
  fill: var(--clean-wine, #7c2429);
  stroke: var(--clean-wine, #7c2429);
}

.estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__dot {
  transform: scale(1);
  opacity: 1;
}

/* Pop bounce when newly checked */
.estimate-page .estimate-check.estimate-check--pop {
  animation: estimateCheckPop 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes estimateCheckPop {
  0% { transform: scale(0.82); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Soft ring pulse on the mark itself when checked */
.estimate-page .estimate-check-input:checked + .estimate-check::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 6px;
  border: 2px solid color-mix(in srgb, var(--clean-wine, #7c2429) 45%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: estimateCheckRing 420ms ease-out;
}

.estimate-page .estimate-check-input[type="radio"]:checked + .estimate-check::after {
  border-radius: 50%;
}

@keyframes estimateCheckRing {
  0% {
    opacity: 0.7;
    transform: scale(0.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.35);
  }
}

/* Focus-visible on the mark when native input is focused via keyboard */
.estimate-page .estimate-check-input:focus-visible + .estimate-check {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.estimate-page .estimate-check-input:focus-visible + .estimate-check .estimate-check__box,
.estimate-page .estimate-check-input:focus-visible + .estimate-check .estimate-check__ring {
  stroke: var(--brand);
}

/* Disabled */
.estimate-page .estimate-check-input:disabled + .estimate-check {
  opacity: 0.45;
  filter: grayscale(0.15);
}

/* Layout: addon rows use the custom mark instead of 18px native box */
.estimate-page .addon-option {
  grid-template-columns: 1.35rem minmax(0, 1fr);
  column-gap: 0.65rem;
}

.estimate-page .addon-option > .estimate-check {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
}

.estimate-page .addon-option > .estimate-check-input {
  grid-column: 1;
  grid-row: 1;
}

.estimate-page .addon-option__content {
  grid-column: 2;
}

.estimate-page .custom-addon-toggle {
  grid-template-columns: 1.35rem minmax(0, 1fr);
  column-gap: 0.65rem;
}

.estimate-page .custom-addon-toggle > .estimate-check {
  grid-column: 1;
  align-self: center;
}

/* Remember-row + cancel modal labels */
.estimate-page .remember-row,
.estimate-page .addons--single-col label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.estimate-page .remember-row .estimate-check,
.estimate-page .addons--single-col label .estimate-check {
  flex: 0 0 auto;
}

/* Hover polish on interactive parents */
.estimate-page .addon-option:hover .estimate-check__box,
.estimate-page .custom-addon-toggle:hover .estimate-check__box,
.estimate-page .remember-row:hover .estimate-check__box,
.estimate-page .addons--single-col label:hover .estimate-check__ring {
  stroke: color-mix(in srgb, var(--clean-wine, #7c2429) 55%, rgba(166, 190, 188, 0.55));
}

.estimate-page .addon-option:hover .estimate-check-input:not(:checked) + .estimate-check .estimate-check__box,
.estimate-page .custom-addon-toggle:hover .estimate-check-input:not(:checked) + .estimate-check .estimate-check__box {
  fill: #143033;
}

/* Light theme fallback (estimate page is usually dark) */
:root:not([data-theme="dark"]) .estimate-page .estimate-check__box,
:root:not([data-theme="dark"]) .estimate-page .estimate-check__ring {
  fill: #f6fbfb;
  stroke: rgba(36, 77, 75, 0.4);
}

:root:not([data-theme="dark"]) .estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__box,
:root:not([data-theme="dark"]) .estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__ring {
  fill: var(--clean-wine, #7c2429);
  stroke: var(--clean-wine, #7c2429);
}

:root:not([data-theme="dark"]) .estimate-page .addon-option:hover .estimate-check-input:not(:checked) + .estimate-check .estimate-check__box {
  fill: #edf5f4;
}

@media (prefers-reduced-motion: reduce) {
  .estimate-page .estimate-check__box,
  .estimate-page .estimate-check__tick,
  .estimate-page .estimate-check__ring,
  .estimate-page .estimate-check__dot,
  .estimate-page .estimate-check.estimate-check--pop,
  .estimate-page .estimate-check-input:checked + .estimate-check::after {
    animation: none !important;
    transition: none !important;
  }

  .estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__tick {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .estimate-page .estimate-check-input:checked + .estimate-check .estimate-check__dot {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Estimate springy range sliders ───────────────────────────────────── */
.estimate-page .estimate-slider-wrap {
  --slider-progress: 50%;
  --slider-spring: cubic-bezier(0.34, 1.7, 0.45, 1);
  --slider-track: #163338;
  --slider-fill: #7c2429;
  --slider-fill-glow: rgba(124, 36, 41, 0.45);
  --slider-thumb: #edf5f4;
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: 2rem;
  padding: 0.55rem 0;
  touch-action: none;
}

.estimate-page .estimate-slider-wrap.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* Track base */
.estimate-page .estimate-slider-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0.42rem;
  margin-top: -0.21rem;
  border-radius: 999px;
  background: var(--slider-track);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* Active fill */
.estimate-page .estimate-slider__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 0.42rem;
  margin-top: -0.21rem;
  width: var(--slider-progress);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #5a1419, var(--slider-fill) 55%, #a33a40);
  box-shadow: 0 0 12px var(--slider-fill-glow);
  pointer-events: none;
  transform-origin: left center;
  transition: width 280ms var(--slider-spring);
  will-change: width;
}

.estimate-page .estimate-slider-wrap.is-dragging .estimate-slider__fill {
  transition-duration: 80ms;
  transition-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

/* Tick marks under discrete steps */
.estimate-page .estimate-slider__ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  pointer-events: none;
}

.estimate-page .estimate-slider__tick {
  position: absolute;
  top: 0.55rem;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: rgba(166, 190, 188, 0.45);
  transform: translateY(0);
  transition: transform 220ms var(--slider-spring), background 160ms ease, box-shadow 160ms ease;
}

/* Decorative spring thumb (visual only; native input captures events) */
.estimate-page .estimate-slider__thumb {
  position: absolute;
  top: 50%;
  left: var(--slider-progress);
  width: 1.35rem;
  height: 1.35rem;
  margin-left: -0.675rem;
  margin-top: -0.675rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0, #edf5f4 38%, #c7d8d5 100%);
  border: 2px solid #7c2429;
  box-shadow:
    0 4px 12px rgba(3, 18, 23, 0.35),
    0 0 0 0 rgba(124, 36, 41, 0.35);
  pointer-events: none;
  z-index: 2;
  transition:
    left 280ms var(--slider-spring),
    transform 280ms var(--slider-spring),
    box-shadow 220ms ease;
  will-change: left, transform;
}

.estimate-page .estimate-slider-wrap.is-dragging .estimate-slider__thumb {
  transition-duration: 70ms;
  transition-timing-function: cubic-bezier(0.2, 0.95, 0.35, 1.35);
  transform: scale(1.14);
  box-shadow:
    0 8px 18px rgba(3, 18, 23, 0.4),
    0 0 0 6px rgba(124, 36, 41, 0.18);
}

/* Spring overshoot when value settles */
.estimate-page .estimate-slider__thumb--spring {
  animation: estimateSliderThumbSpring 520ms cubic-bezier(0.34, 1.7, 0.45, 1) both;
}

@keyframes estimateSliderThumbSpring {
  0% {
    transform: scale(0.78);
    box-shadow: 0 2px 6px rgba(3, 18, 23, 0.25), 0 0 0 0 rgba(124, 36, 41, 0);
  }
  40% {
    transform: scale(1.22);
    box-shadow: 0 10px 22px rgba(3, 18, 23, 0.4), 0 0 0 8px rgba(124, 36, 41, 0.2);
  }
  70% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(3, 18, 23, 0.35), 0 0 0 0 rgba(124, 36, 41, 0);
  }
}

.estimate-page .estimate-slider-wrap--spring::before {
  animation: estimateSliderTrackSpring 480ms cubic-bezier(0.34, 1.7, 0.45, 1) both;
}

@keyframes estimateSliderTrackSpring {
  0% { transform: scaleY(1); }
  35% { transform: scaleY(1.55); }
  100% { transform: scaleY(1); }
}

.estimate-page .estimate-slider-wrap--spring::before {
  transform-origin: center;
}

/* Native range sits on top for interaction; visually transparent */
.estimate-page .estimate-slider-wrap .estimate-slider,
.estimate-page input.estimate-slider[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
  accent-color: transparent;
}

.estimate-page .estimate-slider-wrap .estimate-slider:active {
  cursor: grabbing;
}

.estimate-page .estimate-slider-wrap .estimate-slider:focus {
  outline: none;
}

.estimate-page .estimate-slider-wrap .estimate-slider:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: 999px;
}

/* Hide native thumbs so the custom spring thumb shows through */
.estimate-page .estimate-slider-wrap .estimate-slider::-webkit-slider-runnable-track {
  height: 2rem;
  background: transparent;
  border: none;
}

.estimate-page .estimate-slider-wrap .estimate-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: grab;
}

.estimate-page .estimate-slider-wrap .estimate-slider::-moz-range-track {
  height: 0.42rem;
  background: transparent;
  border: none;
}

.estimate-page .estimate-slider-wrap .estimate-slider::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  cursor: grab;
}

.estimate-page .estimate-slider-wrap .estimate-slider::-moz-range-progress {
  background: transparent;
}

/* Value label spring */
.estimate-page .addon-option__slider-value {
  display: inline-block;
  transform-origin: right center;
  transition: color 160ms ease;
}

.estimate-page .estimate-slider-value--spring,
.estimate-page .addon-option__slider-value.estimate-slider-value--spring {
  animation: estimateSliderValueSpring 480ms cubic-bezier(0.34, 1.75, 0.4, 1) both;
}

@keyframes estimateSliderValueSpring {
  0% {
    transform: scale(0.86) translateY(2px);
    opacity: 0.65;
  }
  45% {
    transform: scale(1.12) translateY(-2px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Layout polish inside addon rows */
.estimate-page .addon-option__slider-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 0.9rem;
  width: 100%;
  min-width: 0;
}

.estimate-page .addon-option__slider-control .estimate-slider-wrap {
  grid-column: 1;
}

.estimate-page .addon-option__slider-control .addon-option__slider-value {
  grid-column: 2;
  min-width: 6.5rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.82rem;
  color: #d4a0a2;
  letter-spacing: 0.01em;
}

.estimate-page .custom-addon-dirty .addon-option__slider-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

/* Active tick nearest the thumb */
.estimate-page .estimate-slider-wrap.is-dragging .estimate-slider__tick {
  background: rgba(237, 245, 244, 0.55);
}

@media (max-width: 600px) {
  .estimate-page .addon-option__slider-control,
  .estimate-page .custom-addon-dirty .addon-option__slider-control {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .estimate-page .addon-option__slider-control .addon-option__slider-value {
    grid-column: 1;
    min-width: 0;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .estimate-page .estimate-slider__fill,
  .estimate-page .estimate-slider__thumb,
  .estimate-page .estimate-slider__tick,
  .estimate-page .estimate-slider__thumb--spring,
  .estimate-page .estimate-slider-wrap--spring::before,
  .estimate-page .estimate-slider-value--spring,
  .estimate-page .addon-option__slider-value.estimate-slider-value--spring {
    animation: none !important;
    transition: none !important;
  }

  .estimate-page .estimate-slider-wrap.is-dragging .estimate-slider__thumb {
    transform: none;
  }
}
