/**
 * Homeschool Atlas 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 {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-700);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.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 */
.section {
  padding: 3.5rem 0;
}

.section--alt {
  background: var(--bg-elevated);
}

html.dark .section--alt {
  background: #0f172a;
  border-block: 1px solid var(--border);
}

.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: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
  }
}

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

.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 (mirrors learn nav + card UI) */
.hero-visual {
  min-width: 0;
}

.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-card {
  margin-top: 1.5rem;
  max-width: 28rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

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

.pricing-card__price {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0.35rem 0;
  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);
}

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

/* 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;
}
