/* Rapport – Mind & Self · components and layout (tokens: tokens.css) */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-2);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--active-bg);
  color: var(--active-fg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Sky (fixed background + glows) ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 38%, var(--bg-3) 100%);
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  transform: rotate(-24deg);
  pointer-events: none;
}
.glow--primary {
  right: -18vw; top: 8vh;
  width: max(520px, 58vw); height: max(380px, 40vw);
  background: radial-gradient(closest-side, var(--glow-1), transparent 100%);
  opacity: 0.85;
  animation: drift 38s var(--ease) infinite alternate;
}
.glow--secondary {
  right: 6vw; top: 34vh;
  width: max(240px, 22vw); height: max(110px, 10vw);
  background: radial-gradient(closest-side, var(--glow-2), transparent 100%);
  animation: drift 26s var(--ease) infinite alternate-reverse;
}

@keyframes drift {
  from { transform: rotate(-24deg) translate3d(0, 0, 0); }
  to { transform: rotate(-20deg) translate3d(-4vw, 3vh, 0); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 12px;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 6px 6px 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--bar-bg);
  border: 1px solid var(--bar-border);
  box-shadow: var(--elevated);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  padding-right: 6px;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand__name { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; line-height: 1; }
.brand__suffix { color: var(--text-2); font-size: 0.8125rem; letter-spacing: 0.02em; display: none; }
@media (min-width: 520px) { .brand__suffix { display: inline; } }

.header-actions { display: flex; align-items: center; gap: 6px; }

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color var(--dur-fast) ease;
}
.nav-link:hover { background: var(--row); }
.nav-link--wide { display: none; }
@media (min-width: 900px) { .nav-link--wide { display: inline-flex; } }

/* Theme toggle: two-segment control like the app's tab bar */
.theme-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--row);
}
.theme-toggle button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.theme-toggle button:hover { background: var(--chip-bg-hover); }
.theme-toggle button:active { transform: scale(0.94); }
.theme-toggle button[aria-pressed="true"] { background: var(--active-bg); color: var(--active-fg); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- Buttons, chips, tags ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
a.chip:hover { background: var(--chip-bg-hover); text-decoration: none; }
a.chip:active { transform: scale(0.97); }
.chip--accent {
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: var(--accent-shadow);
}
a.chip--accent:hover { background: var(--accent); filter: brightness(1.05); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--tag-border);
  color: var(--text-2);
  font-size: 0.8125rem;
}
.tag--duration { background: var(--dur-bg); border-color: var(--dur-border); color: var(--dur-text); }

.eyebrow {
  margin: 0 0 18px;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 2rem + 4vw, 6rem) clamp(3.5rem, 3rem + 4vw, 7rem); overflow-x: clip; }
.hero__grid { display: grid; gap: clamp(3rem, 2rem + 4vw, 4rem); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.1fr 0.9fr; } }

.hero h1 { font-size: var(--step-hero); margin-bottom: 26px; }
.hero__lead { max-width: 34rem; font-size: var(--step-lead); color: var(--text-2); margin-bottom: 30px; }

.availability { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }
.availability__icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--elevated); }
.availability__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-weight: 600;
}
.availability__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-solid);
  box-shadow: 0 0 0 4px rgba(200, 125, 111, 0.22);
}
.availability__meta { color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Phones ---------- */
.phone {
  margin: 0;
  width: var(--phone-w, min(280px, 70vw));
  padding: 8px;
  border-radius: 48px;
  background: linear-gradient(150deg, #3a3d47 0%, #15171c 40%, #2a2c33 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), var(--phone-shadow);
}
.phone img { width: 100%; border-radius: 40px; }
.phone figcaption {
  position: absolute;
  left: 0; right: 0; top: 100%;
  margin-top: 14px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.8125rem;
}

.hero-phones {
  --phone-w: clamp(206px, 18vw + 70px, 318px);
  position: relative;
  /* screen ratio 2622/1206 ≈ 2.17 plus room for the tilted back phone */
  height: calc(var(--phone-w) * 2.3);
}
.hero-phones .phone {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: calc(var(--phone-w) / -2);
  transition: transform var(--dur-theme) var(--ease), opacity var(--dur-theme) var(--ease);
}
.hero-phones .phone--front { z-index: 2; transform: translateX(-16%) rotate(-3deg); }
.hero-phones .phone--back { z-index: 1; transform: translate(28%, 7%) rotate(5deg) scale(0.88); opacity: 0.92; }

/* front/back follow the theme: day screen in front by day, night screen at night */
:root[data-theme="night"] .hero-phones .phone--day { z-index: 1; transform: translate(28%, 7%) rotate(5deg) scale(0.88); opacity: 0.92; }
:root[data-theme="night"] .hero-phones .phone--night { z-index: 2; transform: translateX(-16%) rotate(-3deg); opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero-phones .phone--day { z-index: 1; transform: translate(28%, 7%) rotate(5deg) scale(0.88); opacity: 0.92; }
  :root:not([data-theme]) .hero-phones .phone--night { z-index: 2; transform: translateX(-16%) rotate(-3deg); opacity: 1; }
}

/* ---------- Sheet (content surface, like the app's bottom sheet) ---------- */
.sheet {
  position: relative;
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  background: linear-gradient(180deg, var(--sheet-1) 0%, var(--sheet-2) 100%);
  border-top: 1px solid var(--sheet-border);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.sheet::before {
  content: "";
  position: absolute;
  left: 50%; top: 12px;
  width: 36px; height: 4px; margin-left: -18px;
  border-radius: 2px;
  background: var(--sheet-handle);
}

.section { position: relative; padding-block: var(--space-section); }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { font-size: var(--step-h2); margin-bottom: 24px; }
.section__intro { max-width: 40rem; font-size: var(--step-lead); color: var(--text-2); }

.section-glow {
  position: absolute;
  width: 60vw; height: 36vw; max-width: 760px; max-height: 460px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow-1), transparent);
  opacity: 0.32;
  transform: rotate(-24deg);
  pointer-events: none;
}
.section-glow--left { left: -24vw; top: 18%; }
.section-glow--right { right: -24vw; top: 30%; }

.subhead { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); line-height: 1.08; margin-bottom: 18px; }

/* soft glow behind phones: indigo + gold at night, sage + rose by day (like the app) */
.split__media::before,
.hero-phones::before,
.split__media::after,
.hero-phones::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  transform: rotate(-24deg);
  pointer-events: none;
}
.split__media::before,
.hero-phones::before {
  left: -12%; right: -12%; top: 14%; height: 62%;
  background: radial-gradient(closest-side, var(--glow-1), transparent 100%);
  opacity: 0.6;
}
.split__media::after,
.hero-phones::after {
  right: 0; bottom: 18%; width: 60%; height: 22%;
  background: radial-gradient(closest-side, var(--glow-2), transparent 100%);
}
.split__media .phone { position: relative; z-index: 1; }

/* split layout: text + phone */
.split { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem); align-items: center; }
.split--spaced { margin-top: clamp(3.5rem, 2.5rem + 4vw, 6rem); }
.split__media { display: grid; justify-items: center; position: relative; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  .split--reverse .split__media { order: -1; }
  .split--reverse { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .split__media .phone { --phone-w: 300px; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--card-1), var(--card-2) 55%, var(--card-tint));
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.card h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.975rem; }

.feature-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--feature);
  border: 1px solid var(--feature-border);
  color: var(--feature-text);
  box-shadow: var(--card-shadow);
}
.feature-card::before {
  content: "";
  position: absolute;
  right: -60px; bottom: -70px;
  width: 240px; height: 190px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--feature-glow), transparent);
  pointer-events: none;
}
.feature-card::after {
  content: "";
  position: absolute;
  left: -40px; right: -40px; bottom: -120px;
  height: 190px;
  border-radius: 50%;
  border-top: 1px solid var(--feature-border);
  pointer-events: none;
}
.feature-card > * { position: relative; z-index: 1; }
.feature-card p { color: var(--feature-text-2); }
.feature-card .eyebrow { color: var(--feature-text-2); margin-bottom: 12px; }
.feature-card h3 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: var(--step-h3); line-height: 1.1; margin-bottom: 12px; }
.feature-card .tag { border-color: currentColor; color: var(--feature-text); }

/* day card is always sage, night card always indigo – they show both looks */
.feature-card--day {
  --feature: linear-gradient(160deg, #aebba9 0%, #98a894 45%, #8a9a86 75%, #a2ad92 100%);
  --feature-border: rgba(255, 255, 255, 0.6);
  --feature-text: #1f2620;
  --feature-text-2: #26302a;
  --feature-glow: rgba(247, 232, 200, 0.6);
}
.feature-card--night {
  --feature: linear-gradient(160deg, #5f59a0 0%, #4f4a8a 40%, #3a366c 75%, #4f4573 100%);
  --feature-border: rgba(240, 218, 170, 0.32);
  --feature-text: #f6f2ea;
  --feature-text-2: #ebe5da;
  --feature-glow: rgba(240, 214, 160, 0.45);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }

.stack { display: grid; gap: 14px; }
.pair { display: grid; gap: 14px; margin-top: 34px; }
@media (min-width: 720px) { .pair { grid-template-columns: 1fr 1fr; } }

/* ---------- Experience chain ---------- */
.chain {
  display: grid;
  gap: 10px;
  margin: 40px 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: chain;
}
.chain li {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  column-gap: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--card-1), var(--card-2));
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  counter-increment: chain;
}
.chain li::before {
  content: counter(chain);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--row);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
}
.chain__label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2); }
.chain__value { font-family: var(--font-display); font-style: italic; font-size: 1.45rem; line-height: 1.2; }
.chain li.chain__key { background: var(--feature); border-color: var(--feature-border); color: var(--feature-text); }
.chain li.chain__key .chain__label { color: var(--feature-text-2); }
.chain li.chain__key::before { background: var(--accent); color: var(--on-accent); }
.chain-note { color: var(--text-2); font-size: 0.9375rem; max-width: 46rem; }

@media (min-width: 960px) {
  .chain { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
  .chain li { grid-template-columns: 1fr; row-gap: 8px; align-content: start; padding: 18px; }
  .chain li::before { grid-row: auto; margin-bottom: 8px; }
  .chain li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: -12px; top: 38px;
    width: 12px; height: 1px;
    background: var(--text-2);
    opacity: 0.5;
  }
}

/* ---------- Insight card ---------- */
.insight { margin-top: 28px; }
.insight__kind { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 10px; }
.insight__text { font-size: 1.125rem; color: var(--text); margin-bottom: 14px; }
.insight details { border-top: 1px solid var(--line); padding-top: 4px; }
.insight summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  color: var(--link);
  font-weight: 600;
  list-style: none;
}
.insight summary::-webkit-details-marker { display: none; }
.insight summary::after { content: "+"; font-size: 1.2rem; line-height: 1; }
.insight details[open] summary::after { content: "–"; }
.evidence { margin: 4px 0 12px; padding-left: 14px; border-left: 2px solid var(--accent-solid); }
.evidence cite { display: block; font-style: normal; font-size: 0.8125rem; color: var(--text-2); }
.evidence p { margin: 2px 0 0; color: var(--text); }
.insight__fine { font-size: 0.875rem; color: var(--text-2); }
.answer-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.answer-row .tag { min-height: 34px; padding: 0 14px; font-size: 0.875rem; }

/* ---------- Lists with icons ---------- */
.icon-list { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .icon-list--grid { grid-template-columns: 1fr 1fr; } }
.icon-list li { display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; align-items: start; }
.icon-list .icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--accent-shadow);
}
.icon-list .icon svg { width: 18px; height: 18px; }
.icon-list strong { display: block; margin-bottom: 2px; }
.icon-list span.text { color: var(--text-2); font-size: 0.975rem; }

.note {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--row);
  color: var(--text-2);
  font-size: 0.9375rem;
}
.note strong { color: var(--text); }

/* ---------- Impulses ---------- */
.impulses { display: grid; gap: 12px; margin-top: 34px; }
.impulse { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; }
.impulse > * { grid-column: 1; }
.impulse h3 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.6rem; line-height: 1.1; margin: 0 0 2px; }
.impulse__source { font-size: 0.875rem; color: var(--text-2); margin-bottom: 8px; }
.impulse .tag { grid-column: 2; grid-row: 1; align-self: start; }

/* ---------- Closing call ---------- */
.closing { text-align: center; }
.closing__icon {
  width: 112px; height: 112px;
  margin: 0 auto 28px;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 20px 60px rgba(90, 85, 149, 0.45);
}
.closing h2 { margin-inline: auto; }
.closing .section__intro { margin-inline: auto; }
.closing .chip-row { justify-content: center; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 56px 40px; background: var(--sheet-2); border-top: 1px solid var(--line); }
.safety {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-card);
  background: linear-gradient(160deg, var(--card-1), var(--card-2) 55%, var(--card-tint));
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent-solid);
}
.safety h2 { font-size: 1.0625rem; }
.safety p { color: var(--text-2); font-size: 0.975rem; }
.safety a { font-weight: 600; white-space: nowrap; }

.footer-grid { display: grid; gap: 28px; margin-top: 40px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h2 { font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); text-decoration: none; }
.footer-grid li a:hover { text-decoration: underline; }
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--text-2); margin-top: 6px; }
.footer-fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 0.8125rem; }

/* ---------- Legal / text pages ---------- */
.page-head { padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) 2.5rem; }
.page-head h1 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4.25rem); margin-bottom: 16px; }
.page-head p { color: var(--text-2); font-size: var(--step-lead); max-width: 42rem; }

.draft-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(200, 125, 111, 0.16);
  border: 1px solid rgba(200, 125, 111, 0.5);
  color: var(--text);
  font-size: 0.975rem;
  max-width: 46rem;
}
.draft-banner strong { display: block; }

.prose { max-width: 46rem; padding-block: 48px var(--space-section); }
.prose h2 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem); margin: 2.4em 0 0.6em; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.0625rem; margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent-solid); }
.prose address { font-style: normal; }
.placeholder {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(200, 125, 111, 0.18);
  outline: 1px dashed rgba(200, 125, 111, 0.7);
  font-weight: 600;
}
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
@media (max-width: 599px) {
  .prose table { table-layout: fixed; font-size: 0.875rem; }
  .prose th, .prose td { padding: 10px 6px; overflow-wrap: anywhere; hyphens: auto; }
  .prose th:first-child, .prose td:first-child { padding-left: 0; }
}
.toc { padding: 18px 20px; border-radius: 18px; background: var(--row); margin-bottom: 8px; }
.toc ol { margin: 8px 0 0; }

/* FAQ */
.faq { display: grid; gap: 10px; margin: 0 0 1.5em; }
.faq details { padding: 4px 18px; border-radius: 18px; background: linear-gradient(160deg, var(--card-1), var(--card-2)); border: 1px solid var(--card-border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--link); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 14px; color: var(--text-2); }

/* 404 */
.lost { min-height: 70vh; display: grid; align-content: center; padding-block: 4rem; }
.lost h1 { font-size: var(--step-hero); margin-bottom: 18px; }
.lost p { color: var(--text-2); font-size: var(--step-lead); }

/* ---------- Theme cross-fade ---------- */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: var(--dur-theme); }

/* ---------- 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;
  }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
