:root {
  color-scheme: light;
  --paper: #f7f8f6;
  --ink: #17232d;
  --muted: #69757b;
  --line: #d9dfdc;
  --teal: #087e83;
  --teal-soft: #e1f0ed;
  --rose: #a73f4d;
  --green: #237a5a;
  --content: 790px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

button { font: inherit; }

.cover {
  width: min(100% - 40px, 1280px);
  margin: 20px auto 0;
}

.cover-image {
  display: block;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 16 / 8.3;
  object-fit: cover;
  object-position: center;
  background: #06132e;
}

.button {
  border: 0;
  cursor: pointer;
}

.page {
  width: min(100% - 40px, var(--content));
  margin: 58px auto 86px;
  scroll-margin-top: 20px;
}

.step-section { display: none; animation: arrive 220ms ease-out both; }
.step-section.active { display: block; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-heading { max-width: 610px; }
.eyebrow {
  margin: 0 0 15px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

h1 em { color: var(--teal); font-family: Georgia, serif; font-weight: 400; }
.intro-copy { max-width: 570px; margin: 23px 0 0; color: #4f5d63; font-size: 1.05rem; }

.axis-list, .concept-list, .ethics-list {
  margin-top: 44px;
  border-top: 1px solid var(--line);
}

.axis-list > div, .concept-list > div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.axis-list > div > span, .ethics-list > p > span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.axis-list p, .concept-list p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.axis-list strong, .concept-list strong { color: var(--ink); font-weight: 600; }

.concept-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #bed6d2;
  border-radius: 50%;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 1rem;
}

.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 38px;
}

.button {
  min-height: 43px;
  padding: 10px 16px;
  border-radius: 3px;
  font-size: 0.88rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:active { transform: translateY(1px); }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover { background: var(--teal); }
.button-quiet { padding-left: 0; padding-right: 0; background: transparent; color: var(--muted); }
.button:focus-visible, .text-button:focus-visible, .scale-option:focus-visible {
  outline: 3px solid #66b9b5;
  outline-offset: 3px;
}

.quiz-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.quiz-heading .intro-copy { max-width: 500px; }
.sample-button { flex: 0 0 auto; margin-bottom: 5px; }

.progress {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 38px 0 28px;
  padding: 12px 0 14px;
  background: var(--paper);
}
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 0.78rem; }
.progress-track { height: 3px; background: #e2e6e3; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--teal); transition: width 300ms ease; }
.error-message { padding: 10px 13px; border-left: 3px solid var(--rose); background: #f8e9e9; color: #762c35; font-size: 0.9rem; }

.question {
  padding: 23px 0 25px;
  border-bottom: 1px solid var(--line);
}
.question:first-child { border-top: 1px solid var(--line); }
.question-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em; }
.question-meta span:last-child { text-align: right; }
.question-text { margin: 12px 0 21px; font-size: 1.01rem; font-weight: 500; line-height: 1.5; }

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}
.scale-labels span:last-child { text-align: right; }
.scale-options { display: flex; justify-content: space-between; max-width: 450px; margin: 0 auto; }
.scale-option {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #bfc9c6;
  border-radius: 50%;
  background: transparent;
  color: #526168;
  cursor: pointer;
  font-size: 0.83rem;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.scale-option:nth-child(1), .scale-option:nth-child(2) { border-color: #d5adb0; }
.scale-option:nth-child(4), .scale-option:nth-child(5) { border-color: #a9c9b7; }
.scale-option:hover { transform: scale(1.08); }
.scale-option[aria-pressed="true"] { transform: scale(1.12); color: white; }
.scale-option[aria-pressed="true"]:nth-child(1), .scale-option[aria-pressed="true"]:nth-child(2) { border-color: var(--rose); background: var(--rose); }
.scale-option[aria-pressed="true"]:nth-child(3) { border-color: #66777c; background: #66777c; }
.scale-option[aria-pressed="true"]:nth-child(4), .scale-option[aria-pressed="true"]:nth-child(5) { border-color: var(--green); background: var(--green); }

.action-group { display: flex; align-items: center; gap: 22px; }
.result-panel { margin-top: 54px; padding-top: 35px; border-top: 1px solid var(--line); }
.match-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.match-kicker { margin: 0 0 9px; color: var(--teal); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.match-name { margin: 0; font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1.05; }
.match-tagline { margin: 9px 0 0; color: var(--muted); }
.match-score { flex: 0 0 auto; color: var(--teal); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.04em; }
.match-copy { max-width: 620px; margin: 23px 0 0; color: #4f5d63; }
.tip { margin: 23px 0 0; padding: 14px 16px; border-left: 3px solid var(--teal); background: var(--teal-soft); color: #294a4b; font-size: 0.9rem; }
.math-details { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.math-details summary { cursor: pointer; font-size: 0.88rem; font-weight: 600; }
.formula { overflow-wrap: anywhere; margin-top: 13px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; line-height: 1.9; }
.ranking { color: var(--muted); font-size: 0.83rem; }
.ethics-list p { display: grid; grid-template-columns: 48px 1fr; gap: 14px; margin: 0; padding: 17px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.93rem; }
.ethics-list strong { margin-right: 5px; color: var(--ink); font-weight: 600; }

[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 620px) {
  .cover { width: 100%; margin-top: 0; }
  .cover-image { min-height: 250px; aspect-ratio: 1.3; object-position: center; }
  .page { width: calc(100% - 36px); margin-top: 42px; }
  .quiz-heading { display: block; }
  .sample-button { margin-top: 18px; }
  .question-meta { font-size: 0.66rem; }
  .question-text { font-size: 0.96rem; }
  .scale-option { width: 39px; height: 39px; }
  .section-actions { align-items: flex-start; }
  .quiz-actions { align-items: center; }
  .action-group { gap: 13px; }
  .action-group .button { font-size: 0.78rem; }
  .match-head { gap: 10px; }
  .match-score { font-size: 1.4rem; }
  .site-footer { width: calc(100% - 36px); flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Deep-space palette and restrained neon accents */
:root {
  color-scheme: dark;
  --paper: #06101f;
  --ink: #edfaff;
  --muted: #a0b7c4;
  --line: rgba(91, 213, 238, 0.22);
  --teal: #55efff;
  --teal-soft: #102c3a;
  --rose: #ff5b9d;
  --green: #4affb8;
}

html { background: var(--paper); }
body { background: var(--paper); color: var(--ink); }
body { font-family: "Bahnschrift", "Arial", sans-serif; }

.cover {
  position: relative;
  display: grid;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  margin: 0;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  background: #050d22;
}

.cover-image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

.cover-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 9, 26, 0.08) 60%, rgba(3, 9, 26, 0.76) 100%),
    radial-gradient(ellipse at 50% 105%, rgba(38, 218, 255, 0.2), transparent 52%);
  pointer-events: none;
}

.mobile-cover-title { display: none; }

.scroll-cue {
  position: absolute;
  bottom: clamp(22px, 5vh, 48px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(88, 239, 255, 0.58);
  border-radius: 999px;
  background: rgba(4, 14, 32, 0.78);
  box-shadow: 0 0 18px rgba(47, 221, 255, 0.18), inset 0 0 14px rgba(47, 221, 255, 0.08);
  color: #e9fbff;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.scroll-cue:hover {
  border-color: var(--teal);
  box-shadow: 0 0 26px rgba(47, 221, 255, 0.38);
}

.scroll-cue span { color: var(--teal); font-size: 1.05rem; }

.page {
  width: min(100% - 48px, 860px);
  margin: 0 auto 100px;
  padding-top: 0;
  scroll-margin-top: 0;
}

.step-section { animation: neon-arrive 300ms ease-out both; }
@keyframes neon-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  color: #f1fcff;
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", "Arial Black", Impact, sans-serif;
  font-size: clamp(2.45rem, 7.2vw, 4.6rem);
  font-weight: 750;
  letter-spacing: 0.015em;
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 0 7px rgba(213, 250, 255, 0.42), 0 0 24px rgba(42, 221, 255, 0.2);
}
h1 em {
  color: var(--teal);
  font-family: inherit;
  font-style: normal;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(85, 239, 255, 0.7), 0 0 26px rgba(85, 239, 255, 0.38);
}
.intro-copy { color: #b6c9d1; }

.axis-list, .concept-list, .ethics-list { border-color: var(--line); }
.axis-list > div, .concept-list > div, .ethics-list p { border-color: var(--line); }
.axis-list p, .concept-list p, .ethics-list p { color: #a9bdc6; }
.axis-list strong, .concept-list strong, .ethics-list strong { color: #f1fbff; }
.axis-list > div > span, .ethics-list > p > span { color: var(--teal); }
.concept-mark {
  border-color: rgba(85, 239, 255, 0.5);
  color: var(--teal);
  box-shadow: 0 0 14px rgba(85, 239, 255, 0.12);
}

.button {
  border-radius: 4px;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.button-dark {
  border: 1px solid rgba(85, 239, 255, 0.6);
  background: #0c2938;
  color: #f0fdff;
  box-shadow: inset 0 0 16px rgba(85, 239, 255, 0.09), 0 0 14px rgba(85, 239, 255, 0.09);
}
.button-dark:hover {
  background: #104052;
  box-shadow: inset 0 0 18px rgba(85, 239, 255, 0.16), 0 0 22px rgba(85, 239, 255, 0.22);
}
.button-quiet {
  color: #9db3bf;
  text-decoration: none;
}
.button-quiet:hover { color: var(--teal); }
.button:focus-visible, .scroll-cue:focus-visible, .scale-option:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

.sample-button {
  border: 1px solid rgba(85, 239, 255, 0.35);
  padding-inline: 13px;
  color: var(--teal);
}
.progress {
  border-bottom: 1px solid rgba(85, 239, 255, 0.08);
  background: rgba(6, 16, 31, 0.94);
}
.progress-copy { color: #a8c2ce; }
.progress-track { background: #173141; }
.progress-track span {
  background: var(--teal);
  box-shadow: 0 0 12px rgba(85, 239, 255, 0.8);
}
.error-message {
  border-left-color: var(--rose);
  background: rgba(110, 25, 65, 0.34);
  color: #ffd7e7;
}

.question { border-color: var(--line); }
.question:first-child { border-color: var(--line); }
.question-meta { color: #8eabb9; }
.question-text { color: #effaff; }
.questions.animate-in .question {
  animation: question-pop-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--question-index, 0) * 75ms);
}
@keyframes question-pop-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  72% { opacity: 1; transform: translateY(-2px) scale(1.01); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.scale-labels { color: #a5bbc5; }
.scale-option {
  border-color: rgba(181, 215, 226, 0.5);
  background: rgba(13, 33, 49, 0.7);
  color: #c7e0e9;
  box-shadow: inset 0 0 8px rgba(76, 211, 235, 0.05);
}
.scale-option:nth-child(3) {
  border-color: #89929c;
  background: #202b38;
  color: #cbd2d8;
}
.scale-option[aria-pressed="true"] {
  animation: answer-pop-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.scale-option.is-resetting {
  animation: answer-pop-out 200ms ease-in both;
}
@keyframes answer-pop-in {
  0% { transform: scale(0.72); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1.12); }
}
@keyframes answer-pop-out {
  from { opacity: 1; transform: scale(1.12); }
  to { opacity: 0.5; transform: scale(0.72); }
}
.scale-option:nth-child(1), .scale-option:nth-child(2) { border-color: rgba(255, 91, 157, 0.65); }
.scale-option:nth-child(4), .scale-option:nth-child(5) { border-color: rgba(74, 255, 184, 0.64); }
.scale-option[aria-pressed="true"]:nth-child(1), .scale-option[aria-pressed="true"]:nth-child(2) {
  border-color: var(--rose);
  background: #a92962;
  box-shadow: 0 0 17px rgba(255, 91, 157, 0.58);
}
.scale-option[aria-pressed="true"]:nth-child(3) {
  border-color: #a4adb7;
  background: #59636f;
  box-shadow: 0 0 14px rgba(174, 187, 199, 0.42);
}
.scale-option[aria-pressed="true"]:nth-child(4), .scale-option[aria-pressed="true"]:nth-child(5) {
  border-color: var(--green);
  background: #087c60;
  box-shadow: 0 0 17px rgba(74, 255, 184, 0.47);
}

.result-panel { border-color: var(--line); }
.match-kicker { color: var(--teal); text-shadow: 0 0 12px rgba(85, 239, 255, 0.36); }
.match-name {
  color: #f4fcff;
  text-shadow: 0 0 10px rgba(85, 239, 255, 0.26);
}
.match-tagline, .match-copy, .ranking { color: #adc2cc; }
.match-score {
  color: var(--teal);
  text-shadow: 0 0 16px rgba(85, 239, 255, 0.65);
}
.tip {
  border: 1px solid rgba(74, 255, 184, 0.35);
  border-left: 3px solid var(--green);
  background: rgba(11, 66, 61, 0.42);
  color: #d0fff0;
  box-shadow: inset 0 0 18px rgba(74, 255, 184, 0.045);
}
.math-details { border-color: var(--line); }
.math-details summary { color: #e6faff; }
.formula { color: #a8bec9; }
.formula strong { color: var(--teal); }

.result-panel:not([hidden]) {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  overflow-y: auto;
  margin: 0;
  padding: clamp(34px, 7vh, 76px) 24px 48px;
  border: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(28, 128, 165, 0.2), transparent 55%),
    var(--paper);
  animation: result-arrive 320ms ease-out both;
}
body.results-open { overflow: hidden; }
.result-screen-content { width: min(100%, 860px); margin: 0 auto; }
.result-intro { max-width: 660px; }
.result-intro h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); }
.result-intro h1:focus { outline: none; }
.result-intro .intro-copy { margin-top: 16px; }
#match-card { margin-top: 34px; }
.result-panel .section-actions { flex-wrap: wrap; margin-top: 38px; }
@keyframes result-arrive {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 620px) {
  .cover { min-height: 100svh; }
  .cover-image { object-position: 82% center; }
  .cover-shade {
    background:
      linear-gradient(90deg, rgba(3, 8, 25, 0.68), rgba(3, 8, 25, 0.05) 95%),
      linear-gradient(180deg, rgba(3, 9, 26, 0.02) 54%, rgba(3, 9, 26, 0.72) 100%);
  }
  .mobile-cover-title {
    position: absolute;
    top: 23%;
    left: 7%;
    display: grid;
    gap: 8px;
    max-width: 78%;
    color: #fff;
    text-shadow: 0 0 8px rgba(225, 250, 255, 0.8), 0 0 24px rgba(55, 224, 255, 0.55);
  }
  .mobile-cover-title strong {
    color: #f4feff;
    font-size: clamp(2rem, 10vw, 3.2rem);
    letter-spacing: 0.01em;
  }
  .mobile-cover-title span {
    color: #d9fbff;
    font-size: clamp(1.05rem, 4.5vw, 1.4rem);
    line-height: 1.18;
  }
  .page {
    width: calc(100% - 36px);
    margin: 0 auto 82px;
  }
  .result-panel:not([hidden]) { padding: 26px 18px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .questions.animate-in .question,
  .scale-option[aria-pressed="true"],
  .scale-option.is-resetting { animation-duration: 0.01ms; }
}
