/* ═══════════════════════════════════════════════════════
   SIDEWALK REPAIR NYC — COST ESTIMATOR
   Loaded only on the page that renders partials/estimator.blade.php.
   Built on the brand tokens from global.css (--orange / --navy / …);
   everything below is scoped under #cost-estimator so it can never
   leak into the rest of the site.
═══════════════════════════════════════════════════════ */

#cost-estimator {
  --est-ink: #0f1720;
  --est-line: #e6e6e2;
  --est-line-soft: #f0f0ec;
  --est-mute: #6f7480;
  --est-tint: #fff6ef;
  --est-shadow-sm: 0 1px 2px rgba(15, 23, 32, .07);
  --est-shadow-md: 0 2px 6px rgba(15, 23, 32, .06), 0 12px 28px rgba(15, 23, 32, .07);
  --est-shadow-lg: 0 2px 8px rgba(15, 23, 32, .06), 0 32px 70px rgba(15, 23, 32, .14);
  --est-shadow-orange: 0 8px 22px rgba(232, 100, 10, .28);
  --est-ease: cubic-bezier(.22, .68, .36, 1);

  position: relative;
  padding: 86px 0 96px;
  background: var(--light-bg);
  overflow: hidden;
}

/* Faint construction-grid wash, same language as .page-hero::before */
#cost-estimator::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 50% -8%, rgba(232, 100, 10, .09), transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 64px, rgba(26, 35, 50, .028) 64px, rgba(26, 35, 50, .028) 65px),
    repeating-linear-gradient(90deg, transparent, transparent 64px, rgba(26, 35, 50, .028) 64px, rgba(26, 35, 50, .028) 65px);
}

#cost-estimator .container {
  position: relative;
  z-index: 1;
}

.est-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Section heading ── */
.est-head {
  max-width: 720px;
  margin: 0 auto 46px;
  text-align: center;
}

.est-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid rgba(232, 100, 10, .3);
  box-shadow: var(--est-shadow-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}

.est-eyebrow .est-dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
  animation: estPulse 1.9s ease-in-out infinite;
}

@keyframes estPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .35;
    transform: scale(.7);
  }
}

.est-head h2 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--navy);
  text-transform: uppercase;
}

.est-head h2 em {
  font-style: normal;
  color: var(--orange);
}

.est-head p {
  margin: 16px auto 0;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--est-mute);
}

/* ── Shell ── */
.est-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 26px;
  align-items: start;
}

/* ── Main card ── */
.est-card {
  position: relative;
  background: #fff;
  box-shadow: var(--est-shadow-lg);
  padding: 38px 40px 34px;
}

.est-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange-light), var(--orange) 55%, var(--orange-dark));
}

.est-card-head {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--est-line-soft);
}

.est-card-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--navy);
}

.est-card-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--est-mute);
}

/* ── Stepper ── */
.est-steps {
  display: flex;
  list-style: none;
  margin: 26px 0 30px;
  padding: 0;
}

.est-steps li {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #b4b8c0;
  transition: color .3s var(--est-ease);
}

/* Connector rail between the nodes */
.est-steps li::before {
  content: '';
  position: absolute;
  top: 15px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--est-line);
  z-index: 0;
}

.est-steps li:first-child::before {
  display: none;
}

.est-steps li.is-done::before,
.est-steps li.is-active::before {
  background: var(--orange);
}

.est-node {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border: 2px solid var(--est-line);
  color: #b4b8c0;
  font-size: 12px;
  font-weight: 700;
  transition: all .3s var(--est-ease);
}

.est-node .est-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}

.est-steps li.is-active {
  color: var(--navy);
}

.est-steps li.is-active .est-node {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(232, 100, 10, .16);
}

.est-steps li.is-done {
  color: var(--navy);
}

.est-steps li.is-done .est-node {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

/* ── Step panes ── */
/* Scoped — a bare [hidden] rule here would leak into the whole page. */
#cost-estimator [hidden] {
  display: none !important;
}

.est-step {
  animation: estStepIn .4s var(--est-ease) both;
}

@keyframes estStepIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .est-step,
  .est-line,
  .est-result-head {
    animation: none !important;
  }
}

/* ── Fieldsets ── */
.est-fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 28px;
}

.est-fieldset:last-of-type {
  margin-bottom: 0;
}

.est-legend {
  display: block;
  padding: 0;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--navy);
}

.est-req {
  color: var(--orange);
}

.est-hint {
  margin: 0 0 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--est-mute);
}

/* ── Choice tiles ── */
.est-choices {
  display: grid;
  gap: 10px;
}

.est-choices-2 {
  grid-template-columns: repeat(2, 1fr);
}

.est-choices-3 {
  grid-template-columns: repeat(3, 1fr);
}

.est-choices-4 {
  grid-template-columns: repeat(4, 1fr);
}

.est-choice {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.est-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.est-choice-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  height: 100%;
  min-height: 104px;
  padding: 17px 16px;
  background: #fff;
  border: 1.5px solid var(--est-line);
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  transition: border-color .22s var(--est-ease), background .22s var(--est-ease),
    box-shadow .22s var(--est-ease), transform .22s var(--est-ease);
}

.est-choice-body .est-icon {
  width: 28px;
  height: 28px;
  color: #9aa0aa;
  transition: color .22s var(--est-ease), transform .3s var(--est-ease);
}

.est-choice:hover .est-choice-body {
  border-color: #c9ccd2;
  box-shadow: var(--est-shadow-md);
  transform: translateY(-2px);
}

.est-choice:hover .est-choice-body .est-icon {
  color: var(--orange);
}

/* Selected: orange frame + tint + corner tick, label stays readable */
.est-choice input:checked+.est-choice-body {
  border-color: var(--orange);
  background: var(--est-tint);
  box-shadow: var(--est-shadow-orange);
  transform: translateY(-2px);
}

.est-choice input:checked+.est-choice-body .est-icon {
  color: var(--orange);
  transform: scale(1.06);
}

.est-choice-body::after {
  content: '';
  position: absolute;
  top: 11px;
  right: 11px;
  width: 19px;
  height: 19px;
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
  opacity: 0;
  transform: scale(.4);
  transition: all .24s var(--est-ease);
}

.est-choice input:checked+.est-choice-body::after {
  opacity: 1;
  transform: scale(1);
}

.est-choice input:focus-visible+.est-choice-body {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* "Not sure yet" reads as the opt-out, not a service */
.est-choice-alt .est-choice-body {
  border-style: dashed;
  background: #fafaf8;
}

/* Compact variant for the repair / replacement toggle */
.est-choices-inline .est-choice-body {
  flex-direction: row;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
}

.est-choices-inline .est-choice-body::after {
  top: 50%;
  margin-top: -9.5px;
}

/* ── Service panels ── */
.est-panel {
  position: relative;
  padding: 24px;
  margin-bottom: 18px;
  background: #fcfcfb;
  border: 1px solid var(--est-line);
}

.est-panel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--est-line);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.est-panel-head .est-icon {
  width: 20px;
  height: 20px;
}

.est-field {
  margin-bottom: 22px;
}

.est-field:last-child {
  margin-bottom: 0;
}

.est-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
}

.est-value {
  padding: 4px 12px;
  background: var(--est-tint);
  border: 1px solid rgba(232, 100, 10, .28);
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Select ── */
.est-select {
  position: relative;
}

.est-select select {
  width: 100%;
  padding: 13px 42px 13px 15px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--est-line);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s var(--est-ease), box-shadow .2s var(--est-ease);
}

.est-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
  pointer-events: none;
}

.est-select select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 100, 10, .14);
}

/* ── Range slider ── */
.est-range {
  --pct: 20%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  margin: 4px 0;
  padding: 0;
  border: 0;
  outline: none;
  cursor: pointer;
  background: linear-gradient(90deg, var(--orange) 0 var(--pct), var(--est-line) var(--pct) 100%);
}

.est-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 5px solid var(--orange);
  box-shadow: 0 2px 8px rgba(15, 23, 32, .22);
  cursor: grab;
  transition: transform .18s var(--est-ease), box-shadow .18s var(--est-ease);
}

.est-range::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 14px rgba(232, 100, 10, .4);
}

.est-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.04);
}

.est-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #fff;
  border: 5px solid var(--orange);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 32, .22);
  cursor: grab;
}

.est-range:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 6px;
}

.est-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a8adb6;
}

/* ── Stepper (slab count) ── */
.est-stepper {
  display: flex;
  align-items: stretch;
  width: 176px;
  border: 1.5px solid var(--est-line);
  background: #fff;
}

.est-stepper-btn {
  width: 50px;
  flex-shrink: 0;
  background: #fff;
  border: 0;
  color: var(--navy);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background .18s var(--est-ease), color .18s var(--est-ease);
}

.est-stepper-btn:hover {
  background: var(--orange);
  color: #fff;
}

.est-stepper-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.est-stepper input {
  width: 100%;
  min-width: 0;
  padding: 13px 0;
  border: 0;
  border-left: 1.5px solid var(--est-line);
  border-right: 1.5px solid var(--est-line);
  background: #fff;
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  outline: none;
  -moz-appearance: textfield;
}

.est-stepper input::-webkit-outer-spin-button,
.est-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Checklist ── */
.est-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.est-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: #fff;
  border: 1.5px solid var(--est-line);
  cursor: pointer;
  transition: border-color .2s var(--est-ease), background .2s var(--est-ease),
    box-shadow .2s var(--est-ease);
}

.est-check:hover {
  border-color: #c9ccd2;
  box-shadow: var(--est-shadow-sm);
}

.est-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.est-check-box {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: #fff;
  border: 1.5px solid #c9ccd2;
  transition: all .2s var(--est-ease);
}

.est-check-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/13px no-repeat;
  opacity: 0;
  transform: scale(.4);
  transition: all .2s var(--est-ease);
}

.est-check input:checked~.est-check-box {
  background: var(--orange);
  border-color: var(--orange);
}

.est-check input:checked~.est-check-box::after {
  opacity: 1;
  transform: scale(1);
}

.est-check-body {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

.est-check input:checked~.est-check-body {
  color: var(--navy);
  font-weight: 600;
}

.est-check input:focus-visible~.est-check-box {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.est-check:has(input:checked) {
  border-color: var(--orange);
  background: var(--est-tint);
}

/* The DOT-violation row is the one that matters most — give it weight. */
.est-check-alert {
  grid-column: 1 / -1;
  border-left: 3px solid var(--orange);
}

.est-note {
  display: flex;
  gap: 12px;
  padding: 15px 17px;
  margin-top: 12px;
  background: linear-gradient(135deg, #fff8f1, #fff);
  border: 1px solid rgba(232, 100, 10, .26);
  border-left: 3px solid var(--orange);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text);
  animation: estStepIn .3s var(--est-ease) both;
}

.est-note strong {
  color: var(--orange);
}

.est-note .est-icon {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  color: var(--orange);
}

/* ── Contact gate ── */
.est-gate {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  margin-bottom: 26px;
  background: linear-gradient(135deg, #f2faf5, #fff);
  border: 1px solid rgba(26, 138, 74, .22);
  border-left: 3px solid var(--success);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.est-gate .est-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--success);
}

.est-gate strong {
  color: var(--navy);
}

.est-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.est-input-group {
  margin-bottom: 16px;
}

.est-input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
}

.est-input-group input,
.est-input-group select {
  width: 100%;
  padding: 13px 15px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: var(--navy);
  background: #fff;
  border: 1.5px solid var(--est-line);
  outline: none;
  transition: border-color .2s var(--est-ease), box-shadow .2s var(--est-ease);
}

.est-input-group input::placeholder {
  color: #b4b8c0;
}

.est-input-group input:focus,
.est-input-group select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 100, 10, .14);
}

.est-input-group select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
}

.est-math {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: #fafaf8;
  border: 1px solid var(--est-line);
}

.est-math label {
  margin: 0;
  flex: 1;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13.5px;
}

.est-math input {
  width: 88px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 700;
}

.est-trust {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  font-size: 12.5px;
  color: var(--est-mute);
}

.est-trust .est-icon {
  width: 17px;
  height: 17px;
  color: var(--success);
}

.est-terms {
  margin: 16px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--est-mute);
}

.est-terms a {
  color: var(--orange);
  font-weight: 600;
}

/* ── Buttons ── */
.est-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.est-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  flex: 1;
  padding: 17px 26px;
  border: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all .22s var(--est-ease);
}

.est-btn-primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange) 60%, var(--orange-dark));
  color: #fff;
  box-shadow: var(--est-shadow-orange);
}

.est-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(232, 100, 10, .42);
}

.est-btn-primary:active {
  transform: translateY(0);
}

.est-btn-primary:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.est-btn-primary .est-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2.6;
  transition: transform .22s var(--est-ease);
}

.est-btn-primary:hover .est-icon {
  transform: translateX(4px);
}

.est-btn-ghost {
  flex: 0 0 auto;
  min-width: 116px;
  background: #fff;
  border: 1.5px solid var(--est-line);
  color: var(--navy);
}

.est-btn-ghost:hover {
  border-color: var(--navy);
  background: #fafaf8;
}

.est-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* ── Error ── */
.est-error {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 17px;
  margin-top: 20px;
  background: #fdf4f3;
  border: 1px solid rgba(192, 57, 43, .28);
  border-left: 3px solid var(--red);
  color: #a5322a;
  font-size: 13px;
  line-height: 1.5;
  animation: estShake .4s var(--est-ease);
}

.est-error .est-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: var(--red);
}

@keyframes estShake {

  0%,
  100% {
    transform: translateX(0);
  }

  22% {
    transform: translateX(-6px);
  }

  55% {
    transform: translateX(5px);
  }

  80% {
    transform: translateX(-2px);
  }
}

/* ── Result ── */
.est-result-head {
  position: relative;
  padding: 40px 32px;
  margin-bottom: 26px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(140deg, #243044, var(--navy) 42%, var(--est-ink));
  color: #fff;
  animation: estStepIn .5s var(--est-ease) both;
}

.est-result-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(460px 220px at 50% 0%, rgba(232, 100, 10, .3), transparent 72%),
    repeating-linear-gradient(90deg, transparent, transparent 48px, rgba(255, 255, 255, .022) 48px, rgba(255, 255, 255, .022) 49px);
}

.est-result-head>* {
  position: relative;
}

.est-result-label {
  display: inline-block;
  padding-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--orange-light);
}

.est-result-range {
  font-size: clamp(2.1rem, 6.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.028em;
  font-variant-numeric: tabular-nums;
}

.est-result-range .est-dash {
  margin: 0 .18em;
  color: var(--orange);
  font-weight: 400;
}

.est-result-note,
.est-result-copy {
  margin: 16px auto 0;
  max-width: 470px;
  font-size: 13.5px;
  line-height: 1.68;
  color: rgba(255, 255, 255, .78);
}

.est-lines {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.est-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 19px;
  margin-bottom: 9px;
  background: #fcfcfb;
  border: 1px solid var(--est-line);
  border-left: 3px solid var(--orange);
  animation: estStepIn .45s var(--est-ease) both;
}

.est-line-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.est-line-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--est-mute);
}

.est-line-total {
  flex-shrink: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.est-cta {
  padding: 30px 26px;
  text-align: center;
  background: var(--est-tint);
  border: 1px solid rgba(232, 100, 10, .24);
}

.est-cta-title {
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 8px;
}

.est-cta-sub {
  margin: 0 auto 20px;
  max-width: 430px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--est-mute);
}

.est-cta-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, var(--orange-light), var(--orange) 60%, var(--orange-dark));
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--est-shadow-orange);
  transition: all .22s var(--est-ease);
}

.est-cta-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(232, 100, 10, .42);
}

.est-cta-hours {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--est-mute);
}

.est-restart {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: none;
  border: 1.5px solid var(--est-line);
  color: var(--est-mute);
  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s var(--est-ease);
}

.est-restart:hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ═══ Side rail ═══ */
.est-rail {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.est-rail-card {
  position: relative;
  overflow: hidden;
  padding: 26px 24px;
  background: linear-gradient(150deg, #243044, var(--navy) 45%, var(--est-ink));
  color: #fff;
  box-shadow: var(--est-shadow-lg);
}

.est-rail-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 180px at 100% 0%, rgba(232, 100, 10, .22), transparent 70%);
  pointer-events: none;
}

.est-rail-card>* {
  position: relative;
}

.est-rail-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange-light);
}

.est-summary {
  list-style: none;
  margin: 0;
  padding: 0;
}

.est-summary li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .1);
  font-size: 12.5px;
  animation: estStepIn .3s var(--est-ease) both;
}

.est-summary li:last-child {
  border-bottom: 0;
}

.est-summary .est-sum-k {
  color: rgba(255, 255, 255, .58);
}

.est-summary .est-sum-v {
  font-weight: 700;
  color: #fff;
  text-align: right;
}

.est-summary-empty {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .5);
}

/* Locked price teaser — no price exists client-side, these are just dots. */
.est-lock {
  margin-top: 18px;
  padding: 18px;
  text-align: center;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .2);
}

.est-lock-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}

.est-lock-value {
  margin: 7px 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255, 255, 255, .3);
  font-variant-numeric: tabular-nums;
}

.est-lock.is-open {
  background: rgba(232, 100, 10, .13);
  border: 1px solid rgba(232, 100, 10, .45);
}

.est-lock.is-open .est-lock-value {
  color: var(--orange-light);
  font-size: 1.32rem;
}

.est-lock-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  color: rgba(255, 255, 255, .45);
}

.est-lock-note .est-icon {
  width: 13px;
  height: 13px;
}

.est-badges {
  display: grid;
  gap: 11px;
}

.est-badge {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .82);
}

.est-badge .est-icon {
  width: 17px;
  height: 17px;
  color: var(--orange-light);
}

.est-badge strong {
  color: #fff;
}

.est-rail-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 17px;
  background: linear-gradient(135deg, var(--orange-light), var(--orange) 60%, var(--orange-dark));
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  box-shadow: var(--est-shadow-orange);
  transition: all .22s var(--est-ease);
}

.est-rail-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(232, 100, 10, .42);
}

.est-rail-hours {
  text-align: center;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--est-mute);
}

.est-rail-hours a {
  color: var(--orange);
  font-weight: 600;
}

/* ═══ Responsive — site breakpoints ═══ */
@media (max-width: 1024px) {
  .est-shell {
    grid-template-columns: 1fr;
  }

  .est-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
  }

  .est-rail-hours {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  #cost-estimator {
    padding: 60px 0 68px;
  }

  .est-card {
    padding: 30px 22px 26px;
  }

  .est-choices-3,
  .est-choices-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .est-rail {
    grid-template-columns: 1fr;
  }

  .est-steps li {
    font-size: 0;
    gap: 0;
  }

  .est-steps li::before {
    top: 15px;
  }
}

@media (max-width: 480px) {
  #cost-estimator {
    padding: 46px 0 56px;
  }

  .est-card {
    padding: 26px 16px 22px;
  }

  .est-panel {
    padding: 18px 15px;
  }

  .est-choice-body {
    min-height: 92px;
    padding: 14px 13px;
    font-size: 12.5px;
  }

  .est-checklist,
  .est-grid-2 {
    grid-template-columns: 1fr;
  }

  .est-actions {
    flex-wrap: wrap;
  }

  .est-btn-ghost {
    flex: 1 1 100%;
    order: 2;
  }

  .est-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .est-result-head {
    padding: 30px 18px;
  }

  /* Keep a 5-figure range on one line at 375px. */
  .est-result-range {
    font-size: 1.82rem;
    letter-spacing: -.035em;
  }

  .est-result-range .est-dash {
    margin: 0 .1em;
  }

  .est-cta {
    padding: 24px 16px;
  }

  .est-cta-call {
    width: 100%;
    padding: 17px 20px;
    font-size: 17px;
  }

  .est-math {
    flex-wrap: wrap;
  }

  .est-math input {
    width: 100%;
  }
}
