/* ==========================================================================
   Faith Alarm — marketing site
   Colors, type, radii and motion are ported directly from the app's design
   tokens (src/theme/tokens.ts). Two paired themes travel together:
     Dawn (morning)  — warm parchment, soft gold        → light scheme
     Vespers (night) — deep navy, candlelight, violet    → dark scheme
   Text-bearing colors are darkened/lightened variants of the same token
   families so every pairing clears WCAG AA.
   ========================================================================== */

/* --- Typefaces (self-hosted, variable) ---------------------------------- */

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader-Regular.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Newsreader';
  src: url('fonts/Newsreader-Italic.ttf') format('truetype');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/DMSans-Regular.ttf') format('truetype');
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens: Dawn (default / light) ------------------------------------- */

:root {
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --bg: #f6f0e2;
  --bg-elev: #fbf7ee;
  --bg-sunken: #ece3cc;
  --fg: #1b1a17;
  --fg2: #4a453b;
  --fg3: #6e675a;
  --fg-quiet: #8a8275;
  --line: #e3d9c0;
  --line-strong: #c9bea1;

  /* Brand gold: --accent paints, --accent-text writes. */
  --accent: #c99b4a;
  --accent-text: #836122;
  --accent-on: #1b1a17;
  --accent-soft: rgba(201, 155, 74, 0.12);
  --accent-med: rgba(201, 155, 74, 0.16);

  --premium: #8c6fbf;
  --premium-text: #6f4fa6;
  --premium-soft: rgba(140, 111, 191, 0.14);
  --violet: #4a4070;
  --good-text: #4c7548;
  --warn: #c97a3e;

  /* Dawn horizon: the app's 7-stop sunrise ramp. */
  --horizon: linear-gradient(
    to bottom,
    #e9b79e 0%,
    #f1c39b 14%,
    #f6d2a6 28%,
    #f8deb6 42%,
    #f8e6c7 58%,
    #f6ecd5 74%,
    #f6f0e2 100%
  );
  --horizon-rule: rgba(201, 155, 74, 0.4);

  --shadow-sm: 0 1px 2px rgba(27, 26, 23, 0.06);
  --shadow-md: 0 12px 18px rgba(95, 68, 20, 0.1);
  --shadow-lg: 0 18px 26px rgba(95, 68, 20, 0.16);

  /* Radii — app scale */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 36px;
  --r-pill: 999px;

  --ease-quiet: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-rise: cubic-bezier(0.16, 1, 0.3, 1);

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  color-scheme: light;
}

/* --- Tokens: Vespers (dark scheme) -------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1733;
    --bg-elev: #182148;
    --bg-sunken: #060b1e;
    --fg: #f2e7cf;
    --fg2: #c3b69a;
    --fg3: #9a90a8;
    --fg-quiet: #6f688a;
    --line: #2a305a;
    --line-strong: #3d4373;

    --accent: #ebba6f;
    --accent-text: #ebba6f;
    --accent-on: #0e1733;
    --accent-soft: rgba(235, 186, 111, 0.14);
    --accent-med: rgba(235, 186, 111, 0.18);

    --premium: #8c6fbf;
    --premium-text: #b79be0;
    --premium-soft: rgba(140, 111, 191, 0.2);
    --violet: #8a7fc0;
    --good-text: #8fbb8a;
    --warn: #e2a06b;

    /* Vespers horizon: radial darken from the horizon up to deep sky. */
    --horizon: radial-gradient(
      120% 100% at 50% 100%,
      #2b2a55 0%,
      #141a38 46%,
      #060b1e 100%
    );
    --horizon-rule: rgba(235, 186, 111, 0.22);

    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;

    color-scheme: dark;
  }
}

/* --- Night scope: Vespers regardless of the reader's scheme -------------
   Used for the night-practice band, so the page itself crosses the horizon
   the same way the app does at 6pm.                                        */

.night {
  --bg: #0e1733;
  --bg-elev: #182148;
  --bg-sunken: #060b1e;
  --fg: #f2e7cf;
  --fg2: #c3b69a;
  --fg3: #9a90a8;
  --fg-quiet: #6f688a;
  --line: #2a305a;
  --line-strong: #3d4373;
  --accent: #ebba6f;
  --accent-text: #ebba6f;
  --accent-on: #0e1733;
  --accent-soft: rgba(235, 186, 111, 0.14);
  --accent-med: rgba(235, 186, 111, 0.18);
  --premium-text: #b79be0;
  --premium-soft: rgba(140, 111, 191, 0.2);
  --violet: #8a7fc0;
  --good-text: #8fbb8a;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;

  /* Vespers horizon: radial darken from the horizon up to deep sky. */
  --horizon: radial-gradient(
    120% 100% at 50% 100%,
    #2b2a55 0%,
    #141a38 46%,
    #060b1e 100%
  );
  --horizon-rule: rgba(235, 186, 111, 0.22);

  background-color: var(--bg);
  color: var(--fg);
}

/* In dark mode the page is already navy, so the night band sinks deeper. */
@media (prefers-color-scheme: dark) {
  .night {
    --bg: #060b1e;
    --bg-elev: #141a38;
    --horizon: radial-gradient(
      120% 100% at 50% 100%,
      #232249 0%,
      #0e1330 46%,
      #030612 100%
    );
    background-color: var(--bg);
  }
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 1.0625rem; /* 17 — bodyLG */
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
  display: block;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-elev);
  color: var(--fg);
  border-radius: 0 0 var(--r-md) 0;
}

.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Type ---------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.375rem, 6.4vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.875rem, 4.6vw, 2.75rem);
  line-height: 1.14;
}

h3 {
  font-size: clamp(1.3125rem, 2.6vw, 1.625rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6875rem; /* 11 */
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.875rem;
}

.eyebrow--quiet {
  color: var(--fg3);
}

.lede {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--fg2);
  max-width: 46ch;
}

.scripture {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--fg);
}

.meta {
  font-size: 0.8125rem; /* 13 */
  line-height: 1.5;
  color: var(--fg3);
}

.ref {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* --- Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 46rem;
}

.section {
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section-head {
  max-width: 34rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
  color: var(--fg2);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

/* --- Logo ---------------------------------------------------------------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--fg);
  text-decoration: none;
}

.logo:hover {
  color: var(--fg);
}

.logo svg {
  display: block;
  color: var(--fg);
  flex: none;
}

/* The brand mark: an italic Newsreader "fa" ligature with a gold accent dot.
   Styled here rather than via SVG presentation attributes so the custom
   property resolves reliably. */
.logo svg text {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 58px;
  letter-spacing: -0.04em;
  fill: currentColor;
}

.logo .dot {
  fill: var(--accent);
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

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

.site-header {
  position: relative;
  z-index: 3;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.125rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 2.4vw, 1.75rem);
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.9375rem;
  color: var(--fg2);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--fg);
  text-decoration: underline;
}

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

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* The signature horizon: bleeds from the top edge, gold hairline beneath. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 34rem;
  background: var(--horizon);
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  top: 31.5rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--horizon-rule);
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3.5rem, 9vw, 6rem);
}

@media (min-width: 60rem) {
  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .lede {
  margin-bottom: 2rem;
}

.hero-copy > * {
  animation: rise 0.7s var(--ease-rise) both;
}

.hero-copy > *:nth-child(2) {
  animation-delay: 0.06s;
}
.hero-copy > *:nth-child(3) {
  animation-delay: 0.12s;
}
.hero-copy > *:nth-child(4) {
  animation-delay: 0.18s;
}
.hero-copy > *:nth-child(5) {
  animation-delay: 0.24s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0.875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-on);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms var(--ease-quiet), box-shadow 180ms var(--ease-quiet);
}

.btn:hover {
  color: var(--accent-on);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--fg);
}

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

/* --- Store badge placeholders ------------------------------------------- */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.6875rem 1.25rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--fg2);
}

.badge svg {
  flex: none;
  color: var(--fg3);
}

.badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.badge-text b {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
}

.badge-text span {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg3);
}

/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.375rem, 3vw, 1.75rem);
}

.card--glow {
  box-shadow: var(--shadow-md);
  border-radius: var(--r-xl);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--fg2);
  font-size: 1rem;
}

/* The app's home card, rebuilt in HTML — the hero's thesis. */
.practice-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.375rem, 3.4vw, 1.75rem);
  box-shadow: var(--shadow-lg);
  max-width: 26rem;
  margin-inline: auto;
  animation: rise 0.9s var(--ease-rise) 0.2s both;
}

.practice-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.practice-card__time {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
}

.practice-card__verse {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
}

.practice-card__verse .scripture {
  font-size: 1.0625rem;
  color: var(--fg2);
  margin: 0 0 0.5rem;
  max-width: none;
}

.practice-card .btn {
  margin-top: 1.125rem;
}

.rhythm-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.rhythm-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.75rem 0.5rem 0.625rem;
  text-align: center;
}

.rhythm-cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.1;
}

.rhythm-cell span {
  font-size: 0.6875rem;
  color: var(--fg3);
}

/* --- Pills --------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill--premium {
  background: var(--premium-soft);
  color: var(--premium-text);
}

.pill--neutral {
  background: color-mix(in srgb, var(--fg-quiet) 16%, transparent);
  color: var(--fg2);
}

.pill--dot::before {
  content: '';
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* --- Diptych: the two thresholds of the day ----------------------------- */

.diptych {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}

@media (min-width: 48rem) {
  .diptych {
    grid-template-columns: 1fr 1fr;
  }
}

.diptych__panel {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--bg-elev);
  color: var(--fg);
}

.diptych__panel + .diptych__panel {
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .diptych__panel + .diptych__panel {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.diptych__panel h3 {
  margin-bottom: 0.625rem;
}

.diptych__panel p {
  color: var(--fg2);
  font-size: 1rem;
}

.notif {
  margin-top: 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  border-radius: var(--r-md);
  background: var(--bg);
  border: 1px solid var(--line);
}

.notif svg {
  flex: none;
  margin-top: 0.125rem;
  color: var(--accent);
}

.notif b {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
}

.notif span {
  font-size: 0.875rem;
  color: var(--fg2);
}

/* --- Night band: the page crosses the horizon --------------------------- */

.band-night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.band-night::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--horizon);
  z-index: -1;
}

/* --- Steps: the four movements of a practice (a real sequence) ----------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.25rem);
}

@media (min-width: 46rem) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.step {
  counter-increment: step;
  position: relative;
  padding: 1.5rem 1.25rem 1.375rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 0.75rem;
}

.step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9375rem;
  color: var(--fg2);
  line-height: 1.55;
}

.step__quote {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--fg);
}

/* The prayer step breathes, exactly as it does in the app. */
.breath {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: var(--accent-med);
  display: grid;
  place-items: center;
  margin: 0.25rem 0 0.875rem;
  animation: breathe 4200ms var(--ease-quiet) infinite;
}

.breath::after {
  content: '';
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.9;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

/* --- Feature list -------------------------------------------------------- */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.875rem;
}

.feature-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--fg2);
}

.feature-list svg {
  flex: none;
  margin-top: 0.3125rem;
  color: var(--accent-text);
}

.feature-list b {
  color: var(--fg);
  font-weight: 600;
}

/* --- Mock UI: library rows & filter chips -------------------------------- */

.mock {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev);
}

.mock__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--line);
}

.mock__row:last-child {
  border-bottom: 0;
}

.mock__row > div {
  min-width: 0;
  flex: 1;
}

.mock__row h4 {
  font-size: 1.0625rem;
}

.mock__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.875rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg2);
}

.chip[data-selected] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* --- Plans --------------------------------------------------------------- */

.plans {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  align-items: start;
}

@media (min-width: 52rem) {
  .plans {
    grid-template-columns: 0.85fr 1.15fr;
  }
}

.plan {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
  padding: clamp(1.5rem, 3.2vw, 2rem);
}

.plan--pro {
  border-width: 2px;
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.plan__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.plan h3 {
  font-size: 1.5rem;
}

.plan > p {
  color: var(--fg2);
  font-size: 1rem;
}

.tiers {
  list-style: none;
  margin: 1.25rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.tier {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.9375rem 1.125rem;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg);
}

.tier--best {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tier__label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}

.tier__label b {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
}

.tier__sub {
  flex-basis: 100%;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--fg3);
}

.tier__price {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
}

.fineprint {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--fg3);
  max-width: var(--measure);
}

/* --- Quiet closing note -------------------------------------------------- */

.closing {
  text-align: center;
}

.closing blockquote {
  margin: 0 auto;
  max-width: 30ch;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.closing .ref {
  display: block;
  margin-top: 1rem;
}

.closing .badges {
  justify-content: center;
  margin-top: 2rem;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--bg);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.footer-nav a {
  font-size: 0.9375rem;
  color: var(--fg2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--fg3);
  max-width: none;
}

/* --- Placeholder marker -------------------------------------------------- */

.todo {
  font-family: var(--font-ui);
  font-size: 0.875em;
  font-weight: 600;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--r-xs);
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--fg);
  border: 1px dashed var(--warn);
  /* Placeholders can be long — they must wrap rather than widen the page. */
  overflow-wrap: break-word;
  word-break: break-word;
}

/* --- Legal documents ----------------------------------------------------- */

.doc {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3rem, 7vw, 5rem);
}

.doc__head {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.doc__head h1 {
  font-size: clamp(2rem, 5.4vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.doc h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  margin-top: 2.75rem;
  margin-bottom: 0.875rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.doc__head + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.doc h3 {
  font-size: 1.1875rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.doc p,
.doc li {
  color: var(--fg2);
  font-size: 1.0625rem;
}

.doc ul,
.doc ol {
  max-width: var(--measure);
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc li::marker {
  color: var(--accent-text);
}

.doc strong {
  color: var(--fg);
  font-weight: 600;
}

.doc .toc {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.doc .toc a {
  font-size: 0.9375rem;
}

.callout {
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  margin: 0 0 1.5rem;
}

.callout p {
  margin: 0;
  font-size: 1rem;
}

.callout p + p {
  margin-top: 0.75rem;
}

/* Data tables must scroll inside themselves, never the page. */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  font-size: 0.9375rem;
  background: var(--bg-elev);
}

caption {
  text-align: left;
  padding: 0.875rem 1.125rem;
  font-size: 0.8125rem;
  color: var(--fg3);
  border-bottom: 1px solid var(--line);
}

th,
td {
  text-align: left;
  padding: 0.8125rem 1.125rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--fg2);
}

th {
  font-weight: 600;
  color: var(--fg);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-sunken);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* --- Motion preferences -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .breath {
    transform: scale(1.06);
    opacity: 1;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .badges {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
