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

:root {
  --bg:        #050714;
  --card:      #0a0f24;
  --card2:     #0e142e;
  --border:    rgba(56, 189, 248, 0.16);
  --teal:      #06B6D4;
  --teal-lg:   #22D3EE;
  --sky:       #38BDF8;
  --emerald:   #10B981;
  --emerald-lg:#34D399;
  --gold:      #F59E0B;
  --purple:    #8B5CF6;
  --red:       #F87171;
  --text:      #E2E8F0;
  --muted:     #94A3B8;
  --dim:       #475569;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(6,182,212,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(16,185,129,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(139,92,246,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Language selector ── */
.lang-bar {
  position: fixed;
  top: .85rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  gap: .35rem;
}

.lang-btn {
  padding: .3rem .65rem;
  background: rgba(5,7,20,0.85);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-family: inherit;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all .2s;
  white-space: nowrap;
}
.lang-btn:hover { border-color: rgba(56,189,248,0.5); color: var(--text); }
.lang-btn.active {
  border-color: var(--teal);
  color: var(--teal-lg);
  background: rgba(6,182,212,0.12);
}

/* ── Screens ── */
.screen { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ══ INTRO ══ */
#intro {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.25rem 3rem;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(6,182,212,0.12);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .38rem 1.1rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--teal-lg);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.logo-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-lg);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.4)} }

.brand-wordmark {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.brand-wordmark .wordmark-accent {
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.55rem, 4.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.025em;
  margin-bottom: 1.1rem;
  max-width: 740px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(.9rem, 2.5vw, 1.08rem);
  color: var(--muted);
  max-width: 580px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

/* ── Privacy banner (intro page) ─────────────────── */
.privacy-banner {
  width: 100%;
  background: rgba(6, 182, 212, 0.07);
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: .75rem;
  padding: .85rem 1.1rem;
  margin-bottom: 1.4rem;
  font-size: .82rem;
  line-height: 1.55;
  color: #94d8e2;
  text-align: center;
}
.privacy-banner strong { color: #e0f7fa; font-weight: 700; }

/* ── Privacy strip (form screen, top of every step) ─ */
.form-privacy-strip {
  width: 100%;
  background: rgba(6, 182, 212, 0.05);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
  padding: .45rem 1rem;
  font-size: .72rem;
  color: #4e9ba8;
  text-align: center;
  letter-spacing: .01em;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2.25rem;
  font-size: .8rem;
  color: var(--dim);
}
.trust-row span { display: flex; align-items: center; gap: .35rem; }

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  background: linear-gradient(135deg, var(--teal), #047A8E);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  padding: .95rem 2.2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 40px rgba(6,182,212,0.4);
  min-height: 52px;
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(6,182,212,0.55); }

.intro-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem;
  margin-top: 3rem;
  max-width: 720px;
  width: 100%;
}
@media (min-width: 580px) { .intro-features { grid-template-columns: repeat(4, 1fr); } }

.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: left;
}
.feat-icon { font-size: 1.5rem; margin-bottom: .45rem; }
.feat-title { font-weight: 700; font-size: .85rem; margin-bottom: .2rem; }
.feat-desc { font-size: .75rem; color: var(--muted); line-height: 1.5; }

/* ══ FORM ══ */
#form-screen {
  display: none;
  padding: 4.5rem 1.25rem 5rem;
  align-items: center;
}
#form-screen.active { display: flex; flex-direction: column; }

.form-container { width: 100%; max-width: 720px; margin: 0 auto; }

.progress-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 2.2rem;
}
.progress-track {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--emerald));
  border-radius: 99px;
  transition: width .5s ease;
}
.progress-label { /* container for the dots row */ }

/* ── Clickable step dots ── */
.step-dots {
  display: flex;
  align-items: center;
  gap: .22rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.step-dots::-webkit-scrollbar { display: none; }
.step-dot {
  min-width: 26px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: 0;
  background: rgba(255,255,255,0.05);
  color: var(--dim);
  border: 2px solid transparent;
  cursor: default;
  flex-shrink: 0;
  user-select: none;
  transition: background .2s ease, color .2s ease, transform .15s ease, border-color .2s ease;
}
.step-dot.done {
  background: rgba(6,182,212,0.18);
  color: var(--teal-lg);
  border-color: rgba(6,182,212,0.25);
}
.step-dot.active {
  background: var(--teal);
  color: #001a1f;
  border-color: var(--emerald);
  font-weight: 800;
  font-size: .65rem;
}
.step-dot.clickable { cursor: pointer; }
.step-dot.clickable:not(.active):hover {
  background: rgba(6,182,212,0.38);
  color: #fff;
  transform: scale(1.18);
  border-color: var(--teal);
}
@media (max-width: 400px) {
  .step-dot { min-width: 23px; width: 23px; height: 23px; font-size: .55rem; }
}

.step-panel { animation: fadeSlideIn .38s ease; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-lg);
  margin-bottom: .75rem;
}

.step-question {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: .35rem;
  margin-top: 1.1rem;
  letter-spacing: -.015em;
}
.step-panel > .step-question:first-of-type { margin-top: 0; }

.step-hint { font-size: .83rem; color: var(--muted); margin-bottom: 1rem; }

.options-grid { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1rem; }
.options-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}

.opt-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .8rem 1.05rem;
  cursor: pointer;
  transition: all .18s;
  text-align: left;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
.opt-card:hover { border-color: rgba(6,182,212,0.5); background: var(--card2); }
.opt-card.selected {
  border-color: var(--teal);
  background: rgba(6,182,212,0.12);
  box-shadow: 0 0 0 1px var(--teal), 0 0 20px rgba(6,182,212,0.18);
}
.opt-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1; }
.opt-text { flex: 1; min-width: 0; }
.opt-label { font-weight: 600; font-size: .9rem; }
.opt-desc { font-size: .74rem; color: var(--muted); margin-top: .12rem; }
.opt-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--teal);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s; flex-shrink: 0;
}
.opt-card.selected .opt-check { opacity: 1; }
.opt-check::after { content: '✓'; color: #fff; font-size: .7rem; font-weight: 800; }

.multi-hint { font-size: .76rem; color: var(--emerald-lg); margin-bottom: .55rem; }

/* Inputs */
.form-input, .form-num {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1.05rem;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  outline: none;
  transition: border-color .18s;
  margin-bottom: 1rem;
}
.form-input { resize: vertical; }
.form-input.no-resize { resize: none; min-height: auto; }
.form-input:focus, .form-num:focus { border-color: var(--teal); }
.form-input::placeholder, .form-num::placeholder { color: var(--dim); }

/* Currency / number input with prefix */
.num-row { display: flex; gap: .65rem; align-items: stretch; margin-bottom: 1rem; flex-wrap: wrap; }
.num-wrap {
  position: relative;
  flex: 1; min-width: 0;
}
.num-wrap .form-num {
  padding-left: 2.4rem;
  margin-bottom: 0;
  -moz-appearance: textfield;
}
.num-wrap .form-num::-webkit-outer-spin-button,
.num-wrap .form-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-prefix {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
  pointer-events: none;
}

/* Compact two-column grid for short fields */
.num-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-bottom: 1rem;
}
@media (max-width: 480px) { .num-grid { grid-template-columns: 1fr; } }
.num-grid .num-field { display: flex; flex-direction: column; gap: .3rem; }
.num-field-label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.num-field-hint { font-size: .7rem; color: var(--dim); }
.num-field .num-wrap .form-num { margin-bottom: 0; }

.step-nav { display: flex; gap: .85rem; align-items: center; margin-top: 1.6rem; }
.btn-back {
  padding: .8rem 1.4rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 48px;
}
.btn-back:hover { border-color: var(--muted); color: var(--text); }
.btn-next {
  flex: 1;
  padding: .88rem 1.75rem;
  background: linear-gradient(135deg, var(--teal), #047A8E);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 20px rgba(6,182,212,0.3);
  min-height: 48px;
}
.btn-next:hover:not(:disabled) { box-shadow: 0 0 30px rgba(6,182,212,0.55); transform: translateY(-1px); }
.btn-next:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }

/* ══ LOADING ══ */
#loading {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 3rem 1.5rem;
}
#loading.active { display: flex; }

.loader-orb {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  margin-bottom: 1.75rem;
  animation: orb-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 60px rgba(6,182,212,0.5);
}
@keyframes orb-pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 60px rgba(6,182,212,0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 90px rgba(6,182,212,0.7); }
}

.loader-title { font-size: clamp(1.3rem, 4vw, 1.6rem); font-weight: 800; margin-bottom: .65rem; }
.loader-sub { color: var(--muted); font-size: .9rem; max-width: 420px; line-height: 1.6; margin-bottom: 2.25rem; }

.agent-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 900;
}

.loader-steps {
  display: flex; flex-direction: column; gap: .55rem;
  max-width: 360px; width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  font-family: 'Inter', monospace;
}
.loader-step { display: flex; align-items: center; gap: .6rem; font-size: .82rem; color: var(--dim); transition: color .4s; }
.loader-step.done { color: var(--muted); }
.loader-step.active { color: var(--teal-lg); }
.step-arrow { font-size: .75rem; flex-shrink: 0; color: var(--dim); transition: color .4s; }
.loader-step.done .step-arrow { color: var(--emerald); }
.loader-step.active .step-arrow { color: var(--teal-lg); }
.loader-step-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex-shrink: 0; transition: background .4s; }
.loader-step.done .loader-step-dot { background: var(--emerald); }
.loader-step.active .loader-step-dot { background: var(--teal-lg); animation: pulse 1s infinite; }

/* ── Patience banner — appears 3 s after loading starts ── */
.patience-banner {
  margin-top: 2.5rem;
  max-width: 480px;
  width: 100%;
  background: linear-gradient(135deg, rgba(245,158,11,0.13), rgba(239,68,68,0.09));
  border: 1.5px solid rgba(245,158,11,0.45);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  animation: fadeSlideIn .5s ease;
  text-align: center;
}
.patience-banner span {
  font-size: .92rem;
  color: var(--text);
  line-height: 1.6;
}
.patience-banner span:first-child {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -.01em;
}

/* Wake-lock status pill on loading screen */
.wakelock-notice {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 99px;
  padding: .4rem 1rem;
  font-size: .78rem;
  color: var(--emerald-lg);
  font-weight: 500;
}
.wakelock-notice.wakelock-warn {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--gold);
}

/* ══ RESULTS ══ */
#results { display: none; padding: 4rem 1.25rem 6rem; align-items: center; }
#results.active { display: flex; flex-direction: column; }
.results-container { width: 100%; max-width: 880px; margin: 0 auto; }

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

.result-header { text-align: center; margin-bottom: 2.25rem; animation: fadeUp .55s ease; }

.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 100px;
  padding: .32rem .95rem;
  font-size: .72rem;
  font-weight: 800;
  color: var(--teal-lg);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.verdict-emoji { display: block; font-size: 3rem; margin-bottom: .35rem; line-height: 1; }
.verdict-headline {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin-bottom: .55rem;
  background: linear-gradient(135deg, var(--text), var(--teal-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.verdict-tagline { font-size: 1rem; color: var(--muted); font-style: italic; max-width: 580px; margin: 0 auto .5rem; line-height: 1.55; }

/* SNAPSHOT BAR */
.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .65rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .1s both;
}
@media (max-width: 1000px) { .snapshot-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .snapshot-grid { grid-template-columns: repeat(2, 1fr); } }

.snap-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem .95rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.snap-label { font-size: .65rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.snap-value { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.snap-value.pos { color: var(--emerald-lg); }
.snap-value.neg { color: var(--red); }
.snap-value.warn { color: var(--gold); }
.snap-sub { font-size: .7rem; color: var(--dim); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
}

.card-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .9rem;
}

/* Grid layouts */
.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .15s both;
}
@media (max-width: 600px) { .metrics-row { grid-template-columns: 1fr; } }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .3s both;
}
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

/* Score */
.overall-score-big {
  font-size: clamp(3.5rem, 10vw, 5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.overall-label { font-size: .85rem; color: var(--muted); margin-top: .4rem; }

.score-bars { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .65rem; }
.score-bar-row { display: flex; align-items: center; gap: .7rem; }
.score-bar-label { font-size: .73rem; color: var(--muted); width: 110px; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 99px; transition: width 1.4s cubic-bezier(.4,0,.2,1); width: 0; }
.score-bar-num { font-size: .75rem; font-weight: 700; width: 28px; text-align: right; }

/* Chart */
.chart-wrap { position: relative; height: 240px; }

/* Eye opener */
.eye-opener-card {
  background: linear-gradient(135deg, rgba(6,182,212,0.12), rgba(16,185,129,0.08));
  border: 1px solid rgba(6,182,212,0.32);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .2s both;
  position: relative;
  overflow: hidden;
}
.eye-opener-card::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.25), transparent 70%);
  pointer-events: none;
}
.insight-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: .7rem;
}
.eye-opener-text {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.005em;
}

/* Insight text */
.insight-label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal-lg);
  margin-bottom: .7rem;
}
.insight-text { font-size: .9rem; line-height: 1.65; color: var(--text); }

/* Hidden leaks list */
.leak-list { display: flex; flex-direction: column; gap: .65rem; margin-top: .4rem; }
.leak-item {
  background: rgba(248,113,113,0.05);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 10px;
  padding: .85rem 1rem;
}
.leak-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; margin-bottom: .35rem; flex-wrap: wrap; }
.leak-cat { font-weight: 700; font-size: .9rem; color: var(--text); }
.leak-amount { font-weight: 800; font-size: .9rem; color: var(--red); white-space: nowrap; }
.leak-issue { font-size: .82rem; color: var(--muted); line-height: 1.55; margin-bottom: .35rem; }
.leak-fix { font-size: .82rem; color: var(--emerald-lg); line-height: 1.55; }
.leak-fix::before { content: '→ '; color: var(--emerald-lg); font-weight: 800; }

/* Primary recommendation */
.primary-rec {
  background: linear-gradient(135deg, rgba(16,185,129,0.10), rgba(6,182,212,0.08));
  border: 1px solid rgba(16,185,129,0.32);
  border-radius: 18px;
  padding: 1.6rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .35s both;
  position: relative;
  overflow: hidden;
}
.primary-rec::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.18), transparent 70%);
  pointer-events: none;
}
.primary-rec-label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--emerald-lg); margin-bottom: .6rem; }
.primary-rec-title { font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 800; letter-spacing: -.015em; margin-bottom: .75rem; line-height: 1.25; }
.primary-rec-text { font-size: .92rem; line-height: 1.65; color: var(--text); margin-bottom: .9rem; }
.primary-rec-impact {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 10px;
  padding: .85rem 1rem;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 1rem;
}
.primary-rec-impact::before { content: '📈 '; }
.first-steps { display: flex; flex-direction: column; gap: .5rem; }
.first-step {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .55rem 0;
}
.first-step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--emerald));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .75rem;
  flex-shrink: 0;
  color: #fff;
}
.first-step-text { font-size: .87rem; line-height: 1.5; color: var(--text); }

/* Alternatives */
.alternatives-card { animation: fadeUp .6s ease .45s both; margin-bottom: 1.25rem; }
.alt-list { display: flex; flex-direction: column; gap: .8rem; }
.alt-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.alt-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .55rem; flex-wrap: wrap; }
.alt-name { font-weight: 700; font-size: .95rem; }
.alt-feas {
  padding: .2rem .6rem;
  border-radius: 6px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: rgba(56,189,248,0.1);
  color: var(--sky);
  white-space: nowrap;
}
.alt-feas.high { background: rgba(16,185,129,0.12); color: var(--emerald-lg); }
.alt-feas.low { background: rgba(248,113,113,0.12); color: var(--red); }
.alt-feas.medium { background: rgba(245,158,11,0.12); color: var(--gold); }
.alt-pros, .alt-cons { font-size: .82rem; line-height: 1.55; }
.alt-pros { color: var(--emerald-lg); margin-bottom: .25rem; }
.alt-pros::before { content: '✓ '; }
.alt-cons { color: var(--muted); }
.alt-cons::before { content: '⚠ '; color: var(--gold); }

/* Relocation cards */
.reloc-section { margin-bottom: 1.25rem; animation: fadeUp .6s ease .5s both; }
.reloc-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.reloc-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 780px) { .reloc-grid { grid-template-columns: 1fr 1fr; } }

.reloc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.reloc-card:hover { border-color: rgba(6,182,212,0.4); transform: translateY(-2px); }
.reloc-card.featured { border-color: rgba(16,185,129,0.45); background: linear-gradient(135deg, rgba(16,185,129,0.06), var(--card)); }
.reloc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .85rem; }
.reloc-dest { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.reloc-match {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  border-radius: 10px;
  padding: .35rem .55rem;
  min-width: 50px;
}
.reloc-match-num { font-size: 1.05rem; font-weight: 900; color: #052716; line-height: 1; }
.reloc-match-lbl { font-size: .55rem; font-weight: 700; color: rgba(5,39,22,0.7); text-transform: uppercase; letter-spacing: .05em; margin-top: 1px; }
.reloc-verdict {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal-lg);
  margin-bottom: .65rem;
}
.reloc-row { font-size: .82rem; line-height: 1.55; margin-bottom: .55rem; }
.reloc-row strong { color: var(--text); font-weight: 700; display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .15rem; }
.reloc-cost {
  font-weight: 800;
  font-size: .95rem;
  color: var(--emerald-lg);
}

/* Roadmap */
.roadmap-card { animation: fadeUp .6s ease .55s both; margin-bottom: 1.25rem; }
.roadmap-list { display: flex; flex-direction: column; gap: 1rem; }
.roadmap-window {
  display: flex; gap: 1rem;
  padding: .9rem 1rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}
.roadmap-bar {
  width: 3px;
  background: linear-gradient(180deg, var(--teal), var(--emerald));
  border-radius: 99px;
  flex-shrink: 0;
}
.roadmap-body { flex: 1; min-width: 0; }
.roadmap-window-name { font-size: .68rem; font-weight: 700; color: var(--teal-lg); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .2rem; }
.roadmap-focus { font-size: .98rem; font-weight: 800; margin-bottom: .55rem; letter-spacing: -.01em; }
.roadmap-actions { display: flex; flex-direction: column; gap: .35rem; }
.roadmap-action { font-size: .82rem; color: var(--muted); line-height: 1.5; padding-left: 1rem; position: relative; }
.roadmap-action::before { content: '▸'; position: absolute; left: 0; color: var(--teal-lg); }

/* Mortgage section */
.mortgage-card { animation: fadeUp .6s ease .25s both; margin-bottom: 1.25rem; }

/* Prediction */
.prediction-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(6,182,212,0.06));
  border: 1px solid rgba(245,158,11,0.22);
  border-radius: 16px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .6s both;
}
.prediction-text { font-size: .92rem; line-height: 1.7; }

/* Risk card */
.risk-card {
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.22);
  border-radius: 16px;
  padding: 1.4rem;
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .25s both;
}

/* AI Journey Image */
.image-card { animation: fadeUp .6s ease .65s both; margin-bottom: 1.75rem; }
#ai-image-wrap {
  border-radius: 10px; overflow: hidden;
  background: var(--card2);
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
#ai-image { width: 100%; display: block; border-radius: 10px; }
.image-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .65rem; color: var(--muted); font-size: .85rem;
}
.img-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,.07);
  border-top-color: var(--teal-lg);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* CTA */
.cta-section {
  text-align: center;
  padding: 2.25rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  animation: fadeUp .6s ease .7s both;
}
.cta-title { font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 800; margin-bottom: .5rem; }
.cta-sub { font-size: .88rem; color: var(--muted); margin-bottom: 1.4rem; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.cta-buttons { display: flex; gap: .85rem; justify-content: center; flex-wrap: wrap; }
.btn-restart {
  padding: .8rem 1.5rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 46px;
}
.btn-restart:hover { border-color: var(--teal); color: var(--teal-lg); }
.btn-share {
  padding: .8rem 1.5rem;
  background: linear-gradient(135deg, var(--teal), #047A8E);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 18px rgba(6,182,212,0.3);
  min-height: 46px;
}
.btn-share:hover { box-shadow: 0 0 30px rgba(6,182,212,0.55); }

.anon-footer { text-align: center; margin-top: 2.5rem; font-size: .75rem; color: var(--dim); }

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
  #intro { padding: 5rem 1rem 3rem; }
  .trust-row { gap: .85rem; font-size: .75rem; }
  .options-grid.two-col { grid-template-columns: 1fr; }
  .btn-start { width: 100%; justify-content: center; }
  .step-nav { flex-direction: column; }
  .btn-back { width: 100%; }
  .card, .primary-rec, .reloc-card, .prediction-card, .risk-card { padding: 1.1rem; }
  .eye-opener-card { padding: 1.25rem; }
  .cta-section { padding: 1.5rem 1rem; }
  .cta-buttons { flex-direction: column; }
  .btn-restart, .btn-share, .btn-export { width: 100%; justify-content: center; }
  .lang-bar { top: .6rem; right: .65rem; }
  .lang-btn { padding: .28rem .55rem; font-size: .7rem; }
  .export-bar { flex-direction: column; }
}

/* ══ ERROR SCREEN ══ */
#error-screen {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}
#error-screen.active { display: flex; }

.error-container {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: var(--card);
  border: 1px solid rgba(248,113,113,0.32);
  border-radius: 18px;
  padding: 2.5rem 1.75rem;
  box-shadow: 0 0 60px rgba(248,113,113,0.12);
}
.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.error-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .75rem;
  letter-spacing: -.01em;
}
.error-message {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1rem;
  background: rgba(248,113,113,0.06);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 10px;
  padding: .85rem 1rem;
}
.error-hint {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}
.error-buttons {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-retry {
  padding: .85rem 1.75rem;
  background: linear-gradient(135deg, var(--teal), #047A8E);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 20px rgba(6,182,212,0.3);
  min-height: 46px;
}
.btn-retry:hover { box-shadow: 0 0 30px rgba(6,182,212,0.55); transform: translateY(-1px); }
.btn-edit {
  padding: .85rem 1.5rem;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 46px;
}
.btn-edit:hover { border-color: var(--muted); color: var(--text); }
@media (max-width: 480px) {
  .error-buttons { flex-direction: column; }
  .btn-retry, .btn-edit { width: 100%; }
}

/* ══ Saved-session banner on intro ══ */
.resume-banner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.32);
  border-radius: 12px;
  padding: .8rem 1rem;
  margin-bottom: 1.25rem;
  max-width: 560px;
  width: 100%;
  font-size: .85rem;
  color: var(--text);
  flex-wrap: wrap;
}
.resume-banner-text { flex: 1; min-width: 0; text-align: left; line-height: 1.45; }
.resume-banner-text strong { color: var(--emerald-lg); display: block; margin-bottom: .15rem; }
.resume-banner-buttons { display: flex; gap: .4rem; }
.resume-btn {
  padding: .45rem .85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(6,182,212,0.12);
  color: var(--teal-lg);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
}
.resume-btn:hover { border-color: var(--teal); background: rgba(6,182,212,0.2); }
.resume-btn.ghost { background: transparent; color: var(--muted); }
.resume-btn.ghost:hover { color: var(--text); border-color: var(--muted); }

/* ══ EXPORT BAR (top of results) ══ */
.export-bar {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeUp .55s ease .05s both;
}
.btn-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .65rem 1.1rem;
  background: rgba(6,182,212,0.1);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--teal-lg);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  min-height: 42px;
  white-space: nowrap;
}
.btn-export:hover { background: rgba(6,182,212,0.18); border-color: var(--teal); color: var(--text); transform: translateY(-1px); }

/* ══ DEBT BREAKDOWN ══ */
.debt-card { margin-bottom: 1.25rem; animation: fadeUp .6s ease .22s both; }
.debt-card .insight-label.red { color: var(--red); }
.debt-card .insight-label.gold { color: var(--gold); }
.debt-grid { display: flex; flex-direction: column; gap: .55rem; }
.debt-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: .85rem;
  padding: .8rem 1rem;
  background: rgba(248,113,113,0.05);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 10px;
}
.debt-row-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.debt-row-value { font-size: .95rem; font-weight: 800; color: var(--red); white-space: nowrap; }
.debt-row-pay { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 480px) {
  .debt-row { grid-template-columns: 1fr; gap: .25rem; }
  .debt-row-value, .debt-row-pay { font-size: .85rem; }
}

/* ══ HEALTH + QOL ══ */
.health-qol-card { margin-bottom: 1.25rem; animation: fadeUp .6s ease .28s both; }
.hqol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-top: .4rem;
}
@media (max-width: 600px) { .hqol-grid { grid-template-columns: 1fr; } }
.hqol-subhead {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-lg);
  margin-bottom: .4rem;
}
.hqol-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--emerald-lg);
  line-height: 1.1;
}
.hqol-num-sub {
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: .4rem;
}

/* ══ IMMIGRATION CARD ══ */
.immigration-card { margin-bottom: 1.25rem; animation: fadeUp .6s ease .32s both; background: linear-gradient(135deg, rgba(139,92,246,0.07), var(--card)); border-color: rgba(139,92,246,0.25); }
.immigration-card .insight-label { color: var(--purple); }

/* ══ RELOCATION cards — extras ══ */
.reloc-scores { display: flex; flex-direction: column; gap: .35rem; align-items: flex-end; }
.reloc-match.lifestyle {
  background: linear-gradient(135deg, var(--gold), #B45309);
}
.reloc-match.lifestyle .reloc-match-num { color: #2A1604; }
.reloc-match.lifestyle .reloc-match-lbl { color: rgba(42,22,4,0.7); }

.reloc-row-highlight {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: 8px;
  padding: .55rem .75rem;
  margin-bottom: .8rem !important;
  display: flex; justify-content: space-between; align-items: center;
}
.reloc-row-highlight strong { margin-bottom: 0 !important; font-size: .7rem !important; }
.reloc-row-highlight .reloc-cost { font-size: 1rem; }

.complexity-tag {
  display: inline-block;
  padding: .1rem .45rem;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .05em;
  border-radius: 5px;
  margin-left: .4rem;
  text-transform: uppercase;
}
.complexity-tag.low { background: rgba(16,185,129,0.18); color: var(--emerald-lg); }
.complexity-tag.medium { background: rgba(245,158,11,0.18); color: var(--gold); }
.complexity-tag.high { background: rgba(248,113,113,0.18); color: var(--red); }

/* ══ SUBSCRIPTIONS checkbox grid (in step 7) ══ */
.subs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-bottom: .55rem;
}
@media (min-width: 600px) { .subs-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .subs-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }

.sub-card {
  display: flex;
  align-items: center;
  gap: .55rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .55rem .75rem;
  cursor: pointer;
  transition: all .15s;
  min-height: 52px;
  -webkit-tap-highlight-color: transparent;
}
.sub-card:hover { border-color: rgba(6,182,212,0.5); background: var(--card2); }
.sub-card.selected {
  border-color: var(--teal);
  background: rgba(6,182,212,0.12);
  box-shadow: 0 0 0 1px var(--teal);
}
.sub-icon { font-size: 1.25rem; flex-shrink: 0; }
.sub-text { flex: 1; min-width: 0; }
.sub-label { font-weight: 600; font-size: .78rem; line-height: 1.2; }
.sub-cost { font-size: .68rem; color: var(--muted); margin-top: .12rem; }
.sub-card .opt-check {
  width: 16px; height: 16px;
  margin-left: auto;
}

.subs-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.32);
  border-radius: 10px;
  padding: .65rem .95rem;
  margin-bottom: 1rem;
}
.subs-total-label { font-size: .82rem; color: var(--muted); font-weight: 500; }
.subs-total-value { font-size: 1.1rem; font-weight: 800; color: var(--teal-lg); }

/* ══ CAREER VALUATION card ══ */
.career-card {
  background: linear-gradient(135deg, rgba(6,182,212,0.06), var(--card));
  border-color: rgba(6,182,212,0.32);
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .32s both;
}
.career-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.career-numbers {
  text-align: right;
  flex-shrink: 0;
}
.career-num-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}
.career-num-value {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
}
.career-num-gap {
  font-size: .78rem;
  font-weight: 700;
  margin-top: .1rem;
}
.career-num-gap.pos { color: var(--red); }   /* gap = underpaid = bad for them */
.career-num-gap.neg { color: var(--emerald-lg); }

.career-verdict-badge {
  display: inline-block;
  margin-top: .4rem;
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.career-verdict-badge.underpaid    { background: rgba(248,113,113,0.18); color: var(--red); }
.career-verdict-badge.well_matched { background: rgba(16,185,129,0.18); color: var(--emerald-lg); }
.career-verdict-badge.overpaid     { background: rgba(245,158,11,0.18); color: var(--gold); }
.career-verdict-badge.skill_mismatch { background: rgba(139,92,246,0.18); color: var(--purple); }

.career-underused { margin-top: 1rem; }
.career-underused-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .45rem;
}
.skill-chip {
  display: inline-block;
  padding: .25rem .7rem;
  margin: 0 .35rem .35rem 0;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.32);
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--purple);
}
.career-path { margin-top: 1.1rem; }
.career-path-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--teal-lg);
  margin-bottom: .6rem;
}

/* ══ CAREER RESOURCES grid ══ */
.resources-card { margin-bottom: 1.25rem; animation: fadeUp .6s ease .36s both; }
.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .55rem;
}
@media (max-width: 600px) { .resources-grid { grid-template-columns: 1fr; } }
.resource-item {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
}
.resource-type {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--teal-lg);
  margin-bottom: .25rem;
}
.resource-name { font-weight: 700; font-size: .92rem; margin-bottom: .25rem; }
.resource-why { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* ══ GOAL REALITY CHECK ══ */
.goal-card {
  background: linear-gradient(135deg, rgba(245,158,11,0.06), var(--card));
  border-color: rgba(245,158,11,0.32);
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .4s both;
}
.goal-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.goal-verdict-badge {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.goal-verdict-badge.underselling { background: rgba(245,158,11,0.18); color: var(--gold); }
.goal-verdict-badge.achievable   { background: rgba(16,185,129,0.18); color: var(--emerald-lg); }
.goal-verdict-badge.stretch      { background: rgba(34,211,238,0.18); color: var(--teal-lg); }
.goal-verdict-badge.unrealistic  { background: rgba(248,113,113,0.18); color: var(--red); }
.goal-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}
@media (max-width: 600px) { .goal-numbers { grid-template-columns: 1fr 1fr; } }
.goal-num {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .7rem .85rem;
}
.goal-num-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .3rem;
}
.goal-num-value {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.01em;
}
.goal-num-value.highlight {
  background: linear-gradient(135deg, var(--teal-lg), var(--emerald-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.goal-num-value.pos { color: var(--emerald-lg); }

/* ══ CHARTS section ══ */
.charts-section { margin-bottom: 1.25rem; animation: fadeUp .6s ease .44s both; }
.charts-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.01em;
}
.chart-card { margin-bottom: 1rem; }
.chart-tall { position: relative; min-height: 240px; }

/* ══ SUBSCRIPTIONS analysis card ══ */
.subs-card {
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .48s both;
}
.subs-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.subs-verdict-badge {
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.subs-verdict-badge.below_median { background: rgba(16,185,129,0.18); color: var(--emerald-lg); }
.subs-verdict-badge.typical      { background: rgba(34,211,238,0.18); color: var(--teal-lg); }
.subs-verdict-badge.above_median { background: rgba(245,158,11,0.18); color: var(--gold); }
.subs-verdict-badge.excessive    { background: rgba(248,113,113,0.18); color: var(--red); }
.subs-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
  margin-top: 1rem;
}
@media (max-width: 480px) { .subs-stats { grid-template-columns: 1fr; } }
.subs-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .85rem;
}
.subs-stat-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .25rem;
}
.subs-stat-value { font-size: 1.15rem; font-weight: 800; }
.subs-stat-value.muted { color: var(--muted); }
.cancel-list {
  background: rgba(248,113,113,0.05);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 10px;
  padding: .75rem .95rem;
  margin-top: .85rem;
}
.cancel-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--red);
  margin-bottom: .5rem;
}
.cancel-item { font-size: .82rem; line-height: 1.55; color: var(--text); padding: .15rem 0; }

/* ══ DAILY HABITS card ══ */
.habits-card {
  background: linear-gradient(135deg, rgba(248,113,113,0.06), var(--card));
  border-color: rgba(248,113,113,0.22);
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .52s both;
}
.habits-numbers {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  margin-top: .75rem;
  flex-wrap: wrap;
}
.habits-num-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .2rem;
}
.habits-num-value { font-size: 1.65rem; font-weight: 900; letter-spacing: -.01em; }
.habits-num-value.big { font-size: 2.4rem; }
.habits-num-value.neg { color: var(--red); }
.biggest-drain {
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 10px;
  font-size: .88rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.55;
}

/* ══ ASSETS card ══ */
.assets-card {
  background: linear-gradient(135deg, rgba(16,185,129,0.05), var(--card));
  border-color: rgba(16,185,129,0.25);
  margin-bottom: 1.25rem;
  animation: fadeUp .6s ease .56s both;
}
.assets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}
@media (max-width: 600px) { .assets-grid { grid-template-columns: 1fr; } }
.asset-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem .95rem;
}
.asset-stat-label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .3rem;
}
.asset-stat-value { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.asset-stat-value.pos { color: var(--emerald-lg); }
.asset-stat-value.neg { color: var(--red); }

/* ══ CREATOR + DONATE FOOTER ══ */
.creator-footer {
  margin-top: 3rem;
  padding: 2.5rem 1.75rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--border);
  border-radius: 20px;
  animation: fadeUp .6s ease .68s both;
}
.creator-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(6,182,212,0.5);
  box-shadow: 0 0 40px rgba(6,182,212,0.3);
  margin-bottom: 1rem;
  background: var(--card);
}
.creator-title {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: .25rem;
  background: linear-gradient(135deg, var(--text), var(--teal-lg));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.creator-agency {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.creator-thanks {
  font-size: .92rem;
  line-height: 1.65;
  color: var(--text);
  max-width: 500px;
  margin: 0 auto 1.75rem;
}
.donate-label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-lg);
  margin-bottom: .8rem;
}
.donate-buttons {
  display: flex;
  gap: .55rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: .65rem 1.15rem;
  background: linear-gradient(135deg, var(--teal), #047A8E);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 0 18px rgba(6,182,212,0.25);
}
.donate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(6,182,212,0.55);
}
.donate-btn-other {
  background: transparent;
  color: var(--teal-lg);
  border: 1.5px solid var(--border);
  font-weight: 600;
  font-size: .82rem;
}
.donate-btn-other:hover {
  background: rgba(6,182,212,0.1);
  border-color: var(--teal);
  color: var(--text);
}
.creator-contact {
  font-size: .82rem;
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .55rem;
}
.creator-contact .contact-label { font-weight: 700; color: var(--text); }
.creator-contact .contact-sep { color: var(--dim); }
.creator-contact a {
  color: var(--teal-lg);
  text-decoration: none;
  transition: color .15s;
  font-weight: 500;
}
/* ── Form section dividers (Housing step) */
.form-section-divider {
  margin: 1.6rem 0 .4rem;
  padding: .85rem 1.1rem .7rem;
  background: rgba(56, 189, 248, 0.07);
  border-left: 3px solid var(--sky);
  border-radius: 0 10px 10px 0;
}
.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: .01em;
}
.form-section-hint {
  margin-top: .35rem;
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
}

.creator-contact a:hover { color: var(--text); }

/* PayPal email fallback (shown when no paypal.me handle is set) */
.donate-email-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  margin: .4rem auto 0;
  max-width: 420px;
}
.donate-email-instr {
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.donate-email-instr a { color: var(--sky); text-decoration: none; }
.donate-email-instr a:hover { text-decoration: underline; }
.donate-email-copy {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 9px;
  padding: .65rem 1.4rem;
  color: var(--teal-lg);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
}
.donate-email-copy:hover {
  background: rgba(6, 182, 212, 0.22);
  border-color: rgba(6, 182, 212, 0.6);
  transform: translateY(-1px);
}
.donate-email-copy:active { transform: translateY(0); }

@media (max-width: 480px) {
  .creator-footer { padding: 2rem 1.25rem 1.5rem; }
  .creator-photo { width: 110px; height: 110px; }
  .creator-title { font-size: 1.25rem; }
  .donate-btn { min-width: 56px; padding: .55rem .95rem; font-size: .9rem; }
}

/* ══ PRINT — Save as PDF ══ */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt;
  }
  body::before { display: none !important; }
  .lang-bar, .export-bar, .image-card, .cta-section, #intro, #form-screen, #loading,
  #error-screen, .no-print, .anon-footer,
  .donate-buttons, .donate-email-box, .resume-banner { display: none !important; }
  .creator-footer { background: #ffffff !important; border: 1px solid #cbd5e1 !important; page-break-before: always; }
  .creator-title, .creator-agency, .creator-thanks { color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; background: none !important; }
  .creator-photo { border-color: #0e7490 !important; box-shadow: none !important; }
  .charts-section, .career-card, .goal-card, .subs-card, .habits-card, .assets-card,
  .resources-card { page-break-inside: avoid; }
  #results { display: block !important; padding: 0 !important; }
  .results-container { max-width: 100% !important; }
  .verdict-badge, .insight-badge, .insight-label, .primary-rec-label, .reloc-verdict,
  .roadmap-window-name, .card-title, .step-tag {
    color: #0f172a !important;
  }
  .verdict-headline {
    -webkit-text-fill-color: #0f172a !important;
    background: none !important;
    background-clip: unset !important;
    color: #0f172a !important;
  }
  .verdict-tagline, .insight-text, .overall-label, .prediction-text, .roadmap-action,
  .leak-issue, .alt-cons, .snap-sub, .reloc-row, .num-field-hint, .hqol-num-sub,
  .first-step-text, .step-hint {
    color: #334155 !important;
  }
  .card, .eye-opener-card, .primary-rec, .reloc-card, .prediction-card, .risk-card,
  .alt-item, .leak-item, .roadmap-window, .debt-row, .snap-cell, .health-qol-card,
  .immigration-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    color: #0f172a !important;
  }
  .verdict-emoji { color: #0f172a !important; }
  .overall-score-big {
    -webkit-text-fill-color: #0e7490 !important;
    background: none !important;
    background-clip: unset !important;
    color: #0e7490 !important;
  }
  .leak-fix, .alt-pros, .reloc-cost, .hqol-num { color: #047857 !important; }
  .leak-amount, .debt-row-value { color: #b91c1c !important; }
  .snap-value.pos { color: #047857 !important; }
  .snap-value.neg { color: #b91c1c !important; }
  .snap-value.warn { color: #b45309 !important; }
  .snap-value { color: #0f172a !important; }
  .belief-quote { color: #b91c1c !important; }
  .chart-wrap { display: none !important; }
  .first-step-num { background: #0e7490 !important; }
  .roadmap-bar { background: #0e7490 !important; }
  .reloc-match { background: #0e7490 !important; }
  .reloc-match-num { color: #ffffff !important; }
  .reloc-match-lbl { color: #cffafe !important; }
  .reloc-match.lifestyle { background: #b45309 !important; }
  .reloc-match.lifestyle .reloc-match-num { color: #ffffff !important; }
  .reloc-match.lifestyle .reloc-match-lbl { color: #fef3c7 !important; }
  .complexity-tag.low { background: #d1fae5 !important; color: #047857 !important; }
  .complexity-tag.medium { background: #fef3c7 !important; color: #b45309 !important; }
  .complexity-tag.high { background: #fee2e2 !important; color: #b91c1c !important; }
  .verdict-badge {
    background: #ecfeff !important;
    border: 1px solid #67e8f9 !important;
    color: #0e7490 !important;
  }
  .primary-rec-impact {
    background: #fef3c7 !important;
    border: 1px solid #fde68a !important;
    color: #0f172a !important;
  }
  .score-bar-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .reloc-grid { display: block !important; }
  .reloc-card { margin-bottom: 1rem; }
  .reloc-card.featured { background: #f0fdfa !important; border-color: #14b8a6 !important; }
  .two-col, .metrics-row, .hqol-grid { display: block !important; }
  .two-col > *, .metrics-row > *, .hqol-grid > * { margin-bottom: 1rem; }
  /* Force colors for snapshot tiles */
  * { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }

  /* ── Catch-all: any element still rendering with a light screen color → dark ink ── */
  .career-body, .goal-body, .subs-body, .habits-body, .assets-body,
  .reloc-body, .immigration-body, .health-body,
  .resources-item, .resources-item p, .resources-item span,
  .alt-item p, .alt-item span,
  .leak-item p, .leak-item span,
  .roadmap-window p, .roadmap-window span, .roadmap-window li,
  .first-step-item p, .first-step-item span,
  .career-card p, .career-card span, .career-card li,
  .goal-card p, .goal-card span,
  .subs-card p, .subs-card span,
  .habits-card p, .habits-card span,
  .assets-card p, .assets-card span,
  .health-qol-card p, .health-qol-card span,
  .immigration-card p, .immigration-card span,
  .card p, .card span, .card li,
  .dim, .hint, .sub, .note, .label,
  [class*="-hint"], [class*="-sub"], [class*="-body"],
  [class*="-desc"], [class*="-note"], [class*="-label"],
  [class*="-text"]:not(.creator-title):not(.creator-agency) {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
  }

  /* Score bar text — keep readable */
  .score-bar-label, .score-bar-value { color: #0f172a !important; }

  /* Career resource / improvement path items */
  .career-resource-why, .improvement-step, .path-step { color: #1e293b !important; }

  /* Debt summary and snapshot sub-labels */
  .debt-summary, .debt-danger-label { color: #1e293b !important; }
  .snap-sub { color: #374151 !important; }
}
