/**
 * Ascendant Family Learning (Ascendant) marketing site
 * Palette aligned with the learn app (Tailwind slate + sky brand).
 * Dark mode via html.dark (same localStorage key "theme" as public/js/theme.js).
 */

:root {
  color-scheme: light;

  /* Surfaces — match app bg-slate-50 / white cards */
  --bg: #f8fafc;              /* slate-50 */
  --bg-muted: #f1f5f9;        /* slate-100 */
  --bg-elevated: #ffffff;
  --bg-header: rgb(248 250 252 / 92%);

  /* Text — slate scale */
  --ink: #0f172a;             /* slate-900 */
  --ink-muted: #475569;       /* slate-600 */
  --ink-subtle: #64748b;      /* slate-500 */

  /* Brand — app brand/sky tokens */
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-500: #0ea5e9;       /* sky-500 */
  --brand-600: #0284c7;       /* sky-600 / brand-600 */
  --brand-700: #0369a1;       /* sky-700 / brand-700 */
  --brand: var(--brand-600);
  --brand-deep: var(--brand-700);
  --accent: var(--brand-600);
  --accent-hover: var(--brand-700);

  --border: #e2e8f0;          /* slate-200 */
  --ok: #059669;              /* emerald-600 */
  --danger: #b91c1c;          /* red-700 */
  --warn-bg: #fffbeb;         /* amber-50 */
  --warn-border: #fde68a;     /* amber-200 */
  --warn-text: #92400e;       /* amber-800 */

  --radius: 0.75rem;          /* rounded-xl */
  --radius-btn: 0.5rem;       /* rounded-lg */
  --shadow: 0 1px 2px 0 rgb(15 23 42 / 0.06), 0 8px 24px -8px rgb(15 23 42 / 0.1);
  --max: 68rem;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --focus: 0 0 0 3px rgb(14 165 233 / 40%);
}

html.dark {
  color-scheme: dark;

  --bg: #020617;              /* slate-950 */
  --bg-muted: #0f172a;        /* slate-900 */
  --bg-elevated: #0f172a;     /* slate-900 cards */
  --bg-header: rgb(2 6 23 / 92%);

  --ink: #e2e8f0;             /* slate-200 */
  --ink-muted: #cbd5e1;       /* slate-300 */
  --ink-subtle: #94a3b8;      /* slate-400 */

  --brand-50: rgba(14, 165, 233, 0.12);
  --brand-100: rgba(14, 165, 233, 0.18);
  --brand-500: #38bdf8;       /* sky-400 */
  --brand-600: #0284c7;
  --brand-700: #38bdf8;       /* brighter labels on dark */
  --brand: #38bdf8;
  --brand-deep: #7dd3fc;
  --accent: #0284c7;
  --accent-hover: #0369a1;

  --border: #334155;          /* slate-700 */
  --ok: #34d399;              /* emerald-400 */
  --danger: #fca5a5;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --warn-border: rgba(245, 158, 11, 0.35);
  --warn-text: #fcd34d;

  --shadow: 0 1px 2px 0 rgb(0 0 0 / 0.4), 0 10px 24px -8px rgb(0 0 0 / 0.45);
  --focus: 0 0 0 3px rgb(56 189 248 / 40%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-600);
}

html.dark a {
  color: var(--brand-500);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--brand-600);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 1000;
  border-radius: var(--radius-btn);
}

.skip-link:focus {
  left: 0.5rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding-block: 0.5rem;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  font-weight: 700;
  color: var(--brand-700);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: min(11.5rem, 48vw);
}

.logo__primary {
  font-size: 1.05rem;
}

.logo__secondary {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted, #64748b);
}

html.dark .logo {
  color: #38bdf8; /* text-brand-700 dark remap */
}

html.dark .logo__secondary {
  color: #94a3b8;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg-elevated);
  color: var(--ink);
  cursor: pointer;
}

.site-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem 1rem;
  box-shadow: var(--shadow);
}

.site-nav.is-open {
  display: flex;
}

.site-nav a:not(.btn) {
  text-decoration: none;
  color: var(--ink-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.site-nav a:not(.btn):hover {
  color: var(--brand-700);
}

.site-nav__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: stretch;
}

.site-nav__theme {
  display: flex;
  align-items: center;
  margin-top: 0.35rem;
}

@media (min-width: 860px) {
  .nav-toggle {
    display: none;
  }

  .site-header__inner {
    gap: 1.5rem;
  }

  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    border: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    gap: 0.85rem;
    margin-left: auto;
  }

  .site-nav__actions {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    margin-left: 0.35rem;
  }

  .site-nav__theme {
    margin-top: 0;
    margin-left: 0.25rem;
  }
}

/* Buttons — match app sky-600 / rounded-lg */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.btn--primary {
  background: var(--brand-600);
  color: #fff !important;
}

.btn--primary:hover {
  background: var(--brand-700);
  color: #fff !important;
}

.btn--secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: #cbd5e1;
  background: var(--bg-muted);
  color: var(--ink);
}

html.dark .btn--secondary:hover {
  border-color: #64748b;
  background: #1e293b;
}

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

.btn--ghost:hover {
  color: var(--brand-700);
}

.btn--block {
  width: 100%;
}

/* Sections — light scrim so the graph wash remains visible, text rides on cards/panels */
.section {
  padding: 3.5rem 0;
  background: rgb(248 250 252 / 0.55);
}

html.dark .section {
  background: rgb(2 6 23 / 0.55);
}

.section--alt {
  background: rgb(255 255 255 / 0.62);
  border-block: 1px solid rgb(226 232 240 / 0.55);
}

html.dark .section--alt {
  background: rgb(15 23 42 / 0.62);
  border-block: 1px solid var(--border);
}

@supports (background: color-mix(in srgb, white 55%, transparent)) {
  .section {
    background: color-mix(in srgb, var(--bg) 55%, transparent);
  }

  html.dark .section {
    background: color-mix(in srgb, var(--bg) 55%, transparent);
  }

  .section--alt {
    background: color-mix(in srgb, var(--bg-elevated) 62%, transparent);
  }

  html.dark .section--alt {
    background: color-mix(in srgb, #0f172a 62%, transparent);
  }
}

/* Map/stuck band: same light scrim as default (readability via local panels below) */
.section--map {
  background: rgb(248 250 252 / 0.5);
}

html.dark .section--map {
  background: rgb(2 6 23 / 0.5);
}

@supports (background: color-mix(in srgb, white 50%, transparent)) {
  .section--map {
    background: color-mix(in srgb, var(--bg) 50%, transparent);
  }

  html.dark .section--map {
    background: color-mix(in srgb, var(--bg) 50%, transparent);
  }
}

/* Soft halo on free-floating headings/leads (not brand CTAs) so graph can stay visible */
.section:not(.section--brand) > .container > h1,
.section:not(.section--brand) > .container > h2,
.section:not(.section--brand) > .container > h3,
.section:not(.section--brand) > .container > .lead,
.section:not(.section--brand) > .container > .system-closing,
.map-split__copy > h3,
.map-split__copy > .lead {
  text-shadow:
    0 0 12px var(--bg),
    0 0 24px var(--bg),
    0 1px 0 rgb(248 250 252 / 0.35);
}

html.dark .section:not(.section--brand) > .container > h1,
html.dark .section:not(.section--brand) > .container > h2,
html.dark .section:not(.section--brand) > .container > h3,
html.dark .section:not(.section--brand) > .container > .lead,
html.dark .section:not(.section--brand) > .container > .system-closing,
html.dark .map-split__copy > h3,
html.dark .map-split__copy > .lead {
  text-shadow:
    0 0 14px rgb(2 6 23 / 0.95),
    0 0 28px rgb(2 6 23 / 0.9);
}

/* Bullet lists in Knowledge Tree copy: panel so wash doesn't cut through */
.map-split__copy .check-list {
  padding: 0.85rem 1rem;
  background: rgb(255 255 255 / 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

html.dark .map-split__copy .check-list {
  background: rgb(15 23 42 / 0.88);
}

.section--brand {
  background: linear-gradient(145deg, #0c4a6e, #0284c7 55%, #0ea5e9);
  color: #f8fafc;
}

html.dark .section--brand {
  background: linear-gradient(145deg, #020617, #0c4a6e 50%, #0369a1);
}

.section--brand a:not(.btn) {
  color: #e0f2fe;
}

.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-600);
  margin: 0 0 0.5rem;
}

.section--brand .section__eyebrow {
  color: #bae6fd;
}

.section h1,
.section h2 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.section--brand h1,
.section--brand h2 {
  color: #f8fafc;
}

.section h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.lead {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 42rem;
}

.section--brand .lead {
  color: rgb(248 250 252 / 88%);
}

.muted {
  color: var(--ink-muted);
}

.tiny {
  font-size: 0.875rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 3rem;
}

.hero__grid {
  display: grid;
  gap: 2rem;
  align-items: start;
  /* Always stack: copy first, product preview below (mock needs width) */
  grid-template-columns: 1fr;
}

.hero__grid > :first-child {
  max-width: 42rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.hero__trust {
  margin: 0.65rem 0 0;
}

.hero__disclaimer {
  font-size: 0.875rem;
  color: var(--ink-subtle);
  max-width: 36rem;
}

.hero__promise {
  margin: 0.85rem 0 0;
  max-width: 38rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--brand-500);
  background: var(--brand-50);
  border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
  line-height: 1.45;
}

html.dark .hero__promise {
  background: rgba(14, 165, 233, 0.12);
}

.outcome-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .outcome-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .outcome-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.outcome-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  border-top: 3px solid var(--brand-500);
  height: 100%;
}

.outcome-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  color: var(--brand-700);
  letter-spacing: -0.01em;
}

.outcome-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* App-shaped product mock (legacy hero card styles; hero now uses .app-ui) */
.app-mock {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.app-mock__nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.app-mock__brand {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-700);
  white-space: nowrap;
}

.app-mock__nav-links {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--ink-subtle);
}

.app-mock__nav-links span {
  padding: 0.3rem 0.45rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

.app-mock__nav-links span.is-active {
  background: var(--brand-50);
  color: #0c4a6e;
  font-weight: 600;
}

html.dark .app-mock__nav-links span.is-active {
  color: #e0f2fe;
}

.app-mock__nav-cta {
  margin-left: auto;
  background: var(--brand-600);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}

@media (min-width: 520px) {
  .app-mock__nav-links {
    display: flex;
  }
}

.app-mock__body {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
}

@media (min-width: 640px) {
  .app-mock__body {
    grid-template-columns: 1.45fr 0.85fr;
  }
}

.app-mock__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.app-mock__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.app-mock__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.app-mock__chip {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid rgb(14 165 233 / 20%);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.app-mock__bars {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.app-mock__bar {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

html.dark .app-mock__bar {
  background: #1e293b;
}

.app-mock__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.app-mock__bar--core span {
  background: linear-gradient(90deg, #34d399, #059669);
}

.app-mock__item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
  margin-top: 0.4rem;
}

html.dark .app-mock__item {
  background: #020617;
}

.app-mock__item--approved {
  background: #f0fdf4;
  border-color: rgb(16 185 129 / 25%);
}

html.dark .app-mock__item--approved {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.app-mock__item strong {
  display: block;
  font-size: 0.78rem;
  color: var(--ink);
  font-weight: 600;
}

.app-mock__item small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.68rem;
  color: var(--ink-subtle);
}

.app-mock__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.app-mock__dot--sky { background: #0ea5e9; }
.app-mock__dot--emerald { background: #10b981; }
.app-mock__dot--violet { background: #8b5cf6; }

.app-mock__side {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.app-mock__mini {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.8rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.app-mock__mini-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.2rem;
}

.app-mock__mini strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
}

.app-mock__mini small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* Lists / grids */
.pain-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.pain-list li {
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  height: 100%;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.feature-card--benefit {
  border-top: 3px solid var(--brand-500);
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.feature-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.feature-card__benefit {
  margin-top: 0.85rem !important;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--ink) !important;
  font-size: 0.9rem !important;
}

.feature-card__benefit-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 0.25rem;
}

.feature-grid--rich {
  gap: 1.1rem;
}

@media (min-width: 1000px) {
  .feature-grid--rich {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* System loop — how pieces connect */
.system-intro {
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-weight: 500;
  max-width: 42rem;
}

.system-flow {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: none;
}

.system-flow__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.system-flow__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.system-flow__item h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
  color: var(--ink);
}

.system-flow__item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.system-closing {
  margin: 1.35rem 0 0;
  max-width: 46rem;
  padding: 1rem 1.15rem;
  background: var(--brand-50);
  border: 1px solid rgb(14 165 233 / 22%);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

html.dark .system-closing {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
}

/* Knowledge-tree diagnostic insight */
.insight-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .insight-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.insight-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1.15rem;
  background: var(--bg-elevated);
  height: 100%;
}

.insight-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.insight-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.insight-card--before {
  border-top: 3px solid #94a3b8;
}

.insight-card--after {
  border-top: 3px solid var(--brand-500);
  background: var(--brand-50);
}

html.dark .insight-card--after {
  background: rgba(14, 165, 233, 0.1);
}

.insight-example {
  margin-top: 1.25rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.insight-example h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.insight-example__label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-700);
  margin-bottom: 0.3rem;
}

.insight-example__target {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
}

.insight-example__list {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink-muted);
}

.insight-example__list li + li {
  margin-top: 0.3rem;
}

.steps {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  counter-reset: step;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .steps--five {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 800px) and (max-width: 1100px) {
  .steps--five {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

html.dark .step {
  background: #020617;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.step h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
  align-items: stretch;
}

@media (min-width: 800px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pricing-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pricing-card--featured {
  border-color: rgb(14 165 233 / 45%);
  box-shadow: 0 0 0 1px rgb(14 165 233 / 20%), var(--shadow);
}

.pricing-card__badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid rgb(14 165 233 / 22%);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.pricing-card__name {
  font-weight: 700;
  color: var(--brand-700);
  font-size: 1.1rem;
}

.pricing-card__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 0.15rem;
  color: var(--ink);
}

.pricing-card__note {
  font-size: 0.85rem;
  color: var(--ink-subtle);
  margin: 0 0 0.75rem;
}

.pricing-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--ink-muted);
  flex: 1;
}

.pricing-card li + li {
  margin-top: 0.35rem;
}

.pricing-more,
.pricing-disclaimer {
  margin-top: 1rem;
}

.pricing-disclaimer {
  max-width: 46rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  max-width: 46rem;
}

.faq details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  margin-bottom: 0.5rem;
  color: var(--brand-700);
}

.faq p {
  margin: 0;
  color: var(--ink-muted);
}

/* Final CTA */
.final-cta {
  text-align: center;
}

.final-cta .lead {
  margin-inline: auto;
}

.final-cta .hero__actions {
  justify-content: center;
}

.final-cta .btn--secondary {
  color: #fff;
  border-color: rgb(255 255 255 / 45%);
  background: transparent;
}

.final-cta .btn--secondary:hover {
  border-color: #fff;
  color: #fff;
  background: rgb(255 255 255 / 10%);
}

/* Comparison */
.compare-wrap {
  margin-top: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 36rem;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.85rem;
}

html.dark .compare-table thead th {
  background: rgba(14, 165, 233, 0.14);
  color: #7dd3fc;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  width: 28%;
}

.compare-table td.is-highlight {
  background: rgb(14 165 233 / 8%);
  font-weight: 600;
  color: var(--brand-700);
}

html.dark .compare-table td.is-highlight {
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Testimonials */
.story-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .story-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.story-card {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  height: 100%;
}

.story-card blockquote {
  margin: 0 0 0.85rem;
}

.story-card blockquote p {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.story-card figcaption {
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.story-card__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

html.dark .story-card__badge {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
}

/* Pricing page */
.pricing-page__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

@media (min-width: 860px) {
  .pricing-page__grid {
    grid-template-columns: minmax(16rem, 22rem) 1fr;
  }
}

.pricing-page__aside h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

/* Waitlist */
.waitlist {
  max-width: 32rem;
}

.waitlist__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--ink);
}

.waitlist__lead {
  margin-top: 0;
}

.waitlist__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0.65rem;
}

.waitlist__input {
  flex: 1 1 14rem;
  min-height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 0.55rem 0.9rem;
  font: inherit;
  background: var(--bg-elevated);
  color: var(--ink);
}

.waitlist__input:focus {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--brand-500);
}

.waitlist__error {
  color: var(--danger);
  font-weight: 600;
}

.waitlist__success {
  color: var(--ok);
  font-weight: 600;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Legal pages */
.prose {
  max-width: 42rem;
}

.prose h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.prose h2 {
  font-size: 1.15rem;
  margin-top: 1.75rem;
  color: var(--ink);
}

.prose p,
.prose li {
  color: var(--ink-muted);
}

.draft-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius-btn);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 1rem 0 1.25rem;
}

/* Footer — slate-900 like app chrome */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0f172a;
  color: #e2e8f0;
  padding: 2.5rem 0 2rem;
}

html.dark .site-footer {
  background: #020617;
  border-top-color: #1e293b;
}

.site-footer a {
  color: #7dd3fc;
}

.site-footer a:hover {
  color: #bae6fd;
}

.site-footer__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.site-footer__disclaimer {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
  max-width: 40rem;
}

.site-footer__meta {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #64748b;
}

/* Theme toggle (same interaction model as app theme.css) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.15rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}

.theme-toggle:not(.theme-toggle--labeled) .theme-toggle-text {
  display: none;
}

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  border: none;
  background: transparent;
  color: var(--ink-subtle);
  cursor: pointer;
  line-height: 1;
  font-size: 0.85rem;
  padding: 0 0.35rem;
}

.theme-toggle button:hover {
  color: var(--ink);
  background: var(--border);
}

.theme-toggle button[aria-pressed="true"] {
  background: var(--bg-elevated);
  color: var(--brand-600);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

html.dark .theme-toggle button[aria-pressed="true"] {
  background: #020617;
  color: #38bdf8;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4);
}

.theme-toggle button:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 1px;
}

/* —— Production polish: curriculum, tiers, lesson, carousel —— */

.check-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  max-width: 42rem;
}

.check-list li {
  position: relative;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink-muted);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0.9rem;
  top: 0.75rem;
  color: var(--ok);
  font-weight: 700;
}

.curriculum-primary {
  margin-top: 1.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.curriculum-primary h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--ink);
}

.curriculum-primary > p {
  margin: 0;
  color: var(--ink-muted);
}

.principle-box {
  margin-top: 1.5rem;
  padding: 1.2rem 1.35rem;
  background: var(--brand-50);
  border: 1px solid rgb(14 165 233 / 22%);
  border-radius: var(--radius);
  max-width: 46rem;
}

html.dark .principle-box {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
}

.principle-box h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--brand-700);
}

.principle-box p {
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
}

.principle-box__close {
  margin-top: 0.75rem !important;
  font-weight: 700 !important;
}

/* Tier cards */
.tier-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 800px) {
  .tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tier-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tier-card--featured {
  border-color: rgb(14 165 233 / 45%);
  background: linear-gradient(180deg, var(--brand-50), var(--bg-elevated) 40%);
}

html.dark .tier-card--featured {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.12), var(--bg-elevated) 45%);
}

.tier-card__badge {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--bg-elevated);
  border: 1px solid rgb(14 165 233 / 25%);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.tier-card__name {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.tier-card__tagline {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: var(--brand-700);
  font-size: 0.95rem;
}

.tier-card__body {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.tier-card__list {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--ink-muted);
  flex: 1;
}

.tier-card__list li + li {
  margin-top: 0.4rem;
}

/* Lesson example */
.lesson-example {
  margin-top: 1.5rem;
}

.lesson-example__header {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.lesson-example__label {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}

.lesson-example__detail {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-style: italic;
}

.lesson-example__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .lesson-example__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.lesson-example__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  border-top: 3px solid #94a3b8;
}

.lesson-example__card--assistant {
  border-top-color: var(--brand-500);
  background: var(--brand-50);
}

html.dark .lesson-example__card--assistant {
  background: rgba(14, 165, 233, 0.1);
}

.lesson-example__card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  color: var(--ink);
}

.lesson-example__card p {
  margin: 0 0 0.65rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.lesson-example__nodes {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.lesson-example__closing {
  margin: 0 !important;
  font-weight: 500;
  color: var(--ink) !important;
}

/* Outcomes tier label */
.outcome-card__tier {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.35rem;
}

.outcome-card--assistant {
  border-top-color: #8b5cf6;
}

.outcome-card--assistant .outcome-card__tier {
  color: #7c3aed;
}

html.dark .outcome-card--assistant .outcome-card__tier {
  color: #c4b5fd;
}

/* Map subsection */
.map-subsection {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.map-subsection h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.system-closing {
  margin-top: 1.25rem;
}

.insight-example__label--spaced {
  margin-top: 0.85rem;
}

.compare-footnote {
  margin-top: 1rem;
}

/* Steps four */
@media (min-width: 800px) {
  .steps--four {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Carousel — horizontal track */
.carousel {
  margin-top: 1.5rem;
  outline: none;
}

.carousel:focus-visible {
  box-shadow: var(--focus);
  border-radius: var(--radius);
}

.carousel__stage {
  overflow: hidden;
  width: 100%;
  border-radius: var(--radius);
}

.carousel__track {
  display: flex;
  width: 100%;
  transition: transform 0.35s ease;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .carousel__track {
    transition: none;
  }
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.carousel__caption {
  margin-top: 1rem;
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  padding: 0 0.5rem 0.25rem;
}

.carousel__caption h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.carousel__caption p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}

.carousel__btn {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

.carousel__btn:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
}

.carousel__btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.carousel__dots {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.carousel__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.15s ease, background 0.15s ease;
}

html.dark .carousel__dot {
  background: #475569;
}

.carousel__dot.is-active {
  background: var(--brand-600);
  width: 1.35rem;
}

.carousel__dot:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* Browser frame for product mocks */
.browser-frame {
  background: #e2e8f0; /* slate-200 — matches app chrome around canvas */
  border: 1px solid #cbd5e1;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 48rem;
  margin-inline: auto;
  /* Fixed stage so short/tall mocks share the same footprint (esp. mobile carousel) */
  display: flex;
  flex-direction: column;
}

html.dark .browser-frame {
  background: #1e293b;
  border-color: #334155;
}

.browser-frame__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

html.dark .browser-frame__chrome {
  background: #0f172a;
  border-bottom-color: #334155;
}

.browser-frame__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #cbd5e1;
}

.browser-frame__dot:nth-child(1) { background: #f87171; }
.browser-frame__dot:nth-child(2) { background: #fbbf24; }
.browser-frame__dot:nth-child(3) { background: #34d399; }

.browser-frame__url {
  margin-left: 0.5rem;
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.dark .browser-frame__url {
  background: #1e293b;
  color: #94a3b8;
}

.browser-frame__body {
  padding: 0;
  background: #f8fafc; /* app body bg-slate-50 */
  height: clamp(18rem, 58vw, 24rem);
  min-height: 18rem;
  max-height: 24rem;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

/* Hero mock without browser chrome: same viewport contract */
.hero-visual {
  min-width: 0;
  width: 100%;
  max-width: 52rem;
}

.hero-visual .app-ui {
  height: clamp(18rem, 58vw, 24rem);
  max-height: 24rem;
  border: 1px solid #cbd5e1;
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

html.dark .hero-visual .app-ui {
  border-color: #334155;
}

/* —— App UI mocks (match learn layout: white nav, sky brand, slate cards) —— */
.app-ui {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  height: 100%;
  min-height: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
}

.app-ui__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1;
  flex-shrink: 0;
}

.app-ui__brand {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0369a1; /* brand-700 */
  white-space: nowrap;
  flex-shrink: 0;
}

.app-ui__links {
  display: none;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
}

@media (min-width: 640px) {
  .app-ui__links {
    display: flex;
  }
}

.app-ui__link {
  padding: 0.3rem 0.45rem;
  border-radius: 0.5rem;
  color: #475569;
  white-space: nowrap;
}

.app-ui__link.is-active {
  background: #f0f9ff; /* sky-50 */
  color: #075985; /* sky-800 */
  font-weight: 600;
}

.app-ui__user {
  margin-left: auto;
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-ui__avatar {
  margin-left: auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.app-ui__main {
  padding: 0.85rem 0.9rem 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-ui__page-head {
  margin-bottom: 0.75rem;
}

.app-ui__crumb {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  color: #64748b;
}

.app-ui__h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.app-ui__sub {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.app-ui__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.app-ui__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.app-ui__btn {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  white-space: nowrap;
}

.app-ui__btn--primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #fff;
}

.app-ui__btn--emerald {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.app-ui__btn--violet {
  background: #fff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.app-ui__btn--dark {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.app-ui__btn--ghost {
  background: #fff;
}

.app-ui__status {
  font-weight: 600;
}

.app-ui__status--draft {
  color: #7c3aed;
}

.app-ui__week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  color: #334155;
}

.app-ui__week-arrow {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 1rem;
}

.app-ui__week-center {
  text-align: center;
}

.app-ui__week-label {
  font-weight: 700;
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}

.app-ui__week-sub {
  display: block;
  font-size: 0.68rem;
  color: #0284c7;
  font-weight: 600;
  margin-top: 0.1rem;
}

.app-ui__chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e0f2fe;
  background: #f0f9ff;
  color: #075985;
}

.app-ui__chip--violet {
  background: #f5f3ff;
  border-color: #ede9fe;
  color: #5b21b6;
}

/* Planning layout: main board + overview (matches real 2/3 + 1/3) */
.app-ui__plan-layout {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

@media (min-width: 700px) {
  .app-ui__plan-layout {
    grid-template-columns: 1.65fr 1fr;
    align-items: start;
  }
}

.app-ui__plan-main {
  min-width: 0;
}

.app-ui__plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.app-ui__h2 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.app-ui__help {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  line-height: 1.4;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.45rem 0.55rem;
}

.app-ui__day-col {
  border: 1px solid #f1f5f9;
  border-radius: 0.65rem;
  background: rgb(248 250 252 / 0.55);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.app-ui__day-col:last-child {
  margin-bottom: 0;
}

.app-ui__day-col-head {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  padding: 0.4rem 0.55rem;
  background: rgb(255 255 255 / 0.85);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.app-ui__count {
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
}

.app-ui__activity {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  padding: 0.5rem 0.45rem;
  border-top: 1px solid #f1f5f9;
  background: #fff;
  font-size: 0.72rem;
}

.app-ui__activity.is-suggested {
  background: #faf5ff;
}

.app-ui__grip {
  color: #cbd5e1;
  font-size: 0.65rem;
  line-height: 1;
  padding-top: 0.2rem;
  letter-spacing: -0.08em;
  user-select: none;
  flex-shrink: 0;
}

.app-ui__checkbox {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.25rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #fff;
  background: #fff;
}

.app-ui__checkbox.is-on {
  background: #7c3aed;
  border-color: #7c3aed;
}

.app-ui__activity-body {
  flex: 1;
  min-width: 0;
}

.app-ui__activity-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.app-ui__activity-title strong {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.75rem;
}

.app-ui__badge {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.app-ui__badge--ai {
  background: #ddd6fe;
  color: #5b21b6;
}

.app-ui__badge--tree {
  background: #d1fae5;
  color: #065f46;
}

.app-ui__badge--manual {
  background: #e2e8f0;
  color: #334155;
}

.app-ui__age {
  font-size: 0.58rem;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.08rem 0.35rem;
}

.app-ui__activity-meta {
  margin: 0.2rem 0 0;
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1.35;
}

.app-ui__linkish {
  color: #047857;
  font-weight: 500;
}

.app-ui__overview .app-ui__field {
  margin-top: 0.5rem;
}

.app-ui__overview .app-ui__h2 {
  margin-bottom: 0.15rem;
}

.app-ui__textarea--sm {
  min-height: 2.1rem;
  font-size: 0.7rem;
  color: #94a3b8;
}

.app-ui__tree-link {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: #047857;
  font-weight: 500;
}

.app-ui__hint {
  margin: 0 0 0.45rem;
  font-size: 0.65rem;
  color: #94a3b8;
}

.app-ui__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
  font-size: 0.6rem;
  color: #64748b;
  align-items: center;
}

.app-ui__swatch {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  margin-right: 0.15rem;
  vertical-align: middle;
}

.app-ui__swatch--sky { background: #0ea5e9; }
.app-ui__swatch--emerald { background: #10b981; }
.app-ui__swatch--amber { background: #f59e0b; }

.app-ui__card--tight {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.15rem;
}

.app-ui__checkline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: #334155;
  margin: 0.55rem 0 0.15rem;
}

.app-ui__log-meta {
  font-size: 0.68rem;
  color: #64748b;
  margin: 0.35rem 0 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px solid #f1f5f9;
}

.app-ui__skill-chip {
  margin-top: 0.25rem;
  padding: 0.5rem 0.55rem;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 0.55rem;
}

.app-ui__skill-chip .app-ui__pill {
  margin-bottom: 0.25rem;
}

/* Product page feature flow (ordered tour) */
.product-flow__intro {
  margin-bottom: 0.5rem;
}

.product-flow__closing {
  margin-top: 2rem;
  max-width: 40rem;
}

.product-flow .workflow-step {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.product-flow .workflow-step:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.knowledge-tree-explainer {
  margin: 2rem 0 1.25rem;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.knowledge-tree-explainer > h3 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.knowledge-tree-explainer > p {
  max-width: 42rem;
  color: var(--ink-muted, #475569);
  line-height: 1.55;
}

.knowledge-tree-explainer__build {
  max-width: 42rem;
  margin: 0.85rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--brand-500, #0ea5e9);
  background: var(--brand-50, #f0f9ff);
  border-radius: 0 var(--radius-btn, 0.5rem) var(--radius-btn, 0.5rem) 0;
  color: var(--ink, #0f172a) !important;
  font-weight: 500;
}

.knowledge-tree-explainer__split {
  margin-top: 1.25rem;
}

.knowledge-tree-explainer__split h4 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.knowledge-tree-explainer__q-label {
  margin: 1rem 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}

.knowledge-tree-explainer__questions {
  margin-top: 0.25rem;
}

/* legacy plan-item aliases (unused but keep safe) */
.app-ui__plan-item {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  padding: 0.4rem 0.45rem;
  font-size: 0.68rem;
}

.app-ui__check {
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.25rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  background: #fff;
}

.app-ui__check.is-on {
  background: #7c3aed;
  border-color: #7c3aed;
}

.app-ui__card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.app-ui__card-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-ui__form .app-ui__field + .app-ui__field,
.app-ui__form .app-ui__field-row {
  margin-top: 0.55rem;
}

.app-ui__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.app-ui__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.2rem;
}

.app-ui__input,
.app-ui__textarea,
.app-ui__select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.78rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  color: #1e293b;
}

.app-ui__textarea {
  min-height: 2.8rem;
  line-height: 1.35;
}

.app-ui__photos {
  display: flex;
  gap: 0.35rem;
}

.app-ui__photo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.4rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #bae6fd, #e0e7ff);
}

.app-ui__photo--add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #94a3b8;
  font-weight: 700;
}

.app-ui__form-footer {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.app-ui__alert {
  font-size: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  margin-bottom: 0.65rem;
}

.app-ui__alert--info {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
}

.app-ui__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
}

.app-ui__label-inline {
  color: #475569;
}

.app-ui__select {
  width: auto;
  min-width: 5rem;
  display: inline-block;
}

.app-ui__pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
}

.app-ui__pill--emerald { background: #ecfdf5; color: #047857; }
.app-ui__pill--sky { background: #f0f9ff; color: #0369a1; }
.app-ui__pill--violet { background: #f5f3ff; color: #6d28d9; }
.app-ui__pill.is-selected { background: #7c3aed; color: #fff; }

.app-ui__topic {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-top: 1px solid #f1f5f9;
  font-size: 0.78rem;
}

.app-ui__topic:first-child {
  border-top: 0;
  padding-top: 0.15rem;
}

.app-ui__topic strong {
  display: block;
  color: #1e293b;
}

.app-ui__topic small {
  display: block;
  color: #64748b;
  margin-top: 0.1rem;
  font-size: 0.7rem;
}

.app-ui__topic-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.app-ui__topic-badge--ready { background: #f5f3ff; color: #6d28d9; }
.app-ui__topic-badge--learning { background: #f0f9ff; color: #0369a1; }
.app-ui__topic-badge--mastered { background: #ecfdf5; color: #047857; }

.app-ui__student-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.app-ui__student-name {
  font-size: 1rem;
  color: #1e293b;
}

.app-ui__mini-btn {
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #fff;
}

.app-ui__mini-btn--sky {
  background: #f0f9ff;
  border-color: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}

.app-ui__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.app-ui__section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 0.4rem;
}

.app-ui__bar-block {
  margin-bottom: 0.55rem;
}

.app-ui__bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: #334155;
  margin-bottom: 0.2rem;
}

.app-ui__bar {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.app-ui__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f59e0b; /* amber mid progress */
}

.app-ui__bar--core span {
  background: #0ea5e9;
}

.app-ui__bar--ok span {
  background: #10b981;
}

.app-ui__disclaimer {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.65rem;
  font-style: italic;
  color: #94a3b8;
}

.app-ui__today {
  margin-top: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f1f5f9;
  background: rgb(248 250 252 / 0.5);
  border-radius: 0.5rem;
  padding: 0.55rem;
}

.app-ui__footnote {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.app-ui__transcript-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}

.app-ui__gpa {
  text-align: right;
}

.app-ui__gpa-label {
  display: block;
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.app-ui__gpa-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.app-ui__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.app-ui__table th {
  text-align: left;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.app-ui__table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.app-ui__table tr:last-child td {
  border-bottom: 0;
}

/* —— Alex / Assistant mock extras —— */
.app-ui__on-track {
  display: inline-flex;
  align-items: center;
  font-size: 0.58rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.35rem;
}

.app-ui__bar--multi {
  background: linear-gradient(90deg, #22c55e 0%, #3b82f6 25%, #f59e0b 50%, #ec4899 75%, #8b5cf6 100%);
  opacity: 0.85;
  border-radius: 999px;
  height: 100%;
}

.app-ui__plan-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
}

.app-ui__plan-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.app-ui__plan-row:last-child {
  border-bottom: 0;
}

.app-ui__plan-row strong {
  display: block;
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 600;
}

.app-ui__plan-row p {
  margin: 0.2rem 0 0;
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1.35;
}

.app-ui__ready-panel {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 0.75rem;
  padding: 0.65rem;
}

.app-ui__ready-panel > h4 {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
}

.app-ui__ready-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 420px) {
  .app-ui__ready-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.app-ui__ready-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.55rem 0.6rem;
}

.app-ui__ready-card strong {
  display: block;
  font-size: 0.75rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.3;
}

.app-ui__ready-card small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.3;
}

.app-ui__ready-card .app-ui__btn {
  margin-top: 0.45rem;
  font-size: 0.65rem;
  padding: 0.25rem 0.5rem;
}

.app-ui__schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 520px) {
  .app-ui__schedule-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  /* Reflection stays visible while the week plan scrolls in the mock viewport */
  .app-ui__schedule-grid .app-ui__reflect {
    position: sticky;
    top: 0;
  }
}

.app-ui__week-plan .app-ui__day-section-head {
  margin: 0.75rem 0 0.25rem;
  padding: 0.35rem 0.5rem;
  background: #e2e8f0;
  border-radius: 0.4rem;
  font-weight: 600;
  font-size: 0.72rem;
  color: #334155;
}

.app-ui__week-plan .app-ui__day-section-head:first-of-type {
  margin-top: 0.15rem;
}

.app-ui__week-plan .app-ui__plan-row {
  padding-left: 0.15rem;
  padding-right: 0.15rem;
}

.app-ui__reflect {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.65rem 0.7rem;
}

.app-ui__reflect h4 {
  margin: 0 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.app-ui__reflect-block {
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 0.55rem;
  margin-bottom: 0.45rem;
  border: 1px solid #f1f5f9;
}

.app-ui__reflect-block p {
  margin: 0;
  font-size: 0.65rem;
  color: #475569;
  line-height: 1.4;
}

.app-ui__reflect-block ul {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  font-size: 0.65rem;
  color: #475569;
  line-height: 1.4;
}

.app-ui__coach {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.app-ui__coach-head {
  padding: 0.55rem 0.7rem 0.35rem;
  border-bottom: 1px solid #f1f5f9;
}

.app-ui__coach-head .app-ui__crumb {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.62rem;
}

.app-ui__coach-banner {
  margin: 0.55rem 0.7rem;
  padding: 0.55rem 0.65rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 0.6rem;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  justify-content: space-between;
}

.app-ui__coach-banner strong {
  display: block;
  font-size: 0.78rem;
  color: #9a3412;
  margin-bottom: 0.15rem;
}

.app-ui__coach-banner p {
  margin: 0;
  font-size: 0.65rem;
  color: #9a3412;
  line-height: 1.35;
  max-width: 28rem;
}

.app-ui__btn--amber {
  background: #ea580c;
  color: #fff;
  border-color: #ea580c;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-ui__coach-body {
  padding: 0 0.7rem 0.7rem;
}

.app-ui__coach-body h4 {
  margin: 0.5rem 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.app-ui__coach-body > p {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  color: #334155;
  line-height: 1.45;
}

.app-ui__coach-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.55rem;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.45rem;
}

.app-ui__coach-card strong {
  display: block;
  font-size: 0.78rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.app-ui__coach-card p {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  color: #475569;
  line-height: 1.4;
}

.app-ui__coach-card a,
.app-ui__coach-card .app-ui__linkish {
  display: block;
  font-size: 0.68rem;
  color: #7c3aed;
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Assistant workflow page */
.workflow-step {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
  align-items: start;
}

@media (min-width: 900px) {
  .workflow-step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.75rem;
  }

  .workflow-step--reverse {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .workflow-step--reverse .workflow-step__copy {
    order: 2;
  }
}

.workflow-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--brand-100, #e0f2fe);
  color: var(--brand-700, #0369a1);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.workflow-step__copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.workflow-step__copy p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.layer-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}

@media (min-width: 720px) {
  .layer-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.layer-card {
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.layer-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.layer-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.layer-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700, #0369a1);
}

.final-cta__legal {
  margin-top: 1.25rem;
  opacity: 0.9;
}

.final-cta__legal a {
  color: #e0f2fe;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Pricing page full-width dual cards */
.pricing-page__grid {
  display: block;
}

/* Nav denser links on tablet */
@media (min-width: 860px) and (max-width: 1100px) {
  .site-nav {
    gap: 0.55rem;
  }

  .site-nav a:not(.btn) {
    font-size: 0.88rem;
  }
}

/* —— Short home: differentiators, links, product jump nav —— */
.diff-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 720px) {
  .diff-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.diff-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.diff-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.diff-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.home-links {
  margin-top: 1.25rem;
  text-align: center;
}

.home-links a {
  color: var(--brand-700);
  font-weight: 600;
  text-decoration: none;
}

html.dark .home-links a {
  color: #38bdf8;
}

.home-links a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.home-links__sep {
  margin: 0 0.5rem;
  color: var(--ink-subtle);
}

.page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.page-jump a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

html.dark .page-jump a {
  color: #38bdf8;
}

.page-jump a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-hero h1 {
  margin-bottom: 0.5rem;
}

/* Sticky mobile trial CTA — conversion without scrolling to footer */
.mobile-cta {
  display: none;
}

@media (max-width: 859px) {
  body {
    padding-bottom: 4.75rem;
  }

  .mobile-cta {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -12px rgb(15 23 42 / 0.2);
  }

  .mobile-cta__btn {
    display: flex;
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
}

/* —— Site-wide faint graph wash (layout) + Knowledge Tree foreground mock —— */
.site-graph-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  color: #0284c7; /* sky-600 */
  /* Soft center emphasis; keeps wash out of the corners a bit */
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 10%, transparent 72%);
}

html.dark .site-graph-bg {
  color: #38bdf8;
}

.site-graph-bg__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/*
 * Visible atmosphere, not chrome. Lit is clearly brighter than dim for scroll,
 * but body copy sits on cards/panels + soft text-shadow rather than a heavy scrim.
 */
.site-graph-bg__edge,
.site-graph-bg__node {
  opacity: 0.1;
  transition: opacity 0.55s ease, stroke-width 0.55s ease;
}

.site-graph-bg__edge {
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-graph-bg__edge--soft {
  stroke-width: 0.95;
  stroke-dasharray: 2.5 4;
}

.site-graph-bg__edge.is-lit {
  opacity: 0.32;
  stroke-width: 1.4;
}

.site-graph-bg__edge--soft.is-lit {
  opacity: 0.22;
  stroke-width: 1.05;
}

.site-graph-bg__node.is-lit {
  opacity: 0.4;
}

.site-graph-bg__node--hub.is-lit {
  opacity: 0.48;
}

html.dark .site-graph-bg__edge,
html.dark .site-graph-bg__node {
  opacity: 0.12;
}

html.dark .site-graph-bg__edge.is-lit {
  opacity: 0.38;
}

html.dark .site-graph-bg__edge--soft.is-lit {
  opacity: 0.26;
}

html.dark .site-graph-bg__node.is-lit {
  opacity: 0.48;
}

html.dark .site-graph-bg__node--hub.is-lit {
  opacity: 0.55;
}

/* No pulse — animation drew the eye through prose */
@media (prefers-reduced-motion: reduce) {
  .site-graph-bg__edge,
  .site-graph-bg__node {
    transition: none;
  }
}

/* Keep page chrome above the fixed wash (do not override sticky header position) */
main,
.site-footer,
.skip-link {
  position: relative;
  z-index: 1;
}

/* .site-header already sticky + z-index: 50; .mobile-cta already fixed + z-index: 60 */

.section--map {
  position: relative;
}

.map-split {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .map-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2rem;
    align-items: center;
  }
}

.map-split__copy .lead {
  margin-bottom: 0.85rem;
}

/* Foreground graph mock */
.map-graph {
  margin: 0;
}

.map-graph__frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-graph__chrome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
}

.map-graph__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #cbd5e1;
}

html.dark .map-graph__dot {
  background: #475569;
}

.map-graph__dot:nth-child(1) { background: #f87171; }
.map-graph__dot:nth-child(2) { background: #fbbf24; }
.map-graph__dot:nth-child(3) { background: #34d399; }

.map-graph__chrome-label {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.map-graph__svg {
  display: block;
  width: 100%;
  height: auto;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgb(14 165 233 / 0.06), transparent 70%),
    var(--bg-elevated);
}

html.dark .map-graph__svg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgb(56 189 248 / 0.08), transparent 70%),
    var(--bg-elevated);
}

.map-graph__arrow {
  fill: #94a3b8;
}

html.dark .map-graph__arrow {
  fill: #64748b;
}

.map-graph__edge {
  stroke-width: 1.75;
  stroke-linecap: round;
}

.map-graph__edge--lit {
  stroke: #94a3b8;
  opacity: 0.9;
}

.map-graph__edge--soft {
  stroke: #7dd3fc;
  opacity: 0.75;
}

.map-graph__edge--dim {
  stroke: #cbd5e1;
  opacity: 0.55;
  stroke-dasharray: 4 4;
}

html.dark .map-graph__edge--lit {
  stroke: #64748b;
}

html.dark .map-graph__edge--soft {
  stroke: #38bdf8;
  opacity: 0.55;
}

html.dark .map-graph__edge--dim {
  stroke: #475569;
  opacity: 0.7;
}

.map-graph__node circle {
  stroke-width: 2;
}

.map-graph__node text {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font);
  fill: var(--ink-muted);
}

.map-graph__node--done circle {
  fill: #ecfdf5;
  stroke: #059669;
}

.map-graph__node--learning circle {
  fill: #f0f9ff;
  stroke: #0284c7;
}

.map-graph__node--ready circle {
  fill: #f5f3ff;
  stroke: #7c3aed;
}

.map-graph__node--later circle {
  fill: #f8fafc;
  stroke: #cbd5e1;
}

html.dark .map-graph__node--done circle {
  fill: rgba(16, 185, 129, 0.15);
  stroke: #34d399;
}

html.dark .map-graph__node--learning circle {
  fill: rgba(14, 165, 233, 0.15);
  stroke: #38bdf8;
}

html.dark .map-graph__node--ready circle {
  fill: rgba(124, 58, 237, 0.18);
  stroke: #a78bfa;
}

html.dark .map-graph__node--later circle {
  fill: #0f172a;
  stroke: #475569;
}

html.dark .map-graph__node--later text {
  fill: #64748b;
}

.map-graph__node--later {
  opacity: 0.72;
}

.map-graph__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0.55rem 0.85rem 0.7rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.map-graph__legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.map-graph__swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.map-graph__swatch--done {
  background: #ecfdf5;
  border-color: #059669;
}

.map-graph__swatch--learning {
  background: #f0f9ff;
  border-color: #0284c7;
}

.map-graph__swatch--ready {
  background: #f5f3ff;
  border-color: #7c3aed;
}

.map-graph__swatch--later {
  background: #f8fafc;
  border-color: #cbd5e1;
}

html.dark .map-graph__swatch--done {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
}

html.dark .map-graph__swatch--learning {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
}

html.dark .map-graph__swatch--ready {
  background: rgba(124, 58, 237, 0.25);
  border-color: #a78bfa;
}

html.dark .map-graph__swatch--later {
  background: #0f172a;
  border-color: #475569;
}

.map-graph__caption {
  margin: 0.5rem 0 0;
  text-align: center;
}

@media (max-width: 640px) {
  .map-graph__node text {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-graph__node--ready circle {
    filter: none;
  }
}
