/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* Palette */
  --bg:            #f7f3ed;
  --surface:       #fffefb;
  --surface-2:     #f0ebe3;
  --surface-3:     #e8e1d6;
  --ink:           #100e0b;
  --ink-2:         #382e22;
  --muted:         #7d6e5e;
  --line:          rgba(16, 14, 11, 0.1);
  --line-strong:   rgba(16, 14, 11, 0.18);

  /* Accent trio */
  --accent:        #f04e22;
  --accent-hover:  #d43b14;
  --accent-glow:   rgba(240, 78, 34, 0.16);
  --accent-2:      #1f4de0;
  --accent-3:      #0b7960;

  /* Result-card dark palette */
  --dark-bg:       #0d0a08;
  --dark-surface:  #1a1310;
  --dark-line:     rgba(240, 78, 34, 0.18);
  --dark-text:     #ede1cc;
  --dark-muted:    #9a8372;
  --dark-gold:     #f5b04a;

  /* Elevation */
  --shadow-xs: 0 1px 3px rgba(16, 14, 11, 0.07);
  --shadow-sm: 0 2px 8px rgba(16, 14, 11, 0.07), 0 6px 18px rgba(16, 14, 11, 0.05);
  --shadow-md: 0 4px 16px rgba(16, 14, 11, 0.09), 0 14px 40px rgba(16, 14, 11, 0.07);
  --shadow-lg: 0 8px 32px rgba(16, 14, 11, 0.11), 0 28px 72px rgba(16, 14, 11, 0.09);

  /* Geometry */
  --radius:     18px;
  --radius-sm:  10px;
  --radius-xs:  6px;
  --radius-pill: 999px;

  /* Typography */
  --font-sans: "Avenir Next", "Avenir", -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-mono: "SFMono-Regular", "SF Mono", "Menlo", "Monaco", monospace;
}

/* ============================================
   RESET + BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

a { color: inherit; }
button { font: inherit; color: inherit; border: none; }
pre { margin: 0; white-space: pre-wrap; }
ul, ol { margin: 0; }

code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  padding: 0.1em 0.38em;
  border-radius: 4px;
  background: rgba(16, 14, 11, 0.07);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-shell {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 0 64px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.page-main {
  display: grid;
  gap: 18px;
  margin: 18px 0;
}

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 10px;
  z-index: 100;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  text-decoration: none;
  line-height: 1;
}

.site-brand__eyebrow {
  display: inline-flex;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-brand__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  padding: 6px 11px;
  border-radius: var(--radius-xs);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.locale-switcher a {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.locale-switcher a:hover {
  color: var(--ink);
}

.locale-switcher a.is-active {
  background: var(--ink);
  color: var(--surface);
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 32px;
  background: var(--ink);
  border-radius: var(--radius);
  margin-top: 4px;
}

.site-footer__brand strong {
  display: block;
  margin-bottom: 6px;
  color: #f0e4d4;
  font-size: 0.92rem;
  font-weight: 700;
}

.site-footer__brand p {
  margin: 0;
  font-size: 0.84rem;
  color: #6a5a4a;
  max-width: 38ch;
  line-height: 1.55;
}

.site-footer__meta {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  align-self: center;
}

.site-footer__meta a {
  padding: 5px 9px;
  border-radius: 6px;
  color: #6a5a4a;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.14s, color 0.14s;
}

.site-footer__meta a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f0e4d4;
}

/* ============================================
   UTILITY: EYEBROW
   ============================================ */
.eyebrow,
.section-heading .eyebrow,
.result-poster .eyebrow,
.quiz-frame .eyebrow,
.quiz-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(280px, 0.72fr);
  gap: 20px;
  align-items: start;
  padding: 48px 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 78, 34, 0.06), transparent 70%);
  pointer-events: none;
}

.hero__copy { min-width: 0; }

.hero h1 {
  font-size: clamp(2.8rem, 6.5vw, 5.8rem);
  max-width: 12ch;
  margin: 8px 0 20px;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero__lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 26px;
  line-height: 1.68;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero__meta {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.68;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 0;
}

.hero__panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.hero__poster {
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(240, 78, 34, 0.05), rgba(31, 77, 224, 0.04));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.hero__poster .eyebrow {
  margin-bottom: 6px;
}

.hero__poster p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.58;
}

/* ============================================
   STAT GRID
   ============================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.stat-card strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-serif);
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
}

.stat-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ============================================
   BUTTONS
   ============================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.1s, box-shadow 0.14s, opacity 0.14s;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 78, 34, 0.3);
}

.button:active {
  transform: translateY(0);
  box-shadow: none;
}

.button:disabled,
.button[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

.button--secondary {
  background: var(--ink);
  color: #f0e4d4;
  border-color: var(--ink);
}

.button--secondary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
  box-shadow: 0 6px 20px rgba(16, 14, 11, 0.22);
}

.button--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button--ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: none;
  transform: none;
}

/* ============================================
   GENERIC SECTION
   ============================================ */
.section {
  display: grid;
  gap: 20px;
  padding: 34px 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section--split {
  grid-template-columns: minmax(0, 1.05fr) minmax(270px, 0.95fr);
  gap: 36px;
  align-items: start;
}

/* ============================================
   SECTION HEADING
   ============================================ */
.section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
}

.section-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.section-heading p {
  color: var(--muted);
  font-size: 0.97rem;
  max-width: 62ch;
  margin: 0;
  line-height: 1.62;
}

/* ============================================
   FEATURE GRID + CARDS
   ============================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  padding: 24px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  min-height: 160px;
  transition: box-shadow 0.16s, transform 0.16s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.58;
}

.feature-card--small h3 {
  font-size: 1rem;
}

/* ============================================
   TYPE GRID + CARDS
   ============================================ */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  position: relative;
  overflow: hidden;
}

.type-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0;
  transition: opacity 0.18s;
}

.type-card:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 78, 34, 0.3);
  box-shadow: var(--shadow-md);
}

.type-card:hover::before {
  opacity: 1;
}

.type-card--compact {
  min-height: 210px;
}

.type-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.type-card__code {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(240, 78, 34, 0.08);
}

.type-card__rank {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--surface-3);
  line-height: 1;
  letter-spacing: -0.03em;
}

.type-card h3 {
  font-size: 1.25rem;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.type-card__tagline {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
  line-height: 1.42;
}

.type-card p:not(.type-card__tagline) {
  font-size: 0.84rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.52;
}

.type-card__footer {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.type-card__footer span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--surface-2);
}

/* ============================================
   CALLOUT PANEL + QUOTE CARD
   ============================================ */
.callout-panel {
  padding: 28px 26px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 14px;
}

.callout-panel h3 {
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  line-height: 1.18;
}

.callout-panel p {
  font-size: 0.93rem;
  color: var(--muted);
  margin: 0;
  max-width: 48ch;
}

.hero__quote-card {
  padding: 28px 26px;
  background: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 14px;
}

.hero__quote-card .eyebrow {
  color: var(--accent);
}

.hero__quote-card blockquote {
  margin: 0;
  padding: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  line-height: 1.32;
  color: #f0e4d4;
  letter-spacing: -0.025em;
}

.hero__quote-card p {
  font-size: 0.84rem;
  color: #5a4a3a;
  margin: 0;
}

/* ============================================
   COMPARISON LIST
   ============================================ */
.comparison-list {
  display: grid;
  gap: 9px;
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  line-height: 1.52;
}

.comparison-item > span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-top: 7px;
}

.comparison-item p {
  margin: 0;
  color: var(--ink-2);
}

/* ============================================
   FAQ
   ============================================ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-item {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.14s;
}

.faq-item[open] {
  border-color: rgba(240, 78, 34, 0.35);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  background: var(--surface);
  transition: background 0.14s;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:hover {
  background: var(--surface-2);
}

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.14s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.64;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ============================================
   QUIZ HERO
   ============================================ */
.quiz-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 20px;
  align-items: start;
  padding: 42px 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quiz-hero__copy { min-width: 0; }

.quiz-hero__copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  margin: 8px 0 16px;
}

.quiz-hero__panel {
  display: grid;
  gap: 14px;
}

.quiz-hero__note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.58;
  font-style: italic;
}

/* ============================================
   QUIZ SHELL + LOADING STATE
   ============================================ */
.quiz-shell__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 380px;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quiz-shell__loading .eyebrow {
  margin-bottom: 10px;
}

.quiz-shell__loading h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.quiz-shell__loading p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

.quiz-error {
  padding: 24px 28px;
  border: 1.5px solid rgba(240, 78, 34, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(240, 78, 34, 0.04);
  color: var(--accent-hover);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ============================================
   QUIZ FRAME
   ============================================ */
.quiz-frame {
  display: grid;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.quiz-frame__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.quiz-frame__top h2 {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-top: 4px;
}

.quiz-frame__top .eyebrow {
  margin-bottom: 4px;
}

.quiz-frame__meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  flex-shrink: 0;
}

.quiz-frame__meta > span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.quiz-frame__meta progress {
  width: 180px;
  height: 5px;
  border: none;
  border-radius: var(--radius-pill);
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.quiz-frame__meta progress::-webkit-progress-bar {
  background: var(--surface-2);
  border-radius: var(--radius-pill);
}

.quiz-frame__meta progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-pill);
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz-frame__meta progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-pill);
}

/* ============================================
   QUIZ INTRO
   ============================================ */
.quiz-intro {
  display: grid;
  gap: 22px;
  padding: 28px 28px 26px;
}

.quiz-intro__lede {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink);
  line-height: 1.66;
  max-width: 62ch;
}

.quiz-intro__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quiz-intro__list li {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: grid;
  gap: 5px;
}

.quiz-intro__list strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.quiz-intro__list span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.48;
}

.quiz-intro__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.quiz-intro__hint {
  font-size: 0.84rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ============================================
   QUESTION + ANSWERS
   ============================================ */
.question-shell {
  display: grid;
  gap: 18px;
  padding: 28px 28px 22px;
}

.question-shell__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.question-shell h3 {
  font-size: clamp(1.45rem, 3.2vw, 2.3rem);
  max-width: 24ch;
  line-height: 1.14;
  letter-spacing: -0.03em;
}

.question-shell__hint {
  font-size: 0.84rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

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

.answer-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  padding: 16px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s, box-shadow 0.14s;
}

.answer-card:hover {
  border-color: rgba(240, 78, 34, 0.4);
  background: #fdf5f1;
  box-shadow: 0 2px 12px rgba(240, 78, 34, 0.1);
}

.answer-card.is-selected {
  border-color: var(--accent);
  background: rgba(240, 78, 34, 0.05);
  box-shadow: 0 0 0 1px var(--accent);
}

.answer-card__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: rgba(16, 14, 11, 0.07);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 800;
  transition: background 0.14s, color 0.14s;
}

.answer-card.is-selected .answer-card__letter {
  background: var(--accent);
  color: #fff;
}

.answer-card__label {
  display: block;
  font-size: 0.9rem;
  line-height: 1.52;
  color: var(--ink);
}

/* ============================================
   QUIZ ACTIONS BAR
   ============================================ */
.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 28px 22px;
  border-top: 1px solid var(--line);
}

.quiz-actions__meta {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============================================
   RESULT POSTER  (the flagship dark card)
   ============================================ */
.result-poster {
  display: grid;
  gap: 24px;
  padding: 42px 42px 36px;
  background: var(--dark-bg);
  color: var(--dark-text);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
}

/* top rainbow stripe */
.result-poster::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

/* ambient glow */
.result-poster::after {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 78, 34, 0.07), transparent 65%);
  pointer-events: none;
}

.result-poster__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--dark-line);
}

.result-poster .eyebrow {
  color: var(--accent);
  margin-bottom: 8px;
}

.result-poster h1 {
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  color: var(--dark-text);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.result-poster__code {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid rgba(240, 78, 34, 0.35);
  border-radius: var(--radius-xs);
  background: rgba(240, 78, 34, 0.09);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.result-poster__tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  color: var(--dark-gold);
  font-weight: 700;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.025em;
}

.result-poster__summary {
  font-size: 1rem;
  color: var(--dark-muted);
  line-height: 1.68;
  margin: 0;
  max-width: 60ch;
  padding-left: 18px;
  border-left: 2px solid rgba(240, 78, 34, 0.35);
}

.result-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-badges span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid rgba(240, 78, 34, 0.28);
  border-radius: 4px;
  background: rgba(240, 78, 34, 0.07);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   METRIC BARS
   ============================================ */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(240, 78, 34, 0.14);
  border-radius: var(--radius-xs);
}

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

.metric__head > span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6a5848;
}

.metric__head > strong {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
}

.metric__track {
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(240, 78, 34, 0.13);
  overflow: hidden;
}

.metric__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #f5b04a);
}

.result-poster__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(240, 78, 34, 0.18);
}

/* Result-poster-specific button overrides */
.result-poster .button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.result-poster .button:hover {
  background: var(--accent-hover);
}

.result-poster .button--secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(240, 78, 34, 0.35);
  color: var(--accent);
}

.result-poster .button--secondary:hover {
  background: rgba(240, 78, 34, 0.14);
  border-color: var(--accent);
  box-shadow: none;
}

.result-poster .button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #6a5848;
}

.result-poster .button--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--dark-muted);
  box-shadow: none;
}

/* Section holding result poster — no extra card frame */
.page-result .section:first-child {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ============================================
   RESULT DETAIL CARDS
   ============================================ */
.result-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.result-detail-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 10px;
}

.result-detail-card .eyebrow {
  margin-bottom: 2px;
}

.result-detail-card h3 {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.result-detail-card ul {
  padding-left: 18px;
}

.result-detail-card li + li {
  margin-top: 8px;
}

.result-detail-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.62;
}

/* ============================================
   SHARE KIT
   ============================================ */
.share-kit {
  display: grid;
  gap: 16px;
}

.share-kit__text {
  padding: 18px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 0.9rem;
  line-height: 1.64;
  color: var(--ink);
  font-family: var(--font-mono);
}

.share-kit__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ============================================
   AD SHELL
   ============================================ */
.ad-shell {
  min-height: 200px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.ad-shell__label {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad-shell--placeholder p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   PROSE (about / privacy / terms)
   ============================================ */
.prose {
  max-width: 72ch;
  padding: 40px 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 10px 0 24px;
}

.prose p {
  font-size: 0.98rem;
  line-height: 1.72;
  color: var(--muted);
  margin: 0 0 16px;
}

.prose p:last-child { margin-bottom: 0; }

.prose a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
}

body.is-ready .reveal {
  animation: rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Staggered grids */
body.is-ready .feature-grid > *,
body.is-ready .type-grid > *,
body.is-ready .faq-grid > *,
body.is-ready .result-detail-grid > *,
body.is-ready .stat-grid > *,
body.is-ready .comparison-list > * {
  animation-delay: calc(var(--i, 0) * 55ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================
   RESPONSIVE — 1040px
   ============================================ */
@media (max-width: 1040px) {
  .hero,
  .quiz-hero,
  .section--split {
    grid-template-columns: 1fr;
  }

  .hero { padding: 36px 32px; }
  .quiz-hero { padding: 32px 28px; }

  .hero h1 { max-width: none; }

  .feature-grid,
  .type-grid,
  .faq-grid,
  .result-detail-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* ============================================
   RESPONSIVE — 760px
   ============================================ */
@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 16px, 100%);
    padding: 10px 0 48px;
  }

  .page-main {
    gap: 12px;
    margin: 12px 0;
  }

  /* Header: stack on mobile */
  .site-header {
    position: relative;
    top: auto;
    align-items: stretch;
    padding: 12px 16px;
  }

  .site-header__actions {
    justify-content: space-between;
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  .hero {
    padding: 28px 22px;
  }

  .section {
    padding: 24px 22px;
  }

  .quiz-hero {
    padding: 26px 22px;
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .type-grid,
  .faq-grid,
  .result-detail-grid,
  .answer-grid,
  .metric-grid,
  .quiz-intro__list {
    grid-template-columns: 1fr;
  }

  .quiz-frame__top,
  .question-shell,
  .quiz-intro {
    padding-left: 20px;
    padding-right: 20px;
  }

  .quiz-actions {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
  }

  .quiz-actions > .button {
    width: 100%;
    justify-content: center;
  }

  .quiz-actions__meta {
    justify-content: space-between;
  }

  .quiz-intro__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .quiz-intro__actions .button {
    justify-content: center;
  }

  .quiz-frame__meta progress {
    width: 130px;
  }

  /* Result poster mobile */
  .result-poster {
    padding: 28px 22px;
    max-width: none;
  }

  .result-poster h1 {
    font-size: clamp(2.4rem, 9vw, 3.8rem);
  }

  .result-poster__top {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .result-poster__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .result-poster__actions .button {
    justify-content: center;
  }

  .result-poster__tagline {
    font-size: clamp(1.2rem, 5vw, 1.7rem);
  }

  /* Footer stack */
  .site-footer {
    flex-direction: column;
    gap: 18px;
    padding: 24px 22px;
  }
}

/* ============================================
   RESPONSIVE — 480px
   ============================================ */
@media (max-width: 480px) {
  body { font-size: 16px; }

  .site-brand__name { font-size: 1.1rem; }

  .locale-switcher a {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .site-nav a {
    padding: 4px 6px;
    font-size: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.6rem);
  }

  .result-poster {
    padding: 24px 18px;
  }

  .prose {
    padding: 28px 22px;
  }

  .share-kit__text {
    font-size: 0.82rem;
  }
}

/* ============================================
   PAGE-SPECIFIC OVERRIDES
   ============================================ */

/* Test page: outer section wrapping quiz-shell is transparent;
   the quiz-frame itself is the visual card */
.page-test .page-main > .section:last-child {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Result page: tweak the "What it means" section split for better ad column */
.page-result .section.section--split {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}
