/* v50: session-only A/B comparison; loaded after simulator.css. */
#estimate .simulator-compare {
  --compare-navy: #0b2130;
  --compare-navy-soft: #173947;
  --compare-gold: #a98749;
  --compare-ink: #173342;
  --compare-muted: #526a73;
  --compare-surface: #ece8df;
  --compare-paper: #faf8f2;
  border-top: 1px solid #c3b894;
  background: var(--compare-surface);
  color: var(--compare-ink);
  font-size: 16px;
  line-height: 1.7;
  padding: 28px;
}

#estimate .simulator-compare-heading {
  max-width: 720px;
}

#estimate .simulator-compare-heading h3 {
  color: var(--compare-navy);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.35;
  margin: 4px 0 10px;
}

#estimate .simulator-compare-heading > p:last-child,
#estimate .simulator-compare-noscript,
#estimate .simulator-compare-save p,
#estimate .compare-replace-actions p,
#estimate .compare-difference-note,
#estimate .compare-status {
  margin: 0;
}

#estimate .simulator-compare-kicker,
#estimate .simulator-compare-step {
  color: #715b32;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .09em;
}

#estimate .simulator-compare-noscript {
  color: var(--compare-muted);
  margin-top: 14px;
}

#estimate .simulator-compare-interactive {
  display: none;
}

.compare-js #estimate .simulator-compare-noscript {
  display: none;
}

.compare-js #estimate .simulator-compare-interactive {
  display: block;
}

#estimate .simulator-compare-save {
  align-items: center;
  background: #f5f1e8;
  border: 1px solid #cdc6b7;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 22px;
  padding: 18px;
}

#estimate .simulator-compare-step {
  margin: 0 0 4px;
}

#estimate .compare-add-current,
#estimate .compare-replace-actions button,
#estimate .compare-card button,
#estimate .compare-clear {
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  min-height: 48px;
}

#estimate .compare-add-current {
  background: var(--compare-navy);
  border: 1px solid var(--compare-navy);
  color: #f6e6bd;
  flex: 0 0 auto;
  font-weight: 700;
  padding: 10px 20px;
}

#estimate .compare-add-current:hover,
#estimate .compare-add-current:focus-visible {
  background: var(--compare-navy-soft);
  border-color: var(--compare-gold);
}

#estimate .compare-replace-actions {
  background: #f1eadb;
  border: 1px solid #cfbd91;
  margin-top: 14px;
  padding: 14px 16px;
}

#estimate .compare-replace-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

#estimate .compare-replace-actions button,
#estimate .compare-card button {
  background: var(--compare-paper);
  border: 1px solid #98aaa9;
  color: #1c3b49;
  font-weight: 700;
  padding: 8px 13px;
}

#estimate .compare-replace-actions button:hover,
#estimate .compare-card button:hover {
  background: #ece6d8;
  border-color: var(--compare-gold);
}

#estimate .simulator-compare-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

#estimate .compare-card {
  background: var(--compare-paper);
  border: 1px solid #cbc3b3;
  min-width: 0;
}

#estimate .compare-card > header {
  align-items: center;
  background: #e7e0d2;
  border-bottom: 1px solid #cbc3b3;
  display: flex;
  gap: 10px;
  padding: 11px 14px;
}

#estimate .compare-card-letter {
  align-items: center;
  background: var(--compare-navy);
  border-radius: 50%;
  color: #f4dfac;
  display: inline-flex;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  height: 30px;
  justify-content: center;
  line-height: 1;
  width: 30px;
}

#estimate .compare-card h4,
#estimate .compare-difference h4 {
  color: var(--compare-navy);
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

#estimate .compare-card-body {
  padding: 16px;
}

#estimate .compare-card-empty {
  color: var(--compare-muted);
  margin: 0;
}

#estimate .compare-card dl {
  margin: 0;
}

#estimate .compare-card dl > div {
  align-items: baseline;
  border-bottom: 1px solid #d9d2c5;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 0;
}

#estimate .compare-card dt {
  color: #49616b;
  font-size: 16px;
}

#estimate .compare-card dd {
  color: #163542;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

#estimate .compare-card .compare-card-total {
  background: var(--compare-navy);
  color: #fff6df;
  margin: 16px -16px 0;
  padding: 14px 16px;
}

#estimate .compare-card-total span,
#estimate .compare-card-total strong {
  display: block;
}

#estimate .compare-card-total span {
  color: #bdced4;
  font-size: 16px;
}

#estimate .compare-card-total strong {
  color: #f0d69b;
  font-size: 27px;
  line-height: 1.3;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

#estimate .compare-card-same {
  color: #66542f;
  font-size: 16px;
  margin: 13px 0 0;
}

#estimate .compare-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

#estimate .compare-card button[data-compare-remove] {
  background: transparent;
  border-color: transparent;
  color: #536a73;
  text-decoration: underline;
}

#estimate .compare-difference {
  background: var(--compare-navy);
  border-left: 4px solid var(--compare-gold);
  color: #e9f0f1;
  margin-top: 18px;
  padding: 18px 20px;
}

#estimate .compare-difference .simulator-compare-step,
#estimate .compare-difference h4 {
  color: #efdaa4;
}

#estimate .compare-difference-value {
  color: #fff4d7;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  margin: 6px 0 3px;
}

#estimate .compare-difference-note {
  color: #c8d6da;
}

#estimate .compare-footer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  margin-top: 16px;
}

#estimate .compare-clear {
  background: transparent;
  border: 1px solid #789098;
  color: #274b58;
  padding: 8px 14px;
}

#estimate .compare-clear:hover {
  background: #e9e2d6;
  border-color: #466774;
}

#estimate .compare-status {
  color: #465e68;
  flex: 1 1 260px;
  font-size: 16px;
  min-height: 1.7em;
  text-align: right;
}

#estimate .simulator-compare button:focus-visible {
  outline: 3px solid #8a6c31;
  outline-offset: 3px;
}

@media (min-width: 1024px) {
  #estimate .simulator-compare {
    font-size: 18px;
    padding: 34px;
  }

  #estimate .simulator-compare-heading h3 {
    font-size: 32px;
  }

  #estimate .compare-card h4,
  #estimate .compare-difference h4 {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  #estimate .simulator-compare {
    padding: 22px 18px;
  }

  #estimate .simulator-compare-heading h3 {
    font-size: 25px;
  }

  #estimate .simulator-compare-save {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  #estimate .compare-add-current {
    width: 100%;
  }

  #estimate .simulator-compare-cards {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 14px;
  }

  #estimate .compare-card-body {
    padding: 14px;
  }

  #estimate .compare-card .compare-card-total {
    margin: 14px -14px 0;
    padding: 13px 14px;
  }

  #estimate .compare-difference {
    margin-top: 14px;
    padding: 16px;
  }

  #estimate .compare-difference-value {
    font-size: 28px;
  }

  #estimate .compare-footer-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #estimate .compare-clear {
    width: 100%;
  }

  #estimate .compare-status {
    flex-basis: auto;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  #estimate .simulator-compare *,
  .motion-paused #estimate .simulator-compare * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
