/* ============================================================
   LaunchR V7 design system — dark-first command center.
   Semantic color roles: blue = action/selected/current,
   ORANGE = brand + primary CTA, green = complete/profitable,
   amber = caution/incomplete gates, red = blocked/dangerous.
   Two themes on one token set: :root is dark (the default),
   [data-theme="light"] restores the V6 light palette.
   System font stacks only — nothing loads from the network.
   ============================================================ */

:root {
  /* --- dark theme (default) --- */
  --ink: #F3F6FE;
  /* empty-pad rocket (see empty-rocket.jsx): approved dark-hull rendering —
     deep navy hull with a clean white outline (Proper Rocket.png). */
  --lr-rk-hull: #1E2A4A;
  --lr-rk-outline: #F2F4F8;
  --text: #C4CEE4;
  --sub: #8D9BBA;          /* secondary text (legacy name kept) */
  --subtle: #5F6E8D;
  --bg: #0A101E;
  --surface: #121A2E;
  --surface-alt: #0D1526;
  --paper2: #0D1526;       /* legacy alias */
  --line: #25314F;
  --line-strong: #364566;

  --primary: #5B84FF;
  --primary-dark: #7B9CFF;      /* "dark" = hover shade; lighter on dark bg */
  --primary-soft: rgba(91,132,255,.15);
  --info: #6E93FF;

  /* brand orange — the LaunchR accent */
  --brand: #FF7A2F;
  --brand-strong: #F2600F;
  --brand-hi: #FF9552;
  --brand-soft: rgba(255,122,47,.13);

  --success: #31C98B;
  --success-soft: rgba(49,201,139,.13);
  --warn: #F0A32C;
  --warn-soft: rgba(240,163,44,.12);
  --warn-line: rgba(240,163,44,.38);
  --warn-text: #F5B85C;
  --danger: #F26257;
  --danger-soft: rgba(242,98,87,.13);

  /* legacy accent name: --flame stayed the caution amber in V6 so old
     caution styling remains semantic; the brand CTA uses --brand */
  --flame: #F0A32C;
  --flame-soft: rgba(240,163,44,.12);

  /* interaction surfaces */
  --btn-hover: #1A2440;
  --row-hover: rgba(91,132,255,.06);
  --selected-bg: #14203C;
  --tab-on-bg: #1C2946;
  --inverse-bg: #F3F6FE;
  --inverse-text: #0B1120;
  --pop-bg: #1D2946;
  --pop-text: #DCE6F7;
  --hero-dot: rgba(91,132,255,.14);
  --lock-grad: linear-gradient(180deg, #141E36, #0E1626);
  --card-dark-border: #2B3D63;
  --topbar-bg: rgba(10,16,30,.82);
  --glow: radial-gradient(1100px 460px at 82% -12%, rgba(91,132,255,.10), transparent 70%),
          radial-gradient(800px 380px at 8% -8%, rgba(255,122,47,.06), transparent 70%);

  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --disp: var(--sans);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --r-card: 20px;
  --r-ctl: 12px;
  /* V9 tokens: normalized motion timing + a softer card outline so cards
     lean on layered elevation instead of hard borders. Inputs and
     intentional dividers keep the full-strength --line. */
  --t-fast: 150ms;
  --t-med: 220ms;
  --card-line: rgba(78, 98, 145, .34);
  --sh-card: 0 1px 2px rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.045);
  --sh-card-hover: 0 2px 4px rgba(0,0,0,.4), 0 20px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  --sh-selected: 0 0 0 4px rgba(91,132,255,.14), 0 18px 44px rgba(0,0,0,.45);
  --sh-btn: 0 10px 24px rgba(242,96,15,.35), inset 0 1px 0 rgba(255,255,255,.28);
  --sh-tab: 0 1px 3px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}

[data-theme="light"] {
  --card-line: rgba(20, 43, 80, .12);
  --ink: #071B33;
  /* light card: same navy rocket hull, but the outline flips to ink so
     the hull edge still reads (white would vanish on a white card). */
  --lr-rk-outline: #0A1128;
  --text: #24344D;
  --sub: #66758F;
  --subtle: #94A0B8;
  --bg: #F6F8FC;
  --surface: #FFFFFF;
  --surface-alt: #EEF3FA;
  --paper2: #EEF3FA;
  --line: #DDE5F0;
  --line-strong: #C4D0E4;

  --primary: #245BFF;
  --primary-dark: #173ECC;
  --primary-soft: #EBF0FF;
  --info: #4B73FF;

  --brand: #F2600F;
  --brand-strong: #DD4F04;
  --brand-hi: #FF7A2F;
  --brand-soft: #FFEFE3;

  --success: #16A36A;
  --success-soft: #E7F6EF;
  --warn: #E79B21;
  --warn-soft: #FFF8EC;
  --warn-line: #F4D49A;
  --warn-text: #B0740D;
  --danger: #D92D20;
  --danger-soft: #FDECEB;

  --flame: #E79B21;
  --flame-soft: #FFF8EC;

  --btn-hover: #F2F6FD;
  --row-hover: #FAFCFF;
  --selected-bg: #FBFCFF;
  --tab-on-bg: #FFFFFF;
  --inverse-bg: #071B33;
  --inverse-text: #FFFFFF;
  --pop-bg: #071B33;
  --pop-text: #DCE6F7;
  --hero-dot: rgba(36,91,255,.10);
  --lock-grad: linear-gradient(180deg, #FBFCFF, #EEF3FA);
  --card-dark-border: #14304F;
  --topbar-bg: rgba(246,248,252,.85);
  --glow: radial-gradient(1100px 460px at 82% -12%, rgba(36,91,255,.05), transparent 70%);

  --sh-card: 0 1px 2px rgba(7,27,51,.04), 0 12px 32px rgba(20,42,80,.06);
  --sh-card-hover: 0 2px 4px rgba(7,27,51,.05), 0 18px 40px rgba(20,42,80,.10);
  --sh-selected: 0 0 0 4px rgba(36,91,255,.08), 0 18px 44px rgba(36,91,255,.14);
  --sh-btn: 0 10px 22px rgba(242,96,15,.28), inset 0 1px 0 rgba(255,255,255,.3);
  --sh-tab: 0 1px 3px rgba(7,27,51,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--glow); pointer-events: none;
}
button { font-family: inherit; }
button:focus-visible, .chip:focus-visible, .tab:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px;
}

/* ---------- layout ---------- */
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.wrap-sm { max-width: 760px; margin: 0 auto; padding: 0 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-start { display: flex; align-items: flex-start; gap: 12px; }
.wrapflex { display: flex; flex-wrap: wrap; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 18px; }
.stack-8 > * + * { margin-top: 34px; }
.flex1 { flex: 1; min-width: 0; }
.center { text-align: center; }
.divider { flex: 1; height: 1px; background: var(--line); }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; } .mt-5 { margin-top: 26px; } .mt-6 { margin-top: 36px; }
.mb-3 { margin-bottom: 12px; }
@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .wrap, .wrap-sm { padding: 0 16px; }
}

/* ---------- type ---------- */
.h1 { font-family: var(--disp); font-size: clamp(36px, 5.6vw, 60px); line-height: 1.02; font-weight: 800; letter-spacing: -0.028em; color: var(--ink); }
.h2 { font-family: var(--disp); font-size: clamp(25px, 3.5vw, 33px); line-height: 1.12; font-weight: 750; letter-spacing: -0.018em; color: var(--ink); }
.h3 { font-family: var(--disp); font-size: 21px; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); }
.h4 { font-size: 16.5px; line-height: 1.3; font-weight: 650; color: var(--ink); }
.h5 { font-size: 14px; line-height: 1.3; font-weight: 650; color: var(--ink); }
.p { font-size: 15.5px; color: var(--text); }
.p-sub { font-size: 14.5px; color: var(--sub); line-height: 1.55; }
.p-sm { font-size: 13px; color: var(--sub); line-height: 1.5; }
.strong { font-weight: 650; color: var(--ink); }
.em { font-style: italic; }
.mono { font-family: var(--mono); }
.c-primary { color: var(--primary); }
.c-success { color: var(--success); }
.c-warn { color: var(--warn); }
.c-flame { color: var(--warn); }
.c-sub { color: var(--sub); }
.c-ink { color: var(--ink); }
.c-brand { color: var(--brand); }

/* eyebrow labels — quieter than before, uppercase kept small & rare */
.tl { font-family: var(--sans); font-size: 12px; font-weight: 650; letter-spacing: 0.01em; color: var(--sub); }
.tl-num { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; }
.label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink); margin-bottom: 7px; }
.label .hint { font-weight: 400; color: var(--subtle); font-size: 12px; }
.minilabel { display: block; font-family: var(--sans); font-size: 11.5px; font-weight: 650; color: var(--sub); margin-bottom: 4px; }
.labelmini { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.01em; }
.cardkicker { font-family: var(--sans); font-size: 11px; color: var(--subtle); }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--card-line); /* V9: low-opacity outline; depth comes from layered shadows */
  border-radius: var(--r-card);
  padding: 20px;
  box-shadow: var(--sh-card);
  position: relative;
}
.card-flat { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: none; }
.card-hover { cursor: pointer; text-align: left; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.card-hover:hover { box-shadow: var(--sh-card-hover); transform: translateY(-1px); border-color: var(--line-strong); }
.card-best { border: 1px solid var(--primary); box-shadow: var(--sh-selected); }
.card-dark {
  background: linear-gradient(160deg, #0C2445 0%, #071B33 100%);
  border: 1px solid var(--card-dark-border);
  border-radius: var(--r-card);
  padding: 24px;
  position: relative;
  overflow: hidden;
  color: #DCE6F7;
}
.card-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--r-card); padding: 20px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 11px 18px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { background: var(--btn-hover); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-full { width: 100%; }
/* primary CTA — brand orange, the LaunchR signature */
.btn-flame {
  background: linear-gradient(180deg, var(--brand-hi) 0%, var(--brand) 52%, var(--brand-strong) 100%);
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: var(--sh-btn); text-shadow: 0 1px 1px rgba(120,40,0,.25);
}
.btn-flame:hover { filter: brightness(1.07); }
.btn-flame:active { filter: brightness(.97); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-dark { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); color: #fff; }
.btn-dark:hover { background: rgba(255,255,255,.18); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: none;
  color: var(--primary); font-size: 14px; font-weight: 600; cursor: pointer; padding: 10px 6px;
}
.linkbtn { background: none; border: none; color: var(--sub); font-size: 13.5px; font-weight: 500; cursor: pointer; padding: 4px 2px; }
.linkbtn:hover { color: var(--ink); }
.copybtn {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 11px; cursor: pointer;
}
.copybtn:hover { border-color: var(--primary); color: var(--primary); }
.copybtn-fail { border-color: var(--danger); color: var(--danger); }

/* ---------- chips & pills ---------- */
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: border-color var(--t-fast) ease, background var(--t-fast) ease, transform var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.chip:hover { border-color: var(--line-strong); background: var(--row-hover); }
.chip:active { transform: scale(.97); }
.chip.on {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 4px 14px rgba(70,110,255,.35);
}
.chip.on:hover { filter: brightness(1.06); }
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--surface-alt); color: var(--sub);
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 550;
}
.pill-primary { background: var(--primary-soft); color: var(--primary-dark); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warn, .pill-flame { background: var(--warn-soft); color: var(--warn-text); border: 1px solid var(--warn-line); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- inputs ---------- */
.input, .textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: 11px 13px; font-size: 14.5px; color: var(--ink); font-family: var(--sans);
}
.input:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input-mono { font-family: var(--mono); font-size: 13.5px; }
.textarea { resize: vertical; min-height: 44px; line-height: 1.5; }

/* ---------- callouts ---------- */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--sub); border-radius: 12px; padding: 13px 15px; font-size: 13.5px; line-height: 1.55; color: var(--text); background: var(--surface); }
.callout-primary { background: var(--primary-soft); border-color: rgba(36,91,255,.18); border-left-color: var(--primary); }
.callout-success { background: var(--success-soft); border-color: rgba(22,163,106,.22); border-left-color: var(--success); }
.callout-warn, .callout-flame { background: var(--warn-soft); border-color: var(--warn-line); border-left-color: var(--warn); }
.callout-danger { background: var(--danger-soft); border-color: rgba(217,45,32,.22); border-left-color: var(--danger); }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--hero-dot) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 75%);
}
.hero-next {
  background: linear-gradient(160deg, #0C2445 0%, #071B33 100%);
  border: 1px solid var(--card-dark-border); border-radius: var(--r-card); padding: 24px;
  box-shadow: 0 20px 44px rgba(0,0,0,.3);
}
.heropreview { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) { .heropreview { display: none; } }

/* ---------- Mission Readout (V8) — scoped under mrx- to avoid collisions.
   A deep-navy command panel in both themes (like .hero-next), tuned per theme
   via the tokens below. System fonts only: --disp for display, --mono for
   telemetry numerals. ---------- */
.mrx-panel {
  --mrx-line: rgba(255,255,255,.09);
  --mrx-dim: rgba(255,255,255,.5);
  --mrx-dimmer: rgba(255,255,255,.42);
  background: linear-gradient(165deg, #101A33 0%, #0B1428 100%);
  border: 1px solid var(--card-dark-border);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--sh-card);
  position: relative; overflow: hidden;
  max-width: 420px;
}
[data-theme="light"] .mrx-panel {
  background: linear-gradient(165deg, #0C2445 0%, #071B33 100%);
  box-shadow: 0 4px 8px rgba(10,17,40,.05), 0 24px 48px rgba(10,17,40,.14);
}
.mrx-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 70% 20%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 70% 20%, black, transparent 75%);
}
.mrx-inner { position: relative; z-index: 1; }
.mrx-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--mrx-dimmer); text-transform: uppercase; margin-bottom: 16px; }

.mrx-dial-row { display: flex; align-items: center; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--mrx-line); margin-bottom: 18px; }
.mrx-dial { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.mrx-dial svg { transform: rotate(-90deg); display: block; }
.mrx-dial-track { stroke: rgba(255,255,255,.12); }
.mrx-dial-fill { stroke: var(--brand); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1); }
.mrx-dial-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.mrx-dial-value b { font-family: var(--mono); font-size: 18px; color: #fff; font-weight: 600; }
.mrx-dial-value span { font-family: var(--mono); font-size: 8px; letter-spacing: .08em; color: var(--mrx-dimmer); text-transform: uppercase; margin-top: 1px; }

.mrx-tag { display: inline-block; font-size: 11px; font-weight: 650; color: #4ADE9C; background: rgba(49,201,139,.16); border-radius: 5px; padding: 2px 8px; margin-bottom: 7px; letter-spacing: .02em; }
.mrx-dial-copy h3 { font-family: var(--disp); color: #fff; font-size: 18px; margin: 0 0 4px; font-weight: 700; letter-spacing: -.01em; }
.mrx-dial-copy p { color: var(--mrx-dim); font-size: 12.5px; margin: 0; line-height: 1.5; }

.mrx-checklist { display: flex; flex-direction: column; margin-bottom: 18px; }
.mrx-check-item { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.mrx-check-item:last-child { border-bottom: none; }
.mrx-check-mark { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mrx-check-mark.done { background: var(--success); }
.mrx-check-mark.done .mrx-icon { width: 12px; height: 12px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mrx-check-mark.pending { border: 1.5px solid rgba(255,255,255,.32); }
.mrx-check-item span { font-size: 13px; color: rgba(255,255,255,.88); font-weight: 500; }
.mrx-check-item.is-pending span { color: var(--mrx-dim); }

.mrx-meter { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 14px 16px; }
.mrx-meter-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.mrx-meter-top span:first-child { font-size: 13px; font-weight: 650; color: #fff; }
.mrx-meter-count { font-family: var(--mono); font-size: 11px; color: var(--brand-hi); background: var(--brand-soft); padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.mrx-meter-bar { height: 6px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.mrx-meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), #8FA9FF); border-radius: 99px; transition: width 1.2s cubic-bezier(.4,0,.2,1) .3s; }
@media (prefers-reduced-motion: reduce) {
  .mrx-dial-fill, .mrx-meter-fill { transition: none; }
}

/* ---------- account / auth (V8) ---------- */
.syncbadge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sub); }
.syncdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.authtab { background: none; border: none; cursor: pointer; padding: 4px 2px; font: inherit; font-weight: 650; font-size: 14px; color: var(--sub); border-bottom: 2px solid transparent; }
.authtab.on { color: var(--ink); border-bottom-color: var(--brand); }
/* V10: modals mount via a portal to <body> (modal.jsx) so this fixed
   scrim always covers the real viewport — never a backdrop-filter
   ancestor like the sticky header. Background scroll is locked by the
   portal; overscroll-behavior stops wheel chaining into the page. */
.modal-scrim { position: fixed; inset: 0; background: rgba(4,8,18,.62); backdrop-filter: blur(3px); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-card { max-width: 620px; width: 100%; max-height: min(90vh, calc(100vh - 32px)); overflow-y: auto; overscroll-behavior: contain; }

/* ---------- preflight question sections ---------- */
.qsection { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--sh-card); }
.qsection .why { font-size: 12px; color: var(--subtle); margin-top: 6px; }

/* ---------- tracks / progress ---------- */
.track { background: var(--line); border-radius: 999px; height: 8px; overflow: hidden; }
.track-dark { background: rgba(255,255,255,.14); }
.fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width .45s ease; }
.fill-grad { background: linear-gradient(90deg, var(--info), var(--primary)); }
.fill-success { background: var(--success); }

/* ---------- launch path stepper ---------- */
.pathbar { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding: 2px 0; }
.pathnode { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 86px; position: relative; text-align: center; flex: 1; }
.pathnode::before {
  content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0;
}
.pathnode:first-child::before { display: none; }
.pathnode.done::before, .pathnode.current::before { background: var(--success); }
.pathdot {
  width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; z-index: 1; background: var(--surface); border: 2px solid var(--line); color: var(--subtle);
}
.pathnode.done .pathdot { background: var(--success); border-color: var(--success); color: #fff; }
.pathnode.current .pathdot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(36,91,255,.15); }
.pathnode.locked .pathdot { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pathnode.milestone .pathdot { border-style: dashed; border-color: var(--success); color: var(--success); background: var(--success-soft); font-weight: 800; }
.pathnode.milestone.done .pathdot {
  border-style: solid; background: var(--success); border-color: var(--success); color: #fff;
  box-shadow: 0 0 0 4px var(--success-soft), 0 6px 16px rgba(49,201,139,.38);
}
.pathnode.milestone.done .pathlabel { color: var(--success); font-weight: 700; }
.pathlabel { font-size: 11px; font-weight: 600; color: var(--sub); line-height: 1.25; max-width: 96px; }
.pathnode.current .pathlabel { color: var(--primary); }
.pathnode.done .pathlabel { color: var(--ink); }
@media (max-width: 640px) {
  .pathbar { flex-direction: column; align-items: stretch; gap: 2px; }
  .pathnode { flex-direction: row; min-width: 0; text-align: left; gap: 10px; padding: 4px 0; }
  .pathnode::before { top: -8px; left: 10px; width: 2px; height: 14px; }
  .pathlabel { max-width: none; }
}

/* ---------- segmented tabs ---------- */
.seg { display: flex; gap: 4px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: none; border: none; border-radius: 10px; padding: 10px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--sub); cursor: pointer;
}
.tab.on { background: var(--tab-on-bg); color: var(--ink); box-shadow: var(--sh-tab); }
.subtab {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 12.5px; font-weight: 550; color: var(--sub); cursor: pointer;
}
.subtab:hover { border-color: var(--line-strong); color: var(--ink); }
.subtab.on { background: var(--inverse-bg); border-color: var(--inverse-bg); color: var(--inverse-text); font-weight: 600; }
.subgroup { margin-right: 14px; }
.subgroup-label { font-family: var(--sans); font-size: 10.5px; font-weight: 650; color: var(--subtle); margin: 0 0 5px 4px; display: block; }

/* ---------- step cards ---------- */
.stepcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--sh-card); border-left: 3px solid var(--line); transition: border-color .2s ease, box-shadow .2s ease; }
.stepcard.current { border-left-color: var(--primary); border-color: rgba(36,91,255,.32); box-shadow: var(--sh-selected); }
.stepcard.done { border-left-color: var(--success); opacity: .82; }
.stepcard.gated { border-left-color: var(--warn); }
.bigcheck {
  width: 30px; height: 30px; min-width: 30px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--surface); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.bigcheck:hover { border-color: var(--primary); }
.bigcheck.on { background: var(--success); border-color: var(--success); }
.bigcheck.locked { border-color: var(--warn); color: var(--warn); font-size: 13px; }
.stepnum { font-family: var(--mono); font-size: 11px; font-weight: 650; color: var(--subtle); min-width: 20px; padding-top: 2px; }

/* ---------- checklist rows ---------- */
.checkrow {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 10px 2px; cursor: pointer; font-size: 13.5px; color: var(--text); line-height: 1.5;
}
.checkrow:hover { background: var(--row-hover); }
.checkrow.done .txt { color: var(--subtle); text-decoration: line-through; }
.checkbox {
  width: 19px; height: 19px; min-width: 19px; border-radius: 6px; border: 1.5px solid var(--line);
  background: var(--surface); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.checkbox.on { background: var(--success); border-color: var(--success); }

/* ---------- misc components ---------- */
.ibadge { width: 34px; height: 34px; min-width: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.ibadge-dark { background: rgba(255,255,255,.10); color: #9FB6E4; }
.stat { min-width: 120px; }
.kpi { font-family: var(--mono); font-size: 23px; font-weight: 650; letter-spacing: -0.01em; }
.result-box { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; color: var(--text); max-height: 340px; overflow-y: auto; }
.footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 26px 16px 34px; text-align: center; background: var(--surface); }
.tick { font-weight: 700; }

/* glossary terms */
.term { border-bottom: 1.5px dotted var(--primary); cursor: help; position: relative; color: var(--ink); }
.termpop {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 40; width: 262px;
  background: var(--pop-bg); color: var(--pop-text); border-radius: 12px; padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none;
  box-shadow: 0 14px 30px rgba(7,27,51,.35); cursor: default; display: block; white-space: normal; text-align: left;
}
.termpop-t { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #7EA1F5; margin-bottom: 4px; }

/* recommender */
.scorebar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; }
.scorefill { height: 100%; border-radius: 6px; transition: width .5s ease; }
.bestscore { font-family: var(--mono); font-size: 42px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); line-height: 1; }

/* niche finder */
.ideacard { text-align: left; cursor: pointer; }
.ideacard.on { border: 1px solid var(--primary); box-shadow: var(--sh-selected); background: var(--selected-bg); }

/* step guide panel */
.guidebox { background: var(--surface-alt); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.linkchip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 11px; font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  color: var(--primary); text-decoration: none; cursor: pointer;
}
.linkchip:hover { border-color: var(--primary); }
.linkchip-tool { background: var(--primary-soft); }

/* milestones */
.milebadge { display: flex; gap: 10px; align-items: flex-start; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; flex: 1; min-width: 180px; opacity: .72; }
.milebadge.on { border: 1.5px solid var(--success); background: var(--success-soft); opacity: 1; }

/* metric hints */
.wherebtn {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 5px;
  border-radius: 50%; border: 1px solid var(--primary); background: none; color: var(--primary);
  font-size: 10px; font-weight: 700; cursor: pointer; vertical-align: 1px;
}

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .35s ease both; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.015); } 100% { transform: scale(1); } }
.pop { animation: pop .35s ease; }
@media (prefers-reduced-motion: reduce) { .rise, .pop, .fill { animation: none; transition: none; } }

/* sparkline */
.spark { display: inline-block; vertical-align: middle; }
.select { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 11px 13px; font-size: 14.5px; color: var(--ink); font-family: var(--sans); }


/* ============ V6.2: calm + dark mission header ============ */

/* the one deliberate orange moment in the app: launch progress in the dark header */
.fill-launch { background: linear-gradient(90deg, #245BFF 0%, #4B73FF 55%, #FF7A2F 100%); }

.pathbar-dark .pathnode::before { background: rgba(255,255,255,.16); }
.pathbar-dark .pathnode.done::before, .pathbar-dark .pathnode.current::before { background: var(--success); }
.pathbar-dark .pathdot { background: #0E2747; border-color: rgba(255,255,255,.28); color: #7E90B4; }
.pathbar-dark .pathnode.done .pathdot { background: var(--success); border-color: var(--success); color: #fff; }
.pathbar-dark .pathnode.current .pathdot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(36,91,255,.28); }
.pathbar-dark .pathnode.locked .pathdot { background: rgba(231,155,33,.14); border-color: var(--warn); color: var(--warn); }
.pathbar-dark .pathnode.milestone .pathdot { background: rgba(49,201,139,.14); border-color: var(--success); color: var(--success); }
.pathbar-dark .pathnode.milestone.done .pathdot { background: var(--success); color: #fff; }
.pathbar-dark .pathnode.milestone.done .pathlabel { color: #6FE7B4; }
.pathbar-dark .pathlabel { color: #7E90B4; }
.pathbar-dark .pathnode.done .pathlabel { color: #C6D3EC; }
.pathbar-dark .pathnode.current .pathlabel { color: #fff; }

/* collapsed completed phases */
.phaserow {
  width: 100%; display: flex; align-items: center; gap: 10px; background: var(--success-soft);
  border: 1px solid rgba(22,163,106,.25); border-radius: 14px; padding: 12px 16px; cursor: pointer; text-align: left;
}
.phaserow .h5 { color: var(--success); }

/* collapsed step cards */
.stepcard.collapsed { padding: 13px 18px; cursor: pointer; }
.stepcard.collapsed:hover { border-color: #CBD6E8; }

/* evidence */
.evline { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--sub); background: var(--surface-alt); border-radius: 9px; padding: 6px 10px; margin-top: 8px; }
.evline a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* growth / license */
.lockcard { border: 1px dashed var(--line-strong); border-radius: var(--r-card); padding: 22px; background: var(--lock-grad); }
.pricechip { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink); }

/* publish pack */
.packfield { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.packfield + .packfield { margin-top: 10px; }
.packnum { font-family: var(--mono); font-size: 11px; font-weight: 650; color: var(--primary); }

/* ============ V7: brand header, theme toggle, profile ============ */

/* sticky command-center top bar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* wordmark — Launch in ink, R in brand orange */
.brandbtn { display: inline-flex; align-items: center; gap: 11px; background: none; border: none; cursor: pointer; padding: 0; }
.brandname {
  font-family: var(--disp); font-size: 25px; font-weight: 800; letter-spacing: -0.03em;
  color: var(--ink); line-height: 1;
}
.brandname .r { color: var(--brand); }
.vbadge {
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: var(--brand); background: var(--brand-soft); border: 1px solid rgba(255,122,47,.3);
  border-radius: 6px; padding: 3px 6px; margin-left: 8px; vertical-align: 4px;
}

/* tagline — a product slogan, not a debug label */
.tagline {
  /* V9: this is a slogan, not a control — no pill, border or shadow.
     The glowing spark dot and the warm orange arrow stay. */
  display: inline-flex; align-items: center; gap: 9px;
  background: none; border: none; padding: 0; box-shadow: none;
  font-size: 13px; font-weight: 650; letter-spacing: .02em; color: var(--sub); white-space: nowrap;
}
.tagline .spark { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 9px rgba(255,122,47,.9); }
.tagline .to { color: var(--brand); font-weight: 800; }
@media (max-width: 820px) { .tagline { display: none; } }

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  border: 1px solid var(--line); background: var(--surface); color: var(--sub);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }

/* profile */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand-hi), var(--brand-strong));
  color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(242,96,15,.35);
}
.profile-card { border-left: 3px solid var(--brand); }
.profile-note { font-size: 12px; color: var(--subtle); }

.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-flame:disabled:hover { filter: none; }

/* ============================================================
   V9 — public header, account menu, site footer, About,
   Mission Readout staged load-in, empty-pad rocket, best-fit dial.
   ============================================================ */

/* ---------- header nav + download ---------- */
.hdr-navlink {
  background: none; border: none; cursor: pointer; padding: 8px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--sub); border-radius: 8px;
  text-decoration: none; transition: color var(--t-fast) ease, background var(--t-fast) ease;
}
.hdr-navlink:hover { color: var(--ink); background: var(--row-hover); }
.hdr-navlink-soon { cursor: default; color: var(--subtle); font-weight: 500; }
.hdr-navlink-soon:hover { color: var(--subtle); background: none; }

.hdr-download { text-decoration: none; }
.hdr-download-soon {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--subtle);
  border: 1px dashed var(--line); border-radius: 10px; padding: 8px 13px;
  cursor: default; white-space: nowrap; opacity: .85;
}
.hdr-download-desktop {
  /* installed Windows app: a quiet non-interactive status, never a CTA —
     the app must not advertise (or "coming-soon") itself to itself */
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--subtle);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  cursor: default; white-space: nowrap; opacity: .7; user-select: none;
}
@media (max-width: 720px) { .hdr-download, .hdr-download-soon, .hdr-download-desktop, .hdr-navlink { display: none; } .acct .hdr-navlink { display: block; } }

/* ---------- account menu ---------- */
.acct { position: relative; }
.avatar-btn { border: none; cursor: pointer; padding: 0; transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease; }
.avatar-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(242,96,15,.45); }
.avatar-btn:active { transform: none; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 268px; z-index: 70;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: 16px;
  box-shadow: var(--sh-card-hover); padding: 6px; overflow: hidden;
}
.acct-id { display: flex; align-items: center; gap: 11px; padding: 10px 12px 6px; }
.acct-email { color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; }
.acct-sync { padding: 4px 12px 8px; }
.acct-sep { height: 1px; background: var(--line); margin: 4px 8px; }
.acct-item {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text);
  transition: background var(--t-fast) ease, color var(--t-fast) ease;
}
.acct-item:hover { background: var(--row-hover); color: var(--ink); }
.acct-item-out { color: var(--danger); }
.acct-item-out:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- About + public footer ---------- */
.about { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 40px; }
@media (max-width: 720px) { .about-cols { grid-template-columns: 1fr; } }
.sitefooter { border-top: 1px solid var(--line); margin-top: 56px; padding: 26px 0 34px; background: var(--surface); }
.sitefooter-note { max-width: 680px; margin: 0 auto; text-align: center; }
.sitefooter-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.sitefooter-brand { font-family: var(--disp); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.sitefooter-brand .r { color: var(--brand); }
.sitefooter-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---------- Mission Readout staged load-in (V9) ---------- */
.mrx-panel { transition: opacity .38s ease, transform .38s cubic-bezier(.3,.7,.3,1); }
.mrx-enter { opacity: 0; transform: translateY(10px) scale(.985); }
.mrx-settled { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mrx-panel { transition: none; }
  .mrx-enter { opacity: 1; transform: none; }
}

/* ---------- best-fit radial score ---------- */
.bestdial { position: relative; width: 112px; height: 112px; margin: 0 auto; }
.bestdial svg { transform: rotate(-90deg); display: block; }
.bestdial-track { stroke: var(--line); }
.bestdial-fill { stroke: var(--primary); stroke-linecap: round; }
.bestdial-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bestdial-value b { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); line-height: 1; }
.bestdial-value span { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); margin-top: 3px; }

/* ---------- empty-pad rocket illustration (scoped lr-*) ----------
   rocket-icon-task.md geometry + behavior; V10 corrects the palette to
   the approved rendering (Proper Rocket.png): navy hull + white outline
   via --lr-rk-hull / --lr-rk-outline (theme-aware, defined in :root).
   Decoration only: NO pointer cursor. Hover wobble runs once per
   hover-in (~0.55s); stars twinkle on all devices; reduced-motion
   disables all illustration animation. */
.lr-empty-rocket-wrap { margin: 0 auto; }
.lr-rk-body { transform-box: fill-box; transform-origin: 50% 50%; }
.lr-empty-rocket-wrap:hover .lr-rk-body { animation: lrRocketJiggle 0.55s ease-in-out; }
@keyframes lrRocketJiggle {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-2px) rotate(-4deg); }
  40% { transform: translateX(2px) rotate(3deg); }
  60% { transform: translateX(-1px) rotate(-2deg); }
  80% { transform: translateX(1px) rotate(1deg); }
}
.lr-rk-star { animation: lrRkTwinkle 2.4s ease-in-out infinite; }
@keyframes lrRkTwinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) {
  .lr-empty-rocket-wrap:hover .lr-rk-body { animation: none; }
  .lr-rk-star { animation: none; opacity: 0.4; }
}
