/* ─── TOKENS (mirrors the newer site shell) ─────────────────────────── */
:root {
  --ink:           #0A1628;
  --ink-dim:       #5B6A82;
  --surface:       #FFFFFF;
  --panel:         #F2F6FB;
  --panel-mid:     #E8EEF5;

  --dark:          #0D1B2E;
  --navy:          #1A3A5C;
  --blue:          #2563AE;
  --sky:           #5BA8D9;

  --accent:        #2563EB;
  --accent-dark:   #1D4ED8;
  --accent-glow:   rgba(37, 99, 235, .28);
  --accent-glow-2: rgba(37, 99, 235, .12);
  --accent-halo:   rgba(37, 99, 235, .40);
  --accent-tint:   rgba(37, 99, 235, .07);
  --accent-border: rgba(37, 99, 235, .18);
  --on-accent:     #FFFFFF;

  --border-l:      #E2E8F0;

  --nav-bg:        rgba(255, 255, 255, .94);
  --nav-cta-bg:    #E8EEF5;
  --nav-cta-bg-h:  #D5DFEC;
  --nav-cta-text:  #0A1628;

  --hero-glow-1:   rgba(37, 99, 174, .25);
  --hero-glow-2:   rgba(26, 58, 92, .40);

  --success-bg:    rgba(34, 197, 94, .08);
  --success-bd:    rgba(34, 197, 94, .22);
  --success-ink:   #15803D;

  --shadow-soft:   0 6px 28px rgba(13, 27, 46, .12);
  --shadow-hover:  0 12px 40px rgba(13, 27, 46, .18);

  --radius:        12px;
  --radius-lg:     18px;
  --nav-h:         56px;

  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --ease-spring:   cubic-bezier(.34, 1.56, .64, 1);
  --ease-gentle:   cubic-bezier(.25, .46, .45, .94);

  /* Prompt-tool specific tokens */
  --app-bg:             linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
  --app-panel:          #FFFFFF;
  --app-panel-2:        #F7FAFD;
  --app-panel-3:        #EEF3F9;
  --app-border:         #D9E3EF;
  --app-text:           #0F1E33;
  --app-text-dim:       #596B85;
  --app-text-soft:      #8091A9;
  --app-header-bg:      linear-gradient(135deg, #0D1B2E 0%, #1A3A5C 100%);
  --app-header-border:  rgba(255,255,255,.14);
  --app-header-ink:     #F8FBFF;
  --app-header-dim:     rgba(255,255,255,.72);
  --app-primary:        #2563EB;
  --app-primary-2:      #1D4ED8;
  --app-primary-tint:   rgba(37, 99, 235, .08);
  --app-primary-tint-2: rgba(37, 99, 235, .14);
  --app-positive:       #16A34A;
  --app-negative:       #DC2626;
  --app-warn:           #D97706;
  --app-low-bg:         rgba(220, 38, 38, .08);
  --app-low-bd:         rgba(220, 38, 38, .28);
  --app-low-ink:        #B91C1C;
  --app-mid-bg:         rgba(91, 168, 217, .12);
  --app-mid-bd:         rgba(91, 168, 217, .32);
  --app-mid-ink:        #1A3A5C;
  --app-high-bg:        rgba(37, 99, 235, .10);
  --app-high-bd:        rgba(37, 99, 235, .30);
  --app-high-ink:       #1D4ED8;
}

[data-theme="dark"] {
  --ink:           #E6EDF7;
  --ink-dim:       #8DA0BD;
  --surface:       #0A1321;
  --panel:         #111E37;
  --panel-mid:     #172340;

  --dark:          #050B17;
  --navy:          #1E3A6B;
  --blue:          #3B82F6;
  --sky:           #60A5FA;

  --accent:        #2563EB;
  --accent-dark:   #7f9ff7;
  --accent-glow:   rgba(37, 99, 235, .30);
  --accent-glow-2: rgba(37, 99, 235, .14);
  --accent-halo:   rgba(37, 99, 235, .45);
  --accent-tint:   rgba(37, 99, 235, .10);
  --accent-border: rgba(37, 99, 235, .28);

  --border-l:      #1B2742;

  --nav-bg:        rgba(10, 19, 33, .85);
  --nav-cta-bg:    #172340;
  --nav-cta-bg-h:  #223152;
  --nav-cta-text:  #E6EDF7;

  --hero-glow-1:   rgba(37, 99, 235, .30);
  --hero-glow-2:   rgba(59, 130, 246, .22);

  --shadow-soft:   0 6px 28px rgba(0, 0, 0, .55);
  --shadow-hover:  0 12px 40px rgba(37, 99, 235, .16);

  --success-bg:    rgba(34, 197, 94, .10);
  --success-bd:    rgba(34, 197, 94, .24);
  --success-ink:   #4ADE80;

  --app-bg:             linear-gradient(180deg, #0d1627 0%, #101c31 100%);
  --app-panel:          #111E37;
  --app-panel-2:        #0F1A30;
  --app-panel-3:        #172640;
  --app-border:         #223152;
  --app-text:           #E6EDF7;
  --app-text-dim:       #9DB0CB;
  --app-text-soft:      #99aac5;
  --app-header-bg:      linear-gradient(135deg, #050B17 0%, #10203A 100%);
  --app-header-border:  rgba(255,255,255,.10);
  --app-header-ink:     #F8FBFF;
  --app-header-dim:     rgba(255,255,255,.70);
  --app-primary:        #dfecff;
  --app-primary-2:      #60A5FA;
  --app-primary-tint:   rgba(59, 130, 246, .12);
  --app-primary-tint-2: rgba(59, 130, 246, .18);
  --app-positive:       #4ADE80;
  --app-negative:       #F87171;
  --app-warn:           #F59E0B;
  --app-low-bg:         rgba(248, 113, 113, .12);
  --app-low-bd:         rgba(248, 113, 113, .34);
  --app-low-ink:        #FCA5A5;
  --app-mid-bg:         rgba(96, 165, 250, .16);
  --app-mid-bd:         rgba(96, 165, 250, .36);
  --app-mid-ink:        #BFDBFE;
  --app-high-bg:        rgba(59, 130, 246, .16);
  --app-high-bd:        rgba(59, 130, 246, .38);
  --app-high-ink:       #BFDBFE;
}

/* ─── RESET ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
a { text-decoration: none; color: inherit; }
img, video { display: block; width: 100%; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; }

/* ─── NAV ───────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-l);
  transition: box-shadow .3s var(--ease-out-expo),
              background-color .4s ease,
              border-color .4s ease;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.07); }

.nav-left { display: flex; align-items: center; gap: 20px; }
.nav-logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.3px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity .2s, color .4s ease;
}
.nav-logo:hover { opacity: .85; }
.nav-logo-mark { flex-shrink: 0; overflow: visible; }
.nav-logo-mark .logo-outer {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  fill: none;
  transition: stroke .4s ease;
}
.nav-logo-mark .logo-inner {
  fill: var(--accent);
  transform-origin: center;
  transform-box: fill-box;
  transition: fill .4s ease, transform .3s var(--ease-spring);
}
.nav-logo:hover .logo-inner { transform: scale(1.25); }

.nav-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-dim);
  transition: color .4s ease;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22C55E;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--ink-dim); transition: color .2s; }
.nav-links a:not(.nav-cta) { position: relative; padding-bottom: 2px; }
.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1.5px;
  background: var(--accent-dark);
  border-radius: 2px;
  transition: width .25s var(--ease-out-expo), background-color .4s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { width: 100%; }
.nav-active { font-weight: 600; color: var(--ink) !important; }
.nav-active:not(.nav-cta)::after { width: 100% !important; }

.nav-cta {
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  background: var(--nav-cta-bg);
  color: var(--nav-cta-text) !important;
  border-radius: 8px;
  transition: background .2s, transform .15s, color .4s ease;
}
.nav-cta:hover { background: var(--nav-cta-bg-h); transform: translateY(-1px); }

.theme-toggle {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border-l);
  border-radius: 50%;
  color: var(--ink-dim);
  cursor: pointer;
  padding: 0;
  transition: color .25s ease, border-color .25s ease, background .25s ease,
              transform .3s var(--ease-spring);
}
.theme-toggle:hover {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-glow-2);
  transform: rotate(-12deg);
}
[data-theme="dark"] .theme-toggle:hover {
  color: var(--accent);
  transform: rotate(12deg);
}
.tt-icon { display: none; }
[data-theme="light"] .tt-moon,
:root:not([data-theme="dark"]) .tt-moon { display: block; }
[data-theme="dark"] .tt-sun { display: block; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease-out-expo), opacity .2s, background-color .4s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-l);
  padding: 20px 32px 24px;
  z-index: 290;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform .25s var(--ease-out-expo), opacity .2s,
              background-color .4s ease, border-color .4s ease;
}
.mobile-menu.open { display: flex; transform: translateY(0); opacity: 1; }
.mobile-menu a {
  font-size: 16px; color: var(--ink-dim);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-l);
  transition: color .2s, border-color .4s ease;
}
.mobile-menu a:hover { color: var(--ink); }
.mobile-menu a:last-of-type { border-bottom: none; }

.mobile-theme-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 14px 0 2px;
  background: none;
  border: none;
  border-top: 1px solid var(--border-l);
  margin-top: 6px;
  font-size: 16px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color .2s, border-color .4s ease;
}
.mobile-theme-toggle:hover { color: var(--accent-dark); }
[data-theme="dark"] .mobile-theme-toggle:hover { color: var(--accent); }
.mtt-label-light, .mtt-label-dark { display: none; }
[data-theme="light"] .mtt-label-light,
:root:not([data-theme="dark"]) .mtt-label-light { display: inline; }
[data-theme="dark"] .mtt-label-dark { display: inline; }
.mtt-icon-wrap {
  width: 30px; height: 30px;
  border: 1px solid var(--border-l);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  transition: border-color .2s;
}
.mobile-theme-toggle:hover .mtt-icon-wrap { border-color: var(--accent); }

/* ─── PAGE / SPLIT LAYOUT ───────────────────────────────────────────── */
.pe-page {
  min-height: 100vh;
  padding-top: var(--nav-h);
  background:
    radial-gradient(circle at top left, var(--hero-glow-1), transparent 34%),
    radial-gradient(circle at bottom right, var(--hero-glow-2), transparent 30%),
    var(--surface);
}

.split-page {
  display: flex;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
}
.split-left {
  width: 56%;
  min-width: 10%;
  max-width: 90%;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--app-bg);
  flex-shrink: 0;
  border-right: 1px solid var(--border-l);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.split-left:hover { scrollbar-color: var(--app-border) transparent; }
.split-right {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: background-color .4s ease, border-color .4s ease;
}
.split-handle {
  width: 8px;
  background: var(--border-l);
  cursor: col-resize;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 10;
}
.split-handle:hover,
.split-handle.dragging { background: var(--accent); }
.handle-grip { display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.handle-grip span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(0,0,0,.25);
}
.split-handle:hover .handle-grip span,
.split-handle.dragging .handle-grip span { background: #fff; }

/* ─── APP SHELL ─────────────────────────────────────────────────────── */
.app-shell { display: flex; flex-direction: column; min-height: 100%; color: var(--app-text); }
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--app-header-bg);
  border-bottom: 1px solid var(--app-header-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(5,11,23,.22);
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.logo-text {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--app-header-ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .18s, border-color .18s, transform .12s, color .18s, box-shadow .18s;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:active { transform: scale(.98); }
.btn-ghost {
  background: rgba(255,255,255,.08);
  color: var(--app-header-dim);
  border-color: rgba(255,255,255,.16);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.14);
  color: var(--app-header-ink);
  border-color: rgba(255,255,255,.28);
}
.btn-primary-app {
  background: var(--app-primary);
  color: #fff;
  border-color: var(--app-primary);
  box-shadow: 0 10px 24px rgba(37,99,235,.18);
}
.btn-primary-app:hover {
  background: var(--app-primary-2);
  border-color: var(--app-primary-2);
  transform: translateY(-1px);
}
.fb-ghost {
  background: transparent;
  color: var(--app-text-dim);
  border-color: var(--app-border);
}
.fb-ghost:hover {
  background: var(--app-panel-2);
  color: var(--app-text);
}
.fb-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #fff;
  background: var(--app-primary);
  border: 1px solid var(--app-primary);
  border-radius: 10px;
  padding: .75rem 1.3rem;
  cursor: pointer;
  transition: background .16s, transform .16s, box-shadow .16s, border-color .16s;
  box-shadow: 0 10px 24px rgba(37,99,235,.18);
}
.fb-submit-btn:hover {
  background: var(--app-primary-2);
  border-color: var(--app-primary-2);
  transform: translateY(-1px);
}

.fb-step-track {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 8px;
}
.fb-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fb-pip-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .67rem;
  font-weight: 700;
  color: rgba(255,255,255,.38);
  transition: all .22s var(--ease-out-expo);
}
.fb-pip-label {
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  white-space: nowrap;
  transition: color .22s;
}
.fb-connector {
  width: 26px;
  height: 1.5px;
  background: rgba(255,255,255,.12);
  margin: 0 3px 18px;
  flex-shrink: 0;
  transition: background .22s;
}
.fb-pip.fb-pip-active .fb-pip-circle {
  background: #fff;
  border-color: rgba(255,255,255,.35);
  color: var(--app-primary-2);
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}
.fb-pip.fb-pip-active .fb-pip-label { color: rgba(255,255,255,.92); }
.fb-pip.fb-pip-done .fb-pip-circle {
  background: var(--app-primary);
  border-color: var(--app-primary);
  color: #fff;
}
.fb-pip.fb-pip-done .fb-pip-label { color: rgba(255,255,255,.58); }
.fb-pip.fb-pip-done + .fb-connector { background: rgba(59,130,246,.55); }

.fb-progress-rail { height: 4px; background: rgba(255,255,255,.35); }
.fb-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--app-primary), #8CB7FF);
  border-radius: 0 999px 999px 0;
  transition: width .4s var(--ease-out-expo);
}

.fb-screen { display: none; }
.fb-screen.fb-active { display: block; animation: fbIn .28s var(--ease-out-expo) both; }
.fb-screen.fb-back.fb-active { animation: fbOut .24s var(--ease-out-expo) both; }
@keyframes fbIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fbOut { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── WELCOME / STEPS ───────────────────────────────────────────────── */
.fb-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 160px);
  padding: 52px 34px 42px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 24%),
    radial-gradient(circle at bottom left, rgba(37,99,235,.06), transparent 26%),
    var(--app-panel);
  position: relative;
  overflow: hidden;
}
.fb-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fb-deco-r1 {
  position: absolute; border-radius: 50%;
  width: 480px; height: 480px;
  border: 1px solid rgba(37,99,235,.10);
  top: -180px; right: -140px;
}
.fb-deco-r2 {
  position: absolute; border-radius: 50%;
  width: 300px; height: 300px;
  border: 1px solid rgba(37,99,235,.14);
  top: -60px; right: -30px;
}
.fb-deco-r3 {
  position: absolute; border-radius: 50%;
  width: 140px; height: 140px;
  border: 1.5px solid rgba(37,99,235,.28);
  top: 60px; right: 60px;
}
.fb-deco-d1, .fb-deco-d2, .fb-deco-d3 {
  position: absolute; border-radius: 50%;
}
.fb-deco-d1 { width: 10px; height: 10px; background: var(--app-primary); top: 210px; right: 200px; opacity: .72; }
.fb-deco-d2 { width: 6px; height: 6px; background: var(--sky); top: 310px; right: 120px; opacity: .56; }
.fb-deco-d3 { width: 8px; height: 8px; background: var(--accent); bottom: 100px; left: 20px; opacity: .35; }
.fb-welcome-inner { position: relative; z-index: 1; max-width: 470px; }
.fb-tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--app-primary-2);
  background: var(--app-primary-tint);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 6px 12px;
  margin-bottom: 20px;
}
.fb-welcome-title {
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  font-weight: 800;
  color: var(--app-text);
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.fb-accent {
  color: var(--app-primary-2);
  position: relative;
  display: inline-block;
}
.fb-welcome-sub {
  font-size: .96rem;
  color: var(--app-text-dim);
  line-height: 1.75;
  margin-bottom: 20px;
  max-width: 43ch;
}
.fb-checklist { display: grid; gap: 11px; margin-bottom: 24px; }
.fb-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  color: var(--app-text);
}
.fb-tick {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 800;
  color: #fff;
  background: var(--app-primary);
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}
.fb-start-btn { margin-bottom: 14px; }
.fb-fine {
  font-size: .78rem;
  color: var(--app-text-soft);
  line-height: 1.65;
  max-width: 44ch;
}
.fb-arr { display: inline-block; transition: transform .2s var(--ease-out-expo); }
.fb-start-btn:hover .fb-arr { transform: translateX(2px); }

.fb-step-wrap {
  padding: 28px 26px 30px;
  min-height: calc(100vh - var(--nav-h) - 160px);
}
.fb-step-hd { margin-bottom: 16px; }
.fb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--app-primary-tint);
  border: 1px solid var(--accent-border);
  color: var(--app-primary-2);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: 12px;
}
.fb-step-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--app-text);
  margin-bottom: 8px;
}
.fb-step-sub {
  font-size: .92rem;
  color: var(--app-text-dim);
  line-height: 1.72;
}
.fb-step-sub strong { color: var(--app-text); }

.fb-mini-prog { margin-top: 14px; }
.fb-mini-lbl {
  display: inline-block;
  margin-bottom: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--app-text-dim);
}
.fb-mini-track {
  height: 6px;
  background: var(--app-panel-3);
  border-radius: 999px;
  overflow: hidden;
}
.fb-mini-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--app-primary), var(--sky));
  border-radius: 999px;
  transition: width .3s var(--ease-out-expo);
}
.fb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: .76rem;
  color: var(--app-text-dim);
}
.fb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fb-ld {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.fb-ld-no  { background: var(--app-negative); }
.fb-ld-mid { background: var(--sky); }
.fb-ld-yes { background: var(--app-primary); }

.fb-card {
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15,27,45,.06);
  overflow: hidden;
  margin-bottom: 16px;
}
[data-theme="dark"] .fb-card { box-shadow: 0 12px 28px rgba(0,0,0,.28); }

.fb-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.fb-row-two .fb-field { padding: 16px 16px 12px; border-right: 1px solid var(--app-border); }
.fb-row-two .fb-field:last-child { border-right: none; }
.fb-field { padding: 0 16px 14px; border-bottom: 1px solid var(--app-border); }
.fb-field:last-child,
.fb-field.fb-field-pad { border-bottom: none; }
.fb-field.fb-field-pad { padding: 12px 16px 16px; }
.fb-field.fb-field-solo { padding: 16px; border-bottom: none; }
.fb-field label,
.fb-qt label {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-text-dim);
  margin-bottom: 8px;
}
.fb-opt {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  font-size: .66rem;
  color: var(--app-text-soft);
}
.fb-field input[type="text"],
.fb-field textarea,
.fb-qt textarea,
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  color: var(--app-text);
  background: var(--app-panel-2);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  padding: .78rem .92rem;
  transition: background .16s, border-color .16s, box-shadow .16s, color .16s;
  resize: vertical;
  line-height: 1.55;
  outline: none;
}
.fb-field input::placeholder,
.fb-field textarea::placeholder,
.fb-qt textarea::placeholder,
.form-input::placeholder,
.form-textarea::placeholder { color: var(--app-text-soft); }
.fb-field input:focus,
.fb-field textarea:focus,
.fb-qt textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: var(--app-panel);
  border-color: var(--app-primary);
  box-shadow: 0 0 0 4px var(--app-primary-tint);
}

.fb-likert-card { padding: 0; }
.fb-li {
  padding: 12px 14px;
  border-bottom: 1px solid var(--app-border);
  transition: background .15s, border-color .15s;
}
.fb-li:last-child { border-bottom: none; }
.fb-li.fb-answered { background: var(--app-primary-tint); }
.fb-li.fb-unanswered {
  background: var(--app-low-bg);
  border-left: 3px solid var(--app-negative);
}
.fb-li-section {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--app-primary-2);
  display: block;
  margin-bottom: 5px;
}
.fb-li-q {
  font-size: .83rem;
  font-weight: 600;
  color: var(--app-text);
  line-height: 1.55;
  margin-bottom: 9px;
}
.fb-li-qnum {
  font-size: .62rem;
  font-weight: 800;
  color: var(--app-text-soft);
  margin-right: 4px;
}
.fb-li-btns {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.fb-lbtn {
  font-size: .76rem;
  font-weight: 700;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-panel);
  color: var(--app-text-soft);
  padding: .5rem .15rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all .14s var(--ease-out-expo);
  line-height: 1;
}
.fb-lbtn:hover {
  border-color: var(--app-primary);
  color: var(--app-primary);
  background: var(--app-primary-tint);
  transform: translateY(-1px);
}
.fb-lbtn .fb-ldot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--app-border);
  transition: background .14s;
}
.fb-lbtn .fb-lnum { font-size: .79rem; }
.fb-lbtn.fb-sel-low  { background: var(--app-low-bg);  border-color: var(--app-low-bd);  color: var(--app-low-ink);  transform: translateY(-1px); }
.fb-lbtn.fb-sel-low  .fb-ldot { background: var(--app-low-ink); }
.fb-lbtn.fb-sel-mid  { background: var(--app-mid-bg);  border-color: var(--app-mid-bd);  color: var(--app-mid-ink);  transform: translateY(-1px); }
.fb-lbtn.fb-sel-mid  .fb-ldot { background: var(--app-mid-ink); }
.fb-lbtn.fb-sel-high { background: var(--app-high-bg); border-color: var(--app-high-bd); color: var(--app-high-ink); transform: translateY(-1px); }
.fb-lbtn.fb-sel-high .fb-ldot { background: var(--app-high-ink); }
.fb-li-err {
  font-size: .67rem;
  color: var(--app-negative);
  font-weight: 600;
  margin-top: 6px;
  display: none;
}
.fb-li.fb-unanswered .fb-li-err { display: block; }

.fb-qual-card { padding: 0; }
.fb-qb {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--app-border);
  transition: background .15s;
}
.fb-qb.fb-qb-last { border-bottom: none; }
.fb-qb:hover { background: var(--app-primary-tint); }
.fb-qi {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 20px;
  border: 1px solid transparent;
}
.fb-qi-good   { background: rgba(22,163,74,.10); border-color: rgba(22,163,74,.16); color: var(--app-positive); }
.fb-qi-bad    { background: var(--app-low-bg);     border-color: var(--app-low-bd);      color: var(--app-negative); }
.fb-qi-miss   { background: var(--app-mid-bg);     border-color: var(--app-mid-bd);      color: var(--app-mid-ink); }
.fb-qi-change { background: var(--app-high-bg);    border-color: var(--app-high-bd);     color: var(--app-primary); }
.fb-qt { flex: 1; }
.fb-qt textarea { min-height: 96px; }

.fb-review-card {
  margin-top: 16px;
  padding: 16px 16px 6px;
  background: var(--app-panel);
  border: 1px solid var(--app-border);
  border-radius: var(--radius);
}
.fb-review-hd {
  font-size: .78rem;
  font-weight: 700;
  color: var(--app-text-dim);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.fb-review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--app-border);
}
.fb-review-row:first-child { border-top: none; padding-top: 0; }
.fb-review-lbl {
  font-size: .78rem;
  font-weight: 600;
  color: var(--app-text-dim);
}
.fb-review-val {
  font-size: .83rem;
  font-weight: 700;
  color: var(--app-text);
  text-align: right;
}
.fb-text-btn {
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--app-primary-2);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}
.fb-text-btn:hover { text-decoration: underline; }
.fb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fb-done {
  min-height: calc(100vh - var(--nav-h) - 160px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 28px;
  background: var(--app-panel);
}
.fb-done-icon {
  width: 70px; height: 70px;
  background: rgba(22,163,74,.12);
  border: 1px solid rgba(22,163,74,.20);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--app-positive);
  margin: 0 auto 20px;
  box-shadow: 0 0 0 12px rgba(22,163,74,.06);
  animation: donePop .5s var(--ease-spring) both;
}
@keyframes donePop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.fb-done-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--app-text);
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.fb-done-sub {
  font-size: .9rem;
  color: var(--app-text-dim);
  line-height: 1.75;
  margin-bottom: 24px;
  max-width: 34ch;
}
.fb-ghost-light {
  background: transparent;
  color: var(--app-text-dim);
  border: 1px solid var(--app-border);
}
.fb-ghost-light:hover {
  background: var(--app-panel-2);
  color: var(--app-text);
}

/* ─── ARTICLE PANEL ─────────────────────────────────────────────────── */
.explain-content {
  flex: 1;
  width: 100%;
  padding: 48px 44px 40px;
}
.explain-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.45px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 12px;
}
.explain-title {
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: -.04em;
  margin-bottom: 16px;
  max-width: none;
}
.explain-lead {
  font-size: 1rem;
  color: var(--ink-dim);
  line-height: 1.8;
  margin-bottom: 18px;
  max-width: 66ch;
}
.explain-thesis {
  margin: 28px 0 30px;
  padding: 18px 20px;
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow-soft);
}
.explain-thesis p + p { margin-top: 12px; }
.explain-thesis p {
  font-size: .96rem;
  color: var(--ink);
  line-height: 1.78;
}
.explain-steps {
  display: grid;
  gap: 16px;
  margin-bottom: 28px;
}
.step {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 18px 18px 16px;
  background: var(--panel);
  border: 1px solid var(--border-l);
  border-radius: var(--radius);
  transition: transform .18s var(--ease-spring), box-shadow .18s, border-color .18s, background-color .4s ease;
}
.step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--accent-border);
}
.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-tint);
  border: 1px solid var(--accent-border);
  color: var(--accent-dark);
  font-size: .76rem;
  font-weight: 800;
}
.step-body strong {
  display: block;
  font-size: .98rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.step-body p {
  font-size: .92rem;
  color: var(--ink-dim);
  line-height: 1.78;
}
.explain-callout {
  margin: 0 0 26px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--dark), var(--navy));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.explain-callout blockquote {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #F8FBFF;
  font-weight: 700;
  letter-spacing: -.01em;
}
.explain-callout cite {
  display: inline-block;
  margin-top: 12px;
  font-size: .8rem;
  font-style: normal;
  color: rgba(255,255,255,.72);
}
.explain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.explain-tags span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-l);
  background: var(--surface);
  color: var(--ink-dim);
  font-size: .8rem;
  font-weight: 600;
}

.contact-section {
  margin-top: 8px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--border-l);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.contact-heading {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 10px;
}
.contact-sub {
  font-size: .94rem;
  color: var(--ink-dim);
  line-height: 1.75;
  margin-bottom: 22px;
}
.contact-form { display: grid; gap: 14px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group { position: relative; }
.form-group--select .form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
}
.select-chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--ink-dim);
  pointer-events: none;
}
.form-textarea { min-height: 130px; }
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, transform .18s var(--ease-spring), box-shadow .2s;
  margin-top: 4px;
  box-shadow: 0 10px 24px rgba(37,99,235,.16);
}
.btn-submit:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-2px);
}
.btn-submit:active:not(:disabled) { transform: translateY(0); }
.btn-submit:disabled { opacity: .65; cursor: not-allowed; }
.form-success {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: var(--success-bg);
  border: 1px solid var(--success-bd);
  border-radius: 10px;
  color: var(--success-ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.6;
}
.form-success.visible { display: flex; }
.input-error,
.mc-input-error {
  border-color: var(--app-negative) !important;
  box-shadow: 0 0 0 4px rgba(220,38,38,.10) !important;
}

.showcase-footer {
  padding: 22px 44px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border-l);
}
.footer-copy {
  font-size: 12px;
  color: var(--ink-dim);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 12px;
  color: var(--ink-dim);
  transition: color .2s;
}
.footer-links a:hover { color: var(--ink); }

/* ─── TOAST / MODAL ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--dark);
  border: 1px solid var(--border-l);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 23, .52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9998;
}
.modal-box {
  width: min(100%, 480px);
  background: var(--surface);
  border: 1px solid var(--border-l);
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  padding: 24px;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.modal-body {
  font-size: .92rem;
  color: var(--ink-dim);
  line-height: 1.7;
}
.modal-body + .modal-body { margin-top: 6px; }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.fb-modal-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-l);
  background: var(--panel);
  color: var(--ink);
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s;
}
.fb-modal-btn:hover { background: var(--panel-mid); }
.fb-modal-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.fb-modal-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* ─── RESPONSIVE ────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .explain-content { padding: 40px 34px 34px; }
  .showcase-footer { padding: 22px 34px 26px; }
}

@media (max-width: 960px) {
  .split-page {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .split-left {
    width: 100% !important;
    min-width: unset;
    max-width: unset;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border-l);
  }
  .split-handle { display: none; }
  .split-right {
    border-top: 8px solid var(--dark);
  }
  .fb-step-track { display: none; }
  .fb-welcome,
  .fb-step-wrap,
  .fb-done { min-height: auto; }
  .explain-title { max-width: 100%; }
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links, .nav-status { display: none; }
  .hamburger { display: flex; }

  .fb-welcome { padding: 40px 22px 34px; }
  .fb-step-wrap { padding: 22px 18px 24px; }
  .fb-row-two { grid-template-columns: 1fr; }
  .fb-row-two .fb-field {
    border-right: none;
    border-bottom: 1px solid var(--app-border);
  }
  .fb-row-two .fb-field:last-child { border-bottom: 1px solid var(--app-border); }
  .fb-li-btns { gap: 3px; }
  .fb-lbtn { font-size: .7rem; padding: .42rem .08rem; }
  .fb-review-row,
  .fb-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-footer > * { width: 100%; justify-content: center; }

  .explain-content { padding: 30px 22px 28px; }
  .contact-section { padding: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .showcase-footer {
    padding: 20px 22px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .mobile-menu { padding: 18px 20px 22px; }
  .app-header { padding: 12px 14px; }
  .logo-text { font-size: .85rem; }
  .header-right .btn { padding: 9px 11px; font-size: .78rem; }
  .fb-welcome-title { font-size: 1.8rem; }
  .fb-step-title { font-size: 1.22rem; }
  .fb-checklist li { align-items: flex-start; }
  .fb-li { padding: 12px 10px; }
  .fb-li-q { font-size: .79rem; }
  .step {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .step-num { width: 38px; height: 38px; }
  .toast {
    width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
  }
}
