/* ReadySetSay website styles.
   Follows docs/design/DESIGN.md (Paper Cream, Story Ink, Rocket Coral, Meadow Mint, Star Gold, Night Sky).
   Self-contained for the strict CSP: no external fonts, scripts or images, no inline styles.
   The browser game (play.html) keeps src/styles.css; nothing here is shared with it. */

:root {
  --cream: #FFF9F0;
  --ink: #122640;
  --ink-2: #3A4A60;
  --coral: #EB664F;
  --mint: #CFE8D9;
  --gold: #FAD166;
  --teal: #2A8FA3;
  --night: #14204A;
  --deep: #08112B;
  --pebble: #F5F0E5;
  --pebble-line: #DED9C9;
  --stop: #D14A3B;
  --done: #30826B;
  --help: #267AA1;
  --white: #FFFFFF;
  --on-night-2: #C9D1E8;
  --bezel: #0C1531;

  --display: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --section: 64px;
  --focus: var(--ink);
  color-scheme: light;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; --section: 80px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --section: 96px; }
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--coral); }

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

.night {
  --focus: var(--gold);
  background: var(--night);
  color: var(--cream);
}

.night a:not(.btn) { text-decoration-color: var(--gold); }

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

.skip-link {
  position: absolute;
  z-index: 50;
  left: var(--gutter);
  top: -120px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  font: 700 16px/1.2 var(--display);
  text-decoration: none;
}

.skip-link:focus { top: 12px; }

main:focus { outline: none; }

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

.wrap-narrow { max-width: calc(760px + 2 * var(--gutter)); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 22px;
  font: 800 18px/1.1 var(--display);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn svg { flex: none; width: 22px; height: 22px; }

/* Story Ink on Coral keeps body-size labels above 4.5:1; white on Coral is kept for 24px+ heavy type. */
.btn-coral { background: var(--coral); color: var(--ink); }
.btn-coral:hover { background: #F07A65; }

.btn-mint { background: var(--mint); color: var(--ink); }
.btn-mint:hover { background: #DDF0E4; }

.btn-ghost {
  background: rgba(255, 249, 240, 0.1);
  border-color: rgba(255, 249, 240, 0.55);
  color: var(--cream);
}

.btn-ghost:hover { background: rgba(255, 249, 240, 0.18); }

.btn-outline {
  background: var(--white);
  border-color: var(--mint);
  color: var(--ink);
}

.btn-outline:hover { border-color: var(--teal); }

.btn-small { min-height: 48px; padding: 0 18px; font-size: 16px; border-radius: 18px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.12s ease-out, background-color 0.2s ease-out, border-color 0.2s ease-out; }
  .btn:active { transform: scale(0.97); }
}

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

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

.site-header--over {
  position: absolute;
  inset: 0 0 auto 0;
  color: var(--cream);
  --focus: var(--gold);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 21px/1 var(--display);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: inherit;
}

.brand img { width: 40px; height: 40px; border-radius: 50%; }

.nav-inline { display: none; }

.nav-inline,
.nav-menu nav {
  font: 700 16px/1.2 var(--display);
}

.nav-inline a,
.nav-menu nav a {
  text-decoration: none;
  color: inherit;
}

/* The rule above outranks .btn-coral, which gave the header's coral button the header's cream text
   (3.1 to 1). Coral buttons carry ink text everywhere (4.75 to 1). */
.nav-inline .btn-coral,
.nav-menu nav .btn-coral { color: var(--ink); }

@media (min-width: 860px) {
  .nav-inline {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .nav-inline a:not(.btn) {
    padding: 10px 14px;
    border-radius: 999px;
  }

  .nav-inline a:not(.btn):hover { background: rgba(255, 249, 240, 0.14); }
  .site-header:not(.site-header--over) .nav-inline a:not(.btn):hover { background: var(--pebble); }
  .nav-inline .btn { margin-left: 8px; }
  .nav-menu { display: none; }
}

.nav-menu { position: relative; }

.nav-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid rgba(255, 249, 240, 0.5);
  border-radius: 999px;
  font: 700 16px/1 var(--display);
  cursor: pointer;
  list-style: none;
}

.site-header:not(.site-header--over) .nav-menu summary { border-color: var(--pebble-line); background: var(--white); }

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

.nav-menu summary svg { width: 18px; height: 18px; }

.nav-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(290px, calc(100vw - 2 * var(--gutter)));
  padding: 8px;
  border-radius: 20px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(8, 17, 43, 0.35);
  --focus: var(--ink);
}

.nav-menu nav ul { list-style: none; margin: 0; padding: 0; }

.nav-menu nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
}

.nav-menu nav a:hover { background: var(--pebble); }
.nav-menu nav .btn { width: 100%; margin-top: 6px; justify-content: center; }

/* ---------- Hero (landing) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--deep);
}

.hero-plate {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 17, 43, 0.82) 0%, rgba(8, 17, 43, 0.62) 40%, rgba(8, 17, 43, 0.12) 72%, rgba(8, 17, 43, 0) 100%);
}

.hero-grid {
  display: grid;
  gap: 32px;
  justify-items: center;
  padding-top: 92px;
  padding-bottom: 48px;
  text-align: center;
}

.hero-copy { max-width: 600px; }

.kicker {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 249, 240, 0.12);
  font: 700 15px/1.2 var(--display);
}

.kicker svg { width: 16px; height: 16px; }

@media (min-width: 600px) {
  .kicker { display: inline-flex; }
}

.hero h1 { line-height: 1; }

.hero-wordmark {
  display: block;
  font-size: clamp(46px, 8vw, 84px);
  letter-spacing: -0.025em;
}

.hero-tagline {
  display: block;
  margin-top: 14px;
  font-size: clamp(25px, 3.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.ending { color: var(--coral); font-style: normal; }

.hero-lede {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-night-2);
}

.hero .actions {
  justify-content: center;
  margin-top: 24px;
}

.hero .actions .btn { width: 100%; max-width: 360px; }

.hero-fine {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-night-2);
}

.hero-device {
  width: min(310px, 82vw);
  margin: 0;
}

@media (min-width: 600px) {
  .hero .actions .btn { width: auto; }
  .hero-device { width: 360px; }
}

@media (min-width: 960px) {
  .hero::before {
    background: linear-gradient(90deg, rgba(8, 17, 43, 0.9) 0%, rgba(8, 17, 43, 0.72) 38%, rgba(8, 17, 43, 0.18) 68%, rgba(8, 17, 43, 0.05) 100%);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    justify-items: start;
    gap: 48px;
    padding-top: 136px;
    padding-bottom: 96px;
    text-align: left;
  }

  .hero .actions { justify-content: flex-start; margin-top: 28px; }
  .hero-lede { font-size: 18px; }

  .hero-device {
    width: min(400px, 100%);
    justify-self: center;
  }
}

/* ---------- Device frame for real in-app screenshots ---------- */

.device {
  padding: clamp(7px, 1.4vw, 11px);
  border-radius: clamp(24px, 4vw, 36px);
  background: var(--bezel);
  box-shadow: 0 0 0 1.5px rgba(255, 249, 240, 0.16), 0 28px 56px rgba(4, 9, 26, 0.5);
}

.device img {
  width: 100%;
  border-radius: clamp(16px, 2.8vw, 26px);
  background: var(--cream);
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }

.section-head { max-width: 760px; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  font: 700 15px/1.3 var(--display);
}

.night .eyebrow { background: rgba(255, 249, 240, 0.12); color: var(--cream); }

.section h2 { font-size: clamp(30px, 4vw, 44px); }

.section-lede {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}

.night .section-lede { color: var(--on-night-2); }

/* ---------- Speech bubbles (the in-game caption, on the site) ---------- */

.bubble {
  display: inline-block;
  padding: 0.34em 0.72em 0.4em;
  border-radius: 0.7em;
  background: var(--cream);
  color: var(--ink);
  font: 800 clamp(22px, 1.4vw + 16px, 30px)/1.1 var(--display);
  white-space: nowrap;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* The swappable ending is Rocket Coral (large heavy type only: 3:1 on Paper Cream). */
.bubble.ending,
.bubble .ending { color: var(--coral); }

/* ---------- How it plays ---------- */

.pattern {
  display: grid;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 900px) {
  .pattern { grid-template-columns: 1.15fr 1fr; gap: 24px; }
}

.board {
  position: relative;
  overflow: hidden;
  padding: 24px 20px 26px;
  border-radius: 24px;
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(42, 143, 163, 0.22), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #101A3E 60%, var(--deep) 100%);
  --focus: var(--gold);
}

@media (min-width: 768px) {
  .board { padding: 30px 30px 32px; }
}

.board-title {
  font: 800 20px/1.2 var(--display);
}

.board-note {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-night-2);
}

.opener-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 16px;
  margin-top: 20px;
}

.opener-label {
  display: block;
  margin-bottom: 8px;
  font: 700 14px/1.2 var(--display);
  color: var(--on-night-2);
}

.join {
  font: 800 28px/1 var(--display);
  color: var(--gold);
}

.endings {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  align-items: center;
  gap: 14px 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.pause-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px dashed rgba(255, 249, 240, 0.45);
  border-radius: 999px;
  font: 700 15px/1.2 var(--display);
  color: var(--on-night-2);
}

.pause-chip svg { width: 18px; height: 18px; }

/* White on Coral only at 28px heavy, per the design system. */
.go-chip {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 22px;
  background: var(--coral);
  color: var(--white);
  font: 800 28px/1 var(--display);
  letter-spacing: 0.01em;
}

/* Steps (real screenshots) */

.steps-scroller {
  margin-top: 40px;
  margin-inline: calc(-1 * var(--gutter));
  padding: 4px var(--gutter) 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 270px);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step { scroll-snap-align: start; }

.step figure {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--pebble);
  box-shadow: 0 0 0 1px var(--pebble-line);
}

.step img { width: 100%; }

.step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 21px;
}

.step-num {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font: 800 16px/1 var(--display);
}

.step p {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
}

.scroll-hint {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

@media (min-width: 1024px) {
  .steps-scroller {
    margin-inline: 0;
    padding: 4px 0 0;
    overflow: visible;
  }

  .steps {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
  }

  .scroll-hint { display: none; }
}

.after-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 40px;
  padding: 22px 24px;
  border-radius: 20px;
  background: var(--pebble);
  box-shadow: inset 0 0 0 1px var(--pebble-line);
}

.after-steps p { max-width: 640px; color: var(--ink-2); }
.after-steps strong { color: var(--ink); }

/* ---------- Sensory comfort ---------- */

.comfort-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 960px) {
  .comfort-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; }
}

.controls {
  display: grid;
  gap: 20px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) and (max-width: 959px) {
  .controls { grid-template-columns: 1fr 1fr; gap: 24px; }
}

.controls li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ctl-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--pebble);
}

.ctl-icon span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--white);
}

.ctl-icon svg { width: 20px; height: 20px; }
.ctl-help span { background: var(--help); }
.ctl-stop span { background: var(--stop); }
.ctl-done span { background: var(--done); }
.ctl-quiet span { background: var(--help); }
.ctl-calm span { background: var(--night); }

.controls h3 { font-size: 20px; }

.controls p {
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--on-night-2);
}

.comfort-device {
  width: min(360px, 84vw);
  margin: 0 auto;
}

.comfort-device figcaption {
  margin-top: 14px;
  font-size: 15px;
  text-align: center;
  color: var(--on-night-2);
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.promises li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 12px;
  border: 2px solid rgba(207, 232, 217, 0.5);
  border-radius: 999px;
  color: var(--mint);
  font: 700 16px/1.2 var(--display);
}

.promises svg { width: 18px; height: 18px; flex: none; }

.promises-note {
  margin-top: 16px;
  font-size: 16px;
  color: var(--on-night-2);
}

/* ---------- Founder note ---------- */

.letter {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 22px 30px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--pebble-line), 0 16px 40px rgba(18, 38, 64, 0.08);
}

@media (min-width: 768px) {
  .letter { padding: 48px 56px 44px; }
}

.letter h2 { font-size: clamp(28px, 3.6vw, 40px); }

.letter p {
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.7;
}

.letter .signature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font: 800 20px/1.2 var(--display);
}

.letter .signature img { width: 48px; height: 48px; border-radius: 50%; }

.letter .signature span span {
  display: block;
  font: 400 15px/1.4 var(--body);
  color: var(--ink-2);
}

/* ---------- Grown-ups and therapists ---------- */

.grownups { background: var(--pebble); }

.cards {
  display: grid;
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

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

@media (min-width: 1100px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.card {
  padding: 24px 22px;
  border: 2px solid var(--mint);
  border-radius: 20px;
  background: var(--white);
}

.card h3 { font-size: 20px; }

.card p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
}

.card .phrases {
  font: 800 17px/1.4 var(--display);
  color: var(--ink);
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.therapist-note {
  margin-top: 28px;
  font-size: 16px;
  color: var(--ink-2);
}

/* FAQ */

.faq {
  max-width: 820px;
  margin-top: 64px;
}

.faq h2 { font-size: clamp(26px, 3vw, 34px); }

.faq-list { margin-top: 20px; border-top: 1px solid var(--pebble-line); }

.faq details { border-bottom: 1px solid var(--pebble-line); }

.faq summary {
  position: relative;
  display: block;
  padding: 18px 48px 18px 0;
  cursor: pointer;
  list-style: none;
}

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

.faq summary h3 {
  display: inline;
  font-size: 19px;
  line-height: 1.35;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12' stroke='%23122640' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.faq details[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h12' stroke='%23122640' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.faq details p {
  padding: 0 0 20px;
  max-width: 680px;
  color: var(--ink-2);
}

/* ---------- Closing call to action ---------- */

.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1.6px 1.6px at 8% 18%, rgba(255, 249, 240, 0.85) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 4% 82%, rgba(255, 249, 240, 0.7) 50%, transparent 51%),
    radial-gradient(1.8px 1.8px at 95% 12%, rgba(255, 249, 240, 0.85) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 94% 64%, rgba(250, 209, 102, 0.8) 50%, transparent 51%),
    radial-gradient(60% 70% at 28% 55%, rgba(235, 102, 79, 0.22), transparent 70%),
    linear-gradient(180deg, var(--night), var(--deep));
}

.cta-grid {
  display: grid;
  gap: 28px;
  justify-items: center;
  text-align: center;
}

.cta-rocket { width: 150px; }

.cta h2 { font-size: clamp(34px, 5vw, 56px); }

.cta p {
  max-width: 560px;
  margin-top: 16px;
  font-size: 18px;
  color: var(--on-night-2);
}

.cta .actions { justify-content: center; margin-top: 28px; }

@media (min-width: 860px) {
  .cta-grid {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 56px;
    justify-items: start;
    align-items: center;
    max-width: 960px;
    margin-inline: auto;
    text-align: left;
  }

  .cta-rocket { width: 200px; }
  .cta .actions { justify-content: flex-start; }
}

/* ---------- Inner pages ---------- */

.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 104px 0 44px;
  background: var(--deep);
}

.page-hero-plate {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 17, 43, 0.86) 0%, rgba(8, 17, 43, 0.72) 100%);
}

@media (min-width: 768px) {
  .page-hero { padding: 128px 0 60px; }
}

.page-hero h1 { font-size: clamp(34px, 5vw, 56px); }

.page-lede {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-night-2);
}

.page-hero .updated {
  margin-top: 14px;
  font-size: 15px;
  color: var(--on-night-2);
}

.page-hero .actions { margin-top: 24px; }

.prose {
  padding-top: 48px;
  padding-bottom: var(--section);
}

.prose > * + * { margin-top: 18px; }

.prose section { margin-top: 48px; }
.prose section:first-child { margin-top: 0; }
.prose section > * + * { margin-top: 14px; }

.prose h2 { font-size: clamp(25px, 3vw, 32px); }
.prose h3 { font-size: 20px; }

.prose ul,
.prose ol { padding-left: 1.3em; }

.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--teal); font-weight: 700; }

.prose strong { font-weight: 650; }

.prose .lead { font-size: 19px; line-height: 1.6; }

.panel {
  padding: 22px 22px 24px;
  border: 2px solid var(--mint);
  border-radius: 20px;
  background: var(--white);
}

.panel > * + * { margin-top: 10px; }

.panel h3 { font-size: 20px; }

.panel-grid {
  display: grid;
  gap: 14px;
}

.note {
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--pebble);
  box-shadow: inset 0 0 0 1px var(--pebble-line);
  color: var(--ink-2);
}

.note strong { color: var(--ink); }

.phrase-line {
  font: 800 19px/1.45 var(--display);
}

.steps-list { counter-reset: step; list-style: none; padding-left: 0 !important; }

.steps-list > li {
  position: relative;
  padding-left: 48px;
  counter-increment: step;
}

.steps-list > li + li { margin-top: 18px; }

.steps-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font: 800 16px/1 var(--display);
}

.table-scroll { overflow-x: auto; }

.openers {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.openers th,
.openers td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--pebble-line);
  text-align: left;
  vertical-align: top;
}

.openers th { font: 800 15px/1.3 var(--display); color: var(--ink-2); }
.openers td:first-child { font: 800 18px/1.3 var(--display); white-space: nowrap; }

/* Wide comparison table (speech-apps comparison guide): room for each column on phones (it scrolls sideways
   inside .table-scroll), and app names may wrap. */
.openers.compare { min-width: 940px; font-size: 15px; }
.openers.compare td:first-child { font-size: 16px; white-space: normal; min-width: 130px; }

.contact-card {
  padding: 26px 24px;
  border-radius: 24px;
  background: var(--night);
  color: var(--cream);
  --focus: var(--gold);
}

.contact-card > * + * { margin-top: 12px; }
.contact-card p { color: var(--on-night-2); }
.contact-card a:not(.btn) { text-decoration-color: var(--gold); color: var(--cream); }
.contact-card .btn { margin-top: 18px; }

.page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px !important;
}

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

.site-footer {
  padding: 56px 0 32px;
  background: var(--deep);
  color: var(--cream);
  --focus: var(--gold);
}

.footer-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 64px; }
}

.footer-brand p {
  max-width: 360px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--on-night-2);
}

.footer-brand .btn { margin-top: 20px; }

.footer-links {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.footer-links h2 {
  font: 800 15px/1.3 var(--display);
  color: var(--gold);
}

.footer-links ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li { margin-top: 4px; }

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: var(--cream);
  text-decoration: none;
}

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

.footer-base {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 249, 240, 0.14);
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-night-2);
}

.footer-base p + p { margin-top: 6px; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Parent guides (guides.html and the guide pages) */
.crumbs { margin-bottom: 10px; font-size: 15px; font-weight: 650; }
.crumbs a, .guides-more a { display: inline-block; padding: 3px 0; } /* at least 24 px tall to tap */
.guide-list { list-style: none; padding-left: 0 !important; display: grid; gap: 12px; }
.guide-list li + li { margin-top: 0; }
.guide-list a span { font-weight: 400; }
.guide-list a {
  display: block;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--pebble-line);
  color: var(--ink);
  text-decoration: none;
}
.guide-list a:hover { box-shadow: inset 0 0 0 2px var(--teal); }
.guide-list a strong { display: block; font: 800 19px/1.3 var(--display); color: var(--ink); }
.guide-list span { display: block; margin-top: 6px; color: var(--ink-2); line-height: 1.5; }
.refs { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.refs li { overflow-wrap: anywhere; }
.prose .faq { margin-top: 0; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.section .guide-list { margin-top: 28px; }
.guides-more { margin-top: 20px; font-weight: 700; }

/* Print: guides print as clean pages (the phrases guide says "print it, stick it on the fridge") */
@media print {
  .site-header, .site-footer, .skip-link, .page-cta, .actions, .page-hero-plate, .nav-menu, .crumbs { display: none !important; }
  .page-hero, .night { background: none !important; color: #000 !important; padding: 0 !important; }
  .page-hero h1, .page-hero .page-lede, .page-hero .updated, .page-hero .eyebrow { color: #000 !important; }
  body { background: #fff !important; color: #000 !important; font-size: 12pt; }
  .prose a { color: #000; text-decoration: underline; }
  .guide-list a, .note, .faq details { box-shadow: none !important; border: 1px solid #999; }
  .faq details { display: block; } .faq details > p { display: block !important; }
  section, tr, .phrase-line { break-inside: avoid; }
  .table-scroll { overflow: visible !important; }
  .openers.compare { min-width: 0; font-size: 9pt; }
}

/* Guides: the note just after the answer (rest of the byline, lead-page line, the week's price), 2026-11-23. */
.after-answer > * + * { margin-top: 10px; }
.after-answer .week-text .btn { margin-top: 6px; }
