:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #edf3f1;
  --ink: #151d1c;
  --muted: #64706d;
  --line: #d8e0dd;
  --teal: #0d8b7e;
  --teal-dark: #075f57;
  --coral: #d85b4a;
  --gold: #c58b1c;
  --blue: #4969d6;
  --shadow: 0 22px 55px rgba(21, 29, 28, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color-scheme: light;
}

html,
body,
button,
input,
textarea,
select {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 140, 128, 0.12), transparent 33%),
    linear-gradient(315deg, rgba(216, 91, 74, 0.12), transparent 30%),
    var(--bg);
  letter-spacing: 0;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.site-credit {
  position: fixed;
  right: 8px;
  bottom: 5px;
  z-index: 30;
  color: rgba(21, 29, 28, 0.42);
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  pointer-events: none;
}

.home-landing {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 26%, rgba(15, 140, 128, 0.11), transparent 35%),
    #ffffff;
}

.home-panel {
  width: min(860px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.home-panel .eyebrow {
  margin-bottom: 0;
}

.home-panel h1 {
  margin-bottom: 0;
  font-size: clamp(64px, 12vw, 150px);
  line-height: 0.86;
  letter-spacing: 0;
}

.home-panel p:not(.eyebrow) {
  max-width: 650px;
  margin-top: 8px;
  margin-bottom: 0;
  color: rgba(21, 29, 28, 0.72);
  font-size: clamp(19px, 2.2vw, 28px);
  font-weight: 750;
  line-height: 1.2;
  text-wrap: balance;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.home-actions .button-link {
  min-width: 150px;
  min-height: 48px;
  font-size: 15px;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(14px);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand > span:last-child {
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  font-weight: 900;
  font-size: 25px;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: rgba(21, 29, 28, 0.78);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.top-nav a,
.button-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav a[aria-current="page"] {
  border-color: rgba(15, 140, 128, 0.34);
  background: var(--surface-soft);
  color: var(--teal-dark);
}

.home-actions .primary-button.button-link {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.home-actions .ghost-button.button-link {
  background: #ffffff;
  color: var(--ink);
}

.header-question {
  display: none;
  margin: 0 0 0 auto;
  max-width: min(850px, 56vw);
  color: var(--ink);
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 950;
  line-height: 0.96;
  text-align: right;
  text-wrap: balance;
}

.topbar-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.experience {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 28px 18px 44px;
  display: grid;
  gap: 18px;
}

.hero,
.quiz-card,
.results-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: end;
  padding: 24px;
}

body[data-mode="quiz"] .hero,
body[data-mode="results"] .hero,
body[data-mode="explore"] .hero {
  display: none;
}

body[data-mode="quiz"] .experience {
  width: 100%;
  padding: 0;
  gap: 0;
}

body[data-mode="quiz"] .quiz-card {
  position: relative;
  height: calc(100svh - 72px);
  min-height: calc(100svh - 72px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #ffffff;
  box-shadow: none;
}

body[data-mode="quiz"] .quiz-topline,
body[data-mode="quiz"] .question-block,
body[data-mode="quiz"] .line-header,
body[data-mode="quiz"] .axis {
  position: absolute;
  z-index: 8;
  pointer-events: none;
}

body[data-mode="quiz"] .quiz-topline {
  top: clamp(18px, 3.6svh, 34px);
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  margin-bottom: 0;
}

body[data-mode="quiz"] .quiz-topline > div {
  width: min(520px, 58vw);
}

body[data-mode="quiz"] .progress-track {
  width: 100%;
}

body[data-mode="quiz"] .question-block {
  top: clamp(92px, 14svh, 134px);
  left: clamp(18px, 4vw, 56px);
  width: min(760px, calc(100% - clamp(36px, 8vw, 112px)));
  margin-bottom: 0;
}

body[data-mode="quiz"] .question-block h2 {
  max-width: 720px;
  font-size: clamp(36px, 5.8vw, 76px);
  line-height: 0.96;
}

body[data-mode="quiz"] .question-block p {
  max-width: 520px;
  color: rgba(21, 29, 28, 0.68);
  font-size: clamp(15px, 1.7vw, 20px);
}

body[data-mode="quiz"] .line-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  margin-bottom: 0;
}

body[data-mode="quiz"] .line-header {
  top: clamp(112px, 16svh, 156px);
  right: clamp(18px, 4vw, 56px);
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

body[data-mode="quiz"] .line-header strong {
  font-size: clamp(44px, 7vw, 86px);
  letter-spacing: 0;
}

body[data-mode="quiz"] .line-surface {
  position: absolute;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(216, 91, 74, 0.12), transparent 28%),
    linear-gradient(90deg, transparent 56%, rgba(15, 140, 128, 0.16)),
    repeating-linear-gradient(90deg, transparent 0 9.8%, rgba(21, 29, 28, 0.08) 10% 10.14%),
    repeating-linear-gradient(0deg, transparent 0 16.4%, rgba(21, 29, 28, 0.045) 16.6% 16.75%),
    #ffffff;
}

body[data-mode="quiz"] .line-surface::before {
  inset: clamp(260px, 38svh, 360px) clamp(24px, 5.6vw, 86px) clamp(190px, 26svh, 260px);
  border-top-width: 3px;
  border-bottom-width: 3px;
}

body[data-mode="quiz"] .line-surface::after {
  top: clamp(270px, 39svh, 374px);
  right: clamp(18px, 4vw, 56px);
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
}

body[data-mode="quiz"] .line-fill {
  background: linear-gradient(90deg, rgba(216, 91, 74, 0.12), rgba(216, 91, 74, 0.015));
}

body[data-mode="quiz"] .line-average-marker {
  top: clamp(248px, 35svh, 334px);
  bottom: clamp(174px, 24svh, 246px);
  width: 4px;
}

body[data-mode="quiz"] .line-agent-marker {
  width: 38px;
  height: 38px;
}

body[data-mode="quiz"] .line-agent-marker.closest {
  width: 46px;
  height: 46px;
}

body[data-mode="quiz"] .line-agent-stem {
  top: clamp(268px, 39svh, 370px);
  bottom: clamp(186px, 26svh, 260px);
}

body[data-mode="quiz"] .line-closest-label {
  top: calc(50% - 74px);
}

body[data-mode="quiz"] .draw-line {
  top: clamp(246px, 34svh, 330px);
  bottom: clamp(146px, 20svh, 220px);
  width: 6px;
  transform: translateX(-3px);
}

body[data-mode="quiz"] .draw-line::before {
  width: 28px;
  height: 28px;
}

body[data-mode="quiz"] .draw-line span {
  bottom: -34px;
  font-size: 13px;
}

body[data-mode="quiz"] .axis {
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(82px, 11svh, 118px);
  color: rgba(21, 29, 28, 0.68);
  font-weight: 800;
}

body[data-mode="quiz"] .quiz-comparison {
  position: absolute;
  z-index: 9;
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(84px, 11svh, 118px);
  max-height: min(34svh, 270px);
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(216, 224, 221, 0.78);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 45px rgba(21, 29, 28, 0.12);
  backdrop-filter: blur(18px);
}

body[data-mode="quiz"] .quiz-comparison > p {
  color: rgba(21, 29, 28, 0.78);
  font-weight: 650;
}

body[data-mode="quiz"] .quiz-actions {
  position: absolute;
  z-index: 10;
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(18px, 3.8svh, 34px);
  width: min(420px, calc(100% - clamp(36px, 8vw, 112px)));
}

body[data-mode="quiz"] .source-note {
  position: absolute;
  z-index: 10;
  left: clamp(18px, 4vw, 56px);
  bottom: clamp(24px, 4.6svh, 42px);
  max-width: min(440px, 46vw);
  margin: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 12px;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 0.96;
  text-wrap: balance;
}

.hero-copy {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.hero-proof {
  display: grid;
  gap: 8px;
}

.hero-proof span {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  font-weight: 850;
}

.quiz-card,
.results-card {
  padding: 22px;
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 26px;
}

.step-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.progress-track {
  width: min(520px, 58vw);
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeec;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 180ms ease;
}

.category-chip {
  border: 1px solid rgba(15, 140, 128, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 140, 128, 0.08);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.question-block {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.question-block h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  text-wrap: balance;
}

.question-block p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.line-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.line-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.line-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.line-header strong {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.line-surface {
  --line-pct: 50%;
  position: relative;
  height: 122px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: col-resize;
  outline: none;
  user-select: none;
  touch-action: none;
  background:
    linear-gradient(90deg, rgba(72, 103, 214, 0.11), transparent 48%),
    linear-gradient(90deg, transparent 52%, rgba(15, 140, 128, 0.12)),
    repeating-linear-gradient(90deg, transparent 0 9.8%, rgba(21, 29, 28, 0.07) 10% 10.16%),
    #ffffff;
}

.line-surface::before {
  content: "";
  position: absolute;
  inset: 26px 20px;
  z-index: 1;
  border-top: 2px solid rgba(21, 29, 28, 0.2);
  border-bottom: 2px solid rgba(21, 29, 28, 0.08);
  transform: skewY(-0.35deg);
  pointer-events: none;
}

.line-surface::after {
  content: "Draw the line";
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  pointer-events: none;
}

.line-surface.revealed::after {
  content: "Clanker lines";
  color: var(--teal-dark);
}

.line-surface.locked {
  cursor: default;
}

.line-surface:focus-visible {
  border-color: rgba(15, 140, 128, 0.75);
  box-shadow: 0 0 0 3px rgba(15, 140, 128, 0.14);
}

.line-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--line-pct);
  background: linear-gradient(90deg, rgba(216, 91, 74, 0.09), rgba(216, 91, 74, 0.01));
}

.line-reveal-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.line-surface.revealed .line-reveal-layer {
  z-index: 6;
  opacity: 1;
  pointer-events: auto;
}

.line-surface.revealed .draw-line {
  pointer-events: none;
}

.line-surface.revealed .line-agent-marker.has-model-tooltip {
  cursor: help;
  pointer-events: auto;
}

.line-average-marker {
  position: absolute;
  top: 22px;
  bottom: 18px;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(15, 140, 128, 0.24);
}

.line-average-marker::after {
  content: "avg";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.line-agent-marker {
  position: absolute;
  top: calc(50% + var(--marker-offset, 0px));
  left: clamp(24px, var(--marker-pct), calc(100% - 24px));
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  animation: marker-pop 260ms ease forwards;
  animation-delay: calc(var(--marker-order, 0) * 36ms);
}

.line-agent-marker.closest {
  width: 29px;
  height: 29px;
  box-shadow:
    0 0 0 2px rgba(73, 105, 214, 0.22),
    0 8px 18px rgba(73, 105, 214, 0.24);
}

.line-agent-stem {
  position: absolute;
  top: 32px;
  bottom: 26px;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(21, 29, 28, 0.2);
}

.logo-marker {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand-color, var(--ink));
  box-shadow: 0 0 0 1px rgba(21, 29, 28, 0.24);
}

.logo-marker.has-model-tooltip {
  overflow: visible;
}

.logo-marker img {
  display: block;
  width: 76%;
  height: 76%;
  object-fit: contain;
  pointer-events: none;
}

.logo-marker > span {
  color: var(--brand-color, var(--ink));
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.logo-marker > span:not(.model-hover-card) {
  pointer-events: none;
}

.model-hover-card {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: 40;
  width: min(300px, 34vw);
  transform: translate(-50%, 6px);
  opacity: 0;
  visibility: hidden;
  border: 1px solid rgba(216, 224, 221, 0.88);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 45px rgba(21, 29, 28, 0.16);
  text-align: left;
  pointer-events: none;
  backdrop-filter: blur(16px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
}

.model-hover-card strong,
.model-hover-card span,
.model-hover-card p {
  display: block;
}

.model-hover-card strong {
  margin-bottom: 3px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
}

.model-hover-card span {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.model-hover-card p {
  margin: 0;
  color: rgba(21, 29, 28, 0.72);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.28;
}

.has-model-tooltip:hover,
.has-model-tooltip:focus-visible {
  z-index: 50 !important;
}

.has-model-tooltip:hover .model-hover-card,
.has-model-tooltip:focus-visible .model-hover-card {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.tooltip-near-start .model-hover-card {
  left: 0;
  transform: translate(0, 6px);
}

.tooltip-near-start:hover .model-hover-card,
.tooltip-near-start:focus-visible .model-hover-card {
  transform: translate(0, 0);
}

.tooltip-near-end .model-hover-card {
  right: 0;
  left: auto;
  transform: translate(0, 6px);
}

.tooltip-near-end:hover .model-hover-card,
.tooltip-near-end:focus-visible .model-hover-card {
  transform: translate(0, 0);
}

.line-closest-label {
  position: absolute;
  top: 34px;
  left: 50%;
  z-index: 4;
  max-width: min(90px, 28vw);
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid rgba(73, 105, 214, 0.24);
  border-radius: 6px;
  padding: 5px 7px;
  background: #ffffff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: marker-label-in 220ms ease 130ms both;
}

.line-closest-label.near-start {
  left: 12px !important;
  transform: translateX(0);
}

.line-closest-label.near-end {
  right: 12px;
  left: auto !important;
  transform: translateX(0);
}

.draw-line {
  position: absolute;
  top: 15px;
  bottom: 12px;
  left: var(--line-pct);
  z-index: 3;
  width: 4px;
  transform: translateX(-2px);
  background: var(--coral);
  box-shadow:
    0 0 0 1px rgba(216, 91, 74, 0.18),
    0 12px 24px rgba(216, 91, 74, 0.22);
}

.draw-line::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid #ffffff;
  border-radius: 4px;
  background: var(--coral);
}

.draw-line span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(216, 91, 74, 0.34);
  border-radius: 6px;
  padding: 5px 8px;
  background: #ffffff;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.draw-line.near-start span {
  left: 0;
  transform: translateX(0);
}

.draw-line.near-end span {
  left: auto;
  right: 0;
  transform: translateX(0);
}

.line-surface.revealed .draw-line {
  z-index: 5;
  width: 5px;
}

.line-surface.revealed .draw-line span {
  bottom: 4px;
}

@keyframes marker-pop {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes marker-label-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.quiz-comparison {
  display: grid;
  gap: 10px;
  margin: -4px 0 18px;
}

.quiz-comparison > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hidden {
  display: none !important;
}

.moral-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 18px 44px;
}

.moral-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.moral-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 22px;
  align-items: start;
}

.moral-head h1 {
  max-width: 900px;
  margin-bottom: 0;
  font-size: clamp(32px, 5vw, 62px);
}

.moral-value {
  max-width: 260px;
  justify-self: end;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 950;
  line-height: 0.94;
  text-align: right;
  overflow-wrap: anywhere;
}

.moral-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.moral-meta p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

.moral-control {
  display: grid;
  gap: 10px;
}

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

.moral-choice {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: clamp(24px, 4vw, 44px);
  font-weight: 950;
}

.moral-choice.selected {
  border-color: rgba(15, 140, 128, 0.58);
  background: var(--surface-soft);
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 2px rgba(15, 140, 128, 0.12);
}

.moral-slider-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.moral-slider-card.never-selected {
  opacity: 0.45;
}

.moral-slider-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.moral-slider-top strong {
  color: var(--teal-dark);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1;
  text-align: center;
}

.moral-slider-top span:last-child {
  text-align: right;
}

.moral-range {
  width: 100%;
  accent-color: var(--coral);
}

.moral-line-panel {
  display: grid;
  gap: 10px;
}

.moral-line-surface {
  height: 154px;
  background:
    linear-gradient(90deg, rgba(216, 91, 74, 0.08), transparent 44%),
    linear-gradient(90deg, transparent 54%, rgba(15, 140, 128, 0.1)),
    #ffffff;
}

.moral-line-surface.never-selected {
  opacity: 0.55;
}

.moral-line-surface .line-tick-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.moral-line-surface .line-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tick-pct);
  transform: translateX(-50%);
}

.moral-line-surface .line-tick::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 30px;
  left: 50%;
  border-left: 1px solid rgba(21, 29, 28, 0.12);
}

.moral-line-surface .line-tick b {
  position: absolute;
  bottom: 10px;
  left: 50%;
  max-width: 110px;
  transform: translateX(-50%);
  color: rgba(21, 29, 28, 0.68);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.moral-line-surface .line-tick.label-hidden b {
  display: none;
}

.moral-line-surface .line-tick.edge-start b {
  left: 12px;
  transform: translateX(0);
  text-align: left;
}

.moral-line-surface .line-tick.edge-end b {
  right: 12px;
  left: auto;
  transform: translateX(0);
  text-align: right;
}

.moral-line-surface .draw-line {
  z-index: 4;
}

.moral-line-surface .draw-line span {
  bottom: 42px;
}

.never-button {
  min-height: 46px;
  border: 1px solid rgba(216, 91, 74, 0.34);
  border-radius: 8px;
  background: rgba(216, 91, 74, 0.06);
  color: var(--coral);
  font-weight: 950;
}

.never-button.selected {
  background: var(--coral);
  color: #ffffff;
}

.moral-comparison {
  display: grid;
  gap: 10px;
}

.moral-comparison > p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.moral-binary-chart {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.moral-binary-chart article,
.never-bucket {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.moral-binary-chart article.selected,
.never-bucket.selected {
  border-color: rgba(15, 140, 128, 0.52);
  background: var(--surface-soft);
}

.moral-binary-chart strong,
.never-bucket strong {
  display: block;
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.moral-logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.moral-logo-strip > span {
  width: 34px;
  height: 34px;
}

.moral-spread {
  position: relative;
  min-height: 146px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 24.7%, rgba(21, 29, 28, 0.08) 25% 25.2%),
    #ffffff;
}

.moral-spread i,
.moral-spread b {
  position: absolute;
  transform: translateX(-50%);
}

.moral-spread i {
  top: 20px;
  bottom: 26px;
  width: 5px;
  border-radius: 999px;
}

.moral-spread b {
  top: calc(50% + var(--marker-offset, 0px));
  left: clamp(20px, var(--marker-pct), calc(100% - 20px));
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
}

.moral-spread b.closest {
  width: 42px;
  height: 42px;
  box-shadow:
    0 0 0 2px rgba(73, 105, 214, 0.22),
    0 8px 18px rgba(73, 105, 214, 0.24);
}

.moral-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.moral-results {
  padding: 22px;
}

.moral-breakdown-item {
  grid-template-columns: minmax(0, 1fr);
}

.result-hero {
  padding: 6px 2px 22px;
}

.result-hero h2 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.result-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.score-grid article {
  min-height: 144px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface-soft);
}

.score-grid span,
.breakdown-copy span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-grid strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.score-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.breakdown-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.breakdown-head h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.breakdown-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.breakdown-list {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.breakdown-copy strong {
  display: block;
  margin: 4px 0;
  line-height: 1.2;
}

.breakdown-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mini-line {
  position: relative;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, transparent 0 24%, rgba(21, 29, 28, 0.08) 25% 25.3%),
    #f8faf9;
}

.mini-line i {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 3px;
  transform: translateX(-1.5px);
  border-radius: 999px;
}

.mini-average {
  background: var(--teal);
}

.mini-user {
  background: var(--coral);
}

.copy-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.all-biguities-panel {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.all-biguities-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.all-biguities-head h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.all-biguities-head p:last-child {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  text-align: right;
}

.all-biguities-list {
  display: grid;
  gap: 18px;
}

.all-biguities-group {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(216, 224, 221, 0.72);
}

.all-biguities-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.all-biguities-group h4 {
  margin: 0;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.all-biguities-group h4 a {
  color: inherit;
  text-decoration: none;
}

.all-biguities-group h4 a:hover {
  text-decoration: underline;
}

.all-biguities-group ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
  margin: 0;
  padding-left: 22px;
}

.all-biguities-group li {
  padding-left: 3px;
  color: rgba(21, 29, 28, 0.82);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.28;
}

.source-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.explore-screen {
  display: grid;
  gap: 14px;
}

.explore-hero,
.explore-layout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.explore-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.explore-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.explore-hero p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.explore-layout {
  overflow: hidden;
}

.explore-detail {
  min-width: 0;
  padding: 22px;
}

.explore-detail-head {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.explore-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.explore-position {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.explore-detail h3 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.03;
  text-wrap: balance;
}

.explore-detail-head p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.line-panel.compact {
  margin-bottom: 14px;
}

.line-panel.compact .line-surface {
  height: 104px;
}

.explore-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.explore-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.explore-actions p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.4;
}

.quiz-models,
.explore-models {
  display: grid;
  gap: 8px;
}

.comparison-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comparison-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
}

.comparison-card.closest {
  border-color: rgba(15, 140, 128, 0.42);
  background: rgba(237, 243, 241, 0.92);
}

.comparison-card.opposed {
  border-color: rgba(216, 91, 74, 0.28);
}

.comparison-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comparison-card-mark {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 29, 28, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0;
}

.comparison-card-head div {
  min-width: 0;
}

.comparison-card-head span:not(.comparison-card-mark) {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.comparison-card-head strong {
  display: block;
  overflow: hidden;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-card > b {
  color: var(--ink);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 950;
  line-height: 0.95;
}

.comparison-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(21, 29, 28, 0.68);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.view-all-button {
  justify-self: start;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.view-all-drawer {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(216, 224, 221, 0.72);
  padding-top: 8px;
}

.explore-spread {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 24.7%, rgba(21, 29, 28, 0.08) 25% 25.2%),
    linear-gradient(90deg, rgba(72, 103, 214, 0.08), rgba(15, 140, 128, 0.08)),
    #ffffff;
}

.explore-spread i,
.explore-spread b,
.spread-agent-stem {
  position: absolute;
  transform: translateX(-50%);
}

.explore-spread i {
  top: 24px;
  bottom: 24px;
  width: 4px;
  border-radius: 999px;
}

.spread-average {
  background: var(--teal);
}

.spread-user {
  background: var(--coral);
}

.explore-spread b {
  top: calc(50% + var(--marker-offset, 0px));
  left: clamp(18px, var(--marker-pct), calc(100% - 18px));
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
}

.explore-spread b.closest {
  width: 29px;
  height: 29px;
  box-shadow:
    0 0 0 2px rgba(73, 105, 214, 0.22),
    0 8px 18px rgba(73, 105, 214, 0.24);
}

.spread-agent-stem {
  top: 28px;
  bottom: 22px;
  width: 1px;
  background: rgba(21, 29, 28, 0.18);
}

.spread-label {
  position: absolute;
  bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.spread-label.left {
  left: 10px;
}

.spread-label.right {
  right: 10px;
}

.explore-model-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.85fr) 132px minmax(0, 1.4fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.explore-model-row.closest {
  border-color: rgba(15, 140, 128, 0.44);
  background: var(--surface-soft);
}

.explore-model-row span {
  color: var(--teal-dark);
  font-weight: 900;
}

.explore-model-row strong {
  overflow-wrap: anywhere;
}

.model-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.model-name > span:last-child {
  overflow-wrap: anywhere;
}

.model-row-logo {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.explore-model-row p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
  }

  .top-nav {
    gap: 6px;
  }

  .top-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }

  .topbar-badge {
    display: none;
  }

  .experience {
    padding: 14px 12px 32px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .hero-proof {
    grid-template-columns: 1fr;
  }

  .quiz-card,
  .results-card {
    padding: 16px;
  }

  .quiz-topline,
  .line-header,
  .breakdown-head {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-track {
    width: 100%;
  }

  .score-grid,
  .breakdown-item,
  .explore-model-row,
  .comparison-highlights {
    grid-template-columns: 1fr;
  }

  .explore-hero,
  .explore-nav,
  .explore-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .quiz-actions,
  .result-actions {
    flex-direction: column-reverse;
  }

  .all-biguities-head {
    align-items: stretch;
    flex-direction: column;
  }

  .all-biguities-head p:last-child {
    max-width: none;
    text-align: left;
  }

  .all-biguities-group ol {
    grid-template-columns: 1fr;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .moral-head {
    grid-template-columns: 1fr;
  }

  .moral-value {
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .moral-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .moral-binary-chart,
  .moral-choice-grid {
    grid-template-columns: 1fr;
  }

  body[data-mode="quiz"] .quiz-topline {
    top: 14px;
    left: 14px;
    right: 14px;
    align-items: flex-start;
    flex-direction: row;
  }

  body[data-mode="quiz"] .category-chip {
    align-self: flex-start;
    width: auto;
    white-space: nowrap;
  }

  body[data-mode="quiz"] .quiz-topline > div {
    width: min(226px, calc(100% - 104px));
  }

  body[data-mode="quiz"] .question-block {
    top: 96px;
    left: 14px;
    right: 14px;
    width: auto;
  }

  body[data-mode="quiz"] .question-block h2 {
    max-width: 100%;
    font-size: clamp(34px, 10vw, 48px);
    line-height: 0.98;
  }

  body[data-mode="quiz"] .question-block p {
    max-width: 92%;
    font-size: 15px;
  }

  body[data-mode="quiz"] .line-header {
    top: 248px;
    right: 14px;
    left: 14px;
  }

  body[data-mode="quiz"] .line-header strong {
    font-size: clamp(46px, 14vw, 62px);
  }

  body[data-mode="quiz"] .line-surface::before {
    inset: clamp(300px, 43svh, 360px) 18px clamp(178px, 30svh, 258px);
  }

  body[data-mode="quiz"] .line-surface::after {
    top: clamp(308px, 44svh, 368px);
    right: 14px;
  }

  body[data-mode="quiz"] .line-average-marker {
    top: clamp(282px, 40svh, 338px);
    bottom: clamp(166px, 28svh, 238px);
  }

  body[data-mode="quiz"] .line-agent-marker {
    width: 32px;
    height: 32px;
  }

  body[data-mode="quiz"] .line-agent-marker.closest {
    width: 38px;
    height: 38px;
  }

  body[data-mode="quiz"] .line-agent-stem {
    top: clamp(300px, 43svh, 360px);
    bottom: clamp(176px, 30svh, 254px);
  }

  body[data-mode="quiz"] .line-closest-label {
    top: calc(50% - 62px);
  }

  body[data-mode="quiz"] .draw-line {
    top: clamp(280px, 40svh, 336px);
    bottom: clamp(150px, 26svh, 220px);
  }

  body[data-mode="quiz"] .axis {
    left: 14px;
    right: 14px;
    bottom: clamp(124px, 17svh, 142px);
  }

  body[data-mode="quiz"] .quiz-comparison {
    left: 12px;
    right: 12px;
    bottom: clamp(148px, 19svh, 160px);
    max-height: min(27svh, 224px);
    padding: 10px;
  }

  body[data-mode="quiz"] .quiz-actions {
    right: 14px;
    bottom: 20px;
    width: calc(100% - 28px);
  }
}

@media (max-width: 520px) {
  .brand small {
    display: block;
    font-size: 12px;
  }

  h1 {
    font-size: 38px;
  }

  .hero-copy,
  .result-hero p:last-child {
    font-size: 16px;
  }

  .line-surface {
    height: 110px;
  }

  .line-surface::after {
    display: none;
  }
}

/* Polished full-page quiz stage. Keep this late so it wins over base card/mobile rules. */
body[data-mode="quiz"] {
  --quiz-header-h: 72px;
  overflow: hidden;
}

body[data-mode="quiz"] .topbar {
  height: var(--quiz-header-h);
  min-height: var(--quiz-header-h);
  align-items: center;
}

body[data-mode="quiz"] .brand {
  flex: 0 0 auto;
  max-width: min(390px, 38vw);
}

body[data-mode="quiz"] .header-question {
  display: none;
}

body[data-mode="quiz"] .experience {
  width: 100%;
  padding: 0;
  gap: 0;
}

body[data-mode="quiz"] .hero {
  display: none;
}

body[data-mode="quiz"] .quiz-card {
  --stage-x: clamp(22px, 4vw, 64px);
  --stage-top: clamp(22px, 4svh, 42px);
  --line-top: clamp(250px, 31svh, 320px);
  --line-bottom: clamp(126px, 20svh, 230px);
  height: calc(100svh - var(--quiz-header-h));
  min-height: calc(100svh - var(--quiz-header-h));
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.46fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 34px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: var(--stage-top) var(--stage-x) clamp(22px, 4svh, 42px);
  background: #ffffff;
  box-shadow: none;
}

body[data-mode="quiz"] .quiz-card::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0.72) 28%, transparent 58%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0, rgba(255, 255, 255, 0.82) 34%, transparent 67%),
    linear-gradient(270deg, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.78) 23%, transparent 51%);
}

body[data-mode="quiz"] .quiz-topline,
body[data-mode="quiz"] .question-block,
body[data-mode="quiz"] .line-header,
body[data-mode="quiz"] .quiz-actions,
body[data-mode="quiz"] .quiz-comparison,
body[data-mode="quiz"] .source-note {
  position: relative;
  z-index: 8;
}

body[data-mode="quiz"] .quiz-topline,
body[data-mode="quiz"] .question-block,
body[data-mode="quiz"] .line-header,
body[data-mode="quiz"] .quiz-comparison {
  inset: auto;
}

body[data-mode="quiz"] .quiz-topline {
  grid-column: 1 / -1;
  grid-row: 1;
  position: absolute;
  top: clamp(12px, 2.3svh, 22px);
  left: var(--stage-x);
  right: var(--stage-x);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0;
  pointer-events: none;
}

body[data-mode="quiz"] .quiz-topline > div {
  width: clamp(118px, 15vw, 178px);
}

body[data-mode="quiz"] .step-label {
  margin-bottom: 6px;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.04em;
}

body[data-mode="quiz"] .progress-track {
  width: 100%;
  height: 6px;
}

body[data-mode="quiz"] .category-chip {
  width: auto;
  white-space: nowrap;
  min-height: 28px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1;
}

body[data-mode="quiz"] .question-block {
  position: absolute;
  top: clamp(22px, 4svh, 42px);
  left: var(--stage-x);
  z-index: 8;
  display: block;
  width: min(760px, calc(100% - var(--stage-x) * 2 - 390px));
  min-width: 420px;
  margin: 0;
  isolation: isolate;
  pointer-events: none;
}

body[data-mode="quiz"] .question-block::before,
body[data-mode="quiz"] .line-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 0;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

body[data-mode="quiz"] .question-block::before {
  content: none;
}

body[data-mode="quiz"] .line-header::before {
  content: none;
}

body[data-mode="quiz"] .question-block h2 {
  max-width: 780px;
  font-size: clamp(38px, min(5.8vw, 8.2svh), 76px);
  line-height: 0.96;
  text-wrap: balance;
  text-shadow: none;
}

body[data-mode="quiz"] .question-block p {
  display: none;
}

body[data-mode="quiz"] .line-header {
  position: absolute;
  top: clamp(22px, 4svh, 44px);
  right: var(--stage-x);
  display: grid;
  justify-items: end;
  gap: 8px;
  margin: 0;
  text-align: right;
  isolation: isolate;
  pointer-events: none;
}

body[data-mode="quiz"] .line-header strong {
  max-width: 7ch;
  font-size: clamp(46px, min(6.4vw, 8.5svh), 86px);
  line-height: 0.86;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78), 0 14px 38px rgba(255, 255, 255, 0.72);
}

body[data-mode="quiz"] .line-header span {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
}

body[data-mode="quiz"] .line-panel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  margin: 0;
}

body[data-mode="quiz"] .line-surface {
  position: absolute;
  inset: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

body[data-mode="quiz"] .line-fill {
  display: none;
}

body[data-mode="quiz"] .line-tick-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

body[data-mode="quiz"] .line-tick {
  position: absolute;
  top: calc(var(--line-top) + 3px);
  bottom: calc(var(--line-bottom) + 22px);
  left: var(--tick-pct);
  transform: translateX(-50%);
}

body[data-mode="quiz"] .line-tick::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 1px solid rgba(21, 29, 28, 0.14);
}

body[data-mode="quiz"] .line-tick b {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  max-width: clamp(44px, 8vw, 88px);
  overflow: hidden;
  color: rgba(21, 29, 28, 0.72);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-mode="quiz"] .line-tick.edge-start b {
  left: clamp(24px, 4vw, 56px);
  transform: translateX(0);
}

body[data-mode="quiz"] .line-tick.edge-end b {
  right: clamp(24px, 4vw, 56px);
  left: auto;
  transform: translateX(0);
}

body[data-mode="quiz"] .line-surface::before {
  inset: var(--line-top) 0 var(--line-bottom);
  border-top: 3px solid rgba(21, 29, 28, 0.18);
  border-bottom: 0;
  transform: none;
}

body[data-mode="quiz"] .line-surface::after {
  top: calc(var(--line-top) + 18px);
  right: var(--stage-x);
  display: block;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

body[data-mode="quiz"] .line-average-marker {
  top: calc(var(--line-top) - 22px);
  bottom: calc(var(--line-bottom) - 8px);
  width: 4px;
}

body[data-mode="quiz"] .line-agent-stem {
  top: calc(var(--line-top) + 16px);
  bottom: calc(var(--line-bottom) + 16px);
}

body[data-mode="quiz"] .line-agent-marker {
  width: 38px;
  height: 38px;
}

body[data-mode="quiz"] .line-agent-marker.closest {
  width: 46px;
  height: 46px;
}

body[data-mode="quiz"] .line-closest-label {
  top: calc(var(--line-top) + 54px);
}

body[data-mode="quiz"] .draw-line {
  top: calc(var(--line-top) - 26px);
  bottom: calc(var(--line-bottom) - 56px);
  width: 6px;
  transform: translateX(-3px);
}

body[data-mode="quiz"] .draw-line::before {
  width: 28px;
  height: 28px;
}

body[data-mode="quiz"] .draw-line span {
  bottom: -34px;
  font-size: 13px;
}

body[data-mode="quiz"] .axis {
  display: none;
}

body[data-mode="quiz"] .line-surface.revealed + .axis {
  opacity: 0;
}

body[data-mode="quiz"] .quiz-comparison {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  max-height: min(27svh, 250px);
  margin: 0 0 clamp(54px, 7svh, 78px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(216, 224, 221, 0.78);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 45px rgba(21, 29, 28, 0.12);
  backdrop-filter: blur(18px);
}

body[data-mode="quiz"] .quiz-comparison > p {
  color: rgba(21, 29, 28, 0.78);
  font-weight: 650;
}

body[data-mode="quiz"] .quiz-actions {
  position: absolute;
  right: var(--stage-x);
  bottom: clamp(22px, 4svh, 42px);
  width: auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(216, 224, 221, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(21, 29, 28, 0.08);
  backdrop-filter: blur(16px);
}

body[data-mode="quiz"] .quiz-actions .ghost-button,
body[data-mode="quiz"] .quiz-actions .primary-button {
  min-height: 42px;
}

body[data-mode="quiz"] .quiz-actions .ghost-button {
  min-width: 86px;
  background: transparent;
}

body[data-mode="quiz"] .quiz-actions .ghost-button:disabled {
  display: none;
}

body[data-mode="quiz"] .source-note {
  position: absolute;
  left: var(--stage-x);
  bottom: clamp(28px, 4.6svh, 48px);
  max-width: min(440px, 46vw);
  margin: 0;
}

@media (max-width: 820px) {
  body[data-mode="quiz"] {
    --quiz-header-h: 72px;
  }

  body[data-mode="quiz"] .topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
  }

  body[data-mode="quiz"] .brand {
    max-width: 100%;
  }

  body[data-mode="quiz"] .header-question {
    display: none;
  }

  body[data-mode="quiz"] .quiz-card {
    --stage-x: 14px;
    --stage-top: 14px;
    --line-top: clamp(370px, 52svh, 430px);
    --line-bottom: clamp(78px, 12svh, 122px);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: calc(100svh - var(--quiz-header-h));
    min-height: calc(100svh - var(--quiz-header-h));
    padding: var(--stage-top) var(--stage-x) 20px;
  }

  body[data-mode="quiz"] .quiz-topline {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-mode="quiz"] .quiz-topline > div {
    width: min(130px, calc(100% - 104px));
  }

  body[data-mode="quiz"] .question-block {
    top: 18px;
    right: var(--stage-x);
    left: var(--stage-x);
    width: 100%;
    min-width: 0;
    max-width: calc(100% - var(--stage-x) * 2);
    margin: 0;
  }

  body[data-mode="quiz"] .question-block h2 {
    font-size: clamp(32px, min(9.3vw, 6.5svh), 44px);
    line-height: 0.98;
  }

  body[data-mode="quiz"] .question-block p {
    max-width: 92%;
    font-size: 15px;
  }

  body[data-mode="quiz"] .line-header {
    top: clamp(154px, 22svh, 184px);
    right: auto;
    left: var(--stage-x);
    justify-items: start;
    margin: 0;
    text-align: left;
  }

  body[data-mode="quiz"] .line-header strong {
    font-size: clamp(44px, min(14vw, 7.6svh), 64px);
  }

  body[data-mode="quiz"] .line-surface::after {
    top: calc(var(--line-top) + 10px);
    right: var(--stage-x);
  }

  body[data-mode="quiz"] .draw-line span {
    bottom: 18px;
  }

  body[data-mode="quiz"] .line-agent-marker {
    width: 32px;
    height: 32px;
  }

  body[data-mode="quiz"] .line-agent-marker.closest {
    width: 38px;
    height: 38px;
  }

  body[data-mode="quiz"] .axis {
    bottom: clamp(122px, 17svh, 142px);
  }

  body[data-mode="quiz"] .quiz-comparison {
    grid-column: 1;
    grid-row: 4;
    max-height: min(27svh, 224px);
    margin-bottom: 138px;
    padding: 10px;
  }

  body[data-mode="quiz"] .quiz-card:has(.line-surface.revealed) .line-header {
    opacity: 0;
  }

  body[data-mode="quiz"] .quiz-actions {
    right: var(--stage-x);
    bottom: 20px;
    width: calc(100% - var(--stage-x) * 2);
    justify-content: space-between;
  }

  body[data-mode="quiz"] .quiz-actions .primary-button {
    flex: 1;
  }
}

body[data-page="moral"][data-mode="quiz"] .moral-shell {
  width: 100%;
  padding: 0;
}

body[data-page="moral"][data-mode="quiz"] .moral-card {
  --line-top: clamp(290px, 31svh, 330px);
  --line-bottom: clamp(118px, 18svh, 210px);
  border: 0;
  border-radius: 0;
  padding: var(--stage-top) var(--stage-x) clamp(22px, 4svh, 42px);
  background: #ffffff;
  box-shadow: none;
}

body[data-page="moral"][data-mode="quiz"] .moral-question-block {
  width: min(720px, calc(100% - var(--stage-x) * 2 - 300px));
  min-width: 0;
}

body[data-page="moral"][data-mode="quiz"] .moral-question-block h2 {
  font-size: clamp(34px, min(4.8vw, 6.8svh), 62px);
}

body[data-page="moral"][data-mode="quiz"] .moral-control {
  display: block;
  gap: 0;
}

body[data-page="moral"][data-mode="quiz"] .moral-line-panel {
  position: static;
  display: block;
}

body[data-page="moral"][data-mode="quiz"] .moral-line-surface {
  height: auto;
  background: #ffffff;
}

body[data-page="moral"][data-mode="quiz"] .moral-line-surface.never-selected {
  opacity: 1;
}

body[data-page="moral"][data-mode="quiz"] .moral-line-surface.unanswered .draw-line {
  background: rgba(21, 29, 28, 0.32);
}

body[data-page="moral"][data-mode="quiz"] .moral-line-surface.unanswered .draw-line::before {
  background: rgba(21, 29, 28, 0.38);
}

body[data-page="moral"][data-mode="quiz"] .draw-line {
  left: clamp(18px, var(--line-pct), calc(100% - 18px));
}

body[data-page="moral"][data-mode="quiz"] .moral-line-header strong {
  max-width: 9ch;
}

body[data-page="moral"][data-mode="quiz"] .binary-line .line-tick.edge-start b {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

body[data-page="moral"][data-mode="quiz"] .binary-line .line-tick.edge-end b {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

body[data-page="moral"][data-mode="quiz"] .never-button {
  position: absolute;
  top: calc(var(--line-top) + 58px);
  right: var(--stage-x);
  z-index: 9;
  width: auto;
  min-height: 36px;
  padding: 0 14px;
  border-color: rgba(21, 29, 28, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(21, 29, 28, 0.08);
  backdrop-filter: blur(14px);
}

body[data-page="moral"][data-mode="quiz"] .never-button.selected {
  border-color: rgba(216, 91, 74, 0.44);
  background: var(--coral);
  color: #ffffff;
}

body[data-page="moral"][data-mode="quiz"] #moralChart:empty {
  display: none;
}

body[data-page="moral"][data-mode="quiz"] #moralChart {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

body[data-page="moral"][data-mode="quiz"] .never-bucket {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
}

body[data-page="moral"][data-mode="quiz"] .never-bucket strong {
  margin-bottom: 0;
}

body[data-page="moral"][data-mode="quiz"] .moral-logo-strip > span {
  width: 28px;
  height: 28px;
}

body[data-page="moral"][data-mode="results"] {
  overflow: auto;
}

.summary-headline {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.15;
}

.summary-body {
  display: block;
  color: rgba(21, 29, 28, 0.72);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

@media (max-width: 820px) {
  body[data-page="moral"][data-mode="quiz"] .moral-card {
    --line-top: clamp(390px, 56svh, 470px);
    --line-bottom: clamp(82px, 12svh, 122px);
  }

  body[data-page="moral"][data-mode="quiz"] .moral-question-block {
    width: 100%;
    max-width: calc(100% - var(--stage-x) * 2);
  }

  body[data-page="moral"][data-mode="quiz"] .moral-question-block h2 {
    font-size: clamp(28px, min(8vw, 5.8svh), 40px);
  }

  body[data-page="moral"][data-mode="quiz"] .never-button {
    top: calc(var(--line-top) + 46px);
    right: var(--stage-x);
    min-height: 34px;
    font-size: 12px;
  }
}
