/* ==========================================================================
   Parentory — website stylesheet
   All design tokens live in :root below and mirror design.md.
   Accessibility adjustments (documented, so the app can mirror them):
   - --text-secondary #5E6561 replaces Muted Gray #8C918D for readable
     secondary text. Muted Gray on Ivory is 2.84:1 (fails AA); #5E6561 is
     5.30:1 on Ivory, 5.98:1 on White, 5.03:1 on Light Sage.
     Muted Gray is kept as --muted for borders/decoration/disabled only.
   - Semantic colours are used for dots, icons and tinted backgrounds, never
     as small text on light surfaces. Darker "-ink" variants exist for the
     rare case they must be text (all >= 4.7:1 on Ivory).
   - Dark mode semantic colours are lightened (>= 5.2:1 on #24332D).
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Primary palette */
  --forest: #203b36;          /* Deep Forest — primary actions, accents */
  --ivory: #f4f1e9;           /* Warm Ivory — main background */
  --sand: #d5a879;            /* Soft Sand — secondary highlight */
  --sage: #8da99a;            /* Sage — positive states (graphics only) */
  --charcoal: #343a39;        /* Primary text */
  --muted: #8c918d;           /* Muted Gray — decoration / borders only */
  --light-sage: #e7ede7;      /* Highlighted sections */
  --white: #ffffff;           /* Elevated cards */

  /* Semantic */
  --completed: #648c78;
  --upcoming: #c69a58;
  --missed: #b96f67;
  --modified: #8799a5;
  --information: #668d9b;
  --completed-ink: #4a7360;
  --upcoming-ink: #8a6428;
  --missed-ink: #9a5048;
  --modified-ink: #5a6b77;
  --information-ink: #4a6f7c;

  /* Roles (light) */
  --bg: var(--ivory);
  --surface: var(--white);
  --surface-2: var(--light-sage);
  --text: var(--charcoal);
  --text-secondary: #5e6561;   /* AA-adjusted secondary text */
  --heading: var(--forest);
  --primary: var(--forest);
  --on-primary: var(--ivory);
  --accent: var(--sand);
  --border: rgba(32, 59, 54, 0.12);
  --border-strong: rgba(32, 59, 54, 0.24);
  --field-border: #7d847f;     /* 3.4:1 on white — visible input boundary */
  --focus: #203b36;
  --focus-halo: rgba(213, 168, 121, 0.55);
  --band-bg: var(--forest);
  --band-text: var(--ivory);
  --band-text-secondary: #c9d4cc;
  --tint-completed: rgba(100, 140, 120, 0.16);
  --tint-upcoming: rgba(198, 154, 88, 0.18);
  --tint-missed: rgba(185, 111, 103, 0.16);
  --tint-modified: rgba(135, 153, 165, 0.18);
  --tint-info: rgba(102, 141, 155, 0.16);
  --shadow-soft: 0 1px 2px rgba(32, 59, 54, 0.04), 0 8px 24px rgba(32, 59, 54, 0.06);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-label: 0.75rem;      /* 12 — small labels, medium */
  --fs-small: 0.875rem;     /* 14 — secondary text */
  --fs-body: 1rem;          /* 16 — body */
  --fs-lede: 1.125rem;      /* 18 */
  --fs-card: 1.0625rem;     /* 17 — card heading */
  --fs-section: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem);   /* 26 → 36 */
  --fs-hero: clamp(2.25rem, 1.4rem + 3.8vw, 3.5rem);        /* 36 → 56 */
  --fs-stat: 2rem;          /* 32 — main statistics */
  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-body: 1.6;

  /* Spacing — 4px grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* Radii */
  --r-button: 10px;
  --r-input: 12px;
  --r-card: 16px;
  --r-card-lg: 20px;
  --r-sheet: 24px;
  --r-pill: 999px;

  /* Layout */
  --gutter: var(--s-4);
  --container: 1120px;
  --prose: 720px;
  --header-h: 64px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 150ms;
  --dur: 240ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17221f;
    --surface: #24332d;
    --surface-2: #2c3c35;
    --text: #f2f0e9;
    --text-secondary: #aebab1;
    --heading: #f2f0e9;
    --primary: #9db6a4;
    --on-primary: #17221f;
    --accent: #d5a879;
    --border: rgba(242, 240, 233, 0.1);
    --border-strong: rgba(242, 240, 233, 0.2);
    --field-border: #7e8d84;
    --focus: #d5a879;
    --focus-halo: rgba(213, 168, 121, 0.35);
    --band-bg: #24332d;
    --band-text: #f2f0e9;
    --band-text-secondary: #aebab1;
    --completed: #8fb7a0;
    --upcoming: #d9b27a;
    --missed: #d4938b;
    --modified: #a9b9c4;
    --information: #8fb3c0;
    --completed-ink: #8fb7a0;
    --upcoming-ink: #d9b27a;
    --missed-ink: #d4938b;
    --modified-ink: #a9b9c4;
    --information-ink: #8fb3c0;
    --tint-completed: rgba(143, 183, 160, 0.16);
    --tint-upcoming: rgba(217, 178, 122, 0.16);
    --tint-missed: rgba(212, 147, 139, 0.16);
    --tint-modified: rgba(169, 185, 196, 0.16);
    --tint-info: rgba(143, 179, 192, 0.16);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2);
  }
}

@media (min-width: 640px) {
  :root { --gutter: var(--s-6); }
}
@media (min-width: 1024px) {
  :root { --gutter: var(--s-8); }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; }
svg.icon { width: 24px; height: 24px; flex: none; }
svg.icon-sm { width: 18px; height: 18px; flex: none; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-hero); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-section); letter-spacing: -0.02em; }
h3 { font-size: var(--fs-card); line-height: var(--lh-snug); letter-spacing: -0.005em; }
p { margin: 0; }
p + p { margin-top: var(--s-4); }

a {
  color: var(--heading);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-halo);
  border-radius: 4px;
}

.num { font-variant-numeric: tabular-nums; }

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-button);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
@supports not (background: color-mix(in srgb, red 50%, transparent)) {
  .site-header { background: var(--bg); }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--heading);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }

.site-nav ul {
  display: flex;
  gap: var(--s-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s-3);
  border-radius: var(--r-button);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--heading); background: var(--surface-2); }

.header-cta { flex: none; }

/* Mobile: nav drops to a second row that can scroll inside itself */
@media (max-width: 759px) {
  .header-inner { flex-wrap: wrap; row-gap: 0; }
  .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    border-top: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 0; }
  .site-nav li:first-child a { padding-left: 0; }
  .site-nav a:hover { background: transparent; text-decoration: underline; }
  .site-nav a[aria-current="page"] { background: transparent; text-decoration: underline; text-decoration-thickness: 2px; }
  .header-cta { padding-inline: var(--s-3); font-size: 0.875rem; }
}
@media (max-width: 359px) {
  .brand { font-size: 1rem; }
  .brand svg { width: 26px; height: 26px; }
  .header-cta { padding-inline: 10px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0 var(--s-5);
  border: 1px solid transparent;
  border-radius: var(--r-button);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--text)); }
.btn-secondary { background: var(--surface); color: var(--heading); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-lg { min-height: 52px; padding-inline: var(--s-6); font-size: 1rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; transform: none; }
.btn .spinner { display: none; }
.btn.is-busy .spinner { display: inline-block; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin 0.8s linear infinite; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Generic section scaffolding ---------- */

.section { padding-block: var(--s-16); }
@media (min-width: 768px) { .section { padding-block: var(--s-24); } }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 640px; margin-bottom: var(--s-10); }
.section-head p { margin-top: var(--s-4); color: var(--text-secondary); font-size: var(--fs-lede); }
.eyebrow {
  display: inline-block;
  margin-bottom: var(--s-3);
  color: var(--text-secondary);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-small);
  font-weight: 500;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--completed);
  flex: none;
}

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

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--heading);
}

/* ---------- Hero ---------- */

.hero { padding-block: var(--s-12) var(--s-16); overflow: hidden; }
.hero-grid { display: grid; gap: var(--s-12); align-items: center; }
@media (min-width: 960px) {
  .hero { padding-block: var(--s-20) var(--s-24); }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-16); }
}
.hero h1 { margin-top: var(--s-5); max-width: 16ch; }
.hero .lede {
  margin-top: var(--s-5);
  color: var(--heading);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
  line-height: var(--lh-snug);
  font-weight: 500;
}
.hero .sub { margin-top: var(--s-4); max-width: 34rem; color: var(--text-secondary); font-size: var(--fs-lede); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin: var(--s-8) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: var(--fs-small);
}
.trust-line li { display: inline-flex; align-items: center; gap: var(--s-2); }
.trust-line svg { color: var(--heading); }

/* ---------- Phone mockup (HTML/CSS rendering of the Home dashboard) ---------- */

.phone-wrap { display: flex; justify-content: center; }
.phone {
  --p-bg: #f4f1e9;
  --p-surface: #ffffff;
  --p-surface-2: #e7ede7;
  --p-text: #343a39;
  --p-text-2: #5e6561;
  --p-forest: #203b36;
  --p-border: rgba(32, 59, 54, 0.1);
  position: relative;
  width: min(100%, 320px);
  margin: 0;
  padding: 10px;
  border-radius: 48px;
  background: #1b2c28;
  box-shadow: 0 0 0 1px rgba(32, 59, 54, 0.25), 0 24px 60px -24px rgba(32, 59, 54, 0.45);
}
@media (prefers-color-scheme: dark) {
  .phone {
    --p-bg: #17221f;
    --p-surface: #24332d;
    --p-surface-2: #2c3c35;
    --p-text: #f2f0e9;
    --p-text-2: #aebab1;
    --p-forest: #9db6a4;
    --p-border: rgba(242, 240, 233, 0.08);
    background: #0e1513;
    box-shadow: 0 0 0 1px rgba(242, 240, 233, 0.12), 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  }
}
.phone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  background: var(--p-bg);
  color: var(--p-text);
  font-size: 12px;
  line-height: 1.35;
}
.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px 4px;
  font-size: 12px;
  font-weight: 600;
}
.ph-island { width: 84px; height: 22px; border-radius: 12px; background: #0e1513; }
.ph-signal { display: flex; gap: 3px; align-items: flex-end; }
.ph-signal i { display: block; width: 3px; background: currentColor; border-radius: 1px; }
.ph-signal i:nth-child(1) { height: 4px; }
.ph-signal i:nth-child(2) { height: 6px; }
.ph-signal i:nth-child(3) { height: 8px; }
.ph-signal b { display: block; width: 18px; height: 9px; margin-left: 4px; border: 1.5px solid currentColor; border-radius: 3px; }
.ph-body { padding: 8px 16px 12px; display: grid; gap: 12px; }
.ph-top { display: flex; justify-content: space-between; align-items: flex-start; }
.ph-hello { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--p-text); line-height: 1.15; }
.ph-hello small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--p-text-2); letter-spacing: 0; }
.ph-avatar {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--p-surface-2);
  color: var(--p-forest);
  font-size: 11px; font-weight: 600;
}
.ph-child {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  font-weight: 500;
}
.ph-child .ini {
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #d5a879; color: #203b36;
  font-size: 10px; font-weight: 700;
}
.ph-child svg { width: 12px; height: 12px; color: var(--p-text-2); }
.ph-card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: 20px;
  padding: 14px;
}
.ph-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--p-text-2); }
.ph-summary { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.ph-ring { position: relative; width: 84px; height: 84px; flex: none; }
.ph-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.ph-ring .track { stroke: var(--p-surface-2); }
.ph-ring .bar { stroke: #648c78; }
@media (prefers-color-scheme: dark) { .ph-ring .bar { stroke: #8fb7a0; } }
.ph-ring-label {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
}
.ph-ring-label strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--p-text); }
.ph-ring-label span { font-size: 9px; color: var(--p-text-2); margin-top: 2px; }
.ph-stats { display: grid; gap: 8px; }
.ph-stat strong { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: var(--p-text); }
.ph-stat span { font-size: 11px; color: var(--p-text-2); }
.ph-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--p-border); font-size: 10px; color: var(--p-text-2); }
.ph-upcoming { display: flex; gap: 12px; align-items: center; }
.ph-cal {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(198, 154, 88, 0.18); color: #8a6428; flex: none;
}
@media (prefers-color-scheme: dark) { .ph-cal { color: #d9b27a; } }
.ph-cal svg { width: 18px; height: 18px; }
.ph-upcoming b { display: block; font-size: 13px; font-weight: 600; color: var(--p-text); }
.ph-upcoming span { color: var(--p-text-2); font-size: 11px; }
.ph-upcoming .when { margin-left: auto; text-align: right; font-weight: 600; font-size: 12px; color: var(--p-text); white-space: nowrap; }
.ph-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ph-act {
  display: grid; justify-items: center; gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  font-size: 10px; font-weight: 500; text-align: center; color: var(--p-text);
}
.ph-act svg { width: 18px; height: 18px; color: var(--p-forest); }
.ph-act.primary {
  grid-column: 1 / -1;
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 11px;
  background: #203b36; color: #f4f1e9; border-color: #203b36;
  font-size: 13px; font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .ph-act.primary { background: #9db6a4; color: #17221f; border-color: #9db6a4; }
}
.ph-act.primary svg { color: currentColor; width: 16px; height: 16px; }
.ph-recent-head { display: flex; justify-content: space-between; align-items: baseline; }
.ph-recent-head b { font-size: 13px; font-weight: 600; color: var(--p-text); }
.ph-recent-head span { font-size: 11px; font-weight: 600; color: var(--p-forest); }
.ph-list { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.ph-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--p-border); }
.ph-list li:first-child { border-top: 0; }
.ph-ev { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; flex: none; }
.ph-ev svg { width: 15px; height: 15px; }
.ph-ev.ok { background: rgba(100, 140, 120, 0.16); color: #4a7360; }
.ph-ev.late { background: rgba(198, 154, 88, 0.18); color: #8a6428; }
.ph-ev.info { background: rgba(102, 141, 155, 0.16); color: #4a6f7c; }
@media (prefers-color-scheme: dark) {
  .ph-ev.ok { color: #8fb7a0; }
  .ph-ev.late { color: #d9b27a; }
  .ph-ev.info { color: #8fb3c0; }
}
.ph-list b { display: block; font-size: 12px; font-weight: 600; color: var(--p-text); }
.ph-list span { display: block; font-size: 10.5px; color: var(--p-text-2); }
.ph-nav {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px 18px;
  border-top: 1px solid var(--p-border);
  background: var(--p-bg);
}
.ph-nav span { display: grid; justify-items: center; gap: 2px; font-size: 9.5px; font-weight: 500; color: var(--p-text-2); }
.ph-nav span svg { width: 18px; height: 18px; }
.ph-nav span.on { color: var(--p-forest); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .ph-ring .bar { animation: ring-in 1.2s var(--ease) 0.3s both; }
}
@keyframes ring-in { from { stroke-dashoffset: 213.6; } }

/* ---------- Problem ---------- */

.scatter { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.problem-grid { display: grid; gap: var(--s-10); }
@media (min-width: 900px) { .problem-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--s-16); } }
.problem-note { color: var(--text-secondary); }
.problem-note strong { color: var(--text); font-weight: 600; }

/* ---------- Steps ---------- */

.steps { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }
.step { position: relative; }
.step-num {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  margin-bottom: var(--s-4);
  border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  font-size: var(--fs-small); font-weight: 700;
}
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--text-secondary); }

/* ---------- Features ---------- */

.features { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); gap: var(--s-5); } }
.feature { display: flex; flex-direction: column; gap: var(--s-3); }
.feature h3 { margin-top: var(--s-1); }
.feature p { color: var(--text-secondary); font-size: 0.9688rem; }
.feature.wide { background: var(--surface-2); }
@media (min-width: 1024px) { .feature.wide { grid-column: span 2; } }
.feature-meta { margin-top: auto; padding-top: var(--s-2); font-size: var(--fs-small); color: var(--text-secondary); }
.calc-demo { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s-2) var(--s-6); margin-top: var(--s-2); }
.calc-demo div strong { display: block; font-size: 1.5rem; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-demo div span { font-size: var(--fs-small); color: var(--text-secondary); }

/* ---------- Solo band ---------- */

.band { background: var(--band-bg); color: var(--band-text); }
.band h2 { color: var(--band-text); }
.band p { color: var(--band-text-secondary); }
.band-grid { display: grid; gap: var(--s-8); align-items: center; }
@media (min-width: 900px) { .band-grid { grid-template-columns: 1.2fr 1fr; gap: var(--s-16); } }
.band-list { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.band-list li {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4);
  border: 1px solid rgba(242, 240, 233, 0.16);
  border-radius: var(--r-card);
  color: var(--band-text);
}
.band-list svg { color: var(--accent); margin-top: 1px; }
.band .eyebrow { color: var(--band-text-secondary); }
.band :focus-visible { outline-color: var(--accent); }

/* ---------- Privacy ---------- */

.privacy-grid { display: grid; gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .privacy-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); } }
.privacy-item { display: flex; gap: var(--s-4); align-items: flex-start; }
.privacy-item h3 { margin-bottom: var(--s-2); }
.privacy-item p { color: var(--text-secondary); font-size: 0.9688rem; }
.honest-note {
  display: flex; gap: var(--s-3); align-items: flex-start;
  margin-top: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-card);
  background: var(--tint-info);
  color: var(--text);
  font-size: 0.9688rem;
}
.honest-note svg { color: var(--information-ink); margin-top: 2px; }
.privacy-more { margin-top: var(--s-6); }

/* ---------- Pricing ---------- */

.pricing { display: grid; gap: var(--s-5); align-items: stretch; }
@media (min-width: 900px) { .pricing { grid-template-columns: 1fr 1.5fr; } }
.plan { display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-8) var(--s-6); }
@media (min-width: 640px) { .plan { padding: var(--s-8); } }
.plan-head h3 { font-size: 1.25rem; }
.plan-head p { margin-top: var(--s-1); color: var(--text-secondary); font-size: var(--fs-small); }
.price { display: flex; align-items: baseline; gap: var(--s-2); }
.price strong { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1; }
.price span { color: var(--text-secondary); font-size: var(--fs-small); }
.plan ul.ticks { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: 0.9688rem; }
.ticks svg { width: 18px; height: 18px; margin-top: 3px; color: var(--completed-ink); flex: none; }
.plan-pro { border: 1.5px solid var(--primary); }
.plan-pro .badge {
  align-self: flex-start;
  padding: 4px var(--s-3);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #203b36;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.price-options { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .price-options { grid-template-columns: repeat(3, 1fr); } }
.price-option {
  padding: var(--s-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-input);
  background: var(--bg);
}
.price-option .term { font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.price-option .amt { display: block; margin-top: var(--s-1); font-size: 1.5rem; font-weight: 700; color: var(--heading); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-option .per { display: block; font-size: var(--fs-small); color: var(--text-secondary); }
.pro-features { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .pro-features { grid-template-columns: 1fr 1fr; } }
.pricing-note {
  display: flex; gap: var(--s-3); align-items: flex-start;
  margin-top: var(--s-6);
  color: var(--text);
}
.pricing-note svg { color: var(--completed-ink); margin-top: 2px; }
.fine { color: var(--text-secondary); font-size: var(--fs-small); }
.plan .btn { align-self: flex-start; }
.plan-spacer { margin-top: auto; }

/* ---------- FAQ ---------- */

.faq { max-width: 820px; display: grid; gap: var(--s-3); }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: 56px;
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--heading);
  border-radius: var(--r-card);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; color: var(--text-secondary); transition: transform var(--dur) var(--ease); flex: none; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { padding: 0 var(--s-5) var(--s-5); color: var(--text); }
.faq .answer p + p { margin-top: var(--s-3); }
.faq-group + .faq-group { margin-top: var(--s-12); }
.faq-group h2 { font-size: 1.25rem; margin-bottom: var(--s-4); }

/* ---------- Forms ---------- */

.form-card { max-width: 640px; }
.signup { display: grid; gap: var(--s-10); align-items: start; }
@media (min-width: 900px) { .signup { grid-template-columns: 1fr 1fr; gap: var(--s-16); } }
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; font-size: 0.9375rem; color: var(--text); }
.field .hint { font-size: var(--fs-small); color: var(--text-secondary); }
.field .optional { font-weight: 400; color: var(--text-secondary); }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--field-border);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* >= 16px prevents iOS zoom */
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.textarea { min-height: 144px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: var(--s-10);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 21px) 50%, calc(100% - 16px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.input:focus-visible, .select:focus-visible, .textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  box-shadow: 0 0 0 5px var(--focus-halo);
  border-radius: var(--r-input);
}
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--missed-ink); border-width: 2px; }
.field-error { display: flex; gap: var(--s-1); align-items: center; color: var(--missed-ink); font-size: var(--fs-small); font-weight: 500; }
.field-error:empty { display: none; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--missed-ink); color: var(--surface); font-size: 11px; font-weight: 700; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-input); font-size: 0.9688rem; }
.form-status.is-visible { display: flex; }
.form-status.success { background: var(--tint-completed); color: var(--text); }
.form-status.success svg { color: var(--completed-ink); }
.form-status.error { background: var(--tint-missed); color: var(--text); }
.form-status.error svg { color: var(--missed-ink); }
.form-status svg { margin-top: 1px; }
.form-legal { font-size: var(--fs-small); color: var(--text-secondary); }
.form-row-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
@media (max-width: 479px) { .form-row-actions .btn { width: 100%; } }
.noscript-note { padding: var(--s-4); border-radius: var(--r-input); background: var(--tint-upcoming); }

/* ---------- Prose (legal pages) ---------- */

.page-head { padding-block: var(--s-12) var(--s-8); }
@media (min-width: 768px) { .page-head { padding-block: var(--s-16) var(--s-10); } }
.page-head h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 2.75rem); }
.page-head p { margin-top: var(--s-4); max-width: 640px; color: var(--text-secondary); font-size: var(--fs-lede); }
.page-head .updated { font-size: var(--fs-small); margin-top: var(--s-3); }

.prose-wrap { padding-bottom: var(--s-20); }
.prose { max-width: var(--prose); }
.prose h2 { margin-top: var(--s-12); margin-bottom: var(--s-4); font-size: 1.375rem; }
.prose h3 { margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose p, .prose li { color: var(--text); }
.prose p + p { margin-top: var(--s-4); }
.prose ul, .prose ol { margin: var(--s-3) 0 0; padding-left: 1.25rem; display: grid; gap: var(--s-2); }
.prose li::marker { color: var(--text-secondary); }
.prose p + ul, .prose ul + p { margin-top: var(--s-4); }
.prose .callout {
  margin-top: var(--s-6);
  padding: var(--s-5);
  border-radius: var(--r-card);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.prose .callout h2 { margin-top: 0; font-size: 1.125rem; }
.prose .callout ul { margin-top: var(--s-3); }
.prose code { font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.toc { margin-top: var(--s-6); padding: var(--s-5); border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface); }
.toc h2 { margin: 0 0 var(--s-3); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); }
.toc ol { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--s-1); columns: 1; }
.toc a { display: inline-block; padding-block: 6px; }

/* ---------- Support ---------- */

.support-grid { display: grid; gap: var(--s-12); padding-bottom: var(--s-20); }
@media (min-width: 1000px) { .support-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-16); align-items: start; } }
.support-aside { display: grid; gap: var(--s-5); }
@media (min-width: 1000px) { .support-aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); } }
.topic-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.topic-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-4); border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); text-decoration: none; font-size: var(--fs-small); font-weight: 500; }
.topic-links a:hover { background: var(--surface-2); }

/* ---------- 404 ---------- */

.notfound { min-height: 60vh; display: grid; align-content: center; justify-items: start; gap: var(--s-5); padding-block: var(--s-20); }
.notfound .icon-tile { width: 56px; height: 56px; border-radius: var(--r-card); }
.notfound p { color: var(--text-secondary); font-size: var(--fs-lede); max-width: 32rem; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding-block: var(--s-12) var(--s-10); background: var(--bg); }
.footer-grid { display: grid; gap: var(--s-8); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.footer-tag { margin-top: var(--s-3); color: var(--text-secondary); font-size: var(--fs-small); max-width: 26rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-2); margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { .footer-links { justify-content: flex-end; } }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); color: var(--text); font-size: var(--fs-small); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); justify-content: space-between; margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--border); color: var(--text-secondary); font-size: var(--fs-small); }
.footer-bottom strong { color: var(--text); font-weight: 600; }

/* ---------- Motion: gentle reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(8px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer, .skip-link, .hero-actions, .phone-wrap { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .prose-wrap { padding-block: 16px; }
}

/* ---------- Small helpers ---------- */
.mt-5 { margin-top: var(--s-5); }
.problem-note { margin-top: var(--s-4); }
.band .sub-band { margin-top: var(--s-5); font-size: var(--fs-lede); }
.sub-plain { margin-top: var(--s-4); color: var(--text-secondary); font-size: var(--fs-lede); }
.waitlist-ticks { display: grid; gap: var(--s-3); margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.form-title { font-size: 1.375rem; margin-bottom: var(--s-2); }
.notfound .hero-actions { margin-top: var(--s-3); }
main:focus, main:focus-visible { outline: none; box-shadow: none; }
.icon-tile { flex: none; }
.feature.wide .icon-tile { background: var(--surface); }
.footer-bottom p { margin: 0; }
.ph-list .ph-ev { display: grid; }
@media (max-width: 759px) {
  .site-header { position: relative; }
  .header-inner { min-height: 0; padding-top: var(--s-2); }
  .site-nav { margin-top: var(--s-2); }
  html { scroll-padding-top: var(--s-4); }
}
@media (max-width: 559px) {
  .privacy-item { flex-direction: column; gap: var(--s-3); }
}
@media (max-width: 559px) {
  .price-option { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: var(--s-4); padding: var(--s-3) var(--s-4); }
  .price-option .amt { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
