.calc-page {
  min-height: 100vh;
  padding: 58px 0 88px;
  background:
    radial-gradient(circle at 12% 4%, rgba(164, 79, 52, .09), transparent 26rem),
    linear-gradient(180deg, #f7f5f0 0%, #efeae1 100%);
}

.calc-shell {
  --calc-error: #9b2226;
  --calc-error-bg: #fff0ef;
  --calc-done: var(--brand-green);
  --calc-inactive: #d7d4cc;
  max-width: 980px;
  margin: 0 auto;
}

.calc-intro {
  max-width: 780px;
  margin: 0 auto 30px;
  padding: 0 22px;
  text-align: center;
}

.calc-intro .eyebrow {
  justify-content: center;
}

.calc-intro h1 {
  margin: 2px 0 12px;
}

.calc-intro .lead {
  max-width: 660px;
  margin: 0 auto;
}

.calculator-card {
  overflow: hidden;
  margin: 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 70px rgba(23, 33, 31, .12);
}

.calc-header-text {
  position: relative;
  overflow: hidden;
  padding: 28px 32px 25px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: var(--brand-dark);
  color: var(--white);
  text-align: center;
}

.calc-header-text::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 44px solid rgba(209, 164, 93, .09);
  border-radius: 50%;
  content: '';
}

.calc-header-text strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.5vw, 1.55rem);
  line-height: 1.2;
}

.calc-header-text p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-on-dark-muted);
  font-size: .9rem;
}

.progress-wrap {
  position: sticky;
  top: 84px;
  z-index: 120;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 250, 247, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.progress-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.ps-item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.ps-item:not(:last-child)::after {
  position: absolute;
  top: 14px;
  right: calc(-50% + 16px);
  left: calc(50% + 16px);
  height: 2px;
  background: var(--calc-inactive);
  content: '';
  transition: background .25s ease;
}

.ps-item.done:not(:last-child)::after {
  background: var(--calc-done);
}

.ps-circle {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid var(--calc-inactive);
  border-radius: 50%;
  background: #fbfaf7;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  transition: .2s ease;
}

.ps-item.active .ps-circle {
  border-color: var(--brand-rust);
  background: var(--brand-rust);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(164, 79, 52, .10);
}

.ps-item.done .ps-circle {
  border-color: var(--calc-done);
  background: var(--calc-done);
  color: var(--white);
}

.ps-item.done .ps-circle::after {
  content: '\2713';
}

.ps-item.done .ps-num {
  display: none;
}

.ps-label {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ps-item.active .ps-label {
  color: var(--brand-rust);
}

.calc-body {
  max-width: 850px;
  margin: 0 auto;
  padding: 38px 34px 42px;
}

.step-panel {
  display: none;
  animation: calc-panel-in .22s ease;
}

.step-panel.active {
  display: block;
}

@keyframes calc-panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-title {
  margin: 0 0 7px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

.step-sub {
  max-width: 680px;
  margin: 0 0 25px;
  color: var(--text-secondary);
  font-size: .96rem;
  line-height: 1.55;
}

.calc-shell .card {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fbfaf7;
  box-shadow: none;
}

.card-label {
  margin-bottom: 16px;
  color: var(--brand-rust);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.field-group {
  margin-bottom: 18px;
}

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

.field-group label,
.sub-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calc-shell input[type='text'],
.calc-shell input[type='number'],
.calc-shell input[type='email'],
.calc-shell input[type='tel'] {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: 9px;
  outline: none;
  background: var(--white);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
}

.calc-shell input:focus {
  border-color: var(--brand-rust);
  box-shadow: 0 0 0 4px rgba(164, 79, 52, .10);
}

.field-hint {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: .75rem;
}

.field-error {
  display: none;
  margin-top: 5px;
  color: var(--calc-error);
  font-size: .78rem;
  font-weight: 700;
}

.field-error.show {
  display: block;
}

.sqft-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid #ddcfc4;
  border-radius: 9px;
  background: var(--brand-rust-bg);
}

.sqft-display .label {
  color: var(--text-secondary);
  font-size: .88rem;
  font-weight: 600;
}

.sqft-display .value {
  color: var(--brand-rust);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  white-space: nowrap;
}

.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.tier-card {
  position: relative;
  min-height: 154px;
  padding: 19px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tier-card:hover {
  border-color: var(--brand-rust);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tier-card.selected {
  border-color: var(--brand-rust);
  background: var(--brand-rust-bg);
  box-shadow: 0 0 0 2px rgba(164, 79, 52, .09);
}

.tier-card.selected::after {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-rust);
  color: var(--white);
  content: '\2713';
  font-size: .72rem;
  font-weight: 800;
}

.tier-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.badge-value {
  background: #e8f2ed;
  color: #285b4b;
}

.badge-better {
  background: #f3e9de;
  color: #8a432e;
}

.badge-best {
  background: #e7eeea;
  color: #203d34;
}

.badge-luxury {
  background: var(--brand-dark);
  color: var(--brand-gold);
}

.tier-name {
  max-width: calc(100% - 24px);
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.tier-desc {
  color: var(--text-secondary);
  font-size: .82rem;
  line-height: 1.5;
}

.tier-skip {
  margin-top: 13px;
  padding: 15px;
  border: 1.5px dashed var(--border-dark);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 700;
  text-align: center;
  transition: .18s ease;
}

.tier-skip:hover,
.tier-skip.selected {
  border-color: var(--brand-rust);
  background: var(--brand-rust-bg);
  color: var(--brand-rust);
}

.toggle-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  transition: .18s ease;
}

.toggle-option:last-child {
  margin-bottom: 0;
}

.toggle-option:hover,
.toggle-option.active {
  border-color: var(--brand-rust);
  background: var(--brand-rust-bg);
}

.toggle-option input[type='checkbox'] {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--brand-rust);
  cursor: pointer;
}

.tog-label {
  color: var(--text-primary);
  font-size: .92rem;
  font-weight: 800;
}

.tog-sub {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: .8rem;
  line-height: 1.45;
}

.sub-field {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sub-field.show {
  display: block;
}

.consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid #ddcfc4;
  border-radius: 9px;
  background: #fbf5ec;
}

.consent-wrap input[type='checkbox'] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-rust);
}

.consent-wrap label {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: .82rem;
  line-height: 1.5;
}

.consent-wrap a {
  color: var(--brand-rust);
  font-weight: 700;
  text-underline-offset: 2px;
}

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.btn-back,
.btn-next,
.restart-btn,
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: .18s ease;
}

.btn-back,
.restart-btn {
  border: 1.5px solid var(--border-dark);
  background: var(--white);
  color: var(--text-secondary);
}

.btn-back:hover,
.restart-btn:hover {
  border-color: var(--brand-rust);
  background: var(--brand-rust-bg);
  color: var(--brand-rust);
}

.btn-next,
.cta-btn {
  flex: 1;
  border: 1.5px solid var(--brand-rust);
  background: var(--brand-rust);
  color: var(--white);
}

.btn-next:hover,
.cta-btn:hover {
  border-color: var(--brand-rust-light);
  background: var(--brand-rust-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-next:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.result-panel {
  display: none;
}

.result-panel.active {
  display: block;
}

.estimate-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 34px 24px 31px;
  border-radius: var(--radius);
  background: var(--brand-dark);
  text-align: center;
}

.estimate-banner::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5px;
  background: var(--brand-rust);
  content: '';
}

.est-label {
  margin-bottom: 9px;
  color: var(--brand-gold);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.est-range {
  margin-bottom: 8px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
}

.est-note {
  color: var(--text-on-dark-muted);
  font-size: .78rem;
}

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

.summary-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}

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

.sum-key {
  color: var(--text-secondary);
  font-weight: 600;
}

.sum-val {
  color: var(--text-primary);
  font-weight: 800;
  text-align: right;
}

.disclaimer-box {
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid #e0cfad;
  border-left: 4px solid var(--brand-gold);
  border-radius: 9px;
  background: #fbf5e8;
  color: #674f2a;
  font-size: .8rem;
  line-height: 1.6;
}

.cta-btn,
.restart-btn {
  width: 100%;
}

.cta-btn {
  margin-bottom: 10px;
}

.val-alert {
  display: none;
  margin-bottom: 13px;
  padding: 11px 14px;
  border: 1px solid #efb4b0;
  border-radius: 9px;
  background: var(--calc-error-bg);
  color: var(--calc-error);
  font-size: .82rem;
  font-weight: 700;
}

.val-alert.show,
.submit-status.show {
  display: block;
}

.submit-status {
  display: none;
  padding: 10px 0 0;
  color: var(--text-muted);
  font-size: .84rem;
  text-align: center;
}

.calc-reassure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 936px;
  margin: 16px 22px 0;
}

.calc-reassure .ra {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  text-align: left;
}

.calc-reassure .ra svg {
  margin-bottom: 10px;
  color: var(--brand-rust);
}

.calc-reassure .ra strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-primary);
  font-size: .88rem;
}

.calc-reassure .ra span {
  color: var(--text-muted);
  font-size: .78rem;
}

.calc-privacy {
  margin: 18px 22px 0;
  color: var(--text-muted);
  font-size: .76rem;
  text-align: center;
}

.calc-privacy a {
  color: var(--brand-rust);
}

@media (max-width: 1080px) {
  .progress-wrap { top: 70px; }
}

@media (max-width: 700px) {
  .calc-page { padding: 34px 0 112px; }
  .calc-intro { margin-bottom: 23px; }
  .calculator-card { margin: 0 14px; border-radius: 14px; }
  .calc-header-text { padding: 23px 20px 21px; }
  .progress-wrap { padding: 13px 10px 11px; }
  .calc-body { padding: 28px 20px 32px; }
  .calc-shell .card { padding: 18px; }
  .tier-grid { grid-template-columns: 1fr; }
  .tier-card { min-height: 0; }
  .calc-reassure { grid-template-columns: 1fr; margin: 14px 14px 0; }
  .calc-reassure .ra { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: center; }
  .calc-reassure .ra svg { grid-row: 1 / span 2; margin: 0; }
  .calc-privacy { margin-right: 20px; margin-left: 20px; }
}

@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr; }
  .nav-row { flex-direction: column-reverse; }
  .btn-back,
  .btn-next { width: 100%; }
  .summary-list li { display: grid; gap: 2px; }
  .sum-val { text-align: left; }
  .sqft-display { align-items: flex-start; }
}

@media (max-width: 380px) {
  .ps-label { font-size: .59rem; }
  .ps-circle { width: 27px; height: 27px; }
  .ps-item:not(:last-child)::after { top: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .step-panel { animation: none; }
  .tier-card,
  .btn-next,
  .cta-btn { transition: none; }
}
