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

:root {
  --teal-50: #E0EDFA;
  --teal-400: #005dc9;
  --teal-600: #0049A0;
  --teal-800: #003477;
  --amber-50: #FAEEDA;
  --amber-600: #854F0B;
  --amber-800: #633806;
  --coral-50: #FAECE7;
  --coral-600: #993C1D;
  --purple-50: #EEEDFE;
  --purple-600: #534AB7;
  --gray-50: #F8F8F6;
  --gray-100: #F1EFE8;
  --gray-200: #D3D1C7;
  --gray-400: #888780;
  --gray-600: #5F5E5A;
  --gray-900: #1A1A18;
  --white: #ffffff;
  --border: #E2E0D8;
  --muted: #8A8880;
  --black: #0F0F0F;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #005dc9;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.85rem;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover {
  color: var(--gray-900);
}
.nav-cta {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: #005dc9;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s;
}
.nav-cta:hover {
  opacity: 0.82;
}

/* ── HERO ── */
.hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--gray-900);
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: italic;
  color: var(--teal-400);
}
.hero p {
  font-size: 16px;
  color: var(--gray-600);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.65;
}
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 13px;
  color: var(--gray-400);
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-200);
}

/* ── QUIZ WRAP ── */
.quiz-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── PROGRESS ── */
.progress-section {
  margin-bottom: 32px;
}
.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.progress-label {
  font-size: 13px;
  color: var(--gray-600);
}
.progress-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-900);
}
.progress-bar-bg {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--teal-400);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ── STEPS ── */
.step {
  display: none;
}
.step.active {
  display: block;
}

.q-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 8px;
}
.q-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.q-sub {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.multi-hint {
  display: inline-block;
  font-size: 12px;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.q-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0 24px;
}

/* ── OPTIONS ── */
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--gray-900);
  line-height: 1.5;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.opt:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  transform: translateY(-1px);
}
.opt:active {
  transform: translateY(0);
}
.opt.selected {
  border-color: var(--teal-400);
  background: var(--teal-50);
}
.opt-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--gray-100);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.15s, color 0.15s;
}
.opt.selected .opt-letter {
  background: var(--teal-400);
  color: var(--white);
}
.opt-text {
  flex: 1;
}

/* ── NAV BUTTONS ── */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn {
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-900);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover {
  background: var(--gray-100);
}
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--teal-400);
  color: var(--white);
  border-color: var(--teal-400);
}
.btn-primary:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
}
.btn-primary:disabled {
  background: var(--gray-200);
  border-color: var(--gray-200);
  color: var(--gray-400);
}

/* ── RESULT ── */
#step-result {
  display: none;
}
#step-result.active {
  display: block;
}

.result-hero {
  text-align: center;
  padding: 32px 0 28px;
}
.result-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.result-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 10px;
}
.result-hero p {
  font-size: 15px;
  color: var(--gray-600);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── SHARE CARD ── */
.share-card-wrap {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}
#share-card {
  background: var(--gray-900);
  border-radius: 14px;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}
.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--teal-400);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: 6px;
}
.card-path-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.card-logo {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  text-align: right;
  line-height: 1.4;
}
.card-why {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 20px;
  border-left: 2px solid var(--teal-400);
  padding-left: 12px;
}
.card-roles-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}
.card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.card-role-pill {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.2);
  color: #6aaaee;
  font-weight: 500;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.card-footer-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}
.card-url {
  font-size: 12px;
  font-weight: 500;
  color: var(--teal-400);
}

/* ── SHARE BUTTONS ── */
.share-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-900);
  transition: background 0.15s;
}
.share-btn:hover {
  background: var(--gray-100);
}
.share-btn svg {
  width: 16px;
  height: 16px;
}
.share-btn-primary {
  background: var(--teal-400);
  color: var(--white);
  border-color: var(--teal-400);
}
.share-btn-primary:hover {
  background: var(--teal-600);
  border-color: var(--teal-600);
}
.share-btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ── PATH CARDS ── */
.paths-section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 14px;
}
.path-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
}
.path-card.top {
  border-color: var(--teal-400);
}
.path-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.path-rank-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-600);
}
.path-rank-badge.second {
  background: var(--gray-100);
  color: var(--gray-600);
}
.path-rank-badge.third {
  background: var(--gray-100);
  color: var(--gray-400);
}
.path-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}
.match-bar-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.match-pct {
  font-size: 12px;
  font-weight: 500;
  color: var(--teal-400);
}
.match-bg {
  width: 60px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
}
.match-fill {
  height: 100%;
  background: var(--teal-400);
  border-radius: 2px;
}
.path-why {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 14px;
}
.tag-section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 6px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-600);
  font-weight: 500;
}
.tag.gap {
  background: var(--amber-50);
  color: var(--amber-600);
}
.tag.role {
  background: var(--purple-50);
  color: var(--purple-600);
}
.tag.adjacent {
  background: var(--coral-50);
  color: var(--coral-600);
}
.adjacent-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 16px 0 14px;
}
.adjacent-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 8px;
}

/* ── REFLECTION ── */
.reflection {
  background: var(--gray-900);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 24px;
  margin-bottom: 28px;
}
.reflection h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 14px;
}
.reflection-q {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
}
.reflection-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--teal-400);
  min-width: 18px;
  padding-top: 2px;
}
.reflection-cta {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}
.reflection-cta a {
  color: var(--teal-400);
  text-decoration: none;
}
.reflection-cta a:hover {
  text-decoration: underline;
}

.restart-row {
  text-align: center;
  padding-bottom: 16px;
}
.restart-link {
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--gray-400);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
}
.restart-link:hover {
  color: var(--gray-600);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--gray-900);
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  transition: transform 0.3s ease;
  pointer-events: none;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── YOUTUBE MODAL (popup) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 24, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 32px 28px 24px;
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.modal-close:hover {
  background: var(--gray-200);
}
.modal-top {
  margin-bottom: 24px;
}
.modal-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--gray-900);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.modal-sub {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}
.modal-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.modal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  text-decoration: none;
  color: var(--gray-900);
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: inherit;
  width: 100%;
  text-align: left;
}
.modal-card:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  transform: translateY(-1px);
}
.modal-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-card-icon-yt {
  background: #FF0000;
}
.modal-card-icon-res {
  background: var(--teal-400);
}
.modal-card-icon-audit {
  background: var(--gray-900);
}
.modal-card-body {
  flex: 1;
  min-width: 0;
}
.modal-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: 2px;
}
.modal-card-sub {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.4;
}
.modal-card-arrow {
  font-size: 16px;
  color: var(--gray-400);
  flex-shrink: 0;
}
.modal-card:hover .modal-card-arrow {
  color: var(--teal-400);
}
.modal-dismiss {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.modal-dismiss:hover {
  color: var(--gray-600);
  text-decoration: underline;
}

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  .hero {
    padding: 36px 16px 24px;
  }
  .quiz-wrap {
    padding: 0 16px 60px;
  }
  .share-actions {
    flex-direction: column;
  }
  .share-btn {
    justify-content: center;
  }
  .nav-row {
    gap: 8px;
  }
  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  .modal {
    padding: 28px 20px 20px;
    border-radius: var(--radius-lg);
  }
  .modal-title {
    font-size: 20px;
  }
  .modal-card {
    padding: 12px 14px;
  }
  .footer { padding: 1.25rem; flex-direction: column; align-items: flex-start; }
}

/* FOOTER */
footer {
  padding: 1.75rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-brand {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--black);
}
.footer-links { display: flex; gap: 1.5rem;}
.footer-link { font-size: 0.8rem; color: var(--muted); transition: color 0.15s; text-decoration: none;}
.footer-link:hover { color: var(--black); }
.footer-copy { font-size: 0.78rem; color: var(--muted); }