/* ============================================
   BSL AGING QUIZ — DESIGN SYSTEM
   HashiCorp Helios Aesthetic × BioStack Gold
   Light canvas, enterprise-clean, dark text
   quiz.biostacklabs.com
   ============================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS — HashiCorp Helios × BSL Brand
   ============================================================ */
:root {
  /* ── Surfaces ── */
  --surface-page:      #F7F8F9;   /* page background — warm off-white */
  --surface-base:      #FFFFFF;   /* card base */
  --surface-raised:    #F9FAFB;   /* inset / preview panels */
  --surface-overlay:   #F2F4F6;   /* hovered option bg */
  --surface-inverse:   #1B1D21;   /* dark sections */

  /* ── Text ── */
  --text-primary:      #1B1D21;   /* headlines */
  --text-secondary:    #374151;   /* body copy */
  --text-muted:        #6B7280;   /* hints, labels */
  --text-faint:        #9CA3AF;   /* placeholder */
  --text-inverse:      #FFFFFF;

  /* ── Borders ── */
  --border-default:    #E5E7EB;
  --border-strong:     #D1D5DB;
  --border-focus:      #1B1D21;

  /* ── BSL Gold (primary action colour) ── */
  --gold:              #B8902A;
  --gold-light:        #C9A035;
  --gold-dark:         #9A7820;
  --gold-surface:      #FDF8EE;   /* very faint gold wash */
  --gold-border:       #E8D49A;
  --gold-glow:         rgba(184,144,42,0.18);

  /* ── Score Tier Colours ── */
  --tier-green:        #059669;
  --tier-green-bg:     #ECFDF5;
  --tier-green-border: #A7F3D0;
  --tier-yellow:       #D97706;
  --tier-yellow-bg:    #FFFBEB;
  --tier-yellow-border:#FDE68A;
  --tier-orange:       #EA580C;
  --tier-orange-bg:    #FFF7ED;
  --tier-orange-border:#FED7AA;
  --tier-red:          #DC2626;
  --tier-red-bg:       #FEF2F2;
  --tier-red-border:   #FECACA;
  --tier-danger:       #B91C1C;
  --tier-danger-bg:    #FEE2E2;
  --tier-danger-border:#FCA5A5;

  /* ── Product Colours ── */
  --nad-gold:        #B8902A;
  --shield-silver:   #6B7280;
  --gdaid-coral:     #DC4E41;
  --glynac-lavender: #7C6FAF;

  /* ── Typography ── */
  --font-display:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Spacing ── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Radius — Helios is tight/sharp ── */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-full: 9999px;

  /* ── Shadows — Helios uses subtle elevation ── */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  --shadow-focus: 0 0 0 3px rgba(184,144,42,0.20);

  /* ── Transitions ── */
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --t-fast:  120ms;
  --t-base:  200ms;
  --t-slow:  350ms;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--surface-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.quiz-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--space-4);
  background: var(--surface-page);
  position: relative;
  transition: background 400ms ease;
}

.quiz-wrapper.on-intro {
  background: #0D0F11;
}

/* Gold top rule — catalogue brand motif */
.quiz-wrapper::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold));
  z-index: 100;
}

.quiz-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-10) 0 var(--space-16);
}

/* ============================================================
   TOP NAV — catalogue-style: transparent over hero, white on scroll
   ============================================================ */
.quiz-nav {
  width: 100%;
  max-width: 640px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

/* Nav switches colour context based on intro vs question screens */
.quiz-nav--light {
  border-bottom-color: var(--border-default);
  margin-bottom: var(--space-6);
}

.quiz-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 32px;
}

.quiz-logo-img {
  height: 100%;
  width: auto;
  object-fit: contain;
  /* White PNG — renders correctly on dark intro */
  filter: brightness(0) invert(1);
  transition: filter 250ms ease;
}

/* Light screens — invert to black */
.quiz-nav--light .quiz-logo-img {
  filter: brightness(0) saturate(0);
}

.quiz-logo-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(184,144,42,0.4);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(184,144,42,0.12);
  transition: all 200ms ease;
}

.quiz-nav--light .quiz-logo-badge {
  color: var(--gold-dark);
  background: var(--gold-surface);
  border-color: var(--gold-border);
}

/* ============================================================
   PROGRESS BAR — Helios: thin, structured, minimal
   ============================================================ */
.quiz-progress-wrap {
  width: 100%;
  max-width: 640px;
  margin-bottom: 0;
}

.quiz-progress-track {
  width: 100%;
  height: 2px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width var(--t-slow) var(--ease);
}

.quiz-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
  margin-bottom: var(--space-8);
}

.quiz-progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
}

.quiz-progress-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-dark);
}

/* ============================================================
   INTRO SCREEN — dark hero (catalogue-matched)
   ============================================================ */

/* The intro screen fills the viewport — no negative margins needed */
#screenIntro {
  padding: var(--space-12) 0 var(--space-10);
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* Ambient gold glow — catalogue hero motif */
#screenIntro::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(184,144,42,0.09) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

/* Subtle noise grain — catalogue hero motif */
#screenIntro::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.screen-intro {
  animation: fadeUp var(--t-slow) var(--ease-out) both;
  position: relative;
  z-index: 1;
}

/* Eyebrow — catalogue gold rule style */
.intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.intro-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--gold);
  flex-shrink: 0;
}

.intro-eyebrow-dot { display: none; }

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

/* Headline — Syne 800 to match catalogue */
.intro-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: #F0F4F8;
  margin-bottom: var(--space-5);
}

.intro-headline em {
  font-style: normal;
  color: var(--gold);
}

/* Gold underline rule */
.intro-rule {
  display: block;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(184,144,42,0.3));
  margin-bottom: var(--space-6);
  border-radius: 2px;
}

/* Subtext */
.intro-sub {
  font-size: 16px;
  line-height: 1.7;
  color: #8A9BB0;
  max-width: 480px;
  margin-bottom: var(--space-8);
}

/* Divider */
.intro-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: var(--space-6);
}

/* Pillars */
.intro-pillars {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.intro-pillar-tag {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #8A9BB0;
}

.intro-pillar-icon { font-size: 13px; }

/* Stats */
.intro-stats {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.intro-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #8A9BB0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  padding: 5px 12px;
}

.intro-stat-check {
  color: #34D399;
  font-size: 11px;
}

/* Disclaimer */
.intro-disclaimer {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: var(--space-4);
  line-height: 1.6;
  text-align: center;
}

/* ============================================================
   BUTTONS — Helios: solid, no-nonsense, firm radius
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 400px;
  padding: 13px 24px;
  background: var(--text-primary);
  color: var(--text-inverse);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid var(--text-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition:
    background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #2D3037;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Gold variant for CTA */
.btn-primary.btn-gold {
  background: var(--gold);
  border-color: var(--gold-dark);
  color: #fff;
}

.btn-primary.btn-gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

.btn-arrow {
  transition: transform var(--t-base) var(--ease);
}

.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 20px;
  background: var(--surface-base);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast) var(--ease);
}

.btn-secondary:hover {
  background: var(--surface-overlay);
  border-color: var(--border-strong);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-2) 0;
  transition: color var(--t-fast);
}

.btn-back:hover { color: var(--text-secondary); }

/* Loading state */
.btn-primary.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn-primary.loading .btn-text { opacity: 0; }

.btn-spinner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-primary.loading .btn-spinner { display: block; }

/* ============================================================
   QUESTION SCREEN — Helios-style form UX
   ============================================================ */
.screen-question {
  animation: slideIn var(--t-slow) var(--ease-out) both;
}

/* Pillar label */
.question-pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-bottom: var(--space-4);
}

.question-pillar-icon { font-size: 13px; }

.question-pillar-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.question-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.question-hint {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-5);
  padding: var(--space-2) var(--space-3);
  border-left: 2px solid var(--gold-border);
  background: var(--gold-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================================
   ANSWER OPTIONS — Helios form-list style
   ============================================================ */
.answers-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.answer-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px var(--space-4);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.answer-option:hover {
  border-color: var(--border-strong);
  background: var(--surface-overlay);
  box-shadow: var(--shadow-md);
}

.answer-option.selected {
  border-color: var(--gold);
  background: var(--gold-surface);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--gold-border);
}

.answer-letter {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: all var(--t-fast);
  font-family: var(--font-body);
}

.answer-option.selected .answer-letter {
  background: var(--gold);
  border-color: var(--gold-dark);
  color: #fff;
}

.answer-option:hover:not(.selected) .answer-letter {
  background: var(--surface-overlay);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.answer-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.45;
  transition: color var(--t-fast);
}

.answer-option:hover .answer-text,
.answer-option.selected .answer-text {
  color: var(--text-primary);
}

/* Question navigation */
.question-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-default);
}

/* ============================================================
   EMAIL GATE SCREEN
   ============================================================ */
.screen-gate {
  animation: fadeUp var(--t-slow) var(--ease-out) both;
}

/* Score teaser card */
.gate-score-teaser {
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Gold top accent line */
.gate-score-teaser::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
}

.gate-teaser-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-5);
}

.gate-score-number {
  font-size: 80px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  display: inline-block;
}

.gate-score-out-of {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-faint);
  vertical-align: super;
  margin-left: 3px;
}

.gate-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--space-6);
  letter-spacing: 0.02em;
}

.gate-preview-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-4) 0 var(--space-2);
  border-top: 1px solid var(--border-default);
  margin-top: var(--space-3);
}

.gate-preview-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.gate-preview-pillar-score {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.gate-preview-pillar-name {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.gate-unlock-hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Gate form section */
.gate-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: 1.08;
}

.gate-sub {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  max-width: 440px;
}

/* Email form */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.gate-input-group { position: relative; }

.gate-input {
  width: 100%;
  padding: 11px var(--space-4);
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.gate-input::placeholder { color: var(--text-faint); }

.gate-input:focus {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-focus);
}

.gate-input.error {
  border-color: var(--tier-red);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}

.gate-error-msg {
  font-size: 12px;
  color: var(--tier-red);
  margin-top: 4px;
  display: none;
}

.gate-error-msg.visible { display: block; }

.gate-privacy {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: var(--space-2);
}

.gate-privacy a {
  color: var(--gold-dark);
  text-decoration: none;
}

.gate-privacy a:hover { text-decoration: underline; }

/* ============================================================
   RESULTS SCREEN
   ============================================================ */
.screen-results {
  animation: fadeUp var(--t-slow) var(--ease-out) both;
}

/* Score ring header */
.results-header {
  text-align: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-default);
}

.results-score-ring {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto var(--space-5);
}

.results-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.results-ring-bg {
  fill: none;
  stroke: var(--border-default);
  stroke-width: 7;
}

.results-ring-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 408;
  stroke-dashoffset: 408;
  transition: stroke-dashoffset 1.4s var(--ease-out) 0.3s;
}

.results-score-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.results-score-value {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.results-score-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-top: 2px;
}

.results-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
}

.results-summary-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   PILLAR BREAKDOWN — Helios data table style
   ============================================================ */
.results-pillars {
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.results-pillars-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-raised);
}

.pillar-row {
  display: grid;
  grid-template-columns: 110px 1fr 52px;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-default);
  transition: background var(--t-fast);
}

.pillar-row:last-child { border-bottom: none; }

.pillar-row:hover { background: var(--surface-raised); }

.pillar-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.pillar-emoji { font-size: 14px; }

.pillar-bar-track {
  height: 5px;
  background: var(--border-default);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.pillar-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1.1s var(--ease-out);
}

.pillar-score-pct {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   PRODUCT RECOMMENDATIONS — Helios card style
   ============================================================ */
.results-recs {
  margin-bottom: var(--space-10);
}

.results-recs-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-default);
}

.results-recs-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: var(--space-2);
}

.results-recs-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.results-recs-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.product-cards-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--surface-base);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-decoration: none;
  transition: all var(--t-base) var(--ease);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card.primary-rec {
  border-color: var(--gold-border);
  background: var(--gold-surface);
}

.product-card.primary-rec:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--gold-border);
}

.product-card-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--gold-surface);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
}

.product-card-accent-dot {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  border: 1px solid var(--border-default);
  background: var(--surface-raised);
}

.product-card-content { flex: 1; min-width: 0; }

.product-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.product-card-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-2);
}

.product-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.product-card-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-dark);
  margin-top: var(--space-2);
  transition: gap var(--t-fast);
}

.product-card:hover .product-card-cta { gap: 7px; }

/* ============================================================
   RESULTS DISCLAIMER
   ============================================================ */
.results-disclaimer {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.7;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-default);
  text-align: center;
}

/* ============================================================
   SCORE DIRECTION LEGEND — clarifies scale under the summary
   ============================================================ */
.results-score-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.score-dir-low  { color: var(--tier-green); }
.score-dir-high { color: var(--tier-danger); }
.score-dir-divider {
  color: var(--text-faint);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
}

/* ============================================================
   FOCUS AREAS BANNER
   ============================================================ */
.focus-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
  border: 1px solid;
}

.focus-banner--warning {
  background: #FFFBEB;
  border-color: #FDE68A;
}

.focus-banner--positive {
  background: var(--tier-green-bg);
  border-color: var(--tier-green-border);
}

.focus-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.focus-banner-body { flex: 1; min-width: 0; }

.focus-banner-heading {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  letter-spacing: -0.01em;
}

.focus-banner--warning .focus-banner-heading { color: #92400E; }
.focus-banner--positive .focus-banner-heading { color: var(--tier-green); }

.focus-banner-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.focus-banner--warning .focus-banner-sub { color: #78350F; }

.focus-area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.focus-area-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #92400E;
}

.focus-area-tag strong {
  font-weight: 700;
  color: #B45309;
}

/* ============================================================
   PILLAR ATTENTION STATES
   ============================================================ */
.pillar-row--attention {
  background: #FFFBEB;
}

.pillar-row--attention:hover { background: #FEF3C7; }

.pillar-score-pct--attention {
  color: var(--tier-orange);
  font-weight: 800;
}

.pillars-title-legend {
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  font-style: italic;
}

/* ============================================================
   TIER COLOUR HELPERS — Helios semantic palette
   ============================================================ */
.tier-green  { color: var(--tier-green); }
.tier-yellow { color: var(--tier-yellow); }
.tier-orange { color: var(--tier-orange); }
.tier-red    { color: var(--tier-red); }
.tier-danger { color: var(--tier-danger); }

.tier-bg-green  { background: var(--tier-green-bg);  border: 1px solid var(--tier-green-border); }
.tier-bg-yellow { background: var(--tier-yellow-bg); border: 1px solid var(--tier-yellow-border); }
.tier-bg-orange { background: var(--tier-orange-bg); border: 1px solid var(--tier-orange-border); }
.tier-bg-red    { background: var(--tier-red-bg);    border: 1px solid var(--tier-red-border); }
.tier-bg-danger { background: var(--tier-danger-bg); border: 1px solid var(--tier-danger-border); }

.bar-green  { background: var(--tier-green); }
.bar-yellow { background: var(--tier-yellow); }
.bar-orange { background: var(--tier-orange); }
.bar-red    { background: var(--tier-red); }
.bar-danger { background: var(--tier-danger); }

/* ============================================================
   SCREEN HIDE/SHOW
   ============================================================ */
.screen { display: none; }
.screen.active { display: block; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .quiz-container { padding: var(--space-6) 0 var(--space-10); }
  .intro-headline { font-size: 28px; }
  .gate-score-number { font-size: 64px; }
  .results-score-value { font-size: 34px; }
  .results-score-ring { width: 130px; height: 130px; }
  .pillar-row { grid-template-columns: 90px 1fr 42px; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
  .results-pillars-title { padding: var(--space-3) var(--space-4); }
  .product-card { padding: var(--space-4); }
  .gate-score-teaser { padding: var(--space-6); }
  .gate-preview-row { gap: var(--space-4); }
}

@media (min-width: 600px) {
  .product-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .product-card.primary-rec {
    grid-column: 1 / -1;
  }
}
