/* Grassroot Learning Personality Quiz — styles
   Aligned with grassroot.academy: green palette, warm cream paper, editorial type. */

:root {
  --bg: #F5F0E4;
  --paper: #FBF7EC;
  --ink: #1F2A1F;
  --muted: #6B7568;
  --line: #E2DCC8;
  --accent: #3B7A3D;          /* grassroot deep green */
  --accent-soft: #D4E5D2;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "ss02";
}

#root { min-height: 100vh; display: flex; flex-direction: column; }

.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background:
    radial-gradient(ellipse at 8% 0%, rgba(59,122,61,0.08), transparent 45%),
    radial-gradient(ellipse at 92% 100%, rgba(122,168,74,0.06), transparent 45%),
    var(--bg);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}

.lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
  text-wrap: pretty;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Top Bar ---------- */
.top-bar {
  display: grid;
  grid-template-columns: 220px 1fr 80px;
  align-items: center;
  gap: 32px;
  padding: 18px 40px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 10;
}

.top-brand { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.brand-mark {
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.brand-mark::before {
  content: '';
  position: absolute;
  width: 8px; height: 12px;
  background: #FBF7EC;
  border-radius: 0 50% 0 50%;
  transform: rotate(35deg);
}
.brand-name { font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }
.brand-divider { color: var(--muted); }
.brand-sub { color: var(--muted); font-size: 13px; }
.top-q { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Stage ---------- */
.stage-wrap {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 8px 40px 16px;
}

.screen {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  animation: screenIn 0.5s cubic-bezier(.4,0,.2,1);
}

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

/* ---------- Welcome ---------- */
.welcome { padding: 0; }
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  align-items: center;
  min-height: 0;
}
.welcome h1 { font-size: clamp(40px, 5.2vw, 72px); margin: 4px 0 16px; line-height: 1.04; }
.welcome h1 em { font-style: italic; color: var(--accent); }
.welcome-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.welcome-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(59,122,61,0.10), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(122,168,74,0.08), transparent 55%);
}
.welcome-stage > * { position: relative; z-index: 1; }
.stage-tag {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  z-index: 2;
}

.primary-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 28px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31,42,31,0.2); }

/* ---------- Personality Graph (vanilla-JS radar on welcome screen) ---------- */
.welcome-stage-graph {
  background: linear-gradient(180deg, #f7f5ee 0%, #ece9de 100%);
  border: 1px solid #c9c6b8;
  border-radius: 24px;
  padding: 8px;
  /* Explicit height — required so the inner SVG (height: 100%) doesn't push
     the parent past max-height by trying to honor its own viewBox aspect. */
  height: min(520px, 52vh);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.welcome-stage-graph::before { display: none; }
.pg-mount {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-radar {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}
/* Everything inside the SVG is purely visual — no pointer events. The only
   things that should catch the cursor are the four .pg-axis-zone polygons,
   so that hovering ANY part of the chart (including over text or letters)
   still tracks the nearest axis. */
.pg-radar > * { pointer-events: none; }
.pg-grid-ring {
  fill: none;
  stroke: #ddd9ca;
  stroke-width: 1;
}
.pg-grid-ring.pg-grid-center { stroke-dasharray: 2 4; }
.pg-spoke {
  stroke: #c9c6b8;
  stroke-width: 1;
}
.pg-spoke-hot {
  stroke: #1f2a1d;
  stroke-width: 1.5;
  opacity: 0;
}
.pg-axis-zone {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all !important;
}
.pg-pole {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 150px;
  text-anchor: middle;
  dominant-baseline: middle;
}
.pg-pole.pg-outline {
  fill: none;
  stroke-width: 1.6;
}
.pg-pole-label {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  fill: #4a5446;
  text-anchor: middle;
  dominant-baseline: middle;
}
.pg-shape-fill {
  fill: rgba(85, 122, 74, 0.12);
}
.pg-shape-stroke {
  fill: none;
  stroke: #1f2a1d;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.pg-handle .pg-ring {
  fill: #f3f1ea;
  stroke: #1f2a1d;
  stroke-width: 1.4;
}
.pg-handle .pg-dot {
  fill: #1f2a1d;
}
.pg-center-code {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 140px;
  letter-spacing: 0.04em;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #1f2a1d;
}
.pg-center-name {
  font-family: 'Cormorant Garamond', 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 64px;
  text-anchor: middle;
  fill: #4a5446;
}
.pg-center-hint {
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-anchor: middle;
  fill: #8a8f80;
}

/* Welcome screen CTA — matches the site's standard "Start Learning" button
   (.nav-cta / .signup-submit-btn): bright green, slightly rounded corners,
   no drop shadow, simple hover. Sized up for the hero context. */
.welcome-cta-btn {
  display: inline-block;
  background: #1DB954;
  color: #ffffff;
  border: 1px solid #1DB954;
  border-radius: 0.7em;
  padding: 0.9rem 2.6rem;
  margin-top: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-top: 22px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.welcome-cta-btn:hover {
  background: #1AA34A;
  border-color: #1AA34A;
  color: #ffffff;
}

.secondary-btn {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}
.secondary-btn:hover { background: var(--ink); color: var(--paper); }

.meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.meta-row .dot { opacity: 0.4; }
.meta-row strong { color: var(--ink); font-weight: 600; }

.axis-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 480px;
  margin-top: 24px;
}
.axis-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.axis-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.axis-letters { font-family: var(--font-display); font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.axis-letters .vs { font-size: 11px; color: var(--muted); margin: 0 4px; font-style: italic; font-family: var(--font-body); }
.axis-name { color: var(--muted); font-size: 12px; margin-left: auto; }

/* ---------- Axis Intro ---------- */
.axis-intro { align-items: center; justify-content: center; min-height: 600px; }
.axis-intro-inner {
  text-align: center;
  max-width: 720px;
  padding: 60px 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  position: relative;
  animation: axisIntroIn 0.6s cubic-bezier(.3,1.3,.5,1);
  overflow: hidden;
}
.axis-intro-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--axis-soft) 0%, transparent 55%);
  opacity: 0.65;
  z-index: 0;
}
.axis-intro-inner > * { position: relative; z-index: 1; }

@keyframes axisIntroIn {
  from { opacity: 0; transform: scale(0.96) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.axis-roman {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 600;
}
.axis-letters-big {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 140px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 16px 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
}
.vs-big {
  font-size: 0.22em;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-body);
  letter-spacing: 0;
  font-weight: 400;
}
.axis-headline { font-size: clamp(28px, 4vw, 44px); margin: 8px 0 16px; }
.axis-body { margin: 0 auto; max-width: 44ch; font-size: 17px; }
.axis-character {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

/* ---------- Question ---------- */
.q-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  min-height: 580px;
}
.q-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.q-number {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.q-of { color: var(--muted); font-size: 14px; font-family: var(--font-body); }
.q-axis-pill {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
}
.q-text {
  font-family: var(--font-body);   /* Inter — clean sans for readability */
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
  color: var(--ink);
}
.q-instruction { color: var(--muted); font-size: 15px; margin-bottom: 32px; }

.response-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 560px;
  margin-bottom: 14px;
}

.response-btn {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-family: var(--font-body);
  transition: transform 0.2s;
}
.response-btn:hover:not(:disabled) { transform: translateY(-3px); }
.response-btn:disabled { cursor: default; }

.response-circle {
  width: var(--btn-size);
  height: var(--btn-size);
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  display: block;
  transition: all 0.25s cubic-bezier(.3,1.5,.5,1);
  position: relative;
}
.response-btn.disagree .response-circle {
  border-color: color-mix(in srgb, var(--axis-color) 70%, var(--ink));
}
.response-btn.agree .response-circle {
  border-color: color-mix(in srgb, var(--axis-color) 70%, var(--ink));
  background: color-mix(in srgb, var(--axis-color) 15%, var(--paper));
}
.response-btn:hover:not(:disabled) .response-circle {
  background: color-mix(in srgb, var(--axis-color) 25%, var(--paper));
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--axis-color) 18%, transparent);
}
.response-btn.picked .response-circle {
  background: var(--axis-color);
  border-color: var(--ink);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--axis-color) 25%, transparent);
  transform: scale(1.05);
}
.response-btn.picked .response-circle::after {
  content: '';
  position: absolute;
  inset: 25%;
  background: var(--paper);
  border-radius: 50%;
}

.response-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.response-btn:hover .response-label, .response-btn.picked .response-label { opacity: 1; color: var(--ink); }

.response-axis-labels {
  display: flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 560px;
  font-weight: 500;
}

.q-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.q-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--axis-color) 14%, transparent), transparent 65%);
}
.q-stage > * { position: relative; z-index: 1; }

.lock-flash {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  opacity: 0;
  z-index: 2;
  animation: lockFlash 650ms ease-out;
  pointer-events: none;
}
@keyframes lockFlash {
  0% { opacity: 0; transform: scale(0.6); border-radius: 50%; }
  40% { opacity: 0.18; transform: scale(1.05); border-radius: 28px; }
  100% { opacity: 0; transform: scale(1); border-radius: 28px; }
}

.top-progress { padding: 0 8px; }

/* ---------- Calculating ---------- */
.calculating { align-items: center; justify-content: center; min-height: 600px; }
.calc-inner { max-width: 540px; width: 100%; text-align: center; }
.calc-axes { margin-top: 40px; display: flex; flex-direction: column; gap: 18px; }
.calc-row {
  display: grid;
  grid-template-columns: 200px 1fr 30px;
  gap: 16px;
  align-items: center;
  text-align: left;
  opacity: 0.4;
  transition: opacity 0.4s;
}
.calc-row.active, .calc-row.done { opacity: 1; }
.calc-axis-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}
.calc-bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.calc-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 3px;
  transition: width 0.5s ease-out;
}
.calc-row.active .calc-fill { animation: calcFill 0.5s ease-out forwards; }
.calc-row.done .calc-fill { width: 100%; }
@keyframes calcFill { from { width: 0; } to { width: 100%; } }
.calc-check {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
}

/* ---------- Result ---------- */
.result { padding: 20px 0 60px; }
.result-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 60px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 50px;
}
.type-letters {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 140px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.9;
  display: flex;
  gap: 4px;
  margin: 8px 0 16px;
}
.type-letter {
  display: inline-block;
  animation: typeLetterIn 0.7s cubic-bezier(.3,1.4,.5,1) backwards;
}
@keyframes typeLetterIn {
  from { opacity: 0; transform: translateY(40px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.result-name {
  font-size: clamp(36px, 5vw, 64px);
  margin: 8px 0 0;
  line-height: 1.05;
}
.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}
.kw {
  background: var(--accent-soft);
  color: #2A4D2C;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}
.result-actions { display: flex; gap: 12px; margin-top: 28px; }
.result-character {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border-radius: 24px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}
.result-character::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 80%, rgba(59,122,61,0.18), transparent 50%);
}

/* axis bars */
.axis-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
}
.axis-bar-row { display: flex; flex-direction: column; gap: 12px; }
.axis-bar-head { display: flex; justify-content: space-between; gap: 16px; }
.axis-bar-side { display: flex; align-items: baseline; gap: 8px; transition: opacity 0.4s; }
.axis-bar-side.right { justify-content: flex-end; }
.axis-bar-letter {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}
.axis-bar-name { font-size: 13px; color: var(--muted); font-weight: 500; }

.axis-bar-track {
  height: 10px;
  border-radius: 5px;
  position: relative;
}
.axis-bar-center {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1.5px;
  background: var(--ink);
  opacity: 0.2;
}
.axis-bar-marker {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
@keyframes markerIn {
  from { left: 50% !important; opacity: 0; }
}
.axis-bar-blurb { font-size: 14px; line-height: 1.55; color: var(--muted); }
.axis-bar-blurb strong { font-weight: 600; }

/* ---------- 16 type grid ---------- */
.all-types {
  margin-top: 60px;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.type-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(31,42,31,0.08);
}
.type-card.me {
  border: 2px solid var(--accent);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--paper) 60%);
  box-shadow: 0 8px 24px rgba(59,122,61,0.18);
}
.type-card-art {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.type-card-meta { margin-top: 8px; }
.type-card-code {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.type-card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.type-card-badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.result-footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
}
.footer-note {
  font-size: 12px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Value strip on welcome ---------- */
.value-strip {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.value-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 22px 18px;
  background: color-mix(in oklab, var(--accent, #3B7A3D) 10%, var(--paper));
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--accent, #3B7A3D) 18%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.value-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -16px color-mix(in oklab, var(--accent, #3B7A3D) 60%, transparent);
}
.value-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent, #3B7A3D);
}
.vs-illo-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
}
.step-illo {
  width: 160px;
  height: 144px;
  display: block;
}
.value-step:hover .step-illo {
  transform: translateY(-2px) rotate(-1deg);
}
.step-illo {
  transition: transform 0.3s ease;
}
.vs-num {
  display: inline-block;
  background: var(--accent, #3B7A3D);
  color: white;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  border-radius: 100px;
  margin-top: 8px;
}
.vs-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.vs-body { font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Result deep sections ---------- */
.result-section {
  margin-top: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
}
.result-section h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.result-section .section-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 56ch;
}
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.fit-card {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
}
.fit-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 500;
}
.fit-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.tactics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tactic {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--paper));
  border-radius: 12px;
  align-items: flex-start;
}
.tactic-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.tactic-text { font-size: 14px; line-height: 1.5; }
.tactic-text strong { font-weight: 600; display: block; margin-bottom: 2px; }
.cta-banner {
  margin-top: 40px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.cta-banner h3 {
  font-family: var(--font-display);
  font-size: 36px;
  margin: 0 0 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.cta-banner p { color: rgba(251,247,236,0.75); font-size: 16px; line-height: 1.55; max-width: 40ch; margin: 0 0 24px; }
.cta-banner .primary-btn { background: var(--paper); color: var(--ink); }
.cta-banner .secondary-btn { color: var(--paper); border-color: var(--paper); }
.cta-banner .secondary-btn:hover { background: var(--paper); color: var(--ink); }

/* ---------- Welcome typography stage ---------- */
.welcome-typography {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.big-letters {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 160px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  display: flex;
  gap: 6px;
}
.big-letter {
  display: inline-block;
  animation: typeLetterIn 0.7s cubic-bezier(.3,1.4,.5,1) backwards;
}
.big-letter.outline {
  -webkit-text-stroke: 2px currentColor;
  -webkit-text-fill-color: transparent;
}
.welcome-tag {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 24px;
}

/* ---------- Axis intro glyph ---------- */
.axis-glyph {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  padding: 24px 36px;
  border-radius: 100px;
  color: white;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.axis-glyph .vs-mid {
  font-size: 28px;
  opacity: 0.6;
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 400;
}

/* ---------- Question Visual (type-based) ---------- */
.qv-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding: 20px;
}
.qv-letters {
  font-family: var(--font-display);
  font-size: clamp(96px, 14vw, 180px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.qv-letter { transition: opacity 0.35s; }
.qv-mid {
  font-size: 0.45em;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-body);
  font-weight: 400;
  opacity: 0.5;
}
.qv-axis-name {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: -6px;
}
.qv-sep { opacity: 0.4; margin: 0 8px; }
.qv-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  width: 80%;
  margin-top: 16px;
}
.qv-track-center {
  position: absolute;
  left: 50%; top: -3px; bottom: -3px;
  width: 1.5px;
  background: var(--ink);
  opacity: 0.2;
}
.qv-marker {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: left 0.45s cubic-bezier(.3,1.5,.5,1), background 0.3s;
}
.qv-scale-labels {
  display: flex;
  justify-content: space-between;
  width: 80%;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 1100px) {
  .welcome-grid, .q-grid, .result-grid { grid-template-columns: 1fr; gap: 40px; }
  .welcome-stage, .q-stage, .result-character { aspect-ratio: auto; min-height: 280px; }
  /* On single-column mobile/tablet, the left text column is the only thing
     in its row — center it so the heading, CTA, and meta sit on axis. */
  .welcome-left { text-align: center; align-items: center; }
  .welcome-left .meta-row { justify-content: center; }
}
@media (max-width: 760px) {
  .axis-bars { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .value-strip, .three-col, .tactics-grid { grid-template-columns: 1fr; }
  .cta-banner { grid-template-columns: 1fr; padding: 30px; }
  .top-bar { grid-template-columns: 1fr; gap: 12px; padding: 14px 20px; }
  .top-q { display: none; }
  .stage-wrap { padding: 20px; }
  .result-grid { padding: 30px; }
}


/* ----- Neutral question visual (no axis hints) ----- */
.qv-neutral {
  gap: 24px;
  padding: 24px 20px;
}
.qv-orb-stage {
  position: relative;
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qv-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  filter: blur(2px);
  transition: transform 0.45s cubic-bezier(.3,1.4,.5,1), opacity 0.35s ease;
}
.qv-orb-ring {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1.5px solid;
  transition: transform 0.5s cubic-bezier(.3,1.4,.5,1), opacity 0.35s ease;
}
.qv-track-neutral {
  width: clamp(220px, 30vw, 360px);
  margin-top: 6px;
}

/* ----- Per-question art ----- */
.qv-question-art {
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(.3,1.4,.5,1), opacity 0.3s ease;
}
.qv-question-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Question screen now full-width (no right-side visual) */
.q-grid {
  grid-template-columns: 1fr !important;
}
.q-left {
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Paged Questions (5 per page, 4 pages) ---------- */
.questions-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}
/* Quiz page header: a small uppercase "PAGE X OF 4" label above a clean
   single-line stepper. The stepper has 4 numbered dots evenly spaced on a
   thin horizontal track that fills with green as the user progresses. */
.page-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 28px;
}
.page-meta {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6b7568;
  font-weight: 700;
}
.page-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 28px;
}
/* Background track + fill track sit between the centers of the first and
   last dots. Both are absolutely positioned and span the full row. */
.page-progress::before,
.page-progress::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}
.page-progress::before {
  left: 14px;
  right: 14px;
  background: #e7e5e4;
}
.page-progress::after {
  left: 14px;
  width: calc((100% - 28px) * (var(--fill, 0%) / 100%));
  background: #3B7A3D;
  transition: width 0.45s cubic-bezier(.4,.8,.4,1);
}
.page-step {
  position: relative;
  z-index: 1;
}
.page-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #d4d4d4;
  color: #6b7568;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s;
}
.page-step.done .page-step-num {
  background: #3B7A3D;
  border-color: #3B7A3D;
  color: #ffffff;
}
.page-step.active .page-step-num {
  background: #ffffff;
  border-color: #3B7A3D;
  color: #3B7A3D;
  box-shadow: 0 0 0 4px rgba(59, 122, 61, 0.18);
}

.page-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qrow {
  background:
    linear-gradient(180deg, #fafdf8 0%, #ffffff 70%);
  border: 1px solid #d8e7d3;
  border-radius: 12px;
  padding: 14px 18px 12px;
  box-shadow: 0 1px 2px rgba(59, 122, 61, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.qrow.answered {
  border-color: rgba(59, 122, 61, 0.5);
  background:
    linear-gradient(180deg, #f1f8ee 0%, #ffffff 75%);
  box-shadow: 0 2px 6px rgba(59, 122, 61, 0.08);
}
.qrow-num {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.qrow-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}
/* 5-point Likert scale row (Disagree ←  ⊙ ⊙ ⊙ ⊙ ⊙  → Agree) */
.qrow-likert {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 0 4px;
}
.likert-end-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7a857a;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 64px;
}
.likert-end-l { text-align: right; }
.likert-end-r { text-align: left; }

.qrow-responses {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
}
.qrow-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--btn-size);
  height: var(--btn-size);
  flex-shrink: 0;
}
.qrow-btn-circle {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
/* Graduated outline colors so disagree and agree are signaled visually */
.qrow-btn.disagree.dist-2 .qrow-btn-circle { border: 2.5px solid #c8554f; }
.qrow-btn.disagree.dist-1 .qrow-btn-circle { border: 2.5px solid #d8918d; }
.qrow-btn.neutral .qrow-btn-circle         { border: 2.5px solid #c4c4c4; }
.qrow-btn.agree.dist-1 .qrow-btn-circle    { border: 2.5px solid #8fb988; }
.qrow-btn.agree.dist-2 .qrow-btn-circle    { border: 2.5px solid #3B7A3D; }

/* Hover */
.qrow-btn:hover .qrow-btn-circle {
  transform: scale(1.08);
}
.qrow-btn.disagree:hover .qrow-btn-circle {
  background: rgba(200, 85, 79, 0.08);
}
.qrow-btn.agree:hover .qrow-btn-circle {
  background: rgba(59, 122, 61, 0.10);
}
.qrow-btn.neutral:hover .qrow-btn-circle {
  background: rgba(0, 0, 0, 0.04);
}

/* Picked: solid fill in tone color */
.qrow-btn.picked.disagree.dist-2 .qrow-btn-circle {
  background: #c8554f;
  border-color: #c8554f;
  box-shadow: 0 0 0 4px rgba(200, 85, 79, 0.18);
}
.qrow-btn.picked.disagree.dist-1 .qrow-btn-circle {
  background: #d8918d;
  border-color: #d8918d;
  box-shadow: 0 0 0 4px rgba(216, 145, 141, 0.20);
}
.qrow-btn.picked.neutral .qrow-btn-circle {
  background: #9a9a9a;
  border-color: #9a9a9a;
  box-shadow: 0 0 0 4px rgba(154, 154, 154, 0.18);
}
.qrow-btn.picked.agree.dist-1 .qrow-btn-circle {
  background: #8fb988;
  border-color: #8fb988;
  box-shadow: 0 0 0 4px rgba(143, 185, 136, 0.22);
}
.qrow-btn.picked.agree.dist-2 .qrow-btn-circle {
  background: #3B7A3D;
  border-color: #3B7A3D;
  box-shadow: 0 0 0 4px rgba(59, 122, 61, 0.22);
}


/* ---------- A/B/C option buttons (Typeform / Linear inspired) ---------- */
.qrow-options {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}
.qrow-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 38px 9px 12px;
  background: #ffffff;
  border: 1.5px solid #d8e7d3;
  border-radius: 11px;
  cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  text-align: left;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}
.qrow-option:hover {
  border-color: #3B7A3D;
  background-color: #f4f9f1;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(20, 25, 40, 0.02),
    0 8px 18px -8px rgba(59, 122, 61, 0.22);
}
.qrow-option:active {
  transform: translateY(0);
}
.qrow-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #ffffff;
  border: 1.5px solid #c9dcc1;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  color: #3B7A3D;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.qrow-option:hover .qrow-option-letter {
  background: #ffffff;
  color: #2F5F4E;
  border-color: #3B7A3D;
}
.qrow-option-label {
  flex: 1;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.005em;
}
/* Tiny check indicator on the right that fades in when picked */
.qrow-option::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(.3,1.5,.5,1), opacity 0.2s ease;
  /* white check rendered via SVG-ish gradient mask */
  background-image:
    linear-gradient(45deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%);
  background-size: 12px 2px, 8px 2px;
  background-repeat: no-repeat;
  background-position: 5px 12px, 11px 11px;
}
.qrow-option.picked {
  border-color: #3B7A3D;
  background-color: #d4e9cb;
  box-shadow:
    0 0 0 3px rgba(59, 122, 61, 0.22),
    0 10px 22px -10px rgba(59, 122, 61, 0.32);
}
.qrow-option.picked .qrow-option-letter {
  background: #3B7A3D;
  color: #ffffff;
  border-color: #3B7A3D;
}
.qrow-option.picked::after {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}
/* Use proper SVG checkmark (background-image hack above is brittle) */
.qrow-option .qrow-option-check {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%) scale(0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(.3,1.5,.5,1), opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.qrow-option.picked .qrow-option-check {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}
.qrow-option-check svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Disable the ::after fallback now that we have the explicit check element */
.qrow-option::after { display: none; }

.page-nav {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
}
.page-back {
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 12px 22px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  justify-self: start;
  transition: all 0.15s;
}
.page-back:hover:not(:disabled) {
  border-color: var(--ink);
}
.page-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-nav-hint {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
}
.page-next.primary-btn {
  justify-self: end;
}
.page-next.primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .questions-page { padding: 20px 12px 48px; }
  .qrow { padding: 16px 14px 12px; }
  .qrow-text { font-size: 15px; }
  /* Hide the "Disagree" / "Agree" text labels — the colored circles already
     communicate the polarity. Frees up enough horizontal room for the 5
     circles to sit comfortably on a 375px-wide phone. */
  .qrow-likert {
    gap: 0;
    padding: 0;
    justify-content: center;
  }
  .likert-end-label { display: none; }
  .qrow-responses {
    gap: 10px;
    flex: 0 0 auto;
  }
  .page-nav { grid-template-columns: 1fr 1fr; }
  .page-nav-status { grid-column: 1 / -1; text-align: center; order: -1; }
}


/* ---------- Result page (new long-form layout) ---------- */
.result {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.result-hero-card {
  /* No outer box — just centered typography on the page. */
  background: none;
  border: none;
  border-radius: 0;
  padding: 1rem 0 1.5rem;
  text-align: center;
  box-shadow: none;
}
.result-hero-meta {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3B7A3D;
  font-weight: 600;
  margin-bottom: 0.875rem;
}
.result-hero-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 6vw, 4rem);     /* 32 → 64 */
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 1.125rem;
  color: #1F2A1F;
  text-wrap: balance;
}
.result-hero-card .type-letters {
  display: inline-flex;
  flex-wrap: wrap;                        /* don't overflow on tiny screens */
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 3.5rem);  /* 28 → 56 */
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 100%;
}
.result-hero-card .type-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.25rem, 7vw, 3.5rem);     /* 36 → 56 */
  height: clamp(2.25rem, 7vw, 3.5rem);
  border-radius: 0.625rem;
  background: #ffffff;
  border: 1.5px solid #d8e7d3;
  color: #3B7A3D;
  text-align: center;
  flex-shrink: 0;
}
.result-hero-vibe {
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);  /* 15 → 17 */
  line-height: 1.55;
  color: #4a5450;
  max-width: 56ch;
  margin: 0 auto 1.375rem;
  padding: 0 0.5rem;
  text-wrap: balance;
}
.result-hero-card .keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
}
.result-hero-card .kw {
  background: #ffffff;
  border: 1px solid #d8e7d3;
  color: #3B7A3D;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Section scaffolding */
.result-section {
  margin-top: 56px;
}
.result-section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3B7A3D;
  font-weight: 700;
  margin-bottom: 8px;
}
.result-section-eyebrow.watch {
  color: #b56b3d;
}
.result-section-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 14px;
  color: #1F2A1F;
}
.result-section-sub {
  color: #6b7568;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 60ch;
}
.result-paragraph {
  font-size: 16px;
  line-height: 1.7;
  color: #1F2A1F;
  margin: 0 0 16px;
  max-width: 64ch;
}

/* Strengths + blind-spot are plain prose sections — no boxes, just typography.
   The eyebrow color (green vs amber) is the only visual differentiator. */
.result-strengths,
.result-blindspot {
  background: none;
  border: none;
  padding: 0;
}

/* Fit cards (majors / colleges / careers) */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.fit-card {
  background: #ffffff;
  border: 1px solid #d8e7d3;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  font-weight: 500;
  color: #1F2A1F;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.fit-card:hover {
  border-color: #3B7A3D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -6px rgba(59, 122, 61, 0.18);
}

/* CTA banner styling reuse */
.cta-banner {
  margin-top: 56px;
  background: linear-gradient(135deg, #3B7A3D 0%, #2F5F4E 100%);
  border-radius: 24px;
  padding: 40px 36px;
  color: #ffffff;
}
.cta-banner h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.cta-banner p {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 20px;
  max-width: 56ch;
}
.cta-banner .result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-banner .primary-btn {
  background: #ffffff;
  color: #2F5F4E;
}
.cta-banner .secondary-btn {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.cta-banner .secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}

/* Sign-up CTA tweaks: eyebrow + fineprint */
.signup-cta-eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 10px;
}
.cta-banner.signup-cta p em {
  font-style: italic;
  color: #ffffff;
  font-weight: 600;
}
.signup-cta-btn {
  font-size: 15px;
  padding: 13px 24px;
}
.signup-cta-fineprint {
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}

/* 16-archetype grid */
.all-types .type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.all-types .type-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.all-types .type-card:hover {
  border-color: #3B7A3D;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -6px rgba(59, 122, 61, 0.18);
}
.all-types .type-card.me {
  border-color: #3B7A3D;
  background: #f1f8ee;
  box-shadow: 0 0 0 2px rgba(59, 122, 61, 0.18);
}
.all-types .type-card-code {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #3B7A3D;
  margin-bottom: 4px;
}
.all-types .type-card-name {
  font-size: 14px;
  font-weight: 500;
  color: #1F2A1F;
}
.all-types .type-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #3B7A3D;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 999px;
}

@media (max-width: 37.5rem) {              /* 600px */
  .result { padding: 1.25rem 0.875rem 3.5rem; }
  .result-hero-card { padding: 1rem 0 1.25rem; }
  .result-strengths, .result-blindspot { padding: 0; }
  .fit-grid { grid-template-columns: 1fr; gap: 0.5rem; }
  .cta-banner { padding: 1.5rem 1.25rem; }
  .all-types .type-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
  .result-paragraph { font-size: 0.9375rem; line-height: 1.6; }
  .result-section-sub { font-size: 0.875rem; }
}


/* ---------- Result page sidebar layout (16personalities-style) ----------
   All sizes here are in rem so they scale predictably across viewport widths
   instead of being pinned to specific pixel breakpoints. */
.result {
  max-width: none;
  padding: 0;
}
.result-shell {
  display: grid;
  grid-template-columns: 16.25rem 1fr;   /* 260px sidebar */
  gap: 3.5rem;                           /* 56px */
  max-width: 73.75rem;                   /* 1180px */
  margin: 0 auto;
  padding: 2rem 1.75rem 5rem;            /* 32 28 80 */
  scroll-padding-top: 5rem;
}
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

.result-sidebar {
  position: sticky;
  top: 5.5rem;                           /* 88px */
  align-self: start;
  height: fit-content;
}
.result-sidebar-meta {
  font-size: 0.6875rem;                  /* 11px */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #3B7A3D;
  font-weight: 700;
  margin-bottom: 0.375rem;
}
.result-sidebar-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.375rem;                   /* 22px */
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 1.125rem;
  color: #1F2A1F;
  word-break: break-word;
}
.result-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 0.0938rem solid #e7e5e4;  /* 1.5px hairline */
  margin-bottom: 1.25rem;
}
.r-nav-item {
  display: block;
  padding: 0.625rem 0.875rem;            /* 10px 14px */
  font-size: 0.875rem;                   /* 14px */
  font-weight: 500;
  color: #6b7568;
  text-decoration: none;
  margin-left: -0.0938rem;
  border-left: 0.0938rem solid transparent;
  transition: color 0.18s, border-color 0.18s, background-color 0.18s;
}
.r-nav-item:hover {
  color: #1F2A1F;
}
.r-nav-item.active {
  color: #3B7A3D;
  border-left-color: #3B7A3D;
  font-weight: 600;
  background: linear-gradient(90deg, rgba(59,122,61,0.06), transparent 60%);
}
.r-sidebar-cta {
  font-size: 0.8125rem;                  /* 13px */
  padding: 0.625rem 1.125rem;
  width: 100%;
}

.result-content {
  min-width: 0;
}
.r-section {
  scroll-margin-top: 5rem;
  padding: 1.75rem 0 2.75rem;            /* 28 / 44 */
  border-bottom: 1px solid #f0eee9;
}
.r-section:last-child { border-bottom: none; }
.r-section + .r-section { padding-top: 2rem; }
.r-section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);   /* 24 → 40 */
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #1F2A1F;
  margin: 0 0 1.125rem;
  text-wrap: balance;
}
.r-section-body {
  margin-top: 1.5rem;
}

/* ── Mobile / tablet: collapse sidebar to top, replace horizontal-scroll
   nav with a wrapping chip layout so every section is visible at once. ── */
@media (max-width: 55rem) {                /* 880px */
  .result-shell {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1rem 1rem 3rem;
  }
  .result-sidebar {
    position: static;
    border-bottom: 1px solid #e7e5e4;
    padding-bottom: 1rem;
  }
  .result-sidebar-name {
    font-size: 1.5rem;                   /* 24px */
    margin-bottom: 0.875rem;
  }
  .result-nav {
    flex-direction: row;
    flex-wrap: wrap;                      /* chips wrap to multiple rows */
    overflow: visible;
    border: none;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
    padding: 0;
  }
  .r-nav-item {
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;                /* pill-ish chip */
    background: #ffffff;
    padding: 0.4375rem 0.75rem;           /* 7px 12px */
    font-size: 0.8125rem;                 /* 13px */
    margin: 0;
    white-space: nowrap;
  }
  .r-nav-item.active {
    border-color: #3B7A3D;
    background: rgba(59, 122, 61, 0.08);
    color: #3B7A3D;
    font-weight: 600;
  }
  .r-sidebar-cta { display: none; }

  .r-section { padding: 1.25rem 0 1.75rem; }
  .r-section + .r-section { padding-top: 1.25rem; }
}

/* Even tighter on small phones */
@media (max-width: 26.25rem) {              /* 420px */
  .result-shell { padding: 0.75rem 0.875rem 2.5rem; }
  .r-nav-item { font-size: 0.75rem; padding: 0.375rem 0.625rem; }
  .result-sidebar-meta { font-size: 0.625rem; }
  .result-sidebar-name { font-size: 1.375rem; }
}

/* Teaser paragraph — italic + softer color so it reads like a hook line,
   not the full content. */
.result-paragraph-tease {
  font-style: italic;
  color: #4a5547;
  max-width: 56ch;
}

/* Per-section sign-up CTA card. Sits at the bottom of each teased section. */
.gate-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 12px 16px;
  background: #f3f9ef;
  border: 1px solid #d8e7d3;
  border-radius: 12px;
  flex-wrap: wrap;
}
.gate-mini-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2d4128;
  font-size: 13.5px;
  font-weight: 500;
  flex: 1 1 240px;
}
.gate-mini-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #3B7A3D;
  border: 1px solid #d8e7d3;
  flex-shrink: 0;
}
.gate-mini-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.gate-mini-primary {
  display: inline-block;
  background: #1DB954;
  color: #ffffff;
  border: 1px solid #1DB954;
  border-radius: 0.7em;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.gate-mini-primary:hover {
  background: #1AA34A;
  border-color: #1AA34A;
  color: #ffffff;
}
.gate-mini-secondary {
  font-size: 13.5px;
  font-weight: 500;
  color: #3B7A3D;
  text-decoration: none;
  white-space: nowrap;
}
.gate-mini-secondary:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .gate-mini { flex-direction: column; align-items: stretch; gap: 12px; }
  .gate-mini-actions { justify-content: space-between; }
  .gate-mini-primary { flex: 1; text-align: center; }
}

/* ---------- Sign-up gate card ---------- */
.signup-gate-card {
  background: linear-gradient(135deg, #3B7A3D 0%, #2F5F4E 100%);
  color: #ffffff;
  border-radius: 1.5rem;
  padding: 2.5rem 2.375rem;
  position: relative;
  overflow: hidden;
}
.profile-save-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #b8d8b5;
  border-radius: 0.875rem;
  background: #f0f8ec;
  color: #24451f;
  font-size: 0.875rem;
}
.profile-save-banner strong {
  font-weight: 700;
}
.profile-save-banner span {
  color: #52634f;
}
.signup-gate-card::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 60%);
  pointer-events: none;
}
.signup-gate-eyebrow {
  position: relative;
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.75rem;
}
.signup-gate-title {
  position: relative;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.375rem, 2.8vw, 2rem);   /* 22 → 32 */
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.875rem;
  color: #ffffff;
  text-wrap: balance;
}
.signup-gate-sub {
  position: relative;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 22px;
  max-width: 56ch;
}
.signup-gate-sub em {
  font-style: italic;
  color: #ffffff;
  font-weight: 600;
}
.signup-gate-list {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 22px;
}
.signup-gate-list li {
  position: relative;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.92);
  padding-left: 20px;
}
.signup-gate-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}
.signup-gate-actions {
  position: relative;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
/* Make both gate buttons share size/shape so heights match exactly. */
.signup-gate-actions .signup-gate-primary,
.signup-gate-actions .signup-gate-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 0.7em;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.2;
  margin-top: 0;
  text-decoration: none;
  border-width: 1px;
  border-style: solid;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.signup-gate-primary {
  background: #ffffff;
  color: #2F5F4E;
  border-color: #ffffff;
}
.signup-gate-primary:hover {
  background: #f4f9f1;
  color: #2F5F4E;
  border-color: #f4f9f1;
}
.signup-gate-secondary {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.signup-gate-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  color: #ffffff;
}
.signup-gate-fineprint {
  position: relative;
  font-size: 0.78125rem;                  /* 12.5px */
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.01em;
}

@media (max-width: 55rem) {                 /* 880px */
  .signup-gate-card { padding: 1.625rem 1.25rem; border-radius: 1.125rem; }
  .signup-gate-actions { flex-direction: column; }
  .signup-gate-actions a { width: 100%; text-align: center; }
  .signup-gate-list { grid-template-columns: 1fr; gap: 0.375rem 0; }
}

/* ----- Site integration overrides (added for grassroot.academy) ----- */
/* Body matches the rest of the site (white). Cards keep a subtle off-white
   so the design's visual hierarchy survives. */
body.has-site-nav {
    --bg: #ffffff;
    --paper: #f8f9fa;     /* very light neutral so cards visibly sit on white */
    --line: #e7e5e4;
    --accent-soft: #e8f1e1; /* keep a soft green tint for accent surfaces */
    /* Default body+display fonts to Inter for max readability inside the quiz. */
    --font-display: 'Inter', system-ui, sans-serif;
    background: #ffffff;
    /* IMPORTANT: don't force quiz body fonts/colors on the navbar+footer,
       which are siblings of #root. Restore the site's own typography here
       so the shared chrome looks identical to every other page. */
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    color: #18181b;
}
/* Scope the quiz's own typography to the quiz container only */
body.has-site-nav .app-root {
    font-family: var(--font-body);
    color: var(--ink);
}
/* Keep Fraunces ONLY for the biggest editorial moments + italic accents */
body.has-site-nav .welcome .display,
body.has-site-nav .italic-word,
body.has-site-nav .display em,
body.has-site-nav .result-hero .display,
body.has-site-nav .result-name,
body.has-site-nav .big-letter,
body.has-site-nav .type-letter,
body.has-site-nav .axis-bar-letter {
    font-family: 'Fraunces', Georgia, serif;
}
/* Headings that were Fraunces but are at body scale: bump weight to keep presence */
body.has-site-nav .vs-title,
body.has-site-nav .result-section h3,
body.has-site-nav .fit-card h4,
body.has-site-nav .cta-banner h3,
body.has-site-nav .type-card-name,
body.has-site-nav .calc-axis-name {
    font-weight: 600;
    letter-spacing: -0.015em;
}
body.has-site-nav .app-root {
    padding-top: 64px;            /* reserve space for fixed site navbar */
    min-height: calc(100vh - 64px);
    background: #ffffff;          /* override the warm-cream radial gradient */
}
/* Top bar: white with a hairline divider, like other site sections */
body.has-site-nav .app-root .top-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}
/* Hide the prototype's redundant internal brand — site navbar replaces it */
body.has-site-nav .app-root .top-bar .top-brand {
    visibility: hidden;
}
/* Footer placeholder breathing room */
body.has-site-nav #footer-placeholder {
    margin-top: 0;
}
