/* FirstSpar — marketing site.
 *
 * The palette is the app's, token for token (lib/ui/core/themes/app_colors.dart).
 * Three colours used with discipline: Royal Blue for anything active, Shark for
 * structure, white for negative space. The status trio never appears here —
 * nothing on a marketing page is dangerous, cautionary, or ready.
 *
 * The page alternates photo/black → white → black → white on purpose. It gives
 * the site a rhythm that reads as editorial rather than as a SaaS scroll, and
 * it lets the two photographs carry the emotional weight while the white
 * sections carry the argument. */

:root {
  --royal-blue: #0f6ff4;
  --royal-blue-on-dark: #8ab4f8;
  --royal-blue-pressed: #0b54b9;
  --royal-blue-surface: #e8f0fe;
  --shark: #202124;
  --shark-body: #2d3032;
  --shark-muted: #5f6368;
  --border: #dadce0;
  --surface-subtle: #f8f9fa;
  --immersive-black: #080809;
  --raised-dark: #16181c;
  --raised-dark-high: #1c1e22;
  --chip-dark: #202227;
  --border-dark: #2a2c31;
  --on-dark: #bdc1c6;
  --on-dark-muted: #9aa0a6;
  --on-dark-faint: #7a8085;

  --measure: 34rem;
  --page: 76rem;
  /* The `min()` is a ceiling in viewport units over a floor in rem. The rem
   * floor is what makes the gutter grow with the reader's text size, which is
   * right up to the point where it stops leaving room for the text: on a
   * 320px phone at a 200% setting the two gutters were claiming 80px, a
   * quarter of the screen. Nothing changes at ordinary sizes. */
  --gutter: min(clamp(1.25rem, 5vw, 4rem), 8vw);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* The header is sticky, so an anchor jump parks its target underneath it —
   * tapping "How it works" landed on the step cards with the heading hidden.
   * Two rows tall on a phone, one on a laptop. */
  scroll-padding-top: 6.5rem;
}

@media (min-width: 46rem) {
  html {
    scroll-padding-top: 5rem;
  }
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--shark-body);
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Inherited by everything, and dormant until a word genuinely will not fit.
   * At a 200% text setting on a phone the body copy is 34px and the longer
   * words — "reportaproblem.apple.com", "discrimination" — were each wide
   * enough on their own to make the whole page scroll sideways. */
  overflow-wrap: break-word;
}

/* `height: auto` is not optional here. Every <img> carries intrinsic width and
 * height attributes so the browser can reserve space before the file arrives —
 * without this, that height attribute wins over the scaled width and the
 * portrait photographs render stretched to their full 1672px. */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* The UA stylesheet gives <figure> `margin: 1em 40px`, which quietly made
 * every photograph 80px narrower than the column it sits in. */
figure {
  margin: 0;
}

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

/* `com.phileosolutions.firstspar` is 29 unbreakable monospace characters, and
 * it was pushing the privacy policy 16px wider than a 320px screen — the whole
 * page scrolled sideways because of one bundle id. */
code {
  overflow-wrap: anywhere;
  font-size: 0.9em;
}

a:hover {
  color: var(--royal-blue-pressed);
}

h1,
h2,
h3 {
  color: var(--shark);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
  /* Only bites when a single word genuinely cannot fit, so it changes nothing
   * at ordinary sizes. It matters because the display sizes are in rem: a
   * reader on 200% text gets a 60px minimum, at which "conversation" is wider
   * than a phone's column and pushed the whole page sideways. */
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

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

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

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: clamp(4.5rem, 11vw, 9rem);
}

.dark {
  background: var(--immersive-black);
  color: var(--on-dark);
}

.dark h1,
.dark h2,
.dark h3 {
  color: #fff;
}

.dark a {
  color: var(--royal-blue-on-dark);
}

.tint {
  background: var(--surface-subtle);
}

/* The small blue capital line that opens most sections. Its job is to name
 * what the section is about before the headline makes its claim. */
.eyebrow {
  /* The pressed shade, not Royal Blue itself. At 12px this needs 4.5:1, and
   * Royal Blue manages only 4.27 against the tinted sections — it clears the
   * bar on pure white and nowhere else. A shade, so still no fourth hue. */
  color: var(--royal-blue-pressed);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.dark .eyebrow {
  color: var(--royal-blue-on-dark);
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  line-height: 1.5;
  color: var(--shark-muted);
  margin-top: 1.5rem;
}

.dark .lede {
  color: var(--on-dark);
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem 1.25rem;
  align-items: center;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

/* `a.btn-primary`, not `.btn-primary`. The plain class loses the cascade to
 * `.dark a` and `.site-header nav a`, which set link colours — the button then
 * rendered pale blue on Royal Blue at 2.1:1. */
a.btn-primary,
.btn-primary {
  background: var(--royal-blue);
  color: #fff;
}

a.btn-primary:hover,
.btn-primary:hover {
  background: var(--royal-blue-pressed);
  color: #fff;
}

.btn-ghost {
  border-color: var(--border);
  color: var(--shark);
}

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

.dark .btn-ghost {
  border-color: var(--border-dark);
  color: #fff;
}

.dark .btn-ghost:hover {
  border-color: var(--on-dark-muted);
  color: #fff;
}

.note {
  font-size: 0.9375rem;
  color: var(--shark-muted);
  margin-top: 1.25rem;
}

.dark .note {
  color: var(--on-dark-faint);
}

/* --- Site header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  /* Near-opaque, not translucent. The header is in normal flow above <main>,
   * so at rest the backdrop behind it is the body's white — a 0.72 alpha
   * rendered it as a grey bar sitting above a black hero. This also keeps the
   * white nav legible once it is sticking over the white sections. */
  background: rgba(8, 8, 9, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

/* Two rows on a phone, one on a laptop, from one set of links.
 *
 * The links used to be `display: none` below 46rem, which left the mobile
 * header as a wordmark and a button — no route to Pricing, Privacy or the
 * scenarios from any page, on the devices most people arrive on. The footer
 * carried them, at the bottom of a very long scroll.
 *
 * A grid rather than a hamburger: there are four links. A disclosure menu
 * would need either JavaScript this site does not otherwise require on five of
 * its six pages, or the `details` display override, which browsers now
 * implement through `::details-content` and which fails silently where they
 * do not. Two rows always work. */
.site-header .wrap {
  display: grid;
  grid-template-areas:
    'mark cta'
    'links links';
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.15rem 1rem;
  padding-block: 0.45rem;
}

/* `min-width: 0` on both, and it is not optional. A grid item's default
 * `min-width: auto` refuses to shrink below its own min-content, so at large
 * text settings the wordmark and the link row each widened the header past the
 * screen and took the whole page sideways with them — and `overflow-x: auto`
 * on the nav could not engage, because the nav was never the thing being
 * constrained. */
.site-header .wordmark {
  grid-area: mark;
  min-width: 0;
  overflow: hidden;
}

.site-header .btn {
  grid-area: cta;
}

.site-header .nav-links {
  grid-area: links;
  min-width: 0;
}

@media (min-width: 46rem) {
  .site-header .wrap {
    grid-template-areas: 'mark links cta';
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding-block: 0.75rem;
  }

  .site-header .nav-links {
    justify-self: end;
  }
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  text-decoration: none;
  /* The home link, and it was a 28px target — under every published minimum
   * and awkward with a thumb. The height costs nothing: the row is already
   * taller than this. */
  min-height: 44px;
}

.wordmark img {
  width: 28px;
  height: 28px;
}

/* Scrolls rather than wrapping. Four links fit on one line from about 360px
 * up; below that a wrap would leave one link stranded on a line of its own and
 * make the sticky header a third taller, so the row scrolls instead. */
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-header nav::-webkit-scrollbar {
  display: none;
}

/* `:not(.btn)` so this does not repaint the primary button's label. It is
 * more specific than `a.btn-primary` and was turning white-on-blue into
 * grey-on-blue at 2.5:1. */
.site-header nav a:not(.btn) {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-header nav a:not(.btn):hover {
  color: #fff;
}

@media (max-width: 46rem) {
  .site-header nav {
    /* Bleeds to the screen edges so the last link does not look clipped by
     * the gutter when the row scrolls. */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    gap: 1.25rem;
  }

  .site-header nav a:not(.btn) {
    white-space: nowrap;
    padding-block: 0.4rem;
  }
}

.site-header .btn {
  padding: 0.55rem 1.1rem;
  font-size: 0.9375rem;
}

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

/* Copy on the left, the photograph beside it on the right; stacked on a
 * phone. The photograph is portrait — see .hero-figure for what that costs.
 *
 * NOTE the markup is `class="hero dark"`. This rule deliberately does NOT set
 * a background: a section that paints itself dark without also taking the
 * `.dark` text colours renders Shark headlines on near-black, which is
 * invisible rather than merely wrong. `.dark` owns both halves so they cannot
 * come apart — the same rule the app follows with `AppTheme.dark`. */
.hero {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

/* The photograph is a replaced element, and a grid item's automatic minimum
 * size for one of those comes from its *intrinsic* width — 853px here — not
 * from the `max-width: 100%` sitting on it. So the image sized the track, and
 * the headline, lede, button and proof strip all inherited a column wider than
 * the phone they were on. Only visible at large text settings, where the rest
 * of the column had stopped being the widest thing in it. */
.hero .wrap > * {
  min-width: 0;
}

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

/* Smaller than the global h1, which is the opposite of what a hero usually
 * wants. The reason is the proof strip below it: four numbers that only do
 * their job if somebody sees them without scrolling, and at 4.5rem the
 * headline alone ran four lines and pushed them off a 900px laptop screen. A
 * headline that fills the fold by itself is not a stronger headline. */
.hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 5.2vw, 3.625rem);
}

/* Both photographs are portrait — they were shot for a phone screen. Left at
 * their own proportions in a two-column layout they run over 1600px tall and
 * swallow the section, so the frame sets the height and the image crops to
 * fill it.
 *
 * The height belongs on the frame, not on the image. A `max-height` with
 * `height: auto` makes the browser shrink the *width* to preserve the aspect
 * ratio — which left a 268px-wide photograph rattling around inside a 350px
 * rounded frame on a phone. */
.hero-figure {
  position: relative;
  height: clamp(17rem, 44vh, 30rem);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

/* Fades the photograph into the ground it sits on, so it reads as part of the
 * page rather than a picture pasted onto it. */
.hero-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 55%,
    rgba(8, 8, 9, 0.85) 100%
  );
  pointer-events: none;
}

.hero-kicker {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-dark);
  color: var(--on-dark-muted);
  font-weight: 600;
}

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

.stack-lines {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
}

.stack-lines li {
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 700;
  color: var(--shark);
  padding-left: 1.25rem;
  border-left: 3px solid var(--royal-blue-surface);
  line-height: 1.35;
}

.dark .stack-lines li {
  color: #fff;
  border-left-color: var(--border-dark);
}

blockquote {
  margin: 3rem 0 0;
  padding: 0;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--shark);
  max-width: 30rem;
  letter-spacing: -0.02em;
}

.dark blockquote {
  color: #fff;
}

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

.steps {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 3.5rem;
}

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

.step-number {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--royal-blue);
  margin: 0 0 0.75rem;
}

.dark .step-number {
  color: var(--royal-blue-on-dark);
}

.step h3 {
  margin-bottom: 0.75rem;
}

.step p {
  color: var(--shark-muted);
}

.dark .step p {
  color: var(--on-dark);
}

.closer {
  margin-top: 3.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--shark);
}

.dark .closer {
  color: #fff;
}

/* --- Faces -------------------------------------------------------------- */

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

/* Grid items refuse to shrink below min-content unless told to, and one
 * stubborn child widens the track for every sibling in it. */
.split > * {
  min-width: 0;
}

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

  .split.reverse > :first-child {
    order: 2;
  }
}

.figure-panel {
  height: clamp(17rem, 46vh, 30rem);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
}

.figure-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.light .figure-panel {
  border-color: var(--border);
}

.temperaments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.temperaments li {
  background: var(--chip-dark);
  border: 1px solid var(--border-dark);
  color: var(--on-dark);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* --- Pre-flight card ---------------------------------------------------- */

/* A restatement of the app's own pre-flight panel, in the app's own dark
 * tokens. Not a screenshot: a screenshot would be stale the first time the
 * panel changed, and this has to stay honest about what the app offers. */
.preflight {
  background: var(--raised-dark);
  border: 1px solid var(--border-dark);
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 26rem;
}

.preflight-title {
  /* Muted, not faint. `--on-dark-faint` is the app's floor *against
   * immersiveBlack*; on this raised surface it falls to 4.45:1. */
  color: var(--on-dark-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

/* Wraps, or it sets the width of the whole section. "Pushback" and "Realistic"
 * on one line need about 400px at a 200% text setting, and a flex row will not
 * shrink past its min-content — so this panel widened its grid track to 450px
 * and took the headline, the lede and the note out past the screen edge with
 * it. The label dropping above its value is a much smaller cost. */
.preflight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--border-dark);
}

.preflight-row:first-of-type {
  border-top: 0;
}

.preflight-row dt {
  color: #fff;
  font-weight: 700;
  margin: 0;
}

.preflight-row dd {
  color: var(--royal-blue-on-dark);
  font-weight: 700;
  margin: 0;
}

.preflight-foot {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-dark);
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
}

/* --- Scenario cards ----------------------------------------------------- */

.cards {
  display: grid;
  gap: 1rem;
  margin-top: 3.5rem;
}

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

@media (min-width: 62rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: min(1.5rem, 7vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
}

.card h3 {
  font-size: 1.125rem;
}

.card p {
  color: var(--shark-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.card-tag {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--royal-blue);
}

.card.build {
  background: var(--royal-blue-surface);
  border-color: transparent;
}

/* --- Debrief mock ------------------------------------------------------- */

.rubric {
  display: grid;
  gap: 0.875rem;
  margin: 0;
  padding: 0;
}

/* `min(7.5rem, 40%)` rather than a bare 7.5rem: the rem floor is 240px at a
 * 200% text setting, which is wider than the whole column the bars sit in. */
.rubric-row {
  display: grid;
  grid-template-columns: minmax(min(7.5rem, 40%), auto) 1fr;
  align-items: center;
  gap: 1rem;
}

.rubric-row dt {
  font-weight: 700;
  color: var(--shark);
  font-size: 0.9375rem;
}

.rubric-row dd {
  margin: 0;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--royal-blue);
}

.recommend {
  margin-top: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--surface-subtle);
}

.recommend .eyebrow {
  margin-bottom: 0.75rem;
}

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

.recommend p {
  color: var(--shark-muted);
  font-size: 0.9375rem;
}

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

.plans {
  display: grid;
  gap: 1.25rem;
  margin-top: 3.5rem;
}

@media (min-width: 48rem) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }
}

.plan {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.plan.featured {
  border-color: var(--shark);
}

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

.plan-price {
  margin: 0.75rem 0 1.5rem;
  color: var(--shark-muted);
  font-size: 0.9375rem;
}

.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.plan li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9375rem;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--royal-blue);
}

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

.facts {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 52rem) {
  .facts {
    grid-template-columns: repeat(3, 1fr);
  }
}

.fact {
  border: 1px solid var(--border-dark);
  border-radius: 18px;
  padding: 1.5rem;
  background: var(--raised-dark);
}

.fact h2,
.fact h3 {
  font-size: 1.0625rem;
  line-height: 1.3;
  margin-bottom: 0.625rem;
}

.fact p {
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
}

/* --- Closing ------------------------------------------------------------ */

/* Also `class="closing dark"` — see the note on .hero. */
.closing {
  position: relative;
  overflow: hidden;
}

.closing::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('img/empty-chair.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.28;
  filter: grayscale(0.3);
}

.closing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 8, 9, 0.75) 0%,
    rgba(8, 8, 9, 0.92) 100%
  );
}

.closing .wrap {
  position: relative;
  z-index: 1;
  text-align: center;
}

.closing p {
  margin-inline: auto;
}

.closing .actions {
  justify-content: center;
}

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

.site-footer {
  background: var(--shark);
  color: var(--on-dark);
  padding-block: clamp(3.5rem, 7vw, 5rem) 2.5rem;
}

.footer-top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 56rem) {
  .footer-top {
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 2rem;
  }
}

.footer-brand p {
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
  margin-top: 1rem;
  max-width: 22rem;
}

.footer-col h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* The footer's ground is Shark, not immersiveBlack — lighter, so the faint
   * token drops to 4.03:1 here. */
  color: var(--on-dark-muted);
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

/* The footer is the site's real navigation on a phone, so its links get
 * thumb-sized rows rather than the 21px they had. `inline-block` because
 * vertical padding on an inline element does not move the box it is tapped
 * by. */
.footer-col a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.9375rem;
  display: inline-block;
  padding-block: 0.55rem;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  color: var(--on-dark-muted);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin: 0;
  max-width: none;
}

/* Crisis resources belong above the copyright, not buried in a legal column.
 * The app carries the same list on its support screen (REQ-37). */
.footer-safety {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
}

.footer-safety strong {
  color: #fff;
}

/* --- Legal pages -------------------------------------------------------- */

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

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

.doc h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

/* /privacy opens with the three promises, so the policy that follows is an
 * <h2> rather than a second <h1> — one <h1> per page. It is still the title of
 * the document, so it is set like one. */
.doc h2.doc-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 0;
}

.doc h2 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  margin-top: 3rem;
}

.doc h3 {
  margin-top: 2rem;
  font-size: 1.125rem;
}

.doc p,
.doc li {
  max-width: none;
  margin-top: 1rem;
}

.doc ul {
  padding-left: 1.25rem;
}

.doc .updated {
  color: var(--shark-muted);
  font-size: 0.9375rem;
  margin-top: 1rem;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
}

.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.doc th {
  color: var(--shark);
  font-weight: 700;
}

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

.callout {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--royal-blue-surface);
  color: var(--shark-body);
}

.callout p {
  margin-top: 0;
}

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

/* A short rise as each block enters. Deliberately small and one-way: the page
 * should feel considered, not animated. Reduce Motion turns it off entirely,
 * and everything is visible without JavaScript because `.reveal` is only
 * applied by the script itself. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.shown {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Printing never scrolls, so nothing would ever intersect. */
@media print {
  .reveal,
  .reveal.shown {
    opacity: 1;
    transform: none;
  }
}

/* --- Proof strip -------------------------------------------------------- */

/* Four numbers under the hero. The reason they are numbers and not adjectives
 * is that "lots of scenarios" is a claim anyone can make and "22" is one that
 * can be checked — and every figure here is checkable against the binary:
 * ScenarioLibrary.all is 22 long, SparLanguage has 97 entries, freeMaxSeconds
 * is 180, and the zero is the whole of REQ-12.
 *
 * Which also means they are a maintenance liability. If you add a scenario,
 * this strip is wrong until you edit it. That is the trade — a stale number is
 * a smaller problem than a page that says nothing measurable. */
.proof {
  list-style: none;
  padding: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
  margin: 2rem 0 0;
  border-top: 1px solid var(--border-dark);
}

/* `1fr` tracks still refuse to go below their content's min-content width
 * unless the items are told they may. Without this the four figures widened
 * the hero on a small screen at a large text setting. */
.proof > li {
  min-width: 0;
}

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

.proof-figure {
  display: block;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.proof-figure small {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
}

.proof-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--on-dark-muted);
  max-width: none;
}

.light .proof {
  border-top-color: var(--border);
}

.light .proof-figure {
  color: var(--shark);
}

.light .proof-label {
  color: var(--shark-muted);
}

/* --- Symptoms ----------------------------------------------------------- */

/* The complaint, and the answer to it, as one unit.
 *
 * A <dl> because that is exactly the relationship — each term is how somebody
 * describes this in their own words, each definition is what the product does
 * about it. Set in two columns on a wide screen so the pairing is visible at a
 * glance rather than only on the way down. */
.symptoms {
  display: grid;
  gap: 2rem 3rem;
  margin: 3rem 0 0;
}

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

.symptom dt {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--shark);
  text-wrap: balance;
}

.symptom dd {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--royal-blue-surface);
  color: var(--shark-muted);
  font-size: 0.9375rem;
}

.dark .symptom dt {
  color: #fff;
}

.dark .symptom dd {
  color: var(--on-dark-muted);
  border-left-color: var(--border-dark);
}

/* --- Comparison --------------------------------------------------------- */

/* Not a competitor feature matrix. The honest comparison for this product is
 * against the three things somebody actually does instead — read something,
 * ask a chatbot, or wing it — because none of those is a company and all
 * three are real alternatives. A table naming rival apps would be a table of
 * guesses about software we have not used. */
.versus {
  display: grid;
  gap: 1rem;
  margin-top: 3.5rem;
}

/* Three, not four. The chatbot card moved out to a section of its own — free
 * ChatGPT voice is most of the decision, and one card of four was not the
 * weight it deserved. */
@media (min-width: 52rem) {
  .versus {
    grid-template-columns: repeat(3, 1fr);
  }
}

.versus-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.versus-item h3 {
  font-size: 1.0625rem;
}

.versus-item p {
  font-size: 0.9375rem;
  color: var(--shark-muted);
  margin: 0;
}

.versus-item.mine {
  background: var(--royal-blue-surface);
  border-color: transparent;
}

.versus-item.mine p {
  color: var(--shark-body);
}

.versus-verdict {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shark-muted);
}

.versus-item.mine .versus-verdict {
  color: var(--royal-blue-pressed);
}

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

.price-head {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2rem, 4vw, 3rem);
}

/* The two tiers, side by side, with the price set as a headline rather than
 * as a caption. Principle: the number is the thing somebody came to the page
 * for, so it should not be the smallest text on it — the old .plan-price was
 * 15px grey under a 22px tier name. */
.tiers {
  display: grid;
  gap: 1.25rem;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

@media (min-width: 50rem) {
  .tiers {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }
}

/* The `min()` caps padding against the viewport, not just against the type
 * scale. A rem-based minimum keeps growing with the reader's text setting:
 * at 200% on a 320px phone this card was spending 112px — a third of the
 * screen — on its own inside edges, and the text that was left could not
 * fit. */
.tier {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: min(clamp(1.75rem, 4vw, 2.5rem), 9vw);
}

.tier.featured {
  border-color: var(--shark);
  border-width: 2px;
}

.tier-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tier-name h2 {
  font-size: 1.5rem;
}

.tier-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--royal-blue-pressed);
}

.tier-amount {
  margin: 1.25rem 0 0;
  font-size: clamp(2.25rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--shark);
}

.tier-amount small {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--shark-muted);
}

.tier-alt {
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  color: var(--shark-muted);
}

.tier-alt strong {
  color: var(--shark);
}

.tier ul {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.875rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.tier li {
  padding-left: min(1.75rem, 9vw);
  position: relative;
  font-size: 0.9375rem;
}

.tier li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--royal-blue);
}

/* A dash rather than a dot for what a tier does *not* include. Listing the
 * limits is not self-harm: somebody who finds the ceiling after paying is a
 * refund and a review, and somebody who finds it on this page is informed. */
.tier li.limit::before {
  top: 0.85em;
  width: 9px;
  height: 2px;
  border-radius: 0;
  background: var(--shark-muted);
}

.tier li.limit {
  color: var(--shark-muted);
}

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

/* The tiers already end on 4.5rem of padding, and the bare `section` rule
 * would add another 9rem on top of it — a screen and a half of nothing
 * between the price and the questions about the price. */
.pricing-faq {
  padding-block: 0 clamp(3.5rem, 8vw, 6rem);
}

.faq {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

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

.faq summary {
  cursor: pointer;
  padding: 1.25rem 2rem 1.25rem 0;
  font-weight: 700;
  color: var(--shark);
  position: relative;
  list-style: none;
}

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

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 1.1rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--royal-blue);
  line-height: 1;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq details > p {
  margin: 0 0 1.5rem;
  max-width: 44rem;
  color: var(--shark-muted);
  font-size: 0.9375rem;
}

/* --- Privacy page promise ----------------------------------------------- */

/* The three promises used to live on the homepage, where they were the ninth
 * thing on a long scroll. They are now the top of /privacy, above the policy
 * that proves them — the plain-English version first, the enforceable version
 * underneath, one URL. The app links here (lib/config/legal_urls.dart), and
 * that link must not move. */
.promise {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.promise .wrap {
  max-width: var(--page);
}

.promise .facts {
  margin-bottom: 0;
}

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

/* Principle 4: most people who reach this page will not install anything, and
 * the last thing they read is the thing they might repeat to someone else. So
 * the footer opens with the sentence rather than with a sitemap. */
.footer-statement {
  padding-bottom: 3rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-statement p {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #fff;
  max-width: 26rem;
}

.footer-statement .note {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.6;
  color: var(--on-dark-muted);
  margin-top: 1.25rem;
  max-width: 30rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 50;
  background: #fff;
  color: var(--shark);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--royal-blue-on-dark);
  outline-offset: 3px;
}

/* --- Guides ------------------------------------------------------------- */

.crumbs {
  font-size: 0.875rem;
  color: var(--shark-muted);
  margin-bottom: 1.5rem;
}

.crumbs a {
  color: inherit;
}

.crumbs span[aria-hidden] {
  margin-inline: 0.375rem;
}

.doc .updated {
  font-size: 0.875rem;
  color: var(--shark-muted);
}

.card h3 a {
  color: inherit;
  text-decoration: none;
}

.card h3 a:hover,
.card h3 a:focus-visible {
  text-decoration: underline;
}

.card-facing {
  color: var(--shark);
  font-weight: 600;
}

/* The 2- and 3-column breakpoints are viewport-based and would cram three
 * cards into the 46rem doc wrap. */
.doc .cards {
  grid-template-columns: 1fr;
  margin-top: 1.5rem;
}

.doc .card h3,
.doc .card p {
  margin-top: 0;
}

.guide-rehearse {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.guide-rehearse .actions {
  margin-top: 2rem;
}

.guide-related {
  margin-top: 3rem;
}

.guide-related ul {
  padding-left: 1.25rem;
}

.guide-related li {
  margin-top: 0.5rem;
}
