:root {
  --bg: #edf3f7;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --surface: #f8fbfd;
  --ink: #122430;
  --muted: #5f7584;
  --line: rgba(18, 36, 48, 0.12);
  --accent: #1d6f7f;
  --accent-strong: #0f5664;
  --positive: #1f6a51;
  --negative: #8b3e32;
  --shadow: 0 32px 90px rgba(10, 29, 38, 0.1);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 980px;
  --shell-outer: calc(var(--max-width) + 48px);
  --rank-panel-open: 250px;
  --rank-panel-gap: 0px;
  --rank-panel-overlap: 18px;
  --rank-motion: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(91, 170, 186, 0.2), transparent 36%),
    radial-gradient(circle at 80% 20%, rgba(226, 237, 242, 0.9), transparent 28%),
    linear-gradient(180deg, #f8fcfe 0%, var(--bg) 54%, #e7eef3 100%);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 88%);
  pointer-events: none;
}

button {
  font: inherit;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 56px;
}

body.explore-mode .page-shell {
  max-width: min(1560px, 100%);
}

.app-chrome {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0;
  margin-bottom: 0;
}

.app-chrome__brand,
.app-chrome__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-chrome__brand p {
  margin: 0;
}

.brand-mark,
.section-kicker,
.question-card__category,
.match-card__score-label,
.meta-block__label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.brand-mark {
  font-size: 0.9rem;
}

.section-kicker--spaced {
  margin-top: 22px;
}

.info-pane h2,
.info-pane h3,
.start-view h1,
.start-view__intro,
.quiz-panel h2,
.question-card h3,
.results-view h3,
.compare-view h3,
.explore-view h3,
.match-card h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0;
}

.info-pane__lede,
.start-view__lede,
.support-copy,
.meta-block p,
.disclaimer,
.question-card__support,
.compare-view__lede,
.results-summary p,
.results-footnotes p,
.match-card p,
.match-card li,
.signal-list li {
  color: var(--muted);
  line-height: 1.6;
}

.meta-block {
  padding: 20px 22px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: var(--radius-md);
  background: rgba(250, 252, 253, 0.72);
  backdrop-filter: blur(16px);
}

.meta-block p {
  margin: 10px 0 0;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.info-modal.hidden {
  display: none !important;
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 22, 30, 0.34);
  backdrop-filter: blur(12px);
}

.info-pane {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: fadeUp 240ms ease;
}

.info-pane--modal {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: min(88vh, 920px);
  overflow: auto;
  margin: 0;
}

.info-pane__topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.info-pane__close {
  flex-shrink: 0;
}

.info-pane__intro {
  max-width: 760px;
}

.info-pane__intro--compact {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.info-pane h2 {
  margin-top: 10px;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 0.96;
  max-width: 12ch;
}

.info-pane h3 {
  margin-top: 8px;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
}

.info-pane__lede {
  max-width: 58ch;
  margin: 16px 0 0;
  font-size: 1.02rem;
}

.info-pane__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.info-pane__note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.info-pane__credit {
  margin: 8px 0 0;
  color: rgba(95, 117, 132, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: right;
}

.settings-pane {
  width: min(100%, 640px);
}

.share-pane {
  width: min(100%, 860px);
}

.compare-pane {
  width: min(100%, 1120px);
}

.settings-pane__lede {
  max-width: 46ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.share-pane__lede {
  max-width: 56ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compare-pane__lede {
  max-width: 66ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.settings-options {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.settings-section {
  margin-top: 24px;
}

.settings-section__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.settings-option {
  display: block;
  cursor: pointer;
}

.settings-option__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-option__card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: var(--radius-md);
  background: rgba(250, 252, 253, 0.72);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.settings-option:hover .settings-option__card,
.settings-option:focus-within .settings-option__card {
  border-color: rgba(29, 111, 127, 0.14);
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
}

.settings-option__input:checked + .settings-option__card {
  border-color: rgba(29, 111, 127, 0.2);
  background: linear-gradient(180deg, rgba(29, 111, 127, 0.08), rgba(255, 255, 255, 0.94));
  box-shadow: 0 16px 34px rgba(10, 29, 38, 0.08);
}

.settings-option__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.settings-option__text,
.settings-pane__note {
  color: var(--muted);
  line-height: 1.6;
}

.settings-pane__note {
  margin: 16px 0 0;
  font-size: 0.94rem;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.share-block {
  display: grid;
  gap: 12px;
  padding: 20px 22px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: var(--radius-md);
  background: rgba(250, 252, 253, 0.72);
}

.share-block__text,
.share-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.share-seed-field {
  width: 100%;
  min-height: 152px;
  padding: 14px 16px;
  resize: vertical;
  border: 1px solid rgba(18, 36, 48, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: 600 0.95rem/1.55 "Manrope", "Aptos", "Segoe UI", sans-serif;
}

.share-seed-field:focus-visible {
  outline: 2px solid rgba(29, 111, 127, 0.18);
  outline-offset: 2px;
  border-color: rgba(29, 111, 127, 0.2);
}

.share-block__actions,
.results-view__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-status--success {
  color: var(--positive);
}

.share-status--error {
  color: var(--negative);
}

.compare-view,
.explore-view {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 26px;
  background: var(--panel-strong);
  animation: fadeUp 240ms ease;
}

.compare-view__head,
.explore-view__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.compare-view__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.compare-view h3,
.explore-view__head h3 {
  margin-top: 6px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.02;
  max-width: min(100%, 24ch);
  text-wrap: pretty;
}

.compare-view__lede {
  max-width: min(100%, 74ch);
  margin: 12px 0 0;
  font-size: 1rem;
}

.compare-pane__body {
  display: grid;
  grid-template-columns: minmax(260px, 0.54fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-top: 22px;
}

.compare-about-pane h2 {
  max-width: 16ch;
}

.compare-about-grid .meta-block,
.compare-about-grid .info-panel__block {
  background: rgba(255, 255, 255, 0.66);
}

.compare-controls,
.compare-output {
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 24px;
  background: rgba(250, 252, 253, 0.78);
}

.compare-controls {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
}

.compare-output {
  padding: 18px;
  min-width: 0;
}

.compare-select-label,
.compare-slider {
  display: grid;
  gap: 10px;
}

.compare-select,
.compare-slider input[type="range"] {
  width: 100%;
}

.compare-select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(18, 36, 48, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font: 800 0.95rem/1.2 "Manrope", "Aptos", "Segoe UI", sans-serif;
}

.compare-input-grid {
  display: grid;
  gap: 15px;
}

.compare-slider__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.compare-slider output {
  min-width: 42px;
  color: var(--ink);
  text-align: right;
  font-weight: 900;
}

.compare-slider input[type="range"] {
  accent-color: var(--accent-strong);
}

.compare-slider__range {
  position: relative;
  display: block;
  min-width: 0;
  padding-top: 4px;
}

.compare-slider__range--with-marker {
  padding-top: 30px;
}

.compare-slider__range input[type="range"] {
  position: relative;
  z-index: 1;
  display: block;
}

.compare-slider__needed90 {
  position: absolute;
  top: 0;
  left: var(--x, 0%);
  z-index: 2;
  display: grid;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.compare-slider__needed90::after {
  content: "";
  width: 2px;
  height: 22px;
  border-radius: 999px;
  background: rgba(184, 125, 54, 0.72);
  box-shadow: 0 0 0 4px rgba(184, 125, 54, 0.12);
}

.compare-slider__needed90-label {
  margin-bottom: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(184, 125, 54, 0.28);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.96);
  color: #7a4b1d;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(18, 36, 48, 0.08);
}

.compare-slider__needed90--passing::after {
  display: none;
}

.compare-slider__needed90--passing {
  top: 7px;
  left: 0;
  justify-items: start;
  transform: none;
}

.compare-slider__needed90--passing .compare-slider__needed90-label {
  max-width: none;
  margin-bottom: 0;
  padding: 2px 7px;
  border-color: rgba(26, 114, 94, 0.28);
  background: rgba(245, 252, 249, 0.96);
  color: #0f5d4c;
  font-size: 0.64rem;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.compare-slider__needed90.is-hidden {
  display: none;
}

.compare-check-fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px 12px 12px;
  border: 1px solid rgba(29, 111, 127, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
}

.compare-check-fieldset legend {
  padding: 0 8px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compare-check-grid {
  display: grid;
  gap: 10px;
}

.compare-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 800;
}

.compare-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-strong);
}

.compare-check__source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  color: var(--accent-strong);
  font-size: 0.72em;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-0.18em);
}

.compare-check__source-link:hover,
.compare-check__source-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.compare-summary-card {
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(112, 163, 176, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(29, 111, 127, 0.09), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(29, 111, 127, 0.13);
}

.compare-radar-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-items: start;
  min-height: 0;
  padding: clamp(12px, 1.6vw, 20px);
  border: 1px solid rgba(29, 111, 127, 0.13);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(112, 163, 176, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(29, 111, 127, 0.08), rgba(255, 255, 255, 0.94));
}

.compare-radar-card__copy h4 {
  margin: 0;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.2rem, 1.9vw, 1.65rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: none;
  text-align: center;
}

.compare-radar {
  margin: 0;
  min-width: 0;
}

.compare-radar svg {
  display: block;
  width: min(100%, 560px);
  margin: 0 auto;
  overflow: visible;
}

.compare-radar__grid {
  fill: none;
  stroke: rgba(18, 36, 48, 0.08);
  stroke-width: 1;
}

.compare-radar__axis {
  stroke: rgba(18, 36, 48, 0.12);
  stroke-width: 1;
}

.compare-radar__label {
  fill: var(--muted);
  font: 700 0.58rem/1 "Manrope", "Aptos", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.compare-radar__matched {
  fill: rgba(31, 106, 81, 0.06);
  stroke: rgba(31, 106, 81, 0.42);
  stroke-dasharray: 5 5;
  stroke-width: 2;
}

.compare-radar__matched-ring {
  fill: none;
  stroke: rgba(31, 106, 81, 0.26);
  stroke-width: 1;
}

.compare-radar__user {
  fill: rgba(29, 111, 127, 0.26);
  stroke: var(--accent-strong);
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.compare-summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2.1rem, 5vw, 4.1rem);
  line-height: 0.95;
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
}

.compare-summary-card p,
.compare-stat-card p,
.compare-pane__note,
.compare-section-note,
.compare-empty p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.compare-meter {
  height: 12px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(18, 36, 48, 0.08);
}

.compare-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(145, 68, 53, 0.78), rgba(219, 174, 92, 0.8), rgba(29, 111, 127, 0.9));
}

.compare-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.compare-stat-card {
  padding: 14px 16px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.compare-stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  line-height: 1;
}

.compare-stat-card a {
  color: var(--accent-strong);
  font-weight: 800;
}

.compare-legend,
.compare-metric__values,
.compare-check-result small {
  color: var(--muted);
  font-size: 0.84rem;
}

.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.compare-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.compare-dot--user {
  background: var(--accent-strong);
}

.compare-dot--matched {
  background: var(--positive);
}

.compare-dot--unmatched {
  background: var(--negative);
}

.compare-metric-list,
.compare-check-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.compare-metric-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compare-metric {
  display: block;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
}

.compare-metric__head,
.compare-metric__values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.compare-metric__head span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.compare-metric__head strong {
  color: var(--accent-strong);
  font-size: 0.8rem;
  white-space: nowrap;
}

.compare-bar {
  position: relative;
  height: 18px;
  margin: 8px 0 5px;
  border-radius: 999px;
}

.compare-bar::before {
  content: "";
  position: absolute;
  inset: 5px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(145, 68, 53, 0.12), rgba(29, 111, 127, 0.16));
}

.compare-bar__marker {
  position: absolute;
  top: 50%;
  left: var(--x);
  z-index: 2;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 8px rgba(10, 29, 38, 0.14);
}

.compare-bar__marker--matched {
  background: var(--positive);
}

.compare-bar__marker--unmatched {
  background: var(--negative);
}

.compare-bar__slider {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.compare-bar__slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.compare-bar__slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 5px 12px rgba(10, 29, 38, 0.18);
}

.compare-bar__slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.compare-bar__slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 5px 12px rgba(10, 29, 38, 0.18);
}

.compare-bar__slider--readonly {
  cursor: default;
  opacity: 0.92;
}

.compare-bar__slider--readonly::-webkit-slider-thumb {
  background: rgba(29, 111, 127, 0.72);
}

.compare-bar__slider--readonly::-moz-range-thumb {
  background: rgba(29, 111, 127, 0.72);
}

.compare-metric__values {
  font-size: 0.72rem;
  line-height: 1.15;
}

.compare-check-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 13px 14px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
}

.compare-check-result span,
.compare-check-result strong {
  color: var(--ink);
}

.compare-check-result small {
  grid-column: 1 / -1;
}

.compare-section-note {
  font-size: 0.9rem;
}

.compare-pane__note {
  margin-top: 18px;
  font-size: 0.92rem;
}

.compare-pane__note a {
  color: inherit;
  font-weight: 700;
  text-decoration-color: rgba(94, 118, 134, 0.34);
  text-underline-offset: 3px;
}

.explore-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  margin-top: 14px;
}

.explore-canvas-wrap,
.explore-inspector {
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 24px;
  background: rgba(250, 252, 253, 0.8);
}

.explore-canvas-wrap {
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}

.explore-canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.explore-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.explore-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.explore-legend__node {
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-block;
  background: color-mix(in srgb, var(--legend-node-color) var(--legend-node-fill), white);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px rgba(10, 29, 38, 0.08);
}

.explore-legend__node--specialty {
  --legend-node-color: #2d7d89;
  --legend-node-fill: 82%;
  width: 16px;
  height: 16px;
}

.explore-legend__node--fellowship {
  --legend-node-color: #2d7d89;
  --legend-node-fill: 46%;
  width: 11px;
  height: 11px;
  margin-inline: 2px;
}

.explore-legend__item--color {
  gap: 9px;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
}

.explore-legend__swatches {
  display: inline-flex;
  align-items: center;
  isolation: isolate;
}

.explore-legend__swatches span {
  width: 12px;
  height: 12px;
  margin-left: -3px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 5px 12px rgba(10, 29, 38, 0.06);
}

.explore-legend__swatches span:first-child {
  margin-left: 0;
  background: #2d7d89;
}

.explore-legend__swatches span:nth-child(2) {
  background: #d96c58;
}

.explore-legend__swatches span:nth-child(3) {
  background: #7d5b8d;
}

.explore-legend__swatches span:nth-child(4) {
  background: #4d78bc;
}

.explore-legend__swatches span:nth-child(5) {
  background: #5a9f8d;
}

.explore-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 4px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.explore-zoom__button,
.explore-zoom__reset {
  min-width: 36px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.explore-zoom__reset {
  min-width: 58px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.explore-zoom__button:hover,
.explore-zoom__button:focus-visible,
.explore-zoom__reset:hover,
.explore-zoom__reset:focus-visible {
  border-color: rgba(29, 111, 127, 0.16);
  background: rgba(29, 111, 127, 0.08);
  transform: translateY(-1px);
}

.explore-zoom__button:focus-visible,
.explore-zoom__reset:focus-visible {
  outline: 2px solid rgba(29, 111, 127, 0.18);
  outline-offset: 2px;
}

.explore-zoom__button:disabled,
.explore-zoom__reset:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.explore-canvas-shell {
  width: 100%;
  max-width: 100%;
  height: clamp(620px, 72vh, 820px);
  min-width: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(29, 111, 127, 0.08), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 248, 250, 0.92));
  border: 1px solid rgba(18, 36, 48, 0.06);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  min-height: 0;
  cursor: grab;
}

.explore-canvas-shell {
  scrollbar-width: thin;
  scrollbar-color: rgba(29, 111, 127, 0.32) rgba(18, 36, 48, 0.06);
}

.explore-canvas-shell--dragging {
  cursor: grabbing;
  user-select: none;
}

.explore-canvas-shell::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.explore-canvas-shell::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(18, 36, 48, 0.06);
}

.explore-canvas-shell::-webkit-scrollbar-thumb {
  border: 3px solid rgba(248, 251, 253, 0.95);
  border-radius: 999px;
  background: rgba(29, 111, 127, 0.36);
}

.explore-canvas-shell::-webkit-scrollbar-thumb:hover {
  background: rgba(29, 111, 127, 0.5);
}

.explore-canvas {
  width: 1920px;
  height: 1220px;
  min-width: 1920px;
  min-height: 1220px;
  max-width: none;
  display: block;
  cursor: grab;
}

.explore-canvas-shell--dragging .explore-canvas,
.explore-canvas-shell--dragging .explore-node {
  cursor: grabbing;
}

.explore-ring {
  fill: none;
  stroke: rgba(18, 36, 48, 0.08);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
}

.explore-ring--outer {
  stroke: rgba(18, 36, 48, 0.06);
}

.explore-link {
  stroke: color-mix(in srgb, var(--link-color) 42%, white);
  stroke-opacity: var(--link-opacity, 0.24);
  stroke-width: 1.6;
}

.explore-link--profile {
  stroke-linecap: round;
}

.explore-link--parent {
  stroke-dasharray: 7 11;
  stroke-width: 1.2;
}

.explore-link--shared-parent {
  stroke-dasharray: 2 9;
  stroke-linecap: round;
  stroke-width: 1.45;
}

.explore-link--selected {
  stroke-opacity: var(--link-opacity, 0.68);
  stroke-width: 2.3;
}

.explore-node {
  cursor: pointer;
}

.explore-node circle {
  fill: color-mix(in srgb, var(--node-color) calc(var(--node-opacity) * 100%), white);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 2.4;
  transition:
    transform 180ms ease,
    stroke-width 180ms ease,
    filter 180ms ease,
    opacity 180ms ease;
  filter: drop-shadow(0 10px 20px rgba(10, 29, 38, 0.08));
}

.explore-node__label {
  font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
}

.explore-node__label--specialty {
  font-size: 12px;
  font-weight: 800;
}

.explore-node--selected circle,
.explore-node--connected circle {
  stroke-width: 3.4;
}

.explore-node--selected circle {
  filter: drop-shadow(0 16px 28px rgba(10, 29, 38, 0.14));
}

.explore-node:focus-visible {
  outline: none;
}

.explore-you-are-here {
  pointer-events: none;
}

.explore-you-are-here__halo {
  fill: rgba(255, 255, 255, 0.28);
  stroke: rgba(17, 91, 74, 0.84);
  stroke-width: 3;
  stroke-dasharray: 7 7;
  filter: drop-shadow(0 14px 24px rgba(10, 29, 38, 0.16));
  transform-box: fill-box;
  transform-origin: center;
  animation: locationPulse 2.4s ease-in-out infinite;
}

.explore-you-are-here__pin {
  fill: rgba(17, 91, 74, 0.92);
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 3;
  filter: drop-shadow(0 8px 14px rgba(10, 29, 38, 0.16));
}

.explore-you-are-here__leader {
  fill: none;
  stroke: rgba(17, 91, 74, 0.54);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.explore-you-are-here__label-bg {
  fill: rgba(244, 251, 248, 0.94);
  stroke: rgba(17, 91, 74, 0.26);
  stroke-width: 1.5;
  filter: drop-shadow(0 12px 24px rgba(10, 29, 38, 0.12));
}

.explore-you-are-here__label {
  font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-anchor: middle;
  text-transform: uppercase;
  fill: #115b4a;
}

@keyframes locationPulse {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.explore-inspector {
  padding: 20px 22px;
  display: grid;
  grid-template-columns:
    minmax(240px, 0.95fr)
    minmax(190px, 0.62fr)
    minmax(250px, 1fr)
    minmax(250px, 1fr);
  grid-template-areas:
    "type stats notes nearby"
    "title stats notes nearby"
    "lede stats notes nearby"
    "compare stats notes nearby";
  align-items: stretch;
  gap: 18px;
  min-height: 0;
  overflow: visible;
}

.explore-inspector h3 {
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
}

#exploreNodeType {
  grid-area: type;
  margin: 0;
}

#exploreNodeTitle {
  grid-area: title;
}

#exploreNodeBlurb {
  grid-area: lede;
}

.explore-inspector__lede,
.explore-inspector__empty,
.match-card__path-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.explore-inspector__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 12px;
}

.explore-inspector__compare {
  grid-area: compare;
  width: 100%;
  align-self: end;
}

.explore-stat,
.explore-inspector__block {
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.86);
}

.explore-inspector__block--notes {
  grid-area: notes;
}

.explore-inspector__block--nearby {
  grid-area: nearby;
}

.explore-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
  color: var(--accent-strong);
}

.explore-note-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.explore-chip-list,
.rank-panel__paths,
.path-grid {
  display: grid;
  gap: 10px;
}

.path-pill {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  background: rgba(248, 251, 253, 0.94);
  color: var(--ink);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.path-pill:hover,
.path-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 111, 127, 0.18);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(10, 29, 38, 0.08);
}

.path-pill:focus-visible {
  outline: 2px solid rgba(29, 111, 127, 0.14);
  outline-offset: 2px;
}

.path-pill--compact {
  padding: 11px 12px;
}

.path-pill__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.path-pill__name {
  font-weight: 700;
}

.path-pill__score {
  flex-shrink: 0;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
}

.path-pill__meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.info-panel__block--pane {
  padding: 20px 22px;
  margin: 0;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: var(--radius-md);
  background: rgba(250, 252, 253, 0.72);
}

.info-pane__grid > .info-panel__block--pane {
  margin-top: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(18, 36, 48, 0.08);
}

.app-grid {
  --rank-panel-width: 0px;
  --rank-panel-gap-current: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--rank-panel-gap-current);
  align-items: start;
  overflow: visible;
}

.app-grid--with-rank-panel {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--rank-panel-width));
  transition:
    grid-template-columns var(--rank-motion),
    gap var(--rank-motion);
}

.app-grid--ranked {
  --rank-panel-width: var(--rank-panel-open);
  --rank-panel-gap-current: var(--rank-panel-gap);
}

.quiz-panel {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition:
    box-shadow 220ms ease,
    transform var(--rank-motion);
}

.quiz-panel {
  padding: 34px;
}

.quiz-panel,
.app-chrome {
  width: 100%;
}

.rank-panel {
  position: sticky;
  top: 24px;
  z-index: 1;
  min-width: 0;
  width: calc(100% + var(--rank-panel-overlap));
  margin-left: calc(var(--rank-panel-overlap) * -1);
  padding: 24px 22px 24px calc(22px + var(--rank-panel-overlap));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transform: translateX(0);
  transform-origin: left center;
  opacity: 1;
  will-change: transform, opacity;
  transition:
    transform var(--rank-motion),
    opacity 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.rank-panel--collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc((var(--rank-panel-overlap) + 30px) * -1)) scale(0.985);
  box-shadow: none;
  border-color: rgba(18, 36, 48, 0);
}

.rank-panel h2,
.rank-panel h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0;
}

.rank-panel h2 {
  margin-top: 8px;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
}

.rank-panel__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(18, 36, 48, 0.08);
}

.rank-panel__action {
  width: auto;
  padding: 9px 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  border-color: rgba(18, 36, 48, 0.1);
  background: rgba(248, 251, 253, 0.68);
}

.rank-panel__action:hover,
.rank-panel__action:focus-visible {
  color: var(--accent-strong);
  background: rgba(29, 111, 127, 0.05);
  border-color: rgba(29, 111, 127, 0.14);
}

.rank-panel__intro-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.rank-panel__toggle {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(18, 36, 48, 0.1);
  background: rgba(248, 251, 253, 0.72);
  color: rgba(18, 36, 48, 0.52);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.rank-panel__toggle:hover,
.rank-panel__toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 111, 127, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(10, 29, 38, 0.08);
}

.rank-panel__toggle:focus-visible {
  outline: 2px solid rgba(29, 111, 127, 0.18);
  outline-offset: 2px;
}

.rank-panel__toggle span {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
  transform: translateX(1px);
}

.rank-panel h3 {
  margin-top: 6px;
  font-size: 1.5rem;
}

.rank-panel__summary,
.rank-panel__leader-blurb,
.rank-panel__empty,
.rank-panel__reasons li {
  color: var(--muted);
  line-height: 1.55;
}

.rank-panel__summary {
  margin: 14px 0 0;
}

.rank-panel__leader,
.rank-panel__detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(18, 36, 48, 0.08);
}

.rank-panel__leader-blurb {
  margin: 10px 0 0;
}

.rank-panel__list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.rank-panel__empty {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  background: rgba(248, 251, 253, 0.9);
}

.rank-item {
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.rank-item--top {
  border-color: rgba(29, 111, 127, 0.18);
  background: linear-gradient(180deg, rgba(29, 111, 127, 0.08), rgba(255, 255, 255, 0.94));
}

.rank-item__top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.rank-item__index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(29, 111, 127, 0.10);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.rank-item__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.rank-item__score {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.rank-item__track {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(29, 111, 127, 0.10);
  overflow: hidden;
}

.rank-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(29, 111, 127, 0.45), var(--accent-strong));
}

.rank-panel__reasons {
  margin: 12px 0 0;
  padding-left: 18px;
}

.rank-panel__paths {
  margin-top: 12px;
}

.results-view__head,
.progress-copy,
.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.results-display-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(248, 251, 253, 0.76);
}

.results-display-toggle__label {
  padding-left: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.results-display-toggle__options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(100%, 360px);
}

.results-display-toggle__option {
  position: relative;
  flex: 1 1 170px;
  cursor: pointer;
}

.results-display-toggle__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.results-display-toggle__option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid rgba(29, 111, 127, 0.14);
  border-radius: 999px;
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.results-display-toggle__option input:checked + span {
  border-color: rgba(29, 111, 127, 0.28);
  color: var(--ink);
  background: rgba(29, 111, 127, 0.1);
  box-shadow: inset 0 0 0 1px rgba(29, 111, 127, 0.08);
}

.results-display-toggle__option input:focus-visible + span {
  outline: 2px solid rgba(29, 111, 127, 0.18);
  outline-offset: 2px;
}

.start-view {
  display: grid;
  gap: 22px;
  align-content: center;
  justify-items: center;
  min-height: 520px;
  padding: 12px 0 10px;
  text-align: center;
  animation: fadeUp 240ms ease;
}

.start-view__copy {
  display: grid;
  gap: 14px;
  max-width: min(100%, 820px);
}

.start-view__intro {
  margin: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  line-height: 1;
  color: var(--ink);
  max-width: min(100%, 820px);
}

.start-view__mark,
.start-view__subtitle {
  display: block;
  text-wrap: pretty;
}

.start-view__mark {
  font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(4rem, 11vw, 8.2rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.start-view__subtitle {
  font-size: clamp(1.1rem, 2.3vw, 1.8rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--accent-strong);
  max-width: 24ch;
}

.start-view__lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.start-choice-grid {
  width: min(100%, 900px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.start-choice {
  appearance: none;
  border: 1px solid rgba(29, 111, 127, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 251, 0.9));
  color: var(--ink);
  display: grid;
  gap: 9px;
  min-height: 178px;
  padding: 22px;
  text-align: left;
  box-shadow: 0 16px 34px rgba(18, 36, 48, 0.07);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.start-choice:hover,
.start-choice:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(29, 111, 127, 0.32);
  box-shadow: 0 22px 42px rgba(18, 36, 48, 0.11);
}

.start-choice:focus-visible {
  outline: 3px solid rgba(29, 111, 127, 0.18);
  outline-offset: 3px;
}

.start-choice--questions {
  border-color: rgba(50, 131, 109, 0.24);
  background:
    linear-gradient(145deg, rgba(248, 253, 251, 0.97), rgba(240, 249, 246, 0.9));
}

.start-choice__eyebrow {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.start-choice strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.start-choice span:last-child {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.start-view__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.start-view__actions--subtle {
  gap: 10px;
}

.start-view__actions--subtle .ghost-button {
  padding: 11px 16px;
  min-height: 0;
  background: rgba(255, 255, 255, 0.42);
}

.progress-wrap {
  margin-top: 18px;
}

.progress-copy {
  margin-bottom: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(29, 111, 127, 0.12);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2a8394, var(--accent-strong));
  transition: width 220ms ease;
}

.question-card {
  margin-top: 18px;
  padding: 28px;
  border-radius: 26px;
  background: var(--panel-strong);
  border: 1px solid rgba(18, 36, 48, 0.08);
}

.question-card__body {
  display: grid;
  gap: 10px;
  min-height: auto;
}

.question-card h3 {
  margin-top: 6px;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.02;
  max-width: min(100%, 28ch);
  text-wrap: pretty;
}

.question-card__support {
  margin-top: 6px;
  max-width: min(100%, 82ch);
  font-size: 1rem;
}

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

.answer-button,
.secondary-button,
.ghost-button,
.rank-toggle-handle {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.answer-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.rank-toggle-handle:hover,
.answer-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.rank-toggle-handle:focus-visible {
  transform: translateY(-1px);
}

.answer-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible,
.rank-toggle-handle:focus-visible {
  outline: 2px solid rgba(29, 111, 127, 0.18);
  outline-offset: 2px;
}

.answer-button {
  padding: 20px 18px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 253, 0.98));
  border-color: rgba(18, 36, 48, 0.08);
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: rgba(29, 111, 127, 0.32);
  box-shadow: 0 18px 40px rgba(17, 46, 59, 0.08);
}

.answer-button--yes {
  background: linear-gradient(180deg, rgba(31, 106, 81, 0.08), rgba(255, 255, 255, 0.98));
  border-color: rgba(31, 106, 81, 0.16);
}

.answer-button--yes:hover,
.answer-button--yes:focus-visible {
  border-color: rgba(31, 106, 81, 0.34);
  box-shadow: 0 18px 40px rgba(31, 106, 81, 0.10);
}

.answer-button--yes.answer-button--selected {
  border-color: rgba(31, 106, 81, 0.42);
  background: linear-gradient(180deg, rgba(31, 106, 81, 0.14), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(31, 106, 81, 0.14);
}

.answer-button--no {
  background: linear-gradient(180deg, rgba(139, 62, 50, 0.08), rgba(255, 255, 255, 0.98));
  border-color: rgba(139, 62, 50, 0.16);
}

.answer-button--no:hover,
.answer-button--no:focus-visible {
  border-color: rgba(139, 62, 50, 0.34);
  box-shadow: 0 18px 40px rgba(139, 62, 50, 0.10);
}

.answer-button--no.answer-button--selected {
  border-color: rgba(139, 62, 50, 0.42);
  background: linear-gradient(180deg, rgba(139, 62, 50, 0.14), rgba(255, 255, 255, 0.98));
  box-shadow: 0 18px 40px rgba(139, 62, 50, 0.14);
}

.answer-button--yes::before,
.answer-button--no::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 14px 0 0 14px;
}

.answer-button--yes::before {
  background: linear-gradient(180deg, rgba(31, 106, 81, 0.24), var(--positive));
}

.answer-button--no::before {
  background: linear-gradient(180deg, rgba(139, 62, 50, 0.24), var(--negative));
}

.answer-button__value {
  display: block;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
}

.answer-button--yes .answer-button__value {
  color: #184c3c;
}

.answer-button--no .answer-button__value {
  color: #74392f;
}

.answer-button__hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

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

.question-shortcuts {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.87rem;
  text-align: center;
}

.question-shortcuts kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 2px 6px;
  border: 1px solid rgba(18, 36, 48, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 253, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.secondary-button,
.ghost-button {
  padding: 12px 16px;
  font-weight: 700;
}

.secondary-button {
  color: var(--panel-strong);
  background: var(--ink);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  box-shadow: 0 14px 32px rgba(18, 36, 48, 0.18);
}

.ghost-button {
  color: var(--accent-strong);
  background: transparent;
  border-color: rgba(29, 111, 127, 0.18);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: rgba(29, 111, 127, 0.06);
}

.ghost-button.ghost-button--selected {
  background: rgba(29, 111, 127, 0.1);
  border-color: rgba(29, 111, 127, 0.26);
  color: var(--accent-strong);
}

.signal-results-button {
  --signal-button-fill: 0%;
  isolation: isolate;
  min-width: 176px;
  overflow: hidden;
  background: rgba(248, 251, 253, 0.76);
}

.signal-results-button::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--signal-button-fill);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(29, 111, 127, 0.16), rgba(42, 131, 148, 0.2));
  pointer-events: none;
  transition: width 240ms ease;
}

.signal-results-button > span {
  position: relative;
  z-index: 1;
}

.signal-results-button:disabled {
  cursor: not-allowed;
  color: rgba(95, 117, 132, 0.88);
  border-color: rgba(18, 36, 48, 0.1);
  background: rgba(240, 244, 247, 0.72);
  box-shadow: none;
}

.signal-results-button:disabled:hover,
.signal-results-button:disabled:focus-visible {
  transform: none;
  background: rgba(240, 244, 247, 0.72);
  box-shadow: none;
}

.signal-results-button:disabled::before {
  background: linear-gradient(90deg, rgba(95, 117, 132, 0.12), rgba(95, 117, 132, 0.18));
}

.signal-results-button--ready {
  color: var(--accent-strong);
  border-color: rgba(29, 111, 127, 0.22);
}

.rank-toggle-handle {
  position: fixed;
  top: 50%;
  right: max(8px, calc((100vw - var(--shell-outer)) / 2 + 8px));
  z-index: 1;
  width: 40px;
  height: 68px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 0 18px 18px 0;
  border-color: rgba(18, 36, 48, 0.12);
  border-left: 0;
  background: rgba(248, 251, 253, 0.82);
  box-shadow: 10px 18px 36px rgba(10, 29, 38, 0.08);
  backdrop-filter: blur(16px);
  color: rgba(18, 36, 48, 0.54);
  transform: translateY(-50%);
}

.rank-toggle-handle:hover,
.rank-toggle-handle:focus-visible {
  transform: translateY(calc(-50% - 1px));
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(29, 111, 127, 0.18);
  color: var(--accent-strong);
}

.rank-toggle-handle span {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
  transform: translateX(1px);
}

.results-view {
  margin-top: 26px;
  animation: fadeUp 240ms ease;
}

.results-summary {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(29, 111, 127, 0.08), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(29, 111, 127, 0.14);
}

.results-summary p,
.results-footnotes p,
.match-card p,
.match-card li {
  margin: 0;
}

.results-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.match-card {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(18, 36, 48, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.match-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.match-card__left {
  max-width: 38ch;
}

.match-card h4 {
  margin-top: 8px;
  font-size: clamp(1.4rem, 2vw, 1.95rem);
}

.match-card__score {
  min-width: 116px;
  padding: 12px 14px;
  border-radius: 18px;
  text-align: right;
  background: rgba(29, 111, 127, 0.08);
}

.match-card__score-value {
  display: block;
  margin-top: 4px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent-strong);
}

.match-card__why {
  margin-top: 18px;
}

.match-card__why ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.match-card__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.match-card__paths {
  margin-top: 18px;
}

.results-footnotes {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.signal-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.signal-list li {
  position: relative;
  padding-left: 18px;
}

.signal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1180px) {
  :root {
    --max-width: 1120px;
    --shell-outer: calc(var(--max-width) + 48px);
    --rank-panel-open: 280px;
  }

  .start-choice-grid {
    width: min(100%, 980px);
  }
}

@media (min-width: 1500px) {
  :root {
    --max-width: 1240px;
    --shell-outer: calc(var(--max-width) + 48px);
    --rank-panel-open: 300px;
  }

  .quiz-panel {
    padding: 38px;
  }
}

@media (max-width: 980px) {
  .info-pane__grid {
    grid-template-columns: 1fr;
  }

  .share-grid {
    grid-template-columns: 1fr;
  }

  .compare-pane__body,
  .compare-radar-card,
  .compare-summary-grid {
    grid-template-columns: 1fr;
  }

  .compare-radar-card__copy h4 {
    max-width: none;
  }

  .explore-layout {
    grid-template-columns: 1fr;
  }

  .explore-inspector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "type stats"
      "title stats"
      "lede stats"
      "compare stats"
      "notes nearby";
    overflow: visible;
  }

  .app-grid--with-rank-panel,
  .app-grid--ranked {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .rank-panel {
    position: static;
    width: 100%;
    margin-left: 0;
    transform: none;
    opacity: 1;
    will-change: auto;
  }

  .rank-panel--collapsed {
    display: none;
  }

  .start-view {
    min-height: 460px;
  }

  .start-choice-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .start-choice {
    min-height: auto;
  }

  .explore-canvas {
    min-width: 680px;
  }

  .explore-canvas-shell {
    height: clamp(500px, 62vh, 640px);
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 18px 14px 28px;
  }

  .compare-radar__label {
    font-size: 0.5rem;
    letter-spacing: 0;
  }

  .compare-metric-list {
    grid-template-columns: 1fr;
  }

  .info-modal {
    padding: 14px;
  }

  .quiz-panel,
  .info-pane,
  .rank-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .app-chrome {
    padding: 0;
    border-radius: 0;
  }

  .question-card {
    padding: 20px;
    border-radius: 22px;
  }

  .compare-view,
  .explore-view {
    padding: 20px;
    border-radius: 22px;
  }

  .rank-toggle-handle {
    top: 50%;
    right: 4px;
    bottom: auto;
    z-index: 12;
    width: 38px;
    height: 58px;
    transform: translateY(-50%);
    border-left: 1px solid rgba(18, 36, 48, 0.12);
    border-radius: 18px 0 0 18px;
  }

  .rank-toggle-handle:hover,
  .rank-toggle-handle:focus-visible {
    transform: translateY(calc(-50% - 1px));
  }

  .question-card__body {
    min-height: auto;
  }

  .question-card h3 {
    max-width: 100%;
  }

  .answer-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel__controls {
    justify-content: flex-start;
  }

  .info-pane__topbar,
  .app-chrome,
  .rank-panel__intro-head,
  .results-view__head,
  .compare-view__head,
  .explore-view__head,
  .results-display-toggle,
  .results-view__actions,
  .progress-copy,
  .question-actions,
  .share-block__actions,
  .match-card__top,
  .start-view__actions,
  .path-pill__top {
    flex-direction: column;
    align-items: stretch;
  }

  .compare-metric__head,
  .compare-metric__values {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-view__actions {
    justify-content: flex-start;
  }

  .match-card__score {
    text-align: left;
  }

  .results-display-toggle__options {
    justify-content: flex-start;
    width: 100%;
  }

  .results-display-toggle__option span {
    text-align: center;
  }

  .explore-inspector__stats {
    grid-template-columns: 1fr;
  }

  .explore-canvas-shell {
    height: clamp(560px, 68vh, 720px);
  }
}

@media (max-width: 720px) {
  .explore-inspector {
    grid-template-columns: 1fr;
    grid-template-areas:
      "type"
      "title"
      "lede"
      "stats"
      "compare"
      "notes"
      "nearby";
  }

  .explore-inspector__stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .explore-canvas-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .explore-zoom {
    align-self: stretch;
    justify-content: space-between;
  }

  .explore-zoom__button,
  .explore-zoom__reset {
    flex: 1;
  }

  .explore-canvas {
    min-width: 720px;
  }

  .explore-canvas-shell {
    height: min(68vh, 520px);
    min-height: 380px;
  }

  .ghost-button,
  .secondary-button,
  .results-view__actions .ghost-button,
  .results-view__actions .secondary-button,
  .share-block__actions .ghost-button,
  .share-block__actions .secondary-button,
  .compare-view__actions .ghost-button,
  .explore-chip-list .path-pill {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 12px 10px 24px;
  }

  .info-modal {
    padding: 10px;
  }

  .quiz-panel,
  .info-pane,
  .rank-panel {
    padding: 16px;
    border-radius: 22px;
  }

  .question-card,
  .compare-view,
  .explore-view,
  .match-card {
    padding: 16px;
    border-radius: 20px;
  }

  .start-view {
    gap: 18px;
    min-height: auto;
    padding: 8px 0;
  }

  .start-view__copy {
    gap: 10px;
  }

  .start-view__mark {
    font-size: clamp(3.15rem, 17vw, 4.6rem);
    letter-spacing: -0.035em;
  }

  .start-view__subtitle {
    max-width: 22ch;
    font-size: 1rem;
  }

  .start-choice-grid {
    gap: 10px;
  }

  .start-choice {
    gap: 7px;
    padding: 16px;
    border-radius: 20px;
  }

  .start-choice strong {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .question-card {
    margin-top: 0;
  }

  .question-card h3,
  .results-view h3,
  .compare-view h3,
  .explore-view__head h3 {
    font-size: clamp(1.8rem, 10.5vw, 2.45rem);
    line-height: 1.04;
  }

  .answer-button {
    padding: 16px;
  }

  .question-shortcuts {
    font-size: 0.8rem;
  }

  .results-display-toggle {
    align-items: stretch;
  }

  .results-display-toggle__options {
    min-width: 0;
  }

  .compare-controls,
  .compare-output,
  .compare-radar-card,
  .explore-canvas-wrap,
  .explore-inspector {
    padding: 14px;
    border-radius: 18px;
  }

  .compare-radar-card {
    min-height: 0;
    gap: 4px;
    padding: 10px;
  }

  .compare-radar-card__copy h4 {
    font-size: clamp(1.1rem, 5.5vw, 1.55rem);
    max-width: none;
  }

  .compare-radar svg {
    width: min(100%, 360px);
  }

  .compare-slider__top,
  .compare-check-result {
    grid-template-columns: 1fr;
  }

  .compare-slider__top {
    display: grid;
    gap: 3px;
  }

  .compare-slider output {
    min-width: 0;
    text-align: left;
  }

  .compare-check {
    align-items: flex-start;
  }

  .explore-canvas-shell {
    height: min(64vh, 480px);
    min-height: 340px;
  }

  .rank-toggle-handle {
    right: 2px;
  }
}

@media (max-height: 640px) and (min-width: 721px) {
  .page-shell {
    padding-top: 18px;
    padding-bottom: 32px;
  }

  .start-view {
    min-height: auto;
  }

  .explore-canvas-shell {
    height: 58vh;
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
