.dd-path-builder-page {
  background: #f3f4f6;
}

.dd-path-builder-hero {
  min-height: 420px;
  display: flex;
  align-items: center;
}

.dd-path-builder-hero .dd-hero-inner {
  max-width: 900px;
}

.dd-path-builder-hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 68px);
}

.dd-path-builder-hero .hero-copy {
  max-width: 760px;
}

.path-privacy-note {
  width: max-content;
  max-width: 100%;
  margin: 24px 0 0;
  padding: 10px 14px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 13px;
}

.path-builder-shell {
  width: min(980px, calc(100% - 80px));
  margin: -52px auto 0;
  padding: 0 0 84px;
  position: relative;
  z-index: 2;
}

.path-builder-card {
  min-height: 570px;
  padding: clamp(28px, 5vw, 52px);
  background: #ffffff;
  border: 1px solid var(--dd-border);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
}

.path-builder-heading,
.result-heading-row,
.question-actions,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.path-builder-heading h2,
.result-heading-row h2 {
  margin: 0;
  color: var(--dd-dark);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.15;
}

.browse-link,
.text-button {
  color: var(--dd-blue);
  font-weight: 750;
  text-underline-offset: 4px;
}

.text-button {
  padding: 8px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

.question-progress {
  margin: 32px 0 38px;
  color: var(--dd-muted);
  font-size: 14px;
}

.question-progress strong {
  color: var(--dd-dark);
}

.question-progress progress {
  width: 100%;
  height: 10px;
  margin-top: 10px;
  display: block;
  overflow: hidden;
  appearance: none;
  background: #e5e7eb;
  border: 0;
  border-radius: 999px;
}

.question-progress progress::-webkit-progress-bar {
  background: #e5e7eb;
  border-radius: 999px;
}

.question-progress progress::-webkit-progress-value {
  background: linear-gradient(90deg, #d4a017, #f59e0b, #f97316);
  border-radius: 999px;
}

.question-progress progress::-moz-progress-bar {
  background: linear-gradient(90deg, #d4a017, #f59e0b, #f97316);
  border-radius: 999px;
}

.path-question fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.path-question legend {
  max-width: 760px;
  padding: 0;
  color: var(--dd-dark);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.2;
}

.question-prompt {
  margin: 10px 0 24px;
  color: var(--dd-muted);
}

.path-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.path-option {
  min-height: 74px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--dd-dark);
  background: #ffffff;
  border: 2px solid #dbe1ea;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.path-option:hover {
  border-color: #93a5f2;
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.path-option.is-selected,
.path-option:has(input:checked) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(124, 58, 237, 0.09));
  border-color: var(--dd-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.path-option input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  accent-color: var(--dd-purple);
}

.question-actions {
  margin-top: 34px;
}

.path-back {
  color: var(--dd-dark);
  background: #e5e7eb;
  border: 0;
}

.path-next,
.result-start {
  margin-top: 0;
  border: 0;
}

.path-question button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.8);
  opacity: 0.48;
}

.path-builder-card > [data-questionnaire] > .text-button {
  margin-top: 24px;
}

.path-result {
  display: grid;
  gap: 28px;
}

.path-result[hidden] {
  display: none;
}

.scale-path[hidden] {
  display: none;
}

.best-match-badge {
  padding: 7px 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dd-blue), var(--dd-purple));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-summary {
  margin: -12px 0 0;
  color: var(--dd-muted);
  font-size: 18px;
}

.path-result h3 {
  margin: 0 0 8px;
  color: var(--dd-dark);
  font-size: 20px;
}

.why-panel {
  padding: 20px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(124, 58, 237, 0.08));
  border-left: 5px solid var(--dd-purple);
  border-radius: 12px;
}

.why-panel p,
.path-result section > p {
  margin-bottom: 0;
}

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

.result-facts div {
  min-width: 0;
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--dd-border);
  border-radius: 11px;
}

.result-start {
  width: max-content;
}

.scale-path {
  padding: 24px;
  background: #111827;
  border-radius: 16px;
}

.scale-path h3,
.scale-path li {
  color: #ffffff;
}

.scale-path .eyebrow {
  color: #fbbf24;
}

.scale-path ol {
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  counter-reset: scale-step;
  list-style: none;
}

.scale-path li {
  position: relative;
  counter-increment: scale-step;
  font-size: 13px;
}

.scale-path li::before {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  display: grid;
  place-items: center;
  content: counter(scale-step);
  color: #111827;
  background: #fbbf24;
  border-radius: 50%;
  font-weight: 900;
}

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

.alternative-card {
  padding: 18px;
  color: var(--dd-dark);
  background: #f9fafb;
  border: 1px solid var(--dd-border);
  border-radius: 12px;
  text-decoration: none;
}

.alternative-card:hover {
  color: var(--dd-purple);
  border-color: #a5b4fc;
}

.alternative-card strong,
.alternative-card span {
  display: block;
}

.alternative-card span {
  margin-top: 5px;
  color: var(--dd-muted);
  font-size: 13px;
}

.result-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.path-boundary-note,
.path-noscript {
  padding: 16px 18px;
  color: #4b5563;
  background: #fff7dc;
  border: 1px solid #e8c76b;
  border-radius: 12px;
}

.path-boundary-note {
  margin: 20px auto 0;
  display: flex;
  gap: 8px;
}

.path-noscript {
  margin-bottom: 24px;
}

@media (max-width: 800px) {
  .path-option-grid,
  .result-facts,
  .scale-path ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .path-builder-heading,
  .result-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .dd-path-builder-hero {
    min-height: 390px;
  }

  .path-builder-shell {
    width: min(100% - 28px, 980px);
    margin-top: -34px;
  }

  .path-builder-card {
    min-height: 520px;
    padding: 24px 18px;
    border-radius: 16px;
  }

  .path-option-grid,
  .result-facts,
  .scale-path ol,
  .alternative-grid {
    grid-template-columns: 1fr;
  }

  .path-boundary-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .question-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .question-actions .dd-button {
    width: 100%;
  }
}
