/* LeaveFor — design tokens & base styles */

:root {
  /* Brand */
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --navy-600: #475569;
  --navy-500: #64748B;
  --navy-400: #94A3B8;
  --navy-300: #CBD5E1;
  --navy-200: #E2E8F0;
  --navy-100: #F1F5F9;
  --navy-50:  #F8FAFC;

  --amber-700: #C2410C;
  --amber-600: #EA580C;
  --amber-500: #F97316;
  --amber-400: #FB923C;
  --amber-100: #FFEDD5;
  --amber-50:  #FFF7ED;

  --teal-700: #0F766E;
  --teal-600: #0D9488;
  --teal-500: #14B8A6;
  --teal-100: #CCFBF1;
  --teal-50:  #F0FDFA;

  --coral-700: #B91C1C;
  --coral-600: #DC2626;
  --coral-500: #EF4444;
  --coral-100: #FEE2E2;
  --coral-50:  #FEF2F2;

  --white: #FFFFFF;

  /* Semantic (overridable via tweaks) */
  --primary: var(--navy-900);
  --accent: var(--amber-500);
  --accent-hover: var(--amber-600);
  --bg: var(--navy-50);
  --bg-card: var(--white);
  --text: var(--navy-900);
  --text-muted: var(--navy-600);
  --text-soft: var(--navy-500);
  --border: var(--navy-200);
  --border-strong: var(--navy-300);

  /* Type */
  --font-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-body: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Spacing & radius — radius is tweakable */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12), 0 6px 16px rgba(15, 23, 42, 0.06);
  --shadow-amber: 0 10px 30px rgba(249, 115, 22, 0.28), 0 2px 8px rgba(249, 115, 22, 0.18);

  --tr-fast: 140ms cubic-bezier(.2,.7,.2,1);
  --tr-base: 240ms cubic-bezier(.2,.7,.2,1);
  --tr-slow: 520ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: inherit; }

/* App shell ---------------------------------------------------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: 32px 24px 80px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 820px;
  margin: 0 auto;
}

/* Header ---------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.header-logo img {
  height: 30px;
  width: auto;
  display: block;
}
.header-level {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.header-level-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}
.header-level strong {
  color: var(--text);
  font-weight: 600;
}
.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Lang switcher */
.lang {
  position: relative;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: var(--tr-fast);
}
.lang-btn:hover { border-color: var(--border-strong); }
.lang-btn svg { width: 14px; height: 14px; }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 100;
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
  transition: background var(--tr-fast);
}
.lang-item:hover { background: var(--navy-100); }
.lang-item.active { background: var(--amber-50); color: var(--amber-700); }
.lang-item-code { margin-left: auto; font-size: 11px; color: var(--text-soft); font-family: var(--font-mono); }

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  border: 0;
  background: none;
  color: inherit;
  transition: var(--tr-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: var(--shadow-amber);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.lg { padding: 18px 30px; font-size: 16.5px; }

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--white); }

.btn-ghost { color: var(--text-muted); padding: 12px 14px; }
.btn-ghost:hover { color: var(--text); }

.btn-pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28), 0 0 0 0 rgba(249, 115, 22, 0.35); }
  50% { box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28), 0 0 0 16px rgba(249, 115, 22, 0); }
}

/* Pills & badges -------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.pill-soft  { background: var(--navy-100); color: var(--text-muted); }
.pill-amber { background: var(--amber-50); color: var(--amber-700); border: 1px solid var(--amber-100); }
.pill-teal  { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); }
.pill-coral { background: var(--coral-50); color: var(--coral-700); border: 1px solid var(--coral-100); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-veto    { background: linear-gradient(180deg, #FEE2E2, #FECACA); color: var(--coral-700); border: 1px solid #FECACA; }
.badge-scoring { background: var(--teal-50); color: var(--teal-700); border: 1px solid var(--teal-100); }

/* Type ------------------------------------------------------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.serif { font-family: var(--font-display); font-weight: 400; }
.italic { font-style: italic; }

h1, h2, h3 { color: var(--text); margin: 0; }

/* Landing ---------------------------------------------------- */
/* ── Landing hero background ─────────────────────────────────────────────── */
.landing-screen {
  position: relative;
  overflow: hidden;
}
/* dot grid — fades from centre-top downward */
.landing-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 10%, black 0%, transparent 75%);
  mask-image:         radial-gradient(ellipse 85% 55% at 50% 10%, black 0%, transparent 75%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}
.landing-screen .container { position: relative; z-index: 1; }

/* ── Background radar ────────────────────────────────────────────────────── */
.hero-radar-bg {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 560px;
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
}
/* scale up ring positions for the larger bg radar */
.hero-radar-bg .radar-ring   { inset: 0;   }
.hero-radar-bg .radar-ring.r2{ inset: 14%; }
.hero-radar-bg .radar-ring.r3{ inset: 28%; }
.hero-radar-bg .radar-ring.r4{ inset: 42%; }
.hero-radar-bg .radar-core {
  box-shadow: 0 0 0 10px rgba(249,115,22,0.25), 0 0 40px rgba(249,115,22,0.6);
}
.hero-radar-bg .radar-sweep { animation-duration: 8s; }
@media (max-width: 600px) {
  .hero-radar-bg { width: 360px; height: 360px; top: 40px; }
}

.hero {
  padding: 80px 0 32px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
  box-shadow: var(--shadow-xs);
}
.hero-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 14ch;
  margin: 0 auto;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  margin: 26px auto 38px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 56ch;
  text-wrap: pretty;
}
.hero-stats {
  margin: 40px auto 0;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-xs);
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-stat + .hero-stat { border-left: 1px solid var(--border); }
.hero-stat strong { color: var(--text); font-weight: 600; font-family: var(--font-mono); font-size: 13.5px; }

.levels {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.level-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px 26px;
  text-align: left;
  transition: var(--tr-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.level-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.level-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(249, 115, 22, 0.1);
}
.level-card.locked {
  opacity: 0.75;
}
.level-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.level-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}
.level-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: 6px;
}
.level-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}
.level-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.level-card li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.level-card li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.level-meta {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-soft);
}
.level-meta strong { color: var(--text); font-weight: 600; font-family: var(--font-mono); }
.level-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: var(--tr-fast);
}
.level-card:hover .level-arrow {
  background: var(--accent);
  color: var(--white);
  transform: translate(2px, -2px) rotate(-2deg);
}
.level-soon-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted); background: var(--navy-100);
  padding: 4px 10px; border-radius: 20px; border: 1px solid var(--border);
  white-space: nowrap;
}

.cta-row {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-meta {
  font-size: 13.5px;
  color: var(--text-soft);
}

/* Quiz ------------------------------------------------------- */
.progress {
  position: sticky;
  top: 60px;
  z-index: 40;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.progress-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--navy-200);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-400), var(--accent));
  border-radius: var(--r-pill);
  transition: width var(--tr-slow);
}
.progress-count {
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}
.progress-count strong { color: var(--text); }

.quiz {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}
.quiz-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.quiz h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 28px;
}
.quiz-help {
  margin: 14px 0 36px;
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 56ch;
}

/* Answer types */
.opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--tr-fast);
  text-align: left;
  width: 100%;
}
.opt:hover { border-color: var(--border-strong); }
.opt.selected { border-color: var(--accent); background: var(--amber-50); }
.opt-radio {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  transition: var(--tr-fast);
}
.opt.selected .opt-radio {
  border-color: var(--accent);
  background: var(--accent);
}
.opt.selected .opt-radio::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--white);
}
.opt-check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  transition: var(--tr-fast);
  color: var(--white);
}
.opt.selected .opt-check {
  border-color: var(--accent);
  background: var(--accent);
}
.opt-body { flex: 1; }
.opt-title { font-size: 15.5px; font-weight: 500; color: var(--text); }
.opt-desc  { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }
.opt-emoji { font-size: 22px; line-height: 1; }

/* Boolean */
.bool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.bool-btn {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--tr-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.bool-btn:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.bool-btn.selected.yes { border-color: var(--accent); background: var(--amber-50); }
.bool-btn.selected.no { border-color: var(--navy-400); background: var(--navy-100); }
.bool-icon {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  line-height: 1;
  color: var(--text);
}
.bool-btn.yes .bool-icon { color: var(--accent); }
.bool-label { font-size: 17px; font-weight: 600; color: var(--text); }
.bool-sub { font-size: 13px; color: var(--text-muted); }

/* Slider */
.slider-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 32px 28px;
}
.slider-vals {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 28px;
}
.slider-vals-block { display: flex; flex-direction: column; gap: 4px; }
.slider-vals-block.right { text-align: right; }
.slider-vals-label { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.slider-vals-num { font-family: var(--font-display); font-size: 38px; line-height: 1; color: var(--text); font-weight: 400; }
.slider-vals-num .unit { font-family: var(--font-body); font-size: 16px; color: var(--text-muted); margin-left: 4px; font-weight: 500; }

.range-track {
  position: relative;
  height: 6px;
  background: var(--navy-200);
  border-radius: var(--r-pill);
  margin: 24px 0 14px;
}
.range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--amber-400), var(--accent));
  border-radius: var(--r-pill);
}
.range-handle {
  position: absolute;
  top: 50%;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--accent);
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}
.range-handle:hover { transform: translate(-50%, -50%) scale(1.12); }
.range-handle:active { cursor: grabbing; }
.range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-soft);
  margin-top: 14px;
}

/* Quiz footer */
.quiz-footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Transition ------------------------------------------------ */
.transition {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.radar {
  position: relative;
  width: 280px;
  height: 280px;
  margin-bottom: 36px;
}
.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--navy-200);
}
.radar-ring.r2 { inset: 14%; }
.radar-ring.r3 { inset: 28%; }
.radar-ring.r4 { inset: 42%; border-color: var(--amber-100); }
.radar-core {
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.18), 0 0 24px rgba(249, 115, 22, 0.5);
}
.radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 270deg, rgba(249, 115, 22, 0.0) 270deg, rgba(249, 115, 22, 0.32) 350deg, rgba(249, 115, 22, 0.55) 360deg);
  animation: radar-spin 2.4s linear infinite;
  mask: radial-gradient(circle, transparent 6px, black 6px);
  -webkit-mask: radial-gradient(circle, transparent 6px, black 6px);
}
@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.radar-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  animation: radar-blip 4s ease-out infinite;
}
.radar-dot.d1 { top: 22%; left: 32%; animation-delay: 0.4s; }
.radar-dot.d2 { top: 68%; left: 72%; animation-delay: 1.2s; }
.radar-dot.d3 { top: 50%; left: 18%; animation-delay: 2.0s; }
.radar-dot.d4 { top: 30%; left: 75%; animation-delay: 2.8s; background: var(--teal-500); }
@keyframes radar-blip {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  10% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; }
}

.transition h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  max-width: 18ch;
  text-wrap: balance;
}
.transition-status {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  min-height: 20px;
}
.transition-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px;
  margin: 14px 0 40px;
  box-shadow: var(--shadow-sm);
}
.transition-stat {
  padding: 18px 28px;
  text-align: center;
}
.transition-stat + .transition-stat { border-left: 1px solid var(--border); }
.transition-stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--text);
  font-weight: 400;
}
.transition-stat-num.amber { color: var(--accent); }
.transition-stat-num.teal { color: var(--teal-600); }
.transition-stat-label {
  font-size: 11.5px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  font-weight: 600;
}
.transition-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Results --------------------------------------------------- */
.results-head {
  padding: 56px 0 36px;
}
.results-head .eyebrow { margin-bottom: 14px; }
.results-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 18ch;
}
.results-head h1 em { font-style: italic; color: var(--accent); }
.results-head p {
  margin-top: 18px;
  font-size: 16.5px;
  color: var(--text-muted);
  max-width: 56ch;
}

.results-filter-row {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.results-filter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.results-filter-meta strong { color: var(--text); font-weight: 600; }
.results-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--navy-50);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.country-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.country-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: var(--tr-base);
}
.country-card:hover { border-color: var(--border-strong); }
.country-card.expanded { box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.country-row {
  display: grid;
  grid-template-columns: 90px 1fr auto auto;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
  cursor: pointer;
}
.country-flag {
  width: 90px;
  height: 70px;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--navy-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.country-flag::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.country-info { min-width: 0; }
.country-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.005em;
}
.country-name .city { color: var(--text-soft); font-style: italic; }
.country-tags {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.country-match {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.country-match-num {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.country-match-num .pct {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  margin-left: 1px;
}
.country-match-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  font-weight: 600;
}
.country-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy-100);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--tr-fast);
}
.country-card:hover .country-toggle { background: var(--white); color: var(--text); }
.country-card.expanded .country-toggle {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}
.country-toggle svg {
  transition: transform 0.28s ease;
}
.country-card.expanded .country-toggle svg {
  transform: rotate(180deg);
}

/* Expanded panel */
.country-expand-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.country-expand-wrapper.open {
  grid-template-rows: 1fr;
}
.country-expand-wrapper > .country-expand {
  overflow: hidden;
}
.country-expand {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--navy-50) 0%, var(--white) 240px);
}
.country-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 22px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.country-tab {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--tr-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.country-tab:hover { color: var(--text); }
.country-tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.country-tab.locked { color: var(--text-soft); }
.country-tab.locked .lock-i { color: var(--text-soft); }
.lock-i { font-size: 11px; }

.country-tabpanel {
  padding: 28px 22px 26px;
}
.country-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.country-stat-cell {
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.country-stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  font-weight: 600;
}
.country-stat-val {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  color: var(--text);
}
.country-stat-val .small { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); font-weight: 500; }

.country-bullets {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.country-bullets li {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
}
.country-bullets li::before {
  content: "→";
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* Risks box */
.risk-box {
  border: 1px solid var(--coral-500);
  background: var(--coral-50);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.risk-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--coral-500);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-display);
  font-style: italic;
}
.risk-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--coral-700);
}
.risk-body {
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--navy-800);
  line-height: 1.55;
}

/* Locked panel */
.lock-panel {
  position: relative;
  padding: 28px 22px;
  min-height: 320px;
}
.lock-blur {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.08), transparent 60%),
    repeating-linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.04) 0 14px,
      transparent 14px 28px
    );
  filter: blur(2px);
}
.lock-blur::before {
  content: "$ 12 400";
  position: absolute;
  top: 60px; left: 40px;
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--text);
  opacity: 0.3;
}
.lock-blur::after {
  content: "Wealth tax · 0.7% / yr above €700k\A Foreign-source CGT · exempt yrs 1–5\A Crypto income · taxed as misc.";
  white-space: pre;
  position: absolute;
  bottom: 50px; left: 40px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-muted);
  opacity: 0.4;
}
.lock-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.95) 50%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin: 60px 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 26px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.lock-overlay-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-700);
}
.lock-overlay h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.lock-overlay p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--text-muted);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

/* Modal ------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 32px 32px;
  max-width: 540px; width: 100%;
  box-shadow: 0 24px 64px rgba(15,23,42,0.18);
  position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-100); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
  transition: var(--tr-fast);
}
.modal-close:hover { background: var(--navy-200); color: var(--text); }
.modal-badge {
  display: inline-flex; align-items: center;
  background: var(--accent); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 14px;
}
.modal-title { font-family: var(--font-display); font-size: 24px; margin: 0 0 8px; }
.modal-sub   { font-size: 14.5px; color: var(--text-muted); margin: 0 0 24px; line-height: 1.55; }
.modal-options { display: flex; flex-direction: column; gap: 16px; }
.modal-option {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 20px;
}
.modal-option.primary  { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, white); }
.modal-option.secondary { background: var(--navy-50); }
.modal-option-label {
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 14px;
}
.modal-email-form { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-input {
  flex: 1; min-width: 0;
  height: 40px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 14px; background: var(--white); color: var(--text);
  transition: var(--tr-fast);
}
.modal-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.modal-sent {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: color-mix(in srgb, var(--accent) 8%, white);
  border-radius: var(--r-md); font-size: 14px; color: var(--text);
}
.modal-error { color: #ef4444; font-size: 13px; margin: 8px 0 0; }
.modal-fine  { font-size: 12px; color: var(--text-muted); margin: 10px 0 0; }
.modal-donate-body { display: flex; flex-direction: column; gap: 8px; }
.modal-donate-amount { font-family: var(--font-display); font-size: 28px; color: var(--text); }
.modal-donate-body p { font-size: 14px; color: var(--text-muted); margin: 0; }
.btn.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn.btn-outline:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.btn-donate {
  background: #FFDD00; border: 1px solid #e6c700;
  color: #1a1a1a; font-weight: 600; white-space: nowrap;
}
.btn.btn-donate:hover { background: #f5d300; }
.btn.btn-donate:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-coffee-icon { font-style: normal; margin-right: 4px; }

/* Misc ------------------------------------------------------- */
.fade-in { animation: fade-in var(--tr-slow) both; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.icon-arrow {
  display: inline-block;
  width: 16px; height: 16px;
}

/* responsive lite */
@media (max-width: 820px) {
  .levels { grid-template-columns: 1fr; }
  .country-row { grid-template-columns: 64px 1fr auto; }
  .country-toggle { display: none; }
  .country-flag { width: 64px; height: 50px; font-size: 30px; }
  .country-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-wrap: wrap; border-radius: var(--r-md); }
  .hero-stat + .hero-stat { border-left: 0; border-top: 1px solid var(--border); }
  .quiz { padding: 28px 20px 40px; scroll-margin-top: 120px; }
  .quiz h2 { font-size: clamp(22px, 5.5vw, 32px); }
  .quiz-help { font-size: 14.5px; margin: 10px 0 28px; }
}

/* ── Unlock toast ───────────────────────────────────────────────────────── */
.unlocked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.unlocked-banner svg { color: #16A34A; flex-shrink: 0; }

.unlock-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0F172A;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  white-space: nowrap;
  animation: fade-in 0.25s ease;
}
.unlock-toast svg { color: #4ADE80; flex-shrink: 0; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-link:hover { color: var(--text); }
@media (max-width: 600px) {
  .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ── Info pages (footer: /about /privacy /terms /contact) ───────────────── */
.info-page {
  flex: 1;
  padding: 48px 24px 80px;
  animation: fade-in 0.2s ease;
}
.info-page-inner {
  max-width: 680px;
  margin: 0 auto;
}
.info-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 14px;
  padding: 0;
  margin-bottom: 32px;
  transition: color 0.15s;
}
.info-page-back:hover { color: var(--text); }
.info-page h1 {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
  margin: 0 0 24px;
}
.info-page-body {
  line-height: 1.8;
  color: var(--text-muted);
  font-size: 15px;
}
.info-page-body p { margin: 0 0 16px; }
.info-page-body p:last-child { margin-bottom: 0; }

/* footer-link as button */
.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
