/* ============================================================
   FitEntrepreneur - Midnight & Bone design system
   ============================================================ */

:root {
  --bg: #0A0B0E;
  --surface: #13151A;
  --surface-2: #181B21;
  --border: #23262E;
  --border-strong: #2F333D;
  --text: #EDEEF2;
  --text-muted: #7F838E;
  --text-faint: #5A5E68;
  --accent: #71C5FB;
  --accent-hover: #8FD2FF;
  --accent-text: #07131C;
  --accent-weak: rgba(113, 197, 251, 0.10);
  --accent-border: rgba(113, 197, 251, 0.35);
  --success: #7FAE8E;
  --danger: #C07070;
  --warning: #D8B45F;

  --muted: var(--text-muted);
  --color-neutral: var(--bg);
  --color-neutral-dark: var(--accent-text);
  --color-text-primary: var(--text);
  --color-text-secondary: var(--text-muted);
  --color-text-muted: var(--text-muted);
  --color-border: var(--border);
  --color-border-light: var(--border);
  --color-accent-primary: var(--accent);
  --color-accent-secondary: var(--accent);
  --color-accent-hover: var(--accent-hover);
  --color-accent-weak: var(--accent-weak);
  --color-accent-danger: var(--danger);
  --color-accent-success: var(--success);
  --color-accent-warning: var(--warning);
  --color-structure-bg: var(--surface);
  --color-structure-bg-light: var(--surface-2);
  --color-primary-bg: var(--bg);
  --color-primary-bg-light: var(--surface);
  --color-fill: var(--accent);
  --color-on-fill: var(--accent-text);
  --color-white: var(--text);

  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-brand: Georgia, 'Times New Roman', serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 17px;
  --font-size-xl: 21px;
  --font-size-2xl: 26px;
  --font-size-3xl: 34px;
  --font-size-4xl: 42px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 600;
  --font-weight-extrabold: 700;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-xxl: 32px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;
  --radius-2xl: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-accent: none;

  --touch-target: 44px;
  --touch-target-min: 44px;
  --touch-target-comfortable: 44px;
  --touch-target-primary: 48px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.15s ease;
  --transition-cubic: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input,
select,
textarea { font-family: inherit; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; letter-spacing: 0; }

.btn,
.primary-cta,
.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  height: 36px;
  border: 1px solid transparent;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary,
.primary-cta,
.start-btn {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.btn-primary:hover,
.primary-cta:hover,
.start-btn:hover { background: var(--accent-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn-lg {
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
}

.btn:disabled,
.primary-cta:disabled,
.start-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  padding: 0 12px;
  height: 40px;
  outline: none;
  width: 100%;
  transition: border-color var(--transition-base);
}

.input::placeholder { color: var(--text-faint); }
.input:focus { border-color: var(--accent-border); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: fe-spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes fe-spin { to { transform: rotate(360deg); } }

.loading-state,
.empty-state,
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state h2,
.empty-state h3 {
  font-size: 18px;
  color: var(--text);
}

.toast-notification {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: var(--shadow-md);
  max-width: 320px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(4px);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* App shell and sidebar */
.content > .page {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title { font-size: var(--font-size-xl); }
.page-sub { color: var(--text-muted); font-size: var(--font-size-sm); margin-top: 4px; }

#app-sidebar.sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border-right: 0;
  overflow: visible;
}

#app-sidebar > .sidebar { width: 220px; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 18px;
}

.brand-mark {
  font-family: var(--font-family-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.brand-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  width: 100%;
  text-align: left;
  transition: color var(--transition-base), background var(--transition-base);
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; color: currentColor; }
.nav-label { flex: 1; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-shrink: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--text-faint); }

/* Dashboard and lists */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card { padding: 16px; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 600; margin-top: 8px; }
.stat-unit { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-left: 2px; }
.stat-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--text-faint); }
.delta-up { color: var(--accent); font-weight: 600; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.panel { padding: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-title { font-size: 13px; font-weight: 600; }
.panel-meta { font-size: 12px; color: var(--text-faint); }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.list-row:first-of-type { border-top: none; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-weight: 500; color: var(--text); }
.row-sub { font-size: 12px; color: var(--text-faint); margin-top: 1px; }
.row-fig { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Workout runner */
.runner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}

.runner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.runner-elapsed {
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.console { padding: 24px; }
.console-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.exercise-name { font-size: var(--font-size-xl); font-weight: 600; letter-spacing: 0; margin-top: 6px; }
.input-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.big-input { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 16px; }
.big-input-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.big-value { font-size: 36px; font-weight: 600; line-height: 1; }
.runner-actions { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.done-sets { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 12px; }
.done-set-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--text-muted); }
.done-set-row .num { color: var(--text); font-weight: 500; }
.failure-badge { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--text-muted); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 1px 5px; }
.failure-toggle { display: flex; align-items: center; gap: 8px; background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-md); color: var(--text-muted); font-size: 13px; font-weight: 500; height: 44px; padding: 0 16px; transition: all var(--transition-base); }
.failure-toggle.on { color: var(--text); border-color: var(--accent-border); background: var(--accent-weak); }
.failure-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background var(--transition-base); }
.failure-toggle.on .failure-dot { background: var(--accent); }

.unit-toggle { cursor: pointer; user-select: none; display: inline-flex; }
.toggle-track { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius-md); width: 64px; height: 28px; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; transition: all var(--transition-base); }
.toggle-thumb { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; background: var(--accent); border-radius: 50%; transition: transform var(--transition-cubic); z-index: 2; }
.kg-active .toggle-thumb { transform: translateX(36px); }
.label-lbs,
.label-kg { font-size: 10px; font-weight: 700; color: var(--text-muted); z-index: 1; transition: color var(--transition-base); }
.toggle-track:not(.kg-active) .label-lbs,
.toggle-track.kg-active .label-kg { opacity: 0; }

/* History */
.history-table { overflow: hidden; }
.history-row-group { border-bottom: 1px solid var(--border); padding: 12px 16px; }
.history-row-group:last-child { border-bottom: none; }
.history-row-main { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.history-ex-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 12px; color: var(--text-muted); }
.mini-btn { background: transparent; border: none; color: var(--text-muted); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: var(--radius-sm); cursor: pointer; }
.mini-btn:hover { color: var(--text); background: var(--border); }
.mini-btn.danger:hover { color: var(--danger); }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 64px); overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; }
.chat-inner { max-width: 720px; margin: 0 auto; padding: 32px 24px 24px; display: flex; flex-direction: column; gap: 24px; }
.msg { display: flex; flex-direction: column; gap: 6px; }
.msg-user { align-items: flex-end; }
.msg-user .msg-body { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px 16px; max-width: 75%; font-size: 14px; }
.msg-ai .msg-body { font-size: 14px; line-height: 1.65; max-width: 100%; }
.msg-meta { font-size: 11px; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }
.coach-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.msg-body h4 { font-size: 13px; margin: 16px 0 8px; }
.msg-body p + p { margin-top: 12px; }
.msg-body ul { margin: 8px 0 0; padding-left: 18px; color: var(--text); }
.msg-body li { margin-top: 4px; }
.chat-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.chat-table th { text-align: left; font-weight: 500; color: var(--text-faint); font-size: 12px; padding: 6px 12px 6px 0; border-bottom: 1px solid var(--border); }
.chat-table td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.chat-composer { border-top: 1px solid var(--border); background: var(--bg); flex-shrink: 0; }
.composer-inner { max-width: 720px; margin: 0 auto; padding: 12px 24px 20px; }
.chips { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 12px; font-weight: 500; border-radius: var(--radius-md); padding: 5px 10px; cursor: pointer; transition: all var(--transition-base); }
.chip:hover { color: var(--text); border-color: var(--accent-border); }
.composer-box { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 6px 6px 6px 16px; }
.composer-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; height: 32px; min-width: 0; }
.composer-input::placeholder { color: var(--text-faint); }

/* Marketing and onboarding */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card { width: 360px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }

.mkt {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: clip;
}

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
}

.lp-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px 24px;
}

.lp-brand,
.lp-nav-actions,
.hero-actions,
.preview-logo,
.console-actions,
.coach-actions,
.testimonial-person {
  display: flex;
  align-items: center;
}

.lp-brand,
.preview-logo { gap: 9px; }
.lp-nav-actions { gap: 8px; }

.lp-hero {
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 24px 34px;
  text-align: center;
}

.lp-hero-copy {
  max-width: 760px;
  margin: 0 auto;
}

.lp-eyebrow { color: var(--accent); }

.lp-hero h1,
.feature-copy h2,
.method-section h2,
.steps-section h2,
.testimonials-section h2,
.final-cta h2 {
  color: var(--text);
  text-wrap: balance;
}

.lp-hero h1 {
  font-size: clamp(38px, 5.7vw, 64px);
  font-weight: 650;
  line-height: 1.04;
  max-width: 760px;
  margin: 18px auto 0;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 580px;
  margin: 18px auto 0;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-actions {
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.app-preview,
.console-card,
.coach-card,
.progress-card,
.step-card,
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(113, 197, 251, 0.14),
    0 0 32px rgba(113, 197, 251, 0.08),
    inset 0 1px 0 rgba(113, 197, 251, 0.07);
  transition: box-shadow 0.3s ease;
}

.console-card:hover,
.coach-card:hover,
.progress-card:hover,
.step-card:hover,
.testimonial-card:hover {
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(113, 197, 251, 0.28),
    0 0 52px rgba(113, 197, 251, 0.16),
    inset 0 1px 0 rgba(113, 197, 251, 0.12);
}

.hero-preview {
  display: flex;
  flex-direction: column;
  max-width: 840px;
  min-height: 236px;
  margin: 36px auto 0;
  overflow: hidden;
  text-align: left;
  position: relative;
}

.hero-win-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 220px;
  background: radial-gradient(ellipse at top, rgba(113, 197, 251, 0.13) 0%, transparent 68%);
  pointer-events: none;
  z-index: 1;
}

.mac-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(24, 27, 33, 0.9);
  position: relative;
  z-index: 2;
}

.wd {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.mac-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
}

.preview-body {
  display: flex;
  font-size: 12px;
  position: relative;
  z-index: 2;
}

.preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  width: 176px;
  flex-shrink: 0;
}

.preview-sidebar span {
  padding: 7px 10px;
  border-radius: 5px;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
}

.preview-sidebar span.active {
  color: var(--text);
  background: var(--surface-2);
}

.preview-logo { margin-bottom: 12px; }
.preview-logo .brand-name { font-size: 12px; }

.preview-main {
  flex: 1;
  padding: 20px 22px;
}

.preview-title,
.panel-head span:first-child {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  color: var(--text);
}

.preview-stats,
.progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.mini-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
}

.mini-stat span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}

.mini-stat strong {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.025em;
  display: block;
  color: var(--text);
}

.mini-stat small {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 2px;
}

.line-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 13px 14px;
}

.line-chart {
  height: 64px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-head span:last-child {
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
}

.line-chart,
.big-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.chart-base,
.chart-grid {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-fill {
  fill: rgba(113, 197, 251, 0.09);
}

.big-chart circle {
  fill: var(--accent);
}

.metric-band {
  max-width: 880px;
  margin: 0 auto;
  padding: 38px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.band-item { text-align: center; }

.band-value {
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.band-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.feature-split,
.method-section,
.steps-section,
.testimonials-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 76px 24px;
  border-bottom: 1px solid var(--border);
}

.feature-split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
  align-items: center;
  gap: 72px;
}

.feature-split.reverse {
  grid-template-columns: minmax(360px, 1fr) minmax(0, 0.86fr);
}

.feature-copy h2,
.method-section h2,
.steps-section h2,
.testimonials-section h2 {
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.12;
  margin-top: 14px;
}

.feature-copy p,
.method-section > p,
.step-card p,
.testimonial-person small,
.final-cta p {
  color: var(--text-muted);
}

.feature-copy p,
.method-section > p {
  font-size: 15px;
  line-height: 1.75;
  margin-top: 20px;
}

.proof-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.proof-list li {
  position: relative;
  padding-left: 17px;
}

.proof-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.console-card,
.coach-card,
.progress-card {
  padding: 22px;
}

.console-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.console-top span {
  display: block;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.console-top h3 {
  font-size: 21px;
  margin-top: 8px;
}

.timer {
  text-align: right;
  flex-shrink: 0;
}

.timer strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer span {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

.console-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.console-field {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}

.console-field span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.console-field strong {
  display: block;
  margin-top: 7px;
  font-size: 31px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.console-field small {
  color: var(--text-muted);
  font-size: 16px;
}

.console-actions {
  gap: 10px;
  margin-top: 16px;
}

.console-actions .btn {
  flex: 1;
}

.failure-pill {
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.failure-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.coach-question {
  width: fit-content;
  margin-left: auto;
  max-width: 320px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.coach-answer {
  margin-top: 24px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.65;
}

.coach-answer .coach-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.12em;
}

.coach-answer p {
  display: inline;
}

.coach-table {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: 13px;
}

.coach-table th {
  color: var(--text-faint);
  font-weight: 500;
  text-align: left;
  padding: 0 0 8px;
}

.coach-table td {
  color: var(--text);
  font-weight: 600;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.coach-actions {
  gap: 8px;
  margin-top: 14px;
}

.coach-actions .mini-btn {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
}

.coach-actions .mini-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.progress-card {
  min-width: 0;
}

.progress-card .big-chart {
  margin-top: 14px;
  border-radius: var(--radius-md);
}

.progress-metrics {
  margin-top: 16px;
}

.progress-metrics .mini-stat strong {
  font-size: 22px;
}

.method-section,
.steps-section,
.testimonials-section {
  max-width: 980px;
}

.method-section > p {
  max-width: 570px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 68px;
  margin-top: 72px;
}

.method-grid span {
  color: var(--accent);
  font-family: var(--font-family-brand);
  font-size: 18px;
  font-weight: 700;
}

.method-grid h3,
.step-card h3 {
  font-size: 16px;
  margin-top: 14px;
}

.method-grid p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
  margin-top: 9px;
}

.steps-grid,
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.step-card,
.testimonial-card {
  padding: 24px;
  box-shadow: none;
}

.step-card > span {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 650;
}

.step-card p {
  font-size: 13px;
  line-height: 1.65;
  margin-top: 9px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  min-height: 188px;
}

.testimonial-card > p {
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.58;
  margin-bottom: 24px;
}

.testimonial-person {
  gap: 12px;
  margin-top: auto;
}

.testimonial-person > span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
}

.testimonial-person strong,
.testimonial-person small {
  display: block;
}

.testimonial-person strong {
  font-size: 13px;
}

.testimonial-person small {
  font-size: 12px;
}

.founder-quote {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 24px 64px;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 28px;
}

.founder-quote img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
}

.founder-quote p {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
}

.founder-quote strong,
.founder-quote span {
  display: block;
  font-size: 13px;
}

.founder-quote strong {
  margin-top: 14px;
}

.founder-quote span {
  color: var(--text-muted);
  margin-top: 2px;
}

.final-cta {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 68px 24px;
}

.final-cta h2 {
  font-size: 30px;
}

.final-cta p {
  max-width: 480px;
  margin: 16px auto 0;
  font-size: 16px;
  line-height: 1.65;
}

.final-cta .btn {
  margin-top: 28px;
}

.lp-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 12px;
}

.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
}

.reveal-ready [data-reveal].reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.onb-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.onb-top { display: flex; align-items: center; justify-content: space-between; max-width: 640px; width: 100%; margin: 0 auto; padding: 20px 24px; }
.onb-progress { height: 2px; background: var(--border); max-width: 640px; width: calc(100% - 48px); margin: 0 auto; border-radius: 1px; }
.onb-progress-fill { height: 100%; background: var(--accent); border-radius: 1px; transition: width 0.3s ease; }
.onb-body { flex: 1; max-width: 640px; width: 100%; margin: 0 auto; padding: 32px 24px 56px; }
.onb-q { font-size: clamp(22px, 3vw, 28px); letter-spacing: 0; margin-top: 12px; }
.onb-help { color: var(--text-muted); font-size: 13px; margin-top: 8px; }
.option-list { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-align: left; color: var(--text); font-size: 14px; min-height: 44px; transition: border-color var(--transition-base), background var(--transition-base); width: 100%; }
.option-row:hover { border-color: var(--border-strong); }
.option-row.selected { border-color: var(--accent-border); background: var(--accent-weak); }
.option-title { display: block; font-weight: 500; }
.option-sub { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; font-weight: 400; }
.option-check { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all var(--transition-base); }
.option-row.selected .option-check { border-color: var(--accent); background: var(--accent); }
.option-row.selected .option-check::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-text); }
.onb-actions { display: flex; justify-content: space-between; margin-top: 32px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .lp-hero { padding-top: 72px; }
  .feature-split,
  .feature-split.reverse {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .feature-split.reverse .coach-card {
    order: 2;
  }
  .feature-split.reverse .feature-copy {
    order: 1;
  }
  .method-grid {
    gap: 28px;
  }
  .steps-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .content > .page { max-width: none; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .runner-top { align-items: flex-start; flex-direction: column; }
  .input-pair { grid-template-columns: 1fr; }
  .chat { height: calc(100vh - 56px); }
  .msg-user .msg-body { max-width: 92%; }
  .lp-nav-inner { padding: 10px 16px; }
  .lp-nav-actions .btn-ghost { display: none; }
  .lp-hero { padding: 42px 16px 26px; }
  .lp-hero h1 { font-size: clamp(34px, 12vw, 48px); }
  .hero-sub { font-size: 15px; }
  .hero-preview {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 28px;
  }
  .preview-sidebar {
    display: none;
  }
  .preview-main {
    padding: 16px 12px 12px;
  }
  .preview-stats,
  .progress-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mini-stat {
    padding: 10px;
  }
  .mini-stat strong {
    font-size: 18px;
  }
  .line-chart {
    height: 70px;
  }
  .feature-split,
  .method-section,
  .steps-section,
  .testimonials-section {
    padding: 58px 16px;
  }
  .console-card,
  .coach-card,
  .progress-card,
  .step-card,
  .testimonial-card {
    padding: 18px;
  }
  .console-top {
    flex-direction: column;
  }
  .timer {
    text-align: left;
  }
  .method-grid {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }
  .founder-quote {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 600px) {
  .metric-band { grid-template-columns: repeat(2, 1fr); }
  .auth-card { width: 100%; }
  .lp-brand .brand-name {
    max-width: 128px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .final-cta .btn {
    width: 100%;
  }
  .console-inputs {
    grid-template-columns: 1fr;
  }
  .console-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .failure-pill {
    justify-content: center;
  }
  .coach-question {
    width: 100%;
    max-width: none;
  }
  .metric-band,
  .final-cta {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal],
  .reveal-ready [data-reveal].reveal-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
