.route-builder-page {
  overflow-x: clip;
}

/* Phase 7 review: guidance must never reserve space while remaining invisible. */
.route-builder-page .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.route-builder-page .page-hero {
  min-height: clamp(440px, 58svh, 620px);
}

.route-builder-page .route-section {
  padding-block: clamp(28px, 4vw, 52px);
}

[data-rb-back][hidden],
[data-rb-next][hidden],
[data-rb-submit][hidden],
[data-rb-results-section][hidden],
[data-route-builder][hidden],
[data-rb-intro][hidden] {
  display: none !important;
}

.home-finder-interactive {
  --finder-chat-safe-inline-end: 160px;
  width: min(1220px, calc(100% - 36px));
  margin: clamp(18px, 2.4vw, 34px) auto;
  padding: 0;
}

.home-finder-interactive__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 52px);
  align-items: end;
  border: 1px solid rgba(211, 159, 56, 0.28);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  background: linear-gradient(120deg, rgba(19, 17, 11, 0.98), rgba(7, 8, 6, 0.95));
}

.home-finder-interactive__heading h2 {
  max-width: 780px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
}

.home-finder-interactive__heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(244, 239, 227, 0.74);
  line-height: 1.58;
}

.home-finder-interactive__intro-actions {
  display: grid;
  min-width: 210px;
  gap: 9px;
  margin-inline-end: var(--finder-chat-safe-inline-end);
}

.home-finder-interactive__intro-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  white-space: normal;
}

.home-finder-interactive__shell,
.home-finder-interactive__results {
  width: 100%;
}

.home-finder-interactive__results {
  padding-top: 18px;
}

.home-finder-interactive :is(.rb-actions, .rb-result-actions) {
  padding-inline-end: var(--finder-chat-safe-inline-end);
}

.home-finder-interactive .rb-phase7-actions {
  padding-inline-end: calc(18px + var(--finder-chat-safe-inline-end));
}

.home-finder-interactive .rb-phase7-actions .button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.home-finder-interactive .rb-ask > .button {
  max-width: calc(100% - var(--finder-chat-safe-inline-end));
}

.rb-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
  gap: 18px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.rb-progress,
.rb-question-card,
.rb-result-block {
  min-width: 0;
  border: 1px solid rgba(211, 159, 56, 0.2);
  border-radius: 8px;
  background: rgba(244, 239, 227, 0.04);
}

.rb-progress {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rb-progress > strong {
  display: block;
  margin-top: 8px;
  color: #fff7e8;
  font-size: 18px;
}

.rb-progress-track {
  height: 8px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 239, 227, 0.1);
}

.rb-progress-track span {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 180ms ease;
}

.rb-progress ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rb-progress li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: rgba(244, 239, 227, 0.58);
  font-size: 13px;
}

.rb-progress li::before {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(244, 239, 227, 0.14);
  border-radius: 50%;
  content: attr(data-step-number);
  font-size: 11px;
  font-weight: 850;
}

.rb-progress li.is-current,
.rb-progress li.is-complete {
  color: #fff7e8;
}

.rb-progress li.is-current::before,
.rb-progress li.is-complete::before {
  border-color: rgba(211, 159, 56, 0.7);
  background: rgba(211, 159, 56, 0.14);
  color: var(--gold-soft);
}

.rb-progress-note {
  margin: 18px 0 0;
  color: rgba(244, 239, 227, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.rb-question-card {
  display: grid;
  align-content: start;
  padding: clamp(20px, 4vw, 38px);
}

.rb-step {
  margin: 0;
  padding: 0;
  border: 0;
}

.rb-step[hidden] {
  display: none;
}

.rb-step legend {
  width: 100%;
  padding: 0;
  color: #fff7e8;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 850;
  line-height: 1.08;
}

.rb-step-intro {
  margin: 10px 0 20px;
  color: rgba(244, 239, 227, 0.7);
}

.rb-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rb-choice {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 70px;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(244, 239, 227, 0.13);
  border-radius: 8px;
  padding: 14px 14px 14px 46px;
  background: rgba(5, 4, 3, 0.28);
  color: #fff7e8;
  cursor: pointer;
}

.rb-choice:hover,
.rb-choice:focus-within {
  border-color: rgba(211, 159, 56, 0.5);
  background: rgba(211, 159, 56, 0.08);
}

.rb-choice:has(input:checked) {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(211, 159, 56, 0.35);
  background: rgba(211, 159, 56, 0.12);
}

.rb-choice input {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0;
  accent-color: var(--gold);
}

.rb-choice strong,
.rb-choice span {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
}

.rb-choice span {
  color: rgba(244, 239, 227, 0.62);
  font-size: 12px;
}

.rb-form-error {
  margin: 14px 0 0;
  color: #ffd19b;
  font-weight: 750;
}

.rb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.rb-actions .button,
.rb-result-actions .button {
  min-height: 46px;
}

.rb-results-section[hidden] {
  display: none;
}

.rb-results {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.rb-result-block {
  grid-column: span 12;
  padding: clamp(18px, 3vw, 28px);
}

.rb-result-block h2,
.rb-result-block h3,
.rb-result-block p {
  margin-top: 0;
}

.rb-result-block h2 {
  max-width: 760px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.04;
}

.rb-result-summary {
  background: linear-gradient(135deg, rgba(211, 159, 56, 0.13), rgba(244, 239, 227, 0.035));
}

.rb-answer-chips,
.rb-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rb-answer-chips span,
.rb-result-type {
  border: 1px solid rgba(211, 159, 56, 0.28);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 800;
}

.rb-primary,
.rb-why {
  grid-column: span 6;
}

.rb-result-lead {
  max-width: 760px;
  color: rgba(244, 239, 227, 0.78);
  font-size: 18px;
  line-height: 1.55;
}

.rb-guidance-card {
  grid-column: span 4;
}

.rb-stop-card {
  border-color: rgba(226, 164, 77, 0.46);
  background: rgba(130, 69, 18, 0.12);
}

.rb-guidance-card > p,
.rb-stop-card li,
.rb-alternative > p,
.rb-ask > p,
.rb-disclaimer > p {
  color: rgba(244, 239, 227, 0.76);
  line-height: 1.55;
}

.rb-inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
}

.rb-inline-links a {
  color: var(--gold-soft);
  font-weight: 800;
}

.rb-missing-information,
.rb-basket-notice {
  border-left: 3px solid var(--gold);
  padding-left: 12px;
  color: rgba(244, 239, 227, 0.75);
}

.rb-product-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.rb-product-card img {
  width: 150px;
  height: 125px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(5, 4, 3, 0.35);
}

.rb-product-card-body {
  min-width: 0;
}

.rb-product-card-body h3 {
  overflow-wrap: normal;
  word-break: normal;
}

.rb-product-card-body p,
.rb-why li,
.rb-guide p {
  color: rgba(244, 239, 227, 0.72);
  line-height: 1.5;
}

.rb-stock-state {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 850;
}

.rb-stock-state.is-available {
  color: #bfe5ad;
}

.rb-stock-state.is-unavailable {
  color: #ffd19b;
}

.rb-product-card[data-availability="unavailable"] {
  border-left: 3px solid #d79250;
  padding-left: 14px;
}

.rb-pairing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.rb-pairing-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  border: 1px solid rgba(244, 239, 227, 0.1);
  border-radius: 8px;
  padding: 12px;
  background: rgba(5, 4, 3, 0.22);
}

.rb-pairing-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  object-fit: cover;
}

.rb-pairing-card strong {
  overflow-wrap: normal;
  word-break: normal;
}

.rb-pairing-card a,
.rb-guide a {
  color: var(--gold-soft);
  font-weight: 800;
}

.rb-pairing-choice {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #fff7e8;
  font-size: 13px;
  font-weight: 800;
}

.rb-pairing-choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.rb-route-review {
  border-color: rgba(211, 159, 56, 0.5);
}

.rb-route-review-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rb-route-review-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(244, 239, 227, 0.12);
  border-radius: 7px;
  padding: 12px;
  background: rgba(5, 4, 3, 0.24);
}

.rb-route-review-item label {
  display: grid;
  gap: 5px;
  color: rgba(244, 239, 227, 0.68);
  font-size: 12px;
}

.rb-route-review-item select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(211, 159, 56, 0.35);
  border-radius: 5px;
  padding: 8px;
  background: #11100d;
  color: #fff7e8;
}

.rb-action-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--gold-soft);
  font-weight: 750;
}

.rb-action-status[data-state="error"] {
  color: #ffd19b;
}

.rb-action-status[data-state="success"] {
  color: #bfe5ad;
}

.rb-disclaimer {
  background: rgba(244, 239, 227, 0.025);
}

.rb-invalid {
  border-color: rgba(226, 164, 77, 0.55);
}

.rb-noscript {
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(211, 159, 56, 0.35);
  border-radius: 8px;
  padding: 20px;
  background: rgba(244, 239, 227, 0.04);
}

.rb-learn-first {
  border-color: rgba(211, 159, 56, 0.42);
}

.rb-phase7-summary,
.rb-phase7-why,
.rb-phase7-purchase,
.rb-phase7-learn-first,
.rb-phase7-education,
.rb-phase7-actions,
.rb-phase7-trust,
.rb-phase7-support {
  grid-column: span 12;
}

.rb-phase7-summary { padding-bottom: clamp(18px, 2.5vw, 24px); }
.rb-phase7-why { padding-block: 18px; }
.rb-phase7-why ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.rb-phase7-why li,
.rb-phase7-trust span {
  border-left: 2px solid rgba(211, 159, 56, 0.55);
  padding-left: 12px;
  color: rgba(244, 239, 227, 0.76);
  line-height: 1.5;
}
.rb-phase7-support {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.rb-phase7-support .rb-guidance-card { grid-column: auto; padding: 18px; }
.rb-phase7-support .rb-guidance-card h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.15; }
.rb-phase7-purchase h2,
.rb-phase7-learn-first h2,
.rb-phase7-education h2 { font-size: clamp(1.6rem, 2.4vw, 2.25rem); line-height: 1.08; }
.rb-phase7-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(244, 239, 227, 0.1);
  border-radius: 8px;
  background: rgba(5, 4, 3, 0.24);
  font-size: 13px;
  font-weight: 800;
}
.rb-phase7-education {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: center;
}
.rb-phase7-education-links { display: grid; gap: 8px; }
.rb-phase7-education-links a {
  min-height: 42px;
  border: 1px solid rgba(211, 159, 56, 0.28);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--gold-soft);
  font-weight: 800;
  text-decoration: none;
}
.rb-phase7-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.rb-result-actions {
  margin-top: 18px;
}

@media (max-width: 820px) {
  .route-builder-page .page-hero {
    min-height: 430px;
  }

  .rb-shell {
    grid-template-columns: 1fr;
  }

  .rb-progress {
    position: static;
  }

  .rb-progress ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rb-primary,
  .rb-why,
  .rb-guidance-card {
    grid-column: span 12;
  }

  .rb-pairing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rb-phase7-why ul,
  .rb-phase7-support,
  .rb-phase7-trust,
  .rb-phase7-education {
    grid-template-columns: 1fr;
  }

  .home-finder-interactive__heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-finder-interactive__intro-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: calc(100% - var(--finder-chat-safe-inline-end));
    min-width: 0;
    margin-inline-end: 0;
  }
}

@media (max-width: 520px) {
  .home-finder-interactive {
    width: calc(100% - 24px);
  }

  .home-finder-interactive__heading {
    padding: 20px 16px;
  }

  .home-finder-interactive__intro-actions {
    grid-template-columns: 1fr;
  }

  .route-builder-page .route-section {
    overflow: clip;
  }

  .route-builder-page .site-footer-inner {
    width: calc(100% - 2px);
  }

  .rb-shell,
  .rb-results {
    width: 100%;
    max-width: 100%;
  }

  .rb-progress {
    padding: 16px;
  }

  .rb-progress ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rb-question-card {
    padding: 18px;
  }

  .rb-choice-grid {
    grid-template-columns: 1fr;
  }

  .rb-actions .button,
  .rb-result-actions .button {
    flex: 1 1 140px;
  }

  .rb-product-card {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: start;
  }

  .rb-product-card img {
    width: 92px;
    height: 92px;
  }

  .rb-pairing-card {
    padding: 9px;
  }

  .rb-pairing-card strong {
    font-size: 13px;
  }

  .rb-route-review-item {
    grid-template-columns: 1fr;
  }
}
