/* Waypoint marketing site.
 *
 * The palette is lifted straight from the app's TrailColors so the site and the
 * product read as one thing: forest greens for progress, a trail-blaze orange
 * for streaks and calls to action, parchment and bark for the calm reading
 * surface. Dark mode mirrors the app's night-trail theme. */

:root {
  --forest: #2e5d3e;
  --forest-deep: #234a30;
  --moss: #7ba05b;
  --blaze: #e07a3f;
  --ember: #d4552b;
  --brick: #9e3b2e;
  --bark: #4a3b2f;
  --stone: #8a8580;

  --bg: #faf6ef;
  --bg-raised: #ffffff;
  --bg-sunken: #f2ece1;
  --ink: #241d16;
  --ink-soft: #5f574c;
  --line: #e4dccd;

  --blaze-ui: var(--ember); /* the app drops to ember on light for contrast */
  --shadow: 0 1px 2px rgba(36, 29, 22, .06), 0 12px 32px rgba(36, 29, 22, .10);
  --shadow-soft: 0 1px 2px rgba(36, 29, 22, .05), 0 6px 18px rgba(36, 29, 22, .07);
  --radius: 20px;
  --maxw: 1120px;
}

/* The night-trail palette, in two places on purpose.
 *
 * The media query is the default and the only thing a reader without
 * JavaScript ever sees. The attribute is an explicit choice from the header
 * toggle, and has to be able to win *both* ways — a reader on a dark OS asking
 * for light gets nothing from a media query alone. CSS has no way to share one
 * declaration block between a media rule and a plain one, so the values are
 * written twice; if you change one, change the other.
 *
 * `:not([data-theme="light"])` is what lets the explicit light choice beat a
 * dark OS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --forest: #3f7a53;
    --forest-deep: #2e5d3e;
    --moss: #7ba05b;
    --bg: #14181a;
    --bg-raised: #1b2023;
    --bg-sunken: #101516;
    --ink: #f2ede4;
    --ink-soft: #a9a49b;
    --line: #2c3336;
    --blaze-ui: #f2915a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
  --forest: #3f7a53;
  --forest-deep: #2e5d3e;
  --moss: #7ba05b;
  --bg: #14181a;
  --bg-raised: #1b2023;
  --bg-sunken: #101516;
  --ink: #f2ede4;
  --ink-soft: #a9a49b;
  --line: #2c3336;
  --blaze-ui: #f2915a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 22px rgba(0, 0, 0, .35);
}

/* Tells the browser to theme its own furniture — form controls, scrollbars,
 * the address bar on mobile — to match whichever way the page went. */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

/* The `hidden` attribute has to beat our own layout rules.
 *
 * The browser's default is `[hidden] { display: none }`, an attribute selector
 * that loses to anything more specific — so a `.btn` set to inline-flex, or a
 * form set to flex, stays on screen with `hidden` set and nothing to explain
 * why. !important is the accepted idiom here precisely because "hidden" is not
 * a suggestion. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- waypoint mark ----------------------------------------------------- */
/* The pin body uses the app's own forest green (theme-aware, so it brightens
 * in dark mode exactly as the app does), and the cross is punched in the app's
 * background color so it reads as cut out of the reading surface. */

.wp-pin-body { fill: var(--forest); }
/* Always the light (parchment) cross, in both themes — it reads cleanly on the
 * green in dark mode where the app-background color would have gone muddy. */
.wp-pin-cross { fill: #faf6ef; }

/* The Android robot's eyes show the card behind it. */
.and-eye { fill: var(--bg-raised); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
/* :not(.btn) so the "Get the app" button keeps its own dark-on-orange text —
 * otherwise `.nav a` outweighs `.btn-primary` and the label goes muted grey,
 * which is unreadable on the blaze fill. */
.nav a:not(.btn) { color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.nav a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* ---- theme toggle ------------------------------------------------------ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink-soft); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}
/* One icon at a time: the one for the state you are about to switch *to*,
 * which is what the label promises. */
.theme-toggle .theme-icon { display: none; line-height: 0; }
.theme-toggle[data-showing="dark"] .theme-icon-sun { display: block; }
.theme-toggle[data-showing="light"] .theme-icon-moon { display: block; }

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--blaze) 0%, var(--ember) 100%);
  color: #1e1408;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 10px 24px rgba(224, 122, 63, .32);
}
.btn-primary:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 14px 30px rgba(224, 122, 63, .42); }
.btn-ghost {
  background: var(--bg-raised);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.btn svg { width: 20px; height: 20px; }

/* ---- hero -------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 110px) 0 clamp(48px, 7vw, 88px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 85% 0%, color-mix(in srgb, var(--moss) 22%, transparent), transparent 70%),
    radial-gradient(50% 55% at 5% 20%, color-mix(in srgb, var(--blaze) 14%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--forest);
  background: color-mix(in srgb, var(--moss) 22%, var(--bg));
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { margin-top: 18px; color: var(--stone); font-size: .9rem; }
.hero-art { display: flex; justify-content: center; }

/* ---- sections ---------------------------------------------------------- */

section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.card .ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--forest) 16%, var(--bg));
  color: var(--forest);
}
.card .ico svg { width: 24px; height: 24px; }
.card.blaze .ico { background: color-mix(in srgb, var(--blaze) 20%, var(--bg)); color: var(--ember); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---- screenshot gallery ------------------------------------------------ */

.gallery-band { background: var(--bg-sunken); border-block: 1px solid var(--line); }
.gallery {
  display: flex;
  gap: 34px;
  justify-content: center;
  flex-wrap: wrap;
}
.shot { text-align: center; }
.shot .cap {
  margin-top: 18px;
  font-weight: 700;
  color: var(--ink);
}
.shot .cap span { display: block; font-weight: 500; color: var(--ink-soft); font-size: .9rem; }

/* ---- screenshots (real device captures) -------------------------------- */

/* Drawn as background images rather than <img>.
 *
 * These come in light and dark pairs, and the pairing has to follow the header
 * toggle — not just the OS. `<picture>` with a prefers-color-scheme `media`
 * cannot: the browser picks a source at parse time and never reconsiders. Two
 * <img> elements hidden by CSS would work, but browsers fetch both, doubling
 * the transfer on a page that is mostly phone screenshots.
 *
 * A background image is fetched only when the rule that names it actually
 * applies, so this gets an instant toggle for one image's worth of bandwidth.
 * The cost is that `alt` and `loading="lazy"` are gone — hence role="img" with
 * an aria-label on each, and the note about the gallery below.
 *
 * The aspect ratio is fixed here rather than by width/height attributes, so a
 * recapture at slightly different pixel dimensions cannot reflow the page. */
.shot-img {
  display: block;
  width: 250px;
  max-width: 72vw;
  aspect-ratio: 1272 / 2772;
  border-radius: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background-color: var(--bg-raised);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}
.hero-shot { width: 288px; }

/* Each capture ships at 1x, 2x and 3x of the size it is drawn at, and the
 * browser takes the one that matches the screen — so a 1x display draws it
 * pixel-for-pixel and nothing is resampled.
 *
 * This is what fixes the graininess. The captures are ~1440px wide and the box
 * is 250px; asking the browser for that 5.7x reduction aliased every hairline
 * and glyph edge into visible noise. The reduction now happens once, offline,
 * with a proper filter — see server/screenshots-src/build.ps1, which also holds
 * the full-size masters.
 *
 * Three declarations per rule, narrowest support last, because that is how a
 * browser that does not understand image-set() is left holding the plain url().
 *
 * Light captures are the base, mirroring the palette at the top of this file.
 * Both dark selectors are needed for the same reason the palette needs two. */
[data-shot="home"] {
  background-image: url("/static/screenshots/home_light.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/home_light.jpg") 1x,
    url("/static/screenshots/home_light@2x.jpg") 2x,
    url("/static/screenshots/home_light@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/home_light.jpg") 1x,
    url("/static/screenshots/home_light@2x.jpg") 2x,
    url("/static/screenshots/home_light@3x.jpg") 3x);
}
[data-shot="cover"] {
  background-image: url("/static/screenshots/cover_to_cover_light.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/cover_to_cover_light.jpg") 1x,
    url("/static/screenshots/cover_to_cover_light@2x.jpg") 2x,
    url("/static/screenshots/cover_to_cover_light@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/cover_to_cover_light.jpg") 1x,
    url("/static/screenshots/cover_to_cover_light@2x.jpg") 2x,
    url("/static/screenshots/cover_to_cover_light@3x.jpg") 3x);
}
[data-shot="read"] {
  background-image: url("/static/screenshots/read_light.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/read_light.jpg") 1x,
    url("/static/screenshots/read_light@2x.jpg") 2x,
    url("/static/screenshots/read_light@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/read_light.jpg") 1x,
    url("/static/screenshots/read_light@2x.jpg") 2x,
    url("/static/screenshots/read_light@3x.jpg") 3x);
}
[data-shot="social"] {
  background-image: url("/static/screenshots/social_light.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/social_light.jpg") 1x,
    url("/static/screenshots/social_light@2x.jpg") 2x,
    url("/static/screenshots/social_light@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/social_light.jpg") 1x,
    url("/static/screenshots/social_light@2x.jpg") 2x,
    url("/static/screenshots/social_light@3x.jpg") 3x);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-shot="home"] {
    background-image: url("/static/screenshots/homepage.jpg");
    background-image: -webkit-image-set(
      url("/static/screenshots/homepage.jpg") 1x,
      url("/static/screenshots/homepage@2x.jpg") 2x,
      url("/static/screenshots/homepage@3x.jpg") 3x);
    background-image: image-set(
      url("/static/screenshots/homepage.jpg") 1x,
      url("/static/screenshots/homepage@2x.jpg") 2x,
      url("/static/screenshots/homepage@3x.jpg") 3x);
  }
  :root:not([data-theme="light"]) [data-shot="cover"] {
    background-image: url("/static/screenshots/cover_to_cover.jpg");
    background-image: -webkit-image-set(
      url("/static/screenshots/cover_to_cover.jpg") 1x,
      url("/static/screenshots/cover_to_cover@2x.jpg") 2x,
      url("/static/screenshots/cover_to_cover@3x.jpg") 3x);
    background-image: image-set(
      url("/static/screenshots/cover_to_cover.jpg") 1x,
      url("/static/screenshots/cover_to_cover@2x.jpg") 2x,
      url("/static/screenshots/cover_to_cover@3x.jpg") 3x);
  }
  :root:not([data-theme="light"]) [data-shot="read"] {
    background-image: url("/static/screenshots/read.jpg");
    background-image: -webkit-image-set(
      url("/static/screenshots/read.jpg") 1x,
      url("/static/screenshots/read@2x.jpg") 2x,
      url("/static/screenshots/read@3x.jpg") 3x);
    background-image: image-set(
      url("/static/screenshots/read.jpg") 1x,
      url("/static/screenshots/read@2x.jpg") 2x,
      url("/static/screenshots/read@3x.jpg") 3x);
  }
  :root:not([data-theme="light"]) [data-shot="social"] {
    background-image: url("/static/screenshots/social.jpg");
    background-image: -webkit-image-set(
      url("/static/screenshots/social.jpg") 1x,
      url("/static/screenshots/social@2x.jpg") 2x,
      url("/static/screenshots/social@3x.jpg") 3x);
    background-image: image-set(
      url("/static/screenshots/social.jpg") 1x,
      url("/static/screenshots/social@2x.jpg") 2x,
      url("/static/screenshots/social@3x.jpg") 3x);
  }
}

:root[data-theme="dark"] [data-shot="home"] {
  background-image: url("/static/screenshots/homepage.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/homepage.jpg") 1x,
    url("/static/screenshots/homepage@2x.jpg") 2x,
    url("/static/screenshots/homepage@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/homepage.jpg") 1x,
    url("/static/screenshots/homepage@2x.jpg") 2x,
    url("/static/screenshots/homepage@3x.jpg") 3x);
}
:root[data-theme="dark"] [data-shot="cover"] {
  background-image: url("/static/screenshots/cover_to_cover.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/cover_to_cover.jpg") 1x,
    url("/static/screenshots/cover_to_cover@2x.jpg") 2x,
    url("/static/screenshots/cover_to_cover@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/cover_to_cover.jpg") 1x,
    url("/static/screenshots/cover_to_cover@2x.jpg") 2x,
    url("/static/screenshots/cover_to_cover@3x.jpg") 3x);
}
:root[data-theme="dark"] [data-shot="read"] {
  background-image: url("/static/screenshots/read.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/read.jpg") 1x,
    url("/static/screenshots/read@2x.jpg") 2x,
    url("/static/screenshots/read@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/read.jpg") 1x,
    url("/static/screenshots/read@2x.jpg") 2x,
    url("/static/screenshots/read@3x.jpg") 3x);
}
:root[data-theme="dark"] [data-shot="social"] {
  background-image: url("/static/screenshots/social.jpg");
  background-image: -webkit-image-set(
    url("/static/screenshots/social.jpg") 1x,
    url("/static/screenshots/social@2x.jpg") 2x,
    url("/static/screenshots/social@3x.jpg") 3x);
  background-image: image-set(
    url("/static/screenshots/social.jpg") 1x,
    url("/static/screenshots/social@2x.jpg") 2x,
    url("/static/screenshots/social@3x.jpg") 3x);
}

/* Puts back most of what `loading="lazy"` used to do: the gallery is below the
 * fold, and this lets the browser skip rendering — and so fetching — the
 * screenshots until they are near the viewport. The intrinsic size keeps the
 * scrollbar honest while they are skipped. Ignored where unsupported, which
 * costs a fetch rather than correctness. */
.gallery .shot-img {
  content-visibility: auto;
  contain-intrinsic-size: 250px 508px;
}

/* ---- CTA + footer ------------------------------------------------------ */

.cta {
  text-align: center;
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: #f4f1e8;
  border-radius: 28px;
  padding: clamp(40px, 6vw, 64px) 28px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.cta h2 { color: #fff; }
.cta p { color: color-mix(in srgb, #fff 78%, transparent); font-size: 1.1rem; max-width: 44ch; margin: 0 auto 28px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--stone);
  font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.site-footer .nav-links { margin-left: auto; display: flex; gap: 22px; }
.site-footer a { color: var(--ink-soft); }

/* ---- downloads --------------------------------------------------------- */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}
.dl-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.dl-card .platform { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.dl-card .platform svg { width: 30px; height: 30px; }
.dl-card h3 { margin: 0; font-size: 1.3rem; }
.dl-card .meta { color: var(--stone); font-size: .85rem; margin: 2px 0 16px; }
.dl-card p { color: var(--ink-soft); margin: 0 0 22px; flex: 1; }
.dl-card .btn { width: 100%; }

/* Request access, shown while the app is in closed testing.
 *
 * `flex: 1` is on .dl-card p so the two cards' buttons line up; the form has to
 * opt out of growing or opening it stretches the card past its neighbour. */
#access-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#access-form label {
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
}
#access-form input[type=email], #access-form input[type=text] {
  width: 100%; padding: 11px 13px; font: inherit; font-size: .95rem;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px;
}
#access-form input:focus-visible {
  outline: 2px solid var(--pine); outline-offset: 1px;
}
.dl-card .dl-note {
  /* Overrides the .dl-card p rule above, which would otherwise make this
     helper line absorb all the slack in the card. */
  flex: none; font-size: .8rem; color: var(--stone); margin: -4px 0 0;
}
#access-status { flex: none; margin: 0; font-size: .86rem; }
#access-status.ok { color: var(--pine); }
#access-status.bad { color: var(--ember); }
/* The honeypot: off-screen rather than display:none, since a bot that skips
   hidden inputs would sail past it. */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--blaze) 18%, var(--bg));
  color: var(--ember);
}
.steps {
  max-width: 780px; margin: 44px auto 0;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
}
.steps h3 { margin-top: 0; }
.steps ol { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.steps li { margin: 8px 0; }
.steps code {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 7px;
  font-size: .86em;
  color: var(--ink);
}

/* ---- prose (privacy, delete-account) ----------------------------------- */

.prose { padding: clamp(40px, 6vw, 72px) 0 64px; }
.prose .wrap { max-width: 760px; }
.prose h1 { margin-top: 14px; }
.prose h2 { font-size: 1.35rem; margin-top: 36px; }
.prose p, .prose li { color: var(--ink-soft); line-height: 1.7; }
.prose ul { padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--ink); }
.prose-lead { font-size: 1.15rem; color: var(--ink) !important; margin-top: 10px; }
.prose-meta { font-size: .9rem; color: var(--stone) !important; }

.danger-box {
  background: color-mix(in srgb, var(--ember) 12%, var(--bg-raised));
  border: 1px solid color-mix(in srgb, var(--ember) 32%, var(--line));
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.danger-box strong { color: var(--ember); font-size: 1.05rem; }
.danger-box p { margin: 8px 0 0; }

/* ---- account form (delete) --------------------------------------------- */

.account-form { display: flex; flex-direction: column; gap: 8px; margin: 26px 0 8px; }
.account-form label { font-weight: 700; font-size: .9rem; color: var(--ink); margin-top: 8px; }
.account-form input[type=email],
.account-form input[type=password] {
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink);
  font-size: 1rem;
}
.account-form input:focus { outline: 2px solid var(--ember); border-color: transparent; }
.account-form .confirm {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 16px;
  cursor: pointer;
}
.account-form .confirm input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--ember); }
.btn-danger {
  margin-top: 18px;
  background: linear-gradient(180deg, var(--brick) 0%, #86271d 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 10px 24px rgba(158,59,46,.28);
}
.btn-danger:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.form-msg { margin-top: 16px; padding: 11px 14px; border-radius: 10px; font-size: .92rem; }
.form-msg.error { background: color-mix(in srgb, var(--brick) 14%, var(--bg-raised)); color: var(--brick); border: 1px solid color-mix(in srgb, var(--brick) 30%, var(--line)); }
.form-msg.ok { background: color-mix(in srgb, var(--forest) 14%, var(--bg-raised)); color: var(--forest); border: 1px solid color-mix(in srgb, var(--forest) 30%, var(--line)); }

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { margin-top: 20px; }
  .features { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }

  /* Only the CTA and the theme toggle survive here, and the toggle takes room
   * the CTA used to have — enough to wrap "Get the app" onto two lines and
   * push the button out of the header. Tighter gap, smaller toggle, and a
   * label that is not allowed to wrap. */
  .nav { gap: 12px; }
  .nav .btn { white-space: nowrap; padding-inline: 16px; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* Small phones: the CTA and the toggle together are wider than the header's
 * content column, so the toggle was hanging into the gutter. */
@media (max-width: 400px) {
  .nav { gap: 10px; }
  .nav .btn { padding-inline: 12px; font-size: .92rem; }
}
