/* =========================================================
   NEXT LEVEL — Freedom Number Calculator
   Brand: near-black, electric cyan→blue, white, glow.
   ========================================================= */
:root {
  --bg: #05070b;
  --bg-2: #0a111c;
  --card: rgba(11, 19, 32, 0.78);
  --card-2: rgba(7, 12, 21, 0.9);
  --line: rgba(64, 170, 255, 0.28);
  --line-strong: rgba(80, 190, 255, 0.6);
  --cyan: #3de0ff;
  --blue: #1e8bff;
  --blue-deep: #1665ff;
  --text: #ffffff;
  --text-2: #c9d6e6;
  --muted: #8c9cb3;
  --grad: linear-gradient(180deg, #52e8ff 0%, #22a6ff 55%, #1a72ff 100%);
  --grad-h: linear-gradient(90deg, #3de0ff 0%, #1e8bff 60%, #1665ff 100%);
  --glow: 0 0 24px rgba(30, 139, 255, 0.35);
  --radius: 18px;
  --f-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-marker: "Permanent Marker", "Comic Sans MS", cursive;
  --bar-h: 84px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scroll-padding-bottom: 120px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
strong { color: var(--text); font-weight: 700; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
#app:focus, .headline:focus, .final-msg:focus { outline: none; }

/* ---------- Background ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% -5%, rgba(30, 139, 255, 0.22), transparent 70%),
    radial-gradient(40% 30% at 100% 30%, rgba(61, 224, 255, 0.07), transparent 70%),
    radial-gradient(40% 30% at 0% 60%, rgba(22, 101, 255, 0.08), transparent 70%);
}
.bg-mountains { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; min-height: 200px; opacity: 0.9; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.94), rgba(5, 7, 11, 0.8));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(64, 170, 255, 0.12);
}
body[data-step="intro"] .topbar { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body[data-step="intro"] .brand { visibility: hidden; }
.brand { background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.brand img { height: 34px; width: auto; mix-blend-mode: screen; filter: contrast(1.25) brightness(0.92); }
.progress { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.progress-label { font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: 0.12em; color: var(--muted); white-space: nowrap; }
.progress-track { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--grad-h); border-radius: inherit; box-shadow: 0 0 12px rgba(61, 224, 255, 0.7); transition: width 0.5s ease; }
.link-btn {
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text); }
.reset { flex: none; font-size: 13px; }

/* ---------- Screen layout ---------- */
.screen {
  max-width: 760px; margin: 0 auto;
  padding: 28px max(16px, env(safe-area-inset-left)) calc(var(--bar-h) + 48px + env(safe-area-inset-bottom));
  animation: screen-in 0.45s ease both;
}
@keyframes screen-in { from { opacity: 0; } to { opacity: 1; } } /* opacity only: a transform would trap the fixed bottom bar */

.kicker {
  margin: 0 0 10px;
  font-family: var(--f-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.22em; color: var(--cyan); text-transform: uppercase;
}
.headline {
  position: relative; margin: 0 0 18px; padding-bottom: 14px;
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(44px, 11.5vw, 84px); line-height: 0.9; letter-spacing: 0.005em;
}
.headline > span { display: block; }
.headline-xl { font-size: clamp(52px, 14.5vw, 112px); }
.headline-center { text-align: center; }
.grad, .grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.grad { filter: drop-shadow(0 0 18px rgba(30, 139, 255, 0.35)); }
.up-arrow { display: inline-block; width: 0.62em; height: 0.78em; vertical-align: -0.02em; margin-left: 0.04em; filter: drop-shadow(0 0 10px rgba(61, 224, 255, 0.6)); }
.headline > span > .grad { display: inline; }
.brush { position: absolute; left: 0; bottom: 0; width: min(78%, 420px); height: 14px; color: var(--blue); filter: drop-shadow(0 0 6px rgba(30, 139, 255, 0.7)); }
.headline-center .brush { left: 50%; transform: translateX(-50%); }
.lead { margin: 0 0 10px; font-size: clamp(18px, 4.6vw, 21px); font-weight: 600; color: var(--text); line-height: 1.4; }
.body { margin: 0 0 12px; color: var(--text-2); font-size: 17px; }
.note { margin: 0 0 22px; color: var(--muted); font-size: 15px; }
.marker { margin: 18px 0 26px; font-family: var(--f-marker); font-size: clamp(22px, 6vw, 28px); color: var(--cyan); transform: rotate(-2deg); transform-origin: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer;
  font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: 0.06em;
  text-decoration: none; text-transform: uppercase; white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #33c8ff 0%, #1e8bff 50%, #1665ff 100%);
  box-shadow: 0 0 0 1px rgba(120, 210, 255, 0.5) inset, 0 8px 30px rgba(30, 139, 255, 0.45);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 0 1px rgba(160, 225, 255, 0.7) inset, 0 10px 40px rgba(30, 139, 255, 0.6); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-lg { min-height: 60px; font-size: 21px; padding: 0 26px; width: 100%; max-width: 460px; }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); width: 100%; max-width: 460px; }
.btn-ghost:hover { background: rgba(30, 139, 255, 0.12); }
.btn-quiet { border-color: var(--line); color: var(--text-2); }
.btn-quiet:hover { color: var(--text); }
.btn-icon {
  flex: none; width: 52px; height: 52px; border-radius: 14px; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.btn-icon .ico { width: 22px; height: 22px; }
.btn-icon:hover { border-color: var(--line-strong); }
.cta-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 28px 0 8px; }

/* ---------- Intro ---------- */
.screen-intro { text-align: center; padding-top: 0; padding-bottom: 80px; }
.hero-logo {
  width: min(72vw, 400px); height: auto; margin: -12px auto 4px;
  mix-blend-mode: screen; filter: contrast(1.25) brightness(0.92);
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 48%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 48%, #000 55%, transparent 100%);
}
.screen-intro .kicker { color: var(--muted); letter-spacing: 0.3em; font-size: 13px; margin-bottom: 26px; }
.screen-intro .headline .brush { left: 50%; transform: translateX(-50%); }
.screen-intro .lead { font-size: clamp(20px, 5.4vw, 24px); margin-top: 8px; }
.screen-intro .marker { transform: rotate(-2deg); transform-origin: center; }
.chips { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px;
  font-size: 14px; color: var(--text-2); background: rgba(10, 18, 30, 0.8); border: 1px solid var(--line);
}
.chips .ico { width: 16px; height: 16px; color: var(--cyan); }

/* ---------- Cards ---------- */
.card {
  position: relative; margin: 0 0 16px; padding: 20px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 0 22px rgba(30, 139, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--cyan); background: rgba(30, 139, 255, 0.1); border: 1px solid rgba(61, 224, 255, 0.25);
  box-shadow: 0 0 14px rgba(30, 139, 255, 0.25);
}
.card-icon .ico { width: 22px; height: 22px; filter: drop-shadow(0 0 4px rgba(61, 224, 255, 0.8)); }
.card-title { margin: 0; flex: 1; font-family: var(--f-display); font-weight: 800; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; }
.card-total { font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--cyan); white-space: nowrap; }

/* ---------- Fields ---------- */
.fields { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) {
  .fields { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
  .fields-stack { grid-template-columns: 1fr; }
  .field-text { grid-column: 1 / -1; }
}
.fields-2 { grid-template-columns: 1fr 1fr; gap: 10px; }
.fields-3 { grid-template-columns: 1fr 1fr; gap: 12px 10px; }
@media (min-width: 560px) { .fields-3 { grid-template-columns: repeat(3, 1fr); } }
.note-tight { margin: -6px 0 16px; }
.hint-live { color: var(--cyan); font-weight: 600; }

/* Buy / Rent segmented control */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 18px; border-radius: 14px; background: rgba(3, 6, 12, 0.85); border: 1px solid rgba(120, 170, 230, 0.2); }
.segmented button {
  min-height: 46px; border: 0; border-radius: 10px; cursor: pointer; background: transparent; color: var(--muted);
  font-family: var(--f-display); font-weight: 800; font-size: 18px; letter-spacing: 0.1em;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { color: #fff; background: linear-gradient(180deg, #33c8ff 0%, #1e8bff 50%, #1665ff 100%); box-shadow: 0 0 18px rgba(30, 139, 255, 0.45); }

/* Collapsed "add second home" control */
.add-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 0 0 16px; padding: 14px 20px;
  border-radius: var(--radius); border: 1px dashed var(--line-strong); background: rgba(30, 139, 255, 0.05); cursor: pointer;
  color: var(--text-2); font-size: 16px; font-weight: 600; text-align: left;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.2s ease;
}
.add-toggle:hover { background: rgba(30, 139, 255, 0.12); color: var(--text); box-shadow: 0 0 20px rgba(30, 139, 255, 0.2); }
.add-plus {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px;
  color: var(--cyan); font-size: 22px; font-weight: 700; line-height: 1;
  background: rgba(30, 139, 255, 0.12); border: 1px solid rgba(61, 224, 255, 0.35); box-shadow: 0 0 12px rgba(30, 139, 255, 0.3);
}

/* Cars: vehicle builder */
.segmented-3 { grid-template-columns: repeat(3, 1fr); }
.segmented-3 button { font-size: 16px; letter-spacing: 0.08em; }
.sub-label { margin: 22px 0 10px; font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.vehicle .card-title { overflow-wrap: anywhere; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 16px; width: auto; }
.veh-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.veh-compact { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.veh-compact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.veh-compact-name { font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-compact-meta { font-size: 14px; color: var(--muted); }
.veh-compact-meta span { color: var(--cyan); font-weight: 600; }
.veh-compact-actions { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 420px) {
  .veh-compact { flex-wrap: wrap; }
  .veh-compact-actions { width: 100%; justify-content: space-between; }
}

/* Cars: ownership-cost estimator */
.est-btn {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 14px; min-height: 44px;
  border-radius: 12px; border: 1px dashed var(--line-strong); background: rgba(30, 139, 255, 0.08); cursor: pointer;
  color: var(--cyan); font-size: 15px; font-weight: 600;
}
.est-btn:hover { background: rgba(30, 139, 255, 0.16); color: var(--text); }
.est-btn .ico { width: 18px; height: 18px; }
.est-note { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: rgba(30, 139, 255, 0.06); border-left: 3px solid var(--blue); font-size: 13.5px; color: var(--text-2); }
.est-note p { margin: 0; }
.est-note .est-assump { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.est-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; vertical-align: 1px;
  background: rgba(61, 224, 255, 0.14); border: 1px solid rgba(61, 224, 255, 0.35); color: var(--cyan);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

/* Cars: fuel / charging estimate assumptions */
.fuel-box { grid-column: 1 / -1; padding: 14px; border-radius: 14px; background: rgba(3, 6, 12, 0.55); border: 1px solid rgba(64, 170, 255, 0.18); }
.fuel-box-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fuel-box-title { font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.segmented-sm { margin: 0; padding: 3px; flex: 1 1 220px; max-width: 300px; }
.segmented-sm button { min-height: 36px; font-size: 14px; letter-spacing: 0.06em; }
.fuel-calc { margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--cyan); font-variant-numeric: tabular-nums; }
.fuel-box .fields-3 .suf { font-size: 12px; }

/* Travel: dream trips */
.trip .card-title { overflow-wrap: anywhere; }
.trip-examples { margin: 6px 0 14px; }
.trip-nums { margin-top: 0; }
.trip-calc { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(30, 139, 255, 0.08); border: 1px solid var(--line); color: var(--cyan); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.travel-rows strong { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.travel-rows strong small { font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--muted); }
.calc-rows .is-sub { color: var(--text); font-weight: 600; }

/* Lifestyle: everyday-life items */
.life .card-title { overflow-wrap: anywhere; }
.life-cost { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .life-cost { grid-template-columns: 1fr 1.3fr; align-items: end; } }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.segmented-inline { margin: 0; }
.segmented-inline button { min-height: 44px; font-size: 14px; letter-spacing: 0.05em; }
.life-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 14px; }
.life-cat { flex: 0 1 260px; }
.life-cat label { font-size: 13px; color: var(--muted); }
.input.is-select { padding: 0 10px; min-height: 44px; }
.input.is-select select {
  flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; color: var(--text);
  font-family: var(--f-body); font-size: 16px; cursor: pointer;
}
.input.is-select select option { background: #0a111c; color: var(--text); }
.life-cat-tag { display: block; font-size: 12px; color: var(--muted); }

/* Family & Giving */
.give .segmented-inline button { white-space: normal; line-height: 1.1; padding: 0 4px; }
.give-years { margin-top: 14px; }

/* Wealth & Future */
.wealth .segmented { margin: 14px 0 16px; }
.wealth .segmented button { font-size: 15px; letter-spacing: 0.06em; white-space: normal; line-height: 1.1; }
.wealth-calc { white-space: pre-line; }
.wealth .segmented-3 button { font-size: 13.5px; padding: 4px; }
.wealth-target {
  margin: 16px 0 12px; padding: 16px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(30, 139, 255, 0.14), rgba(22, 101, 255, 0.05)); border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px rgba(30, 139, 255, 0.2);
}
.wt-label, .wt-years { display: block; font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-2); }
.wt-amount { display: block; margin: 4px 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(34px, 10vw, 48px); line-height: 1; overflow-wrap: anywhere; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.wt-note { margin: 0 0 4px; }

/* Time & Freedom: number fields stay compact */
.time-fields .input.is-pct { max-width: 260px; }

/* Calculated rows (home breakdown) */
.calc-rows { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid rgba(64, 170, 255, 0.14); }
.calc-rows li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(64, 170, 255, 0.08); font-size: 15px; color: var(--text-2); }
.calc-rows li:last-child { border-bottom: 0; }
.calc-rows strong { font-family: var(--f-display); font-weight: 700; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-rows .is-key strong { color: var(--cyan); font-size: 24px; }
.calc-rows .is-total { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line-strong); color: var(--text); font-weight: 700; }
.calc-rows .is-total strong { font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.home-total { border-color: var(--line-strong); box-shadow: 0 0 28px rgba(30, 139, 255, 0.22); }
.field { min-width: 0; display: flex; flex-direction: column; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); line-height: 1.3; }
.field-text label { font-size: 15px; color: var(--text); }
.hint { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.input {
  display: flex; align-items: center; min-height: 52px; padding: 0 14px; border-radius: 12px;
  background: rgba(3, 6, 12, 0.85); border: 1px solid rgba(120, 170, 230, 0.2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 224, 255, 0.18), 0 0 18px rgba(30, 139, 255, 0.3); }
.input input {
  flex: 1; min-width: 0; width: 100%; height: 50px; padding: 0 6px; border: 0; outline: 0; background: transparent;
  color: var(--text); font-family: var(--f-body); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.input input::placeholder { color: rgba(140, 156, 179, 0.5); }
.pre { color: var(--cyan); font-weight: 700; font-size: 18px; }
.suf { color: var(--muted); font-size: 13px; white-space: nowrap; }
textarea {
  width: 100%; resize: vertical; min-height: 64px; padding: 12px 14px; border-radius: 12px;
  background: rgba(3, 6, 12, 0.85); border: 1px solid rgba(120, 170, 230, 0.2); outline: 0;
  color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.5;
}
textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 224, 255, 0.18); }
textarea::placeholder { color: rgba(140, 156, 179, 0.55); }

/* ---------- Travel ---------- */
.trip-row { padding: 14px 0; border-top: 1px solid rgba(64, 170, 255, 0.12); }
.card-head + .trip-row { border-top: 0; padding-top: 0; }
.trip-title { margin: 0 0 10px; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.convert {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 14px 16px; border-radius: 12px;
  background: rgba(30, 139, 255, 0.08); border: 1px solid var(--line); color: var(--text-2); font-size: 14px;
}
.convert strong { display: block; font-family: var(--f-display); font-size: 26px; line-height: 1.1; }
.convert-arrow .ico { width: 22px; color: var(--cyan); }

/* ---------- Design intro ---------- */
/* A non-interactive preview of the categories: flat list items, no card glow, no hover, default cursor. */
.screen-design { padding-bottom: 0; }
/* On this screen the mountains sit in the page flow, directly under the CTA, instead of pinned behind it. */
body[data-step="design"] .bg-mountains { display: none; }
.design-mtn { display: block; width: 100vw; max-width: none; height: clamp(150px, 24vh, 240px); margin: 28px 0 0 calc(50% - 50vw); }
.cat-label { margin: 22px 0 10px; font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.cat-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .cat-list { grid-template-columns: repeat(4, 1fr); } }
.cat-item {
  margin: 0; padding: 9px 10px; display: flex; align-items: center; gap: 9px; min-width: 0;
  border-radius: 12px; border: 1px solid rgba(64, 170, 255, 0.14); background: rgba(10, 18, 30, 0.45);
  font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1; color: var(--text-2);
  cursor: default; user-select: none; -webkit-user-select: none;
}
.cat-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--cyan); background: rgba(30, 139, 255, 0.1); }
.cat-icon .ico { width: 17px; height: 17px; }
.screen-design .marker { margin: 22px 0 18px; }
.inline-actions { display: flex; align-items: center; gap: 12px; max-width: 520px; }
.inline-actions .btn-primary { flex: 1; min-height: 56px; font-size: 20px; }

/* ---------- Bottom bar ---------- */
.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(5, 7, 11, 0.75), rgba(5, 7, 11, 0.97) 40%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(64, 170, 255, 0.2);
}
.bottombar-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.running { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.running-label { font-family: var(--f-display); font-weight: 700; font-size: 12px; letter-spacing: 0.16em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.running-value { font-family: var(--f-display); font-weight: 800; font-size: 28px; color: var(--text); white-space: nowrap; }
.running-value small { font-size: 15px; color: var(--muted); margin-left: 2px; }
.bottombar .btn-primary { padding: 0 18px; }
@media (max-width: 380px) {
  .bottombar .btn-primary { font-size: 17px; padding: 0 14px; }
  .running-value { font-size: 24px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } .stats-3 { grid-template-columns: repeat(3, 1fr); } }
.stats-3 { grid-template-columns: 1fr; }
@media (min-width: 480px) and (max-width: 699px) { .stats-3 { grid-template-columns: 1fr 1fr; } .stats-3 .stat:first-child { grid-column: 1 / -1; } }
.stat {
  display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 14px; text-align: center;
  background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 0 20px rgba(30, 139, 255, 0.08);
}
.stat-hl { border-color: var(--line-strong); box-shadow: 0 0 26px rgba(30, 139, 255, 0.3), inset 0 0 30px rgba(30, 139, 255, 0.08); }
.stat-label { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; color: var(--text-2); line-height: 1.2; }
.stat-value { font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 7vw, 34px); line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 0.5em; color: var(--muted); font-weight: 700; }
.stat-hl .stat-value { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.stat-hl .stat-value small { -webkit-text-fill-color: var(--muted); }
.stat-sub { font-size: 13px; color: var(--muted); }

/* ---------- Reveal ---------- */
.screen-reveal { padding-bottom: 60px; }
.reveal-hero { text-align: center; padding: 10px 0 18px; }
.reveal-hero .kicker { color: var(--muted); letter-spacing: 0.3em; }
.big-number {
  margin: 14px 0 6px; font-family: var(--f-display); font-weight: 800; line-height: 0.95;
  font-size: clamp(64px, 19vw, 150px); font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.big-number span {
  background: linear-gradient(180deg, #ffffff 0%, #bff3ff 35%, #3de0ff 70%, #1e8bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(30, 139, 255, 0.55));
}
.big-number small { display: block; margin-top: 6px; font-size: clamp(20px, 5vw, 28px); letter-spacing: 0.3em; color: var(--text-2); }
.big-sub { margin: 8px 0 0; color: var(--muted); }
.reveal-in { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.revealed .reveal-in { opacity: 1; transform: none; }
.revealed .reveal-in:nth-child(3) { transition-delay: 0.1s; }
.revealed .reveal-in:nth-child(4) { transition-delay: 0.2s; }
.revealed .reveal-in:nth-child(5) { transition-delay: 0.3s; }
.revealed .reveal-in:nth-child(6) { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal-in { opacity: 1; transform: none; transition: none; }
  .screen { animation: none; }
  .progress-fill { transition: none; }
}

/* Climb / gap indicator */
.climb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.climb-head .card-title { flex: none; }
.climb-pct { margin: 0; color: var(--text-2); font-size: 14px; }
.climb-pct strong { font-family: var(--f-display); font-size: 24px; color: var(--cyan); }
.track { position: relative; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); margin: 34px 8px 8px; }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--grad-h); box-shadow: 0 0 14px rgba(61, 224, 255, 0.6); min-width: 0; }
.track-dot {
  position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%;
  background: #3de0ff; border: 3px solid #0a1220; box-shadow: 0 0 0 2px #3de0ff, 0 0 18px rgba(61, 224, 255, 0.9);
}
.track-mark { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.75); }
.track-mark span {
  position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.track::after {
  content: "⬆"; position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-2); border: 2px solid var(--blue); color: var(--cyan); font-size: 13px;
  box-shadow: 0 0 14px rgba(30, 139, 255, 0.6);
}
.track-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 10px 0 14px; font-variant-numeric: tabular-nums; }
.legend { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--text-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-income { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.lg-current { width: 3px !important; background: #fff; }
.lg-freedom { background: var(--bg-2); border: 2px solid var(--blue); border-radius: 50% !important; }
.climb-note { margin: 0; font-size: 15px; color: var(--text-2); }

/* Breakdown */
.breakdown { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.breakdown li { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.bd-name { display: flex; align-items: center; gap: 8px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-name .ico { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.bd-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bd-bar span { display: block; height: 100%; border-radius: inherit; background: var(--grad-h); }
.bd-val { font-family: var(--f-display); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .breakdown li { grid-template-columns: 1fr auto; row-gap: 6px; }
  .bd-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Summary */
.summary p { margin: 12px 0 0; color: var(--text-2); font-size: 17px; }
.quotes { display: grid; gap: 12px; margin-top: 18px; }
.quotes blockquote { margin: 0; padding: 14px 16px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: rgba(30, 139, 255, 0.06); }
.q-label { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; color: var(--cyan); }
.quotes p { margin: 4px 0 0; color: var(--text); font-size: 16px; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Next Level ---------- */
.screen-next { padding-bottom: 60px; }
.milestones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
@media (min-width: 620px) { .milestones { grid-template-columns: repeat(5, 1fr); } }
.milestone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 84px; padding: 14px 8px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, var(--card), var(--card-2)); border: 1px solid var(--line);
  transition: border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.milestone:hover { border-color: var(--line-strong); }
.milestone.is-active {
  border-color: var(--cyan); background: linear-gradient(180deg, rgba(30, 139, 255, 0.28), rgba(22, 101, 255, 0.12));
  box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 26px rgba(30, 139, 255, 0.5);
}
.milestones .milestone:last-child { grid-column: 1 / -1; }
@media (min-width: 620px) { .milestones .milestone:last-child { grid-column: auto; } }
.ms-amt { font-family: var(--f-display); font-weight: 800; font-size: 26px; line-height: 1; }
.ms-unit { font-family: var(--f-display); font-weight: 700; font-size: 13px; letter-spacing: 0.18em; color: var(--muted); }
.milestone.is-active .ms-unit { color: var(--cyan); }
.ms-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 99px; background: var(--blue); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.custom-wrap { margin: 0 0 18px; max-width: 360px; }
.runway-ends { display: flex; justify-content: space-between; font-family: var(--f-display); font-weight: 800; font-size: 22px; }
.track-days { margin-top: 18px; }
.track-days::after { display: none; }
.track-days i { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, 0.2); }
.days { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin: 10px 0 14px; }
.disclaimer { margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px dashed rgba(140, 156, 179, 0.3); font-size: 13.5px; color: var(--muted); }

/* ---------- Final ---------- */
.screen-final { text-align: center; padding-bottom: 60px; position: relative; }
.final-msg { margin: 10px 0 8px; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; line-height: 0.95; }
.fm-1 { display: block; font-size: clamp(28px, 7.4vw, 46px); color: var(--text); }
.fm-2 { display: block; margin-top: 8px; font-size: clamp(44px, 12vw, 80px); }
.screen-final > .brush { position: static; margin: 4px auto 28px; width: min(70%, 380px); }
.final-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 18px; }
.privacy { margin: 18px auto 0; max-width: 340px; font-size: 13px; color: var(--muted); }
.privacy .ico { display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: var(--cyan); }
.share-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--cyan); }

/* ---------- Share card (4:5, scales with container for future image export) ---------- */
.share-wrap { max-width: 420px; margin: 0 auto; }
.share-card {
  container-type: inline-size;
  position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center;
  padding: 5% 6% 0;
  background: radial-gradient(90% 55% at 50% 0%, #0f2440 0%, #070b13 60%, #04060a 100%);
  border: 1.5px solid rgba(80, 190, 255, 0.7);
  box-shadow: 0 0 40px rgba(30, 139, 255, 0.35), inset 0 0 40px rgba(30, 139, 255, 0.12);
}
.sc-glow { position: absolute; left: 50%; bottom: 10%; width: 120%; height: 40%; transform: translateX(-50%); background: radial-gradient(50% 50% at 50% 100%, rgba(61, 224, 255, 0.35), transparent 70%); pointer-events: none; }
.sc-logo {
  width: 43cqw; height: auto; margin-bottom: 2cqw; position: relative;
  mix-blend-mode: screen; filter: contrast(1.3) brightness(0.9);
  -webkit-mask-image: radial-gradient(ellipse 80% 85% at 50% 55%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 85% at 50% 55%, #000 72%, transparent 100%);
}
.sc-label { position: relative; margin: 0; font-family: var(--f-display); font-weight: 700; font-size: 4.6cqw; letter-spacing: 0.26em; color: var(--text-2); }
.sc-number {
  position: relative; margin: 1.2cqw 0 0; font-family: var(--f-display); font-weight: 800; line-height: 1; font-size: 18.5cqw; letter-spacing: -0.01em; white-space: nowrap;
  background: linear-gradient(180deg, #fff 0%, #bff3ff 40%, #3de0ff 75%, #1e8bff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 3cqw rgba(30, 139, 255, 0.5));
}
.sc-number small { font-size: 6.8cqw; letter-spacing: 0.08em; -webkit-text-fill-color: #c9d6e6; }
.sc-divider { position: relative; width: 24cqw; height: 0.8cqw; margin: 3cqw 0 3cqw; border-radius: 99px; background: var(--grad-h); box-shadow: 0 0 3cqw rgba(30, 139, 255, 0.9); }
.sc-next { position: relative; margin: 1.2cqw 0 0; font-family: var(--f-display); font-weight: 800; font-size: 12.8cqw; line-height: 1; color: #fff; white-space: nowrap; }
.sc-next span { color: var(--cyan); }
.sc-tag { position: relative; margin: 3.4cqw 0 0; font-family: var(--f-display); font-weight: 700; font-size: 4.3cqw; letter-spacing: 0.2em; line-height: 1.45; color: #fff; z-index: 1; }
.sc-mtn { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22%; }

/* Reset confirmation */
.confirm-dialog { width: min(420px, calc(100vw - 32px)); margin: auto; color: var(--text); background: linear-gradient(180deg, #0e1828, #070c15); border-color: var(--line-strong); box-shadow: 0 0 40px rgba(30, 139, 255, 0.35); }
.confirm-dialog::backdrop { background: rgba(2, 4, 8, 0.75); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.confirm-dialog p { margin: 10px 0 20px; color: var(--text-2); }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dialog-actions .btn { flex: 1 1 140px; width: auto; }

.noscript { max-width: 600px; margin: 40px auto; padding: 0 16px; text-align: center; color: var(--text-2); }

@media (min-width: 900px) {
  .screen { padding-top: 44px; }
  .brand img { height: 40px; }
}
