/* ENDEVA brand tokens, shared by the marketing site and the studio.
   Only colours that carry meaning live here; each surface's own palette
   (backgrounds, text, borders) stays in its own stylesheet.
   Rules from the app: mint is brand/accent only and never a data series for
   an activity, activity content uses its category colour, and records use
   --record. Plus is the three categories fused (the app's PlusBranding.swift,
   since 2026-10-04): strength blue to cardio orange, bridged through violet
   and pink so the middle never goes muddy. It runs horizontally, never
   diagonally, on fills, borders and icons, never on small text, and never
   beside mint. Built from the category tokens, so it adapts with them. */

:root {
  /* Brand */
  --brand: #5FD6A4;
  --on-brand: #ffffff;      /* wordmark/tagline on mint, mirrors the splash */
  --brand-ink: #08301f;     /* accessible ink for small text on mint */
  /* Plus: the app's plusSolid (the violet bridge, the stand-in where a
     gradient can't go: small icons, outlines) and plusPink */
  --plus-solid: #8A70E0;
  --plus-pink: #D963A8;
  --record: #FFCC00;        /* personal records and achievements */

  /* Activity categories (iOS system colors) */
  --cat-strength: #007AFF;
  --cat-cardio: #FF9500;
  --cat-sport: #AF52DE;

  /* The Plus spectrum. --plus-gradient is the app's plusGradient (buttons,
     larger marks); --plus-tag-gradient deepens the end so white text stays
     readable on a small tag; --plus-wash is the spectrum at low strength
     behind a Plus card or hero (the app's PlusWash, card surface). */
  --plus-gradient: linear-gradient(90deg, var(--cat-strength) 0%, var(--plus-solid) 38%, var(--plus-pink) 68%, var(--cat-cardio) 100%);
  --plus-tag-gradient: linear-gradient(90deg, var(--cat-strength) 0%, var(--plus-solid) 35%, #C9579E 70%, #E3703B 100%);
  --plus-wash-alpha: 12%;
  --plus-wash: linear-gradient(90deg,
    color-mix(in srgb, var(--cat-strength) var(--plus-wash-alpha), transparent) 0%,
    color-mix(in srgb, var(--plus-solid) var(--plus-wash-alpha), transparent) 38%,
    color-mix(in srgb, var(--plus-pink) var(--plus-wash-alpha), transparent) 68%,
    color-mix(in srgb, var(--cat-cardio) var(--plus-wash-alpha), transparent) 100%);
}

/* Dark values apply when the system prefers dark, unless a page forces light
   with data-theme="light", and always when it forces data-theme="dark". The
   marketing site never sets data-theme, so it simply follows the system; the
   studio sets it from the theme choice in Account. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --record: #FFD60A;

    --cat-strength: #0A84FF;
    --cat-cardio: #FF9F0A;
    --cat-sport: #BF5AF2;
    --plus-wash-alpha: 18%;
  }
}

:root[data-theme="dark"] {
  --record: #FFD60A;

  --cat-strength: #0A84FF;
  --cat-cardio: #FF9F0A;
  --cat-sport: #BF5AF2;
  --plus-wash-alpha: 18%;
}

/* ENDEVA marketing site styles. Pages read only from tokens. The brand and
   category tokens are in src/shared/tokens.css, which the build prepends to
   this file; the surface tokens below belong to the marketing site alone.

   The look follows the app, by way of WEBSITE_SPEC.md §5 (the studio's design
   system): iOS system surfaces, cards filled rather than outlined, radii of
   12, 16 and 20, icon chips tinted with the colour they stand for, tabular
   numbers, and Lucide icons in place of SF Symbols. Mint is chrome only (the
   primary button, focus, the current page, link underlines); activity
   content takes its category colour; the Plus spectrum appears on Plus
   surfaces alone. */

:root {
  color-scheme: light dark;

  /* Surfaces: iOS systemBackground, systemGray6, systemGray5 */
  --bg: #ffffff;
  --card: #f2f2f7;
  --card-raised: #e5e5ea;
  --text: #111113;
  --text-2: #6e6e73;
  --separator: rgba(60, 60, 67, 0.14);
  --header-bg: var(--bg);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);

  /* Mint as text or a focus ring. The brand value is too light on white for
     either (1.8:1), so light mode darkens it; dark mode uses the brand itself. */
  --brand-text: #0e7a51;
  --focus: #1a9e6b;

  /* Older names, kept so long-form furniture reads the same tokens */
  --bg-alt: var(--card);
  --border: var(--separator);

  --radius-s: 12px;
  --radius: 16px;
  --radius-l: 20px;
  --content: 42rem;
  --wide: 72rem;
  --header-h: 4rem;
  /* The status bar and Dynamic Island on an iPhone (viewport-fit=cover in
     base.njk); 0 everywhere else. The header grows by it, so anything placed
     under the header adds it. */
  --safe-top: env(safe-area-inset-top, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-rounded: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --card: #1c1c1e;
    --card-raised: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989f;
    --separator: rgba(84, 84, 88, 0.55);
    --header-bg: var(--bg);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px rgba(0, 0, 0, 0.5);
    --brand-text: var(--brand);
    --focus: var(--brand);
  }
}

/* Base */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Anchored headings land below the sticky header, not under it */
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* In landscape the notch and island sit at the sides: keep content clear of
   them. The header and footer handle their own, so their fills still run
   edge to edge. */
#content {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.6rem); letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; }
strong { font-weight: 650; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* The hidden attribute must always win. The browser's own rule for it is only
   display: none in the UA stylesheet, so any author rule setting display beats
   it: .ex-list li and .chips are both display: flex, which left every "hidden"
   exercise row and the hidden jump links rendering as normal. That made the
   library's search look broken, counting matches correctly while filtering
   nothing. Do not remove this, and do not rely on the attribute alone. */
[hidden] { display: none !important; }

/* Uppercase + tracking is reserved for the ENDEVA wordmark */
.wordmark {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Any stat numbers get tabular digits, matching the app */
.num { font-variant-numeric: tabular-nums; }

.muted { color: var(--text-2); }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-s);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: calc(var(--safe-top) + 0.75rem); }

/* Small label over a heading, in sentence case: uppercase is the wordmark's */
.eyebrow {
  display: block;
  margin: 0 0 0.5rem;
  color: var(--brand-text);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0;
}

/* Layout */
.container {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 720px) {
  .container { padding: 0 1.5rem; }
}

.page { padding: 2.5rem 0 4rem; }

.prose {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}
@media (min-width: 720px) {
  .prose { padding: 3rem 1.5rem 5rem; font-size: 1.0625rem; }
}
.prose h1 { margin-bottom: 0.4em; }
.prose h1 + .muted,
.prose h1 + .article-meta {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}
.prose h2 { font-size: 1.4rem; margin-top: 2.25em; }
.prose ul,
.prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--text-2); }
.prose ol > li::marker { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Links in running text: ink with a mint underline, the brand as chrome */
.prose a:not([class]):not(.toc a, .article-list a),
.page p a:not([class]),
.faq a,
.note a {
  text-decoration-line: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.15s;
}
.prose a:not([class]):not(.toc a, .article-list a):hover,
.page p a:not([class]):hover,
.faq a:hover,
.note a:hover { text-decoration-color: currentColor; }

/* Header: sticky and opaque, in the page's own background. The mobile menu
   is a CSS-only checkbox hack, which keeps the site zero-JS.
   It is opaque on purpose. In Safari on an iPhone the strip behind the status
   bar and Dynamic Island is Safari's, not the page's: it paints it one solid
   colour taken from the top of the page, and no CSS can make it translucent.
   A translucent bar under that solid strip showed the page scrolling through
   it and a hard seam just below the island; an opaque bar in --bg is the same
   colour as the strip, so the two read as one surface. The safe-area padding
   still matters where the page does run under the status bar (a home-screen
   web app). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: var(--safe-top);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--separator);
}
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: var(--header-h);
}
.site-header a { text-decoration: none; }
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  margin-right: auto;
  text-decoration: none;
}
.home-link .mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 22%;
  background: var(--brand);
}
.home-link .wordmark { font-size: 1.05rem; }

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.nav-button:hover { background: var(--card); }
.nav-toggle:focus-visible + .nav-button {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.nav-button .icon { width: 1.5rem; height: 1.5rem; }
.nav-button .i-close,
.nav-toggle:checked + .nav-button .i-menu { display: none; }
.nav-toggle:checked + .nav-button .i-close { display: block; }

/* Mobile: the menu drops open under the bar as one scrolling sheet */
.site-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  max-height: calc(100dvh - var(--header-h) - var(--safe-top));
  overflow-y: auto;
  padding: 0.5rem 0 1.25rem;
}
.nav-toggle:checked ~ .site-nav { display: flex; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 3rem;
  padding: 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-s);
}
.nav-link[aria-current="page"] { color: var(--brand-text); }
.nav-trigger .icon { display: none; }

.dropdown {
  display: grid;
  gap: 0.25rem;
  margin: 0.25rem 0 0.75rem;
  padding: 0.4rem;
  border-radius: var(--radius);
  background: var(--card);
}
.dd-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-s);
}
.dd-item strong { display: block; font-weight: 600; }
.dd-item small {
  display: block;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.35;
}
.dd-item[aria-current="page"] strong { color: var(--brand-text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--separator);
}
.nav-actions .btn { flex: 1; }
.nav-actions .nav-link {
  flex: 1;
  justify-content: center;
  font-size: 1rem;
  background: var(--card);
  border-radius: 999px;
  min-height: 2.75rem;
}

@media (min-width: 900px) {
  .nav-button { display: none; }
  .site-nav {
    display: flex;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .nav-link {
    min-height: 2.5rem;
    padding: 0 0.85rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: 999px;
    transition: color 0.15s, background-color 0.15s;
  }
  .nav-link:hover { color: var(--text); background: var(--card); }
  .nav-link[aria-current="page"] { color: var(--text); font-weight: 600; }
  .nav-trigger .icon {
    display: block;
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
  }

  /* Articles: a hover and keyboard-focus panel, still zero JS */
  .nav-group { position: relative; }
  .dropdown {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    width: 34rem;
    grid-template-columns: 1fr 1fr;
    margin: 0;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--separator);
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -0.35rem);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  }
  /* invisible bridge so the pointer can cross from trigger to panel */
  .dropdown::before {
    content: "";
    position: absolute;
    top: -0.8rem;
    left: 0;
    right: 0;
    height: 0.8rem;
  }
  .nav-group:hover .dropdown,
  .nav-group:focus-within .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
  }
  .nav-group:hover .nav-trigger .icon,
  .nav-group:focus-within .nav-trigger .icon { transform: rotate(180deg); }
  .dd-item { align-items: flex-start; padding: 0.75rem; }
  .dd-item:hover { background: var(--card); }

  .nav-actions {
    gap: 0.25rem;
    margin: 0 0 0 0.75rem;
    padding: 0 0 0 0.75rem;
    border-top: 0;
    border-left: 1px solid var(--separator);
  }
  .nav-actions .btn,
  .nav-actions .nav-link { flex: none; }
  .nav-actions .nav-link { background: none; font-size: 0.95rem; }
  .nav-actions .btn { min-height: 2.5rem; padding: 0 1.1rem; font-size: 0.95rem; }
}

/* Icon chip: the app's tinted square, glyph in the colour it stands for.
   Neutral by default; give it an accent-* class for activity content. */
.icon-chip {
  --chip-c: var(--text-2);
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  color: var(--chip-c);
  background: color-mix(in srgb, var(--chip-c) 15%, transparent);
}
.icon-chip .icon { width: 1.15rem; height: 1.15rem; }
.icon-chip.lg { width: 2.75rem; height: 2.75rem; border-radius: 12px; }
.icon-chip.lg .icon { width: 1.4rem; height: 1.4rem; }
.icon-chip.brand { --chip-c: var(--brand-text); }
.accent-strength .icon-chip, .icon-chip.accent-strength { --chip-c: var(--cat-strength); }
.accent-cardio .icon-chip, .icon-chip.accent-cardio { --chip-c: var(--cat-cardio); }
.accent-sport .icon-chip, .icon-chip.accent-sport { --chip-c: var(--cat-sport); }

/* Buttons: min-height keeps tap targets at 44px or more */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.4rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, background-color 0.15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }
.btn .icon { width: 1.1rem; height: 1.1rem; }
.btn-lg { min-height: 3.25rem; padding: 0.8rem 1.75rem; font-size: 1.05rem; }
.btn-store { background: #000; color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn-store { background: #fff; color: #000; }
}
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-outline { background: var(--card); color: var(--text); }
.btn-outline:hover { background: var(--card-raised); filter: none; }
.btn-plain {
  background: transparent;
  color: inherit;
  padding-inline: 0.75rem;
}
.btn-plain:hover { filter: none; text-decoration: underline; }

/* Plus (the spectrum, tokens.css): subscription surfaces only, never
   beside mint. The tag is the app's PlusBadge: white "Plus" on the tag
   gradient; the button is its PlusUpgradeButton. */
.plus-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: var(--plus-tag-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-plus { background: var(--plus-gradient); color: #fff; }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; filter: none; transform: none; }

/* Cards: filled, not outlined, as in the app */
.grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
/* Three-up card grid, for section indexes with more than four cards */
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.15rem 1.15rem 1.25rem;
}
.card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  margin: 0.4rem 0 0;
}
.card h3 a { text-decoration: none; }
.card p { color: var(--text-2); margin: 0; }
.card > :last-child { margin-bottom: 0; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card p:has(> .btn) { margin-top: auto; padding-top: 0.75rem; }

/* A card whose heading link covers the whole card */
.card-link { transition: background-color 0.15s, transform 0.15s; }
.card-link:hover { background: var(--card-raised); }
.card-link:active { transform: scale(0.99); }
.card-link h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card-link h3 a:focus-visible { outline: none; }
.card-link:has(h3 a:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.card-arrow {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  color: var(--text-2);
  transition: transform 0.15s, color 0.15s;
}
.card-link:hover .card-arrow { transform: translateX(3px); color: var(--text); }

/* Activity dot, kept for any page still using it */
.dot {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--accent, var(--brand));
}
.accent-strength { --accent: var(--cat-strength); }
.accent-cardio { --accent: var(--cat-cardio); }
.accent-sport { --accent: var(--cat-sport); }
.accent-brand { --accent: var(--brand); }

/* Page heads for the section indexes */
.page-head { margin: 0 0 2rem; }
.page-head h1 { margin-bottom: 0.35rem; }
.page-head .lede {
  color: var(--text-2);
  font-size: 1.15rem;
  max-width: 38rem;
  margin: 0;
}

/* Home: hero. A mint card, the app's splash colour, with ink text. White on
   mint, as the splash has it, is 1.8:1 and unreadable at body sizes. */
.hero { padding-top: 1rem; }
.hero-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2rem;
  border-radius: 28px;
  padding: 2.75rem 1.5rem 0;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(160deg, #6fe0b0, var(--brand) 55%, #45c08c);
  color: var(--brand-ink);
}
.hero-copy { text-align: center; }
.hero .mark {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
  border-radius: 22%;
  box-shadow: 0 10px 28px rgba(8, 48, 31, 0.25);
}
.hero h1 {
  font-size: clamp(2.75rem, 11vw, 4.5rem);
  letter-spacing: 0.1em;
  margin-bottom: 0.25em;
}
.hero .tagline {
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5em;
}
.hero .hero-sub {
  font-size: 1.1rem;
  font-weight: 500;
  max-width: 32rem;
  margin: 0 auto 1.75rem;
  opacity: 0.85;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.hero .btn-store { background: #000; color: #fff; }
.hero .btn-plain { color: var(--brand-ink); }
.hero-shot {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.hero-shot .phone {
  width: min(260px, 70vw);
  margin-bottom: -5rem;
  box-shadow: 0 30px 60px rgba(8, 48, 31, 0.3);
}
@media (min-width: 900px) {
  .hero { padding-top: 1.5rem; }
  .hero-card {
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    padding: 4rem 4rem 0;
    min-height: 34rem;
  }
  .hero-copy { text-align: left; padding-bottom: 4rem; }
  .hero .mark { margin: 0 0 1.75rem; }
  .hero .hero-sub { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-shot { align-self: end; }
  .hero-shot .phone { width: 290px; margin-bottom: -6rem; }
}

/* Section heading block used down the home page */
.section { padding-block: 4.5rem 1rem; }
.section-head { max-width: 40rem; margin: 0 0 2rem; }
.section-head h2 { font-size: clamp(1.75rem, 4.5vw, 2.4rem); margin-bottom: 0.35em; }
.section-head p { color: var(--text-2); font-size: 1.1rem; margin: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

/* Feature tour (home): alternating rows on wide screens */
.feature-row {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--separator); }
.feature-row h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0 0 0.6rem;
}
.feature-row p {
  color: var(--text-2);
  font-size: 1.075rem;
  max-width: 34rem;
  margin: 0;
}
.feature-kind {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 600;
}
.feature-row .phone { margin: 0 auto; }
@media (min-width: 760px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 3.5rem 0;
  }
  .feature-row + .feature-row { border-top: 0; }
  .feature-row:nth-child(even) > :first-child { order: 2; }
}

/* Screenshot placeholders: an iPhone frame to drop screenshots into */
.shots { padding: 2rem 0 3rem; }
.shot-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 1.25rem 1rem;
  scroll-snap-type: x mandatory;
}
.phone {
  position: relative;
  flex: none;
  width: 230px;
  aspect-ratio: 9 / 19.5;
  border: 8px solid #1d1d1f;
  border-radius: 2.6rem;
  background:
    linear-gradient(180deg, var(--card), var(--card-raised));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.85rem;
  scroll-snap-align: center;
  box-shadow: var(--shadow);
}
.phone::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 32%;
  height: 1.35rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #1d1d1f;
}
.phone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
}

/* Learn band (home) and hub cards */
.learn-grid { display: grid; gap: 0.75rem; }
@media (min-width: 640px) {
  .learn-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}
@media (min-width: 1000px) {
  .learn-grid { grid-template-columns: repeat(4, 1fr); }
}
.card .card-stat {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Centred call to action band */
.cta { text-align: center; padding: 2rem 0 3rem; }
.cta-card {
  margin: 4rem 0 1rem;
  padding: 3rem 1.5rem;
  border-radius: 28px;
  background: var(--card);
  text-align: center;
}
.cta-card h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); max-width: 30rem; margin: 0 auto 1.25rem; }
.cta-card .mark { width: 3.5rem; height: 3.5rem; border-radius: 22%; margin-bottom: 1.25rem; }

/* Article lists: grouped rows in one card, like an iOS inset list */
.article-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.prose .article-list { padding-left: 0; }
.prose .article-list li { margin: 0; }
.article-list li + li { border-top: 1px solid var(--separator); }
.article-list a {
  position: relative;
  display: block;
  padding: 1rem 3rem 1.05rem 1.15rem;
  text-decoration: none;
  transition: background-color 0.15s;
}
.article-list a:hover { background: var(--card-raised); }
.article-list a::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-50%) rotate(-45deg);
  opacity: 0.7;
}
.article-list a:focus-visible { outline-offset: -2px; }
.article-list h2 {
  font-size: 1.05rem;
  margin: 0 0 0.2em;
  letter-spacing: -0.005em;
}
.article-list p { margin: 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.5; }
.article-list .article-meta { font-size: 0.8rem; margin-bottom: 0.15rem; }
.article-meta {
  color: var(--text-2);
  font-size: 0.9rem;
}

/* FAQ: native details/summary, no JS, as one grouped card */
.faq {
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.faq details + details { border-top: 1px solid var(--separator); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.25rem;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
.faq summary:hover { background: var(--card-raised); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq details p { color: var(--text-2); margin: 0 1.15rem 1rem; }
.faq details > :last-child { margin-bottom: 1.15rem; }

/* Long-form article furniture: science, programs, exercise library.
   Every surface here is neutral (card / separator / text-2). Mint stays
   brand-only, the Plus spectrum stays Plus-only, and the category colors stay for
   activity content, so nothing below tints data. */

/* Jump links now matter, so honour the motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.prose h3 { font-size: 1.12rem; margin-top: 1.75em; }
.prose h4 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.5em 0 0.4em;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--separator);
  margin: 2.5rem 0;
}
.prose figure { margin: 1.5rem 0; }
.prose figcaption { color: var(--text-2); font-size: 0.85rem; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--separator);
  color: var(--text-2);
}

/* "← All guides": a quiet pill above the title */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.25rem;
  padding: 0 0.85rem 0 0.7rem;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background-color 0.15s;
}
.back-link:hover { color: var(--text); background: var(--card-raised); }
.prose > p:has(> .back-link:only-child) { margin-bottom: 1.25rem; }

/* Shape chips: "3 days", "6 weeks", "Barbell". Static labels by default,
   jump links on the exercise index. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}
.prose .chips { padding-left: 0; }
.prose .chips li { margin: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
a.chip {
  min-height: 2.75rem;
  padding: 0 0.95rem;
  text-decoration: none;
  color: var(--text);
}
a.chip:hover { background: var(--card-raised); }

/* Load display, matching the app: kg leads, the percent is a quiet badge */
.load {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.pct {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--card-raised);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  white-space: nowrap;
}
.load .pct { margin-left: 0.4rem; }

/* Week by week scheme tables. Four columns fit 390px; the wrapper is
   insurance for anything wider. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--separator);
  border-radius: var(--radius);
}
.scheme {
  /* separate, not collapse: sticky row headers are unreliable otherwise */
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.9rem;
}
.scheme caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 0.95rem 0.35rem;
  color: var(--text-2);
  font-size: 0.85rem;
  line-height: 1.4;
}
.scheme th,
.scheme td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  border-bottom: 1px solid var(--separator);
}
.scheme tr:last-child > * { border-bottom: 0; }
.scheme thead th {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--card);
}
.scheme tbody th,
.scheme thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  font-weight: 600;
  border-right: 1px solid var(--separator);
}
.scheme tbody th { background: var(--bg); }
.scheme thead th:first-child { background: var(--card); z-index: 2; }
.scheme .sets {
  display: block;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.scheme .pct { margin-top: 0.15rem; }
.scheme .cell-note {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 400;
}
/* Emphasis rows (test week, deload). Neutral fill, never brand or category. */
.scheme tr.is-marked > *,
.scheme tr.is-marked th { background: var(--card); }

/* Contents card at the top of long articles. Plain anchor links, so the jump
   behaviour is the browser's and the page stays zero-JS. Section numbers come
   from CSS counters, so adding or reordering a heading renumbers itself. */
.toc {
  border-radius: var(--radius);
  background: var(--card);
  padding: 1rem 1.15rem 1.1rem;
  margin: 0 0 2.5rem;
}
.toc-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--separator);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li { margin: 0; }
.toc a {
  display: flex;
  gap: 0.55rem;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  text-decoration: none;
}
.toc a:hover { color: var(--brand-text); }
.toc a::before {
  flex: none;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Numbering: 1, 2, 3 for sections and 3.1, 3.2 for subsections */
.toc > ol { counter-reset: toc-section; }
.toc > ol > li { counter-increment: toc-section; }
.toc > ol > li > a::before {
  content: counter(toc-section) ".";
  min-width: 1.6rem;
}
.toc > ol > li > ol {
  counter-reset: toc-sub;
  padding-left: 1.6rem;
}
.toc > ol > li > ol > li { counter-increment: toc-sub; }
.toc > ol > li > ol > li > a::before {
  content: counter(toc-section) "." counter(toc-sub);
  min-width: 2.1rem;
}
.toc > ol > li > ol > li > a { color: var(--text-2); }

@media (min-width: 640px) {
  .toc > ol { column-count: 2; column-gap: 2rem; }
  .toc > ol > li { break-inside: avoid; }
}

/* Section numbers on the headings themselves, mirroring the contents card.
   Opt in with <main class="prose numbered">: the same counters would number
   the guides and support pages otherwise. */
.numbered { counter-reset: section; }
.numbered h2 {
  counter-increment: section;
  counter-reset: subsection;
}
.numbered h3 { counter-increment: subsection; }
.numbered h2::before,
.numbered h3::before {
  margin-right: 0.5rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.numbered h2::before { content: counter(section) "."; }
.numbered h3::before { content: counter(section) "." counter(subsection); }

/* Callouts, mostly for evidence honesty caveats */
.note {
  --note-rule: var(--text-2);
  border-radius: var(--radius);
  border-left: 4px solid var(--note-rule);
  background: var(--card);
  padding: 1rem 1.15rem;
  margin: 1.75rem 0;
}
.note > :last-child { margin-bottom: 0; }
.note p { color: var(--text-2); }
.note-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
/* Only for genuinely strength-category content */
.note-strength { --note-rule: var(--cat-strength); }

/* References */
ol.refs {
  padding-left: 1.6rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
}
ol.refs li { margin-bottom: 0.85rem; line-height: 1.5; }
ol.refs li:target {
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 0 0 0.4rem var(--card);
}
ol.refs cite { font-style: italic; }

/* Help pages: the section sidebar beside the article on wide screens
   (_includes/doc.njk). Below that width the back link does its job. */
.doc-side { display: none; }
@media (min-width: 1080px) {
  .doc-shell {
    display: grid;
    grid-template-columns: 15rem minmax(0, var(--content));
    justify-content: center;
    gap: 4rem;
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 1.5rem;
  }
  .doc-shell > main.prose { margin: 0; padding-inline: 0; }
  .doc-side {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top));
    align-self: start;
    max-height: calc(100vh - var(--header-h) - var(--safe-top));
    overflow-y: auto;
    padding: 3rem 0 2rem;
    font-size: 0.925rem;
  }
  .doc-side-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 650;
  }
  .doc-side-title a { text-decoration: none; }
  .doc-side-title a:hover { color: var(--brand-text); }
  .doc-side ul {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    border-left: 1px solid var(--separator);
  }
  .doc-side li a {
    display: block;
    margin-left: -1px;
    padding: 0.35rem 0 0.35rem 0.9rem;
    border-left: 2px solid transparent;
    color: var(--text-2);
    line-height: 1.35;
    text-decoration: none;
  }
  .doc-side li a:hover { color: var(--text); }
  .doc-side a[aria-current="page"] {
    color: var(--text);
    font-weight: 600;
    border-left-color: var(--brand);
  }
  .doc-side-help {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-s);
    background: var(--card);
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.35;
  }
  .doc-side-help:hover { color: var(--text); }
  .doc-side-help .icon { width: 1.1rem; height: 1.1rem; }
}

/* Exercise library: search and filter controls.
   Ships with the hidden attribute and is revealed by /exercises.js, so with
   JavaScript off none of this appears and the jump links stay instead. */
.ex-head { display: grid; gap: 0.5rem; margin-bottom: 1.5rem; }
.ex-head h1 { margin: 0; }
.ex-head .lede { color: var(--text-2); font-size: 1.1rem; margin: 0; max-width: 40rem; }
.ex-head .ex-note { color: var(--text-2); font-size: 0.95rem; margin: 0; max-width: 40rem; }

/* The written how-tos, as a strip of cards. Scrolls sideways when it runs out
   of room, so it never pushes the library far down the page. */
.howtos { margin: 0 0 2rem; }
.howtos-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.howtos-head h2 { font-size: 1.15rem; margin: 0; }
.howtos-head p { margin: 0; color: var(--text-2); font-size: 0.9rem; }
.howto-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 12.5rem;
  gap: 0.5rem;
  margin: 0 -1rem;
  padding: 0 1rem 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 1rem;
  list-style: none;
}
@media (min-width: 720px) {
  .howto-strip { margin: 0; padding-inline: 0; scroll-padding-inline: 0; }
}
.howto-strip li { scroll-snap-align: start; }
.howto-strip a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  height: 100%;
  min-height: 5.5rem;
  padding: 0.8rem 0.95rem 0.85rem;
  border-radius: var(--radius-s);
  background: var(--card);
  text-decoration: none;
  transition: background-color 0.15s;
}
.howto-strip a:hover { background: var(--card-raised); }
.howto-strip small { color: var(--text-2); font-size: 0.8rem; }
.howto-strip strong { font-weight: 600; line-height: 1.3; }

.ex-controls {
  border-radius: var(--radius-l);
  background: var(--card);
  padding: 0.85rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 720px) {
  .ex-controls { padding: 1.15rem 1.25rem 1rem; }
}
.ex-search {
  position: relative;
  display: block;
  margin-bottom: 0.85rem;
}
.ex-search .icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
}
.ex-search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 1rem 0.6rem 2.7rem;
  border: 1px solid var(--separator);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem; /* 16px or more stops iOS zooming on focus */
  -webkit-appearance: none;
  appearance: none;
}
.ex-search input::placeholder { color: var(--text-2); }
.ex-search input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}

.ex-filter + .ex-filter { margin-top: 0.75rem; }
.ex-filter-label {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
}
.ex-filter .chips { margin: 0; }
/* On a phone each filter row is one line that scrolls sideways, so the
   controls stay short and the results start on the first screen. */
@media (max-width: 719px) {
  .ex-filter .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -0.85rem;
    padding: 0 0.85rem 0.15rem;
    scrollbar-width: none;
  }
  .ex-filter .chips::-webkit-scrollbar { display: none; }
}

/* Filter chips are buttons, so they need the element defaults stripped */
.chip-filter {
  min-height: 2.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border-color: var(--separator);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.chip-filter:hover { border-color: var(--text-2); }
.chip-filter .ex-count { font-size: 0.8rem; }
/* Selected state is a filled neutral, never mint: these are data filters */
.chip-filter.is-on {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.chip-filter.is-on .ex-count { color: var(--bg); opacity: 0.7; }

.ex-status {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ex-empty {
  margin: 2rem 0;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text-2);
  text-align: center;
}

/* Exercise library index */
.ex-group { margin: 0 0 2.5rem; }
.ex-group h2 { font-size: 1.3rem; }
.ex-group h3 {
  font-size: 0.95rem;
  color: var(--text-2);
  margin: 1.5rem 0 0.5rem;
}
.ex-count {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.ex-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ex-list li {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-s);
  background: var(--card);
}
@media (max-width: 719px) {
  .ex-list { gap: 0.35rem; }
  .ex-list li { min-height: 3.25rem; padding-block: 0.5rem; }
}
.ex-list .ex-name { font-weight: 600; line-height: 1.3; }
.ex-list .ex-meta { color: var(--text-2); font-size: 0.8rem; line-height: 1.4; }
/* A row with a how-to is one big link, with a tag saying so */
.ex-list li:has(> a.ex-name) {
  padding-right: 6.25rem;
  transition: background-color 0.15s;
}
.ex-list li:has(> a.ex-name):hover { background: var(--card-raised); }
.ex-list a.ex-name { text-decoration: none; }
.ex-list a.ex-name::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.ex-list a.ex-name:focus-visible { outline: none; }
.ex-list li:has(> a.ex-name:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.ex-tag {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.45rem 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--brand-text);
  font-size: 0.75rem;
  font-weight: 600;
}
.ex-tag .icon { width: 0.9rem; height: 0.9rem; }

/* The flat search results list the script builds. One ungrouped run of
   exercises; the grid takes as many columns as fit. */
.ex-results > .ex-list { margin-bottom: 1.5rem; }
.to-top { margin: 1rem 0 0; font-size: 0.9rem; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 3rem env(safe-area-inset-right, 0px) calc(2.5rem + env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px);
  background: var(--card);
  font-size: 0.925rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
}
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--text-2); max-width: 20rem; margin: 0.5rem 0 0; }
.footer-col h2 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  color: var(--text-2);
  text-decoration: none;
}
.footer-col a:hover { color: var(--text); }
.footer-base {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid var(--separator);
  color: var(--text-2);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
  .footer-brand { grid-column: auto; }
}

/* Subscribe */
.plus-hero {
  margin: 0 0 2rem;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-l);
  background:
    var(--plus-wash),
    var(--card);
  text-align: center;
}
.plus-hero h1 { margin: 0.75rem 0 0.35rem; }
.plus-hero p { color: var(--text-2); font-size: 1.1rem; max-width: 30rem; margin: 0 auto; }
.plans {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}
@media (min-width: 560px) {
  .plans { grid-template-columns: 1fr 1fr; }
}
.plan {
  position: relative;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
}
.plan-name { margin: 0; color: var(--text-2); font-weight: 600; font-size: 0.95rem; }
.plan-price {
  margin: 0.25rem 0 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.plan-price small { font-size: 1rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.plan-save {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--plus-solid) 18%, transparent);
  color: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}
.plus-cta { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; margin: 1.5rem 0 3rem; }
.plus-cta .btn { min-width: 14rem; }
.plus-cta p { color: var(--text-2); font-size: 0.95rem; margin: 0; max-width: 30rem; }
.plus-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 0;
}
@media (min-width: 640px) {
  .plus-list { grid-template-columns: 1fr 1fr; }
}
.plus-list > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--card);
}
/* Each feature's icon in the violet, as the app's paywall rows draw it */
.plus-list .plus-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--plus-solid);
}
.plus-list .plus-icon .icon { width: 1.4rem; height: 1.4rem; }
.plus-list dt { font-weight: 650; }
.plus-list dd { margin: 0.15em 0 0; color: var(--text-2); font-size: 0.95rem; line-height: 1.45; }

/* Support: contact cards, one per row. On wider screens each is a single
   line: icon, what it's for, then the button. */
.prose .contact-grid { grid-template-columns: 1fr; margin: 0 0 1rem; }
.contact-grid .card h3 { font-size: 1.05rem; }
@media (min-width: 640px) {
  .contact-grid .card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 1rem;
    row-gap: 0.15rem;
    align-items: center;
  }
  .contact-grid .icon-chip { grid-row: 1 / span 2; align-self: start; margin-top: 0.15rem; }
  .contact-grid .card h3 { grid-column: 2; margin: 0; }
  .contact-grid .card p { grid-column: 2; }
  .contact-grid .card p:has(> .btn) {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0;
    padding: 0;
  }
}

/* Centred utility pages (404, log in, sign up) */
.center-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem;
}
.center-page .mark {
  width: 4rem;
  height: 4rem;
  border-radius: 22%;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.center-page p { max-width: 26rem; }
.center-page .muted { font-size: 1.1rem; }
.center-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
