html:has(.offer-dialog[open]) { overflow: hidden; }

.hero-copy .hero-offer {
  width: fit-content;
  min-height: 46px;
  margin-top: 18px;
  border-radius: 50px;
  background: var(--accent);
  color: var(--background);
}
.hero-copy .hero-offer:hover { background: var(--primary); }

.offer-dialog {
  width: min(45rem, calc(100% - 28px));
  max-height: calc(100% - 28px);
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #f1f6fd;
  box-shadow: 0 24px 80px rgb(0 0 0 / 0.314);
  color: var(--text-primary);
  overscroll-behavior: contain;
}
.offer-dialog::backdrop { background: rgb(0 0 0 / 0.71); }
.offer-head { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.offer-dialog > .offer-head {
  align-items: center;
  padding: 12px clamp(16px, 4vw, 28px);
  background: var(--background);
  border-bottom: 1px solid #d7e2f1;
}
.offer-head h2 { padding-top: 4px; font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.15; }
.offer-dialog > .offer-head h2 { padding: 0; font-size: clamp(1.15rem, 4.5vw, 1.45rem); }
.offer-close {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  color: var(--primary);
  cursor: pointer;
}
.offer-close { flex: 0 0 44px; width: 44px; padding: 0; font-size: 1.65rem; line-height: 1; }
.offer-close:hover { background: var(--surface); }

.valuation-flow {
  --valuation-border: #d7e2f1;
  --valuation-selection: #e8f2ff;
  max-width: 45rem;
  margin: 18px auto 0;
  padding: clamp(14px, 4vw, 30px);
  border: 1px solid var(--valuation-border);
  border-radius: 24px;
  background: #f1f6fd;
}
.offer-dialog .valuation-flow { margin: 0; border: 0; border-radius: 0; }
.valuation-progress { margin-bottom: clamp(16px, 3vw, 24px); text-align: center; }
.valuation-progress > p { margin: 0 0 8px; font-size: .87rem; font-weight: 700; color: var(--text-secondary); }
.valuation-progress-bar {
  display: block;
  width: 100%;
  height: 5px;
  appearance: none;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  background: var(--valuation-border);
}
.valuation-progress-bar::-webkit-progress-bar { background: var(--valuation-border); }
.valuation-progress-bar::-webkit-progress-value { background: var(--accent); }
.valuation-progress-bar::-moz-progress-bar { background: var(--accent); }
.valuation-heading { display: grid; justify-items: center; gap: 4px; margin-bottom: 14px; text-align: center; }
.valuation-question-title { margin: 0; font-size: clamp(1.35rem, 5vw, 2.05rem); text-wrap: balance; }
.valuation-current-model { margin: 0; color: var(--text-secondary); font-size: .9rem; overflow-wrap: anywhere; }
.valuation-caption { margin-top: 12px; }
.valuation-search { margin-bottom: 4px; }
.valuation-model-status { margin: 7px 0; color: var(--text-secondary); }
.valuation-model-status:empty { display: none; }
.valuation-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 8px;
}
.valuation-models { max-height: 16.5rem; overflow-y: auto; padding: 5px; margin: 4px -5px 0; }
.valuation-choice, .valuation-back, .valuation-edit, .valuation-fault {
  min-height: 44px;
  padding: 9px 12px;
  color: var(--text-primary);
  background: var(--background);
  border: 1px solid var(--valuation-border);
  border-radius: 13px;
  text-align: start;
}
.valuation-choice, .valuation-back, .valuation-edit, .valuation-fault, .valuation-text-button { cursor: pointer; }
.valuation-choice, .valuation-fault { min-height: 57px; }
.valuation-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.valuation-choice::after {
  content: "";
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--valuation-selection);
}
.valuation-choice::before {
  content: "";
  position: absolute;
  right: 22px;
  top: calc(50% - 3px);
  width: 5px;
  height: 5px;
  z-index: 1;
  border-block-start: 2px solid var(--accent);
  border-inline-end: 2px solid var(--accent);
  transform: rotate(45deg);
  pointer-events: none;
}
.valuation-choice[aria-pressed=true]::before {
  right: 21px;
  top: calc(50% - 6px);
  width: 4px;
  height: 8px;
  border-width: 0 2px 2px 0;
  border-style: solid;
  border-color: var(--accent);
}
.valuation-choices:not(.valuation-models, .valuation-compact-choices) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.valuation-choice:hover, .valuation-back:hover, .valuation-edit:hover, .valuation-fault:hover { border-color: var(--accent); }
.valuation-choice[aria-pressed=true], .valuation-fault:has(:checked) { border-color: var(--accent); background: var(--valuation-selection); }
.valuation-text-button {
  min-height: 38px;
  padding: 0;
  background: transparent;
  color: var(--accent);
  border: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.valuation-faults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0; margin: 0; border: 0; min-width: 0; }
.valuation-faults legend { margin-inline: auto; padding: 0 0 10px; color: var(--text-secondary); text-align: center; }
.valuation-fault { display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.valuation-fault input[type=checkbox] { width: 19px; height: 19px; min-height: 0; flex: 0 0 19px; margin: 0; accent-color: var(--accent); }
.valuation-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.valuation-controls:empty { display: none; }
.valuation-controls .button { margin: 0; }
.valuation-controls :disabled { opacity: .58; cursor: default; }
.valuation-flow .promises { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--valuation-border); color: var(--text-secondary); }
.valuation-question > .valuation-text-button { display: block; margin: 5px auto 0; text-align: center; }

.valuation-quote {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px 16px;
  padding: clamp(16px, 3vw, 24px);
  background: #edf8f1;
  color: #124a35;
  border-radius: 14px;
}
.valuation-quote-manual { background: var(--valuation-selection); color: var(--text-primary); }
.valuation-quote h3 { font-size: clamp(1.2rem, 4vw, 1.65rem); }
.valuation-quote > :is(h3, p, strong) { grid-column: 1; }
.valuation-quote > p { margin: 0; }
.valuation-quote > .button { grid-area: 1 / 2 / span 3; align-self: center; margin: 0; text-align: center; }
.valuation-amount { display: block; font-size: clamp(2.6rem, 9vw, 3.6rem); line-height: 1.05; letter-spacing: -.045em; }
.valuation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 12px 0 0;
}
.valuation-summary-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-content: center; padding: 6px 0; border-bottom: 1px solid var(--valuation-border); }
.valuation-summary-item dt { grid-column: 1; color: var(--text-secondary); font-size: .87rem; line-height: 1.3; }
.valuation-summary-item dd { grid-column: 1; margin: 2px 0 0; font-weight: 730; line-height: 1.3; overflow-wrap: anywhere; }
.valuation-edit {
  grid-area: 1 / 2 / span 2;
  align-self: center;
  min-height: 44px;
  padding: 5px 8px;
  font-size: .83rem;
  color: var(--accent);
  border: 0;
  background: transparent;
  text-decoration: underline;
}
.valuation-help {
  width: min(35rem, calc(100% - 26px));
  max-height: calc(100dvh - 26px);
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background);
  color: var(--text-primary);
  overscroll-behavior: contain;
}
.valuation-help::backdrop { background: rgb(0 0 0 / .42); }
html:has(.valuation-help[open]) { overflow: hidden; }
.valuation-help dl { margin: 12px 0 0; }
.valuation-help dt { margin-top: 10px; font-weight: 750; }
.valuation-help dd { margin: 2px 0 0; color: var(--text-secondary); }
@media (max-width: 540px) {
  .valuation-choices:not(.valuation-models, .valuation-compact-choices),
  .valuation-faults, .valuation-summary, .valuation-quote { grid-template-columns: 1fr; }
  .valuation-choice, .valuation-fault { min-height: 45px; }
  .valuation-quote > .button { grid-area: auto; justify-self: start; margin-top: 6px; }
}
@media (max-width: 360px) {
  .valuation-models { grid-template-columns: 1fr; }
}
