/*
  GitSwole — gitswolefitness.com
  Brand tokens mirror the iOS app (LostCount/Design/Theme.swift): true black, lime #CFF500 used as
  a fill with graphite text on top, cream #FCEFDA for headings. Lime text on black is ~16:1.
*/

@layer reset, base, layout, components, sections, pages, motion;

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* ------------------------------------------------------------------------------------------ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, picture, svg, canvas { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  table { border-collapse: collapse; }
  p, h1, h2, h3, h4, li, dd, td { overflow-wrap: break-word; }
  [hidden] { display: none !important; }
}

/* ------------------------------------------------------------------------------------------ */
@layer base {
  :root {
    color-scheme: dark;

    --black: #000;
    --surface: #0b0c0d;
    --card: #141517;
    --card-raised: #1b1d20;
    --line: #2b2e33;
    --line-soft: #1f2125;
    --lime: #cff500;
    --lime-soft: rgb(207 245 0 / 0.1);
    --lime-edge: rgb(207 245 0 / 0.35);
    --lime-glow: rgb(207 245 0 / 0.3);
    --cream: #fcefda;
    --text: #d8d2c6;
    --muted: #9c978e;
    --graphite: #1c1f22;

    --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius-s: 12px;
    --radius-m: 20px;
    --radius-l: 28px;
    --radius-xl: 36px;
    --radius-pill: 999px;

    --gutter: clamp(16px, 4vw, 40px);
    --max: 1200px;
    --header-h: 72px;
    --section-y: clamp(72px, 9vw, 120px);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --shadow-card: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 30px 60px -30px rgb(0 0 0 / 0.85);

    interpolate-size: allow-keywords;
  }

  html {
    background: var(--black);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
  }

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

  body {
    min-height: 100svh;
    background: var(--black);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    font-stretch: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4 {
    color: var(--cream);
    font-weight: 800;
    font-stretch: 106%;
    line-height: 1.05;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }

  p { text-wrap: pretty; }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 0.22em;
    transition: color 0.2s, text-decoration-color 0.2s;
  }
  a:hover { text-decoration-color: currentColor; }

  strong { color: var(--cream); font-weight: 650; }

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

  ::selection { background: var(--lime); color: var(--graphite); }
}

/* ------------------------------------------------------------------------------------------ */
@layer layout {
  .container {
    width: min(100% - 2 * var(--gutter), var(--max));
    margin-inline: auto;
  }

  .section { padding-block: var(--section-y); }
  .section--tight { padding-block: calc(var(--section-y) * 0.6); }

  .section-head {
    max-width: 780px;
    margin-bottom: clamp(40px, 6vw, 72px);
  }
  .section-head--center { margin-inline: auto; text-align: center; }
  .section-head--center .eyebrow { justify-content: center; }
  .section-head .lede { margin-top: 20px; }
  .section-head--center .lede { margin-inline: auto; }
}

/* ------------------------------------------------------------------------------------------ */
@layer components {
  .skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 12px 18px;
    border-radius: var(--radius-s);
    background: var(--lime);
    color: var(--graphite);
    font-weight: 700;
    text-decoration: none;
  }
  .skip-link:focus { top: 12px; }

  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: var(--lime);
    font-size: 0.78rem;
    font-weight: 700;
    font-stretch: 110%;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  /* A tiny staircase, borrowed from the bar in the logo. */
  .eyebrow::before {
    content: "";
    flex: none;
    width: 18px;
    height: 10px;
    background:
      linear-gradient(currentColor, currentColor) 0 100% / 6px 4px no-repeat,
      linear-gradient(currentColor, currentColor) 6px 100% / 6px 7px no-repeat,
      linear-gradient(currentColor, currentColor) 12px 100% / 6px 10px no-repeat;
  }

  .display {
    font-style: italic;
    font-weight: 900;
    font-stretch: 114%;
    letter-spacing: -0.025em;
  }

  .h2 { font-size: clamp(2.1rem, 1.25rem + 3.2vw, 3.6rem); line-height: 1; }

  .lede {
    max-width: 60ch;
    color: var(--text);
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.55;
  }

  .accent { color: var(--lime); }

  /* Buttons ------------------------------------------------------------------------------- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 26px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background-color 0.2s, border-color 0.2s, color 0.2s;
  }
  .btn svg { width: 18px; height: 18px; flex: none; }
  .btn:active { transform: scale(0.98); }

  .btn--primary {
    background: var(--lime);
    color: var(--graphite);
    box-shadow: 0 12px 32px -12px var(--lime-glow);
  }
  .btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px -14px rgb(207 245 0 / 0.5);
  }

  .btn--ghost {
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 0.02);
    color: var(--cream);
  }
  .btn--ghost:hover { border-color: var(--cream); }

  .btn--dark {
    background: var(--graphite);
    color: var(--lime);
  }
  .btn--dark:hover { transform: translateY(-2px); background: #000; }

  .btn--outline-dark {
    border: 1px solid rgb(28 31 34 / 0.4);
    color: var(--graphite);
  }
  .btn--outline-dark:hover { border-color: var(--graphite); background: rgb(28 31 34 / 0.08); }

  .btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.92rem; }

  .store-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-pill);
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
  }
  .store-note::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 4px var(--lime-soft);
  }

  /* Header -------------------------------------------------------------------------------- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    height: var(--header-h);
    border-bottom: 1px solid var(--line-soft);
    background: rgb(0 0 0 / 0.78);
    -webkit-backdrop-filter: saturate(140%) blur(18px);
    backdrop-filter: saturate(140%) blur(18px);
    transition: background-color 0.3s, border-color 0.3s;
  }
  .site-header.is-top {
    border-bottom-color: transparent;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
  }

  .brand { display: inline-flex; align-items: center; flex: none; border-radius: 8px; }
  .brand img { width: auto; height: 26px; }

  .nav {
    display: flex;
    align-items: center;
    gap: 32px;
  }
  /* Desktop: the popover nav is just a normal inline nav. */
  .nav[popover] {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
    color: inherit;
  }

  .nav__list {
    display: flex;
    gap: 28px;
    padding: 0;
    list-style: none;
  }

  .nav__link {
    position: relative;
    display: inline-block;
    padding: 8px 0;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
  }
  .nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--lime);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
  }
  .nav__link:hover,
  .nav__link[aria-current="page"] { color: var(--cream); }
  .nav__link:hover::after,
  .nav__link[aria-current="page"]::after { transform: scaleX(1); }

  .nav-toggle {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
  }
  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--cream);
    transition: transform 0.3s var(--ease-out), opacity 0.2s;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }

  .site-header:has(.nav:popover-open) .nav-toggle__bars,
  .site-header.is-open .nav-toggle__bars { background: transparent; }
  .site-header:has(.nav:popover-open) .nav-toggle__bars::before,
  .site-header.is-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .site-header:has(.nav:popover-open) .nav-toggle__bars::after,
  .site-header.is-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  @media (max-width: 900px) {
    .nav-toggle { display: grid; }

    .nav[popover],
    .nav {
      position: fixed;
      inset: var(--header-h) 0 auto 0;
      flex-direction: column;
      align-items: stretch;
      gap: 24px;
      width: 100%;
      padding: 8px var(--gutter) 28px;
      border-bottom: 1px solid var(--line-soft);
      background: rgb(0 0 0 / 0.96);
      -webkit-backdrop-filter: blur(18px);
      backdrop-filter: blur(18px);
    }
    /* Closed by default. Kept as separate rules: a browser without the Popover API drops any
       rule that mentions :popover-open, and must still be able to open the .is-open fallback. */
    .nav,
    .nav[popover] { display: none; }
    .nav:popover-open { display: flex; }
    .site-header.is-open .nav { display: flex; }

    .nav__list { flex-direction: column; gap: 0; }
    .nav__link {
      display: block;
      padding: 16px 0;
      border-bottom: 1px solid var(--line-soft);
      font-size: 1.15rem;
    }
    .nav__link::after { display: none; }
    .nav__cta { width: 100%; min-height: 52px; }
  }

  /* Checklist ----------------------------------------------------------------------------- */
  .checklist {
    display: grid;
    gap: 14px;
    padding: 0;
    list-style: none;
  }
  .checklist li { position: relative; padding-left: 36px; }
  .checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 22px;
    height: 22px;
    border: 1px solid var(--lime-edge);
    border-radius: 7px;
    background: var(--lime-soft);
  }
  .checklist li::after {
    content: "";
    position: absolute;
    left: 8px;
    top: calc(0.15em + 5px);
    width: 6px;
    height: 10px;
    border: solid var(--lime);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  .icon-badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-s);
    background: var(--lime-soft);
    color: var(--lime);
  }
  .icon-badge svg { width: 22px; height: 22px; }

  /* Footer -------------------------------------------------------------------------------- */
  .site-footer {
    padding: 72px 0 40px;
    border-top: 1px solid var(--line-soft);
  }
  .footer__grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
    gap: 40px;
  }
  .footer__brand img { width: auto; height: 28px; margin-bottom: 18px; }
  .footer__brand p { max-width: 34ch; color: var(--muted); font-size: 0.95rem; }
  .footer__col h2 {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-stretch: 110%;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .footer__col ul { display: grid; gap: 10px; padding: 0; list-style: none; }
  .footer__col a { color: var(--text); text-decoration: none; }
  .footer__col a:hover { color: var(--cream); }
  .footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 0.85rem;
  }
  .footer__legal a:hover { color: var(--cream); }

  .footer__col a { overflow-wrap: anywhere; }
  /* The address breaks after the @ (the <wbr>), and only mid-word on very narrow columns. */
  .footer__col a.footer__mail { overflow-wrap: break-word; font-size: 0.94rem; }

  @media (max-width: 860px) {
    .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer__brand { grid-column: 1 / -1; }
  }
  @media (max-width: 400px) {
    .footer__grid { grid-template-columns: minmax(0, 1fr); }
  }
}

/* ------------------------------------------------------------------------------------------ */
@layer sections {
  /* Hero ---------------------------------------------------------------------------------- */
  .hero {
    position: relative;
    isolation: isolate;
    overflow: clip;
    margin-top: calc(var(--header-h) * -1);
    padding-top: var(--header-h);
    padding-bottom: clamp(48px, 7vw, 96px);
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
      linear-gradient(var(--line-soft) 1px, transparent 1px),
      linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 70% 65% at 72% 42%, #000 15%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 65% at 72% 42%, #000 15%, transparent 72%);
    opacity: 0.7;
  }

  .hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    min-height: min(720px, calc(100svh - var(--header-h)));
    padding-top: clamp(24px, 4vw, 48px);
  }

  /* The headline scales with its own column, so "Get swole." never wraps or overflows. */
  .hero__copy { container-type: inline-size; }
  .hero__title {
    margin-bottom: 28px;
    font-size: clamp(2.4rem, 0.9rem + 6.4vw, 5.6rem);
    font-size: clamp(2.4rem, 16cqi, 5.6rem);
    font-stretch: 108%;
    line-height: 0.92;
    letter-spacing: -0.035em;
  }
  .hero__title .line { display: block; white-space: nowrap; }

  .hero__lede {
    max-width: 34rem;
    margin-bottom: 36px;
    font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3rem);
  }

  .hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 36px;
  }

  .hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.92rem;
  }
  .hero__meta li { display: inline-flex; align-items: center; gap: 10px; }
  .hero__meta li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background: var(--lime);
  }

  .hero__visual {
    position: relative;
    justify-self: end;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 1;
  }
  .hero__glow {
    position: absolute;
    inset: 10%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(207 245 0 / 0.2), rgb(207 245 0 / 0.06) 55%, transparent 78%);
    filter: blur(24px);
  }
  .hero__floor {
    position: absolute;
    left: 20%;
    right: 20%;
    bottom: 15%;
    height: 8%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(207 245 0 / 0.28), transparent);
    filter: blur(6px);
    transform: scale(calc(1 - var(--lift, 0) * 0.5));
    opacity: calc(1 - var(--lift, 0) * 0.6);
  }
  .hero__stage {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
  }
  .hero__stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s var(--ease-out);
  }
  .hero__fallback {
    width: 72%;
    transform: rotate(-7deg);
    filter: drop-shadow(0 24px 48px rgb(207 245 0 / 0.18));
    transition: opacity 0.6s var(--ease-out);
  }
  .hero__visual.is-3d .hero__stage canvas { opacity: 1; }
  .hero__visual.is-3d .hero__fallback { opacity: 0; }

  .hero-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px 12px 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgb(20 21 23 / 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-card);
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.3;
  }
  .hero-chip strong { display: block; color: var(--cream); font-size: 0.98rem; }
  .hero-chip__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--lime);
    color: var(--graphite);
  }
  .hero-chip__icon svg { width: 20px; height: 20px; }
  .hero-chip--a { top: 9%; left: 2%; }
  .hero-chip--b { right: 0; bottom: 9%; }

  @media (max-width: 900px) {
    .hero__grid {
      grid-template-columns: 1fr;
      min-height: 0;
      padding-top: 32px;
    }
    .hero__visual {
      justify-self: center;
      max-width: 560px;
      aspect-ratio: 5 / 4;
      margin-top: 8px;
    }
    .hero-chip--a { top: 4%; left: 0; }
    .hero-chip--b { right: 0; bottom: 4%; }
  }

  @media (max-width: 420px) {
    .hero__actions .btn { flex: 1 1 100%; }
    .hero-chip { padding: 10px 14px 10px 10px; font-size: 0.75rem; }
    .hero-chip strong { font-size: 0.88rem; }
    .hero-chip__icon { width: 32px; height: 32px; }
  }

  /* Stats --------------------------------------------------------------------------------- */
  .stats {
    border-block: 1px solid var(--line-soft);
    background: var(--surface);
  }
  .stats__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
    list-style: none;
  }
  .stat { padding: 36px 28px; }
  .stat + .stat { border-left: 1px solid var(--line-soft); }
  .stat__value {
    display: block;
    margin-bottom: 12px;
    color: var(--cream);
    font-size: clamp(2.25rem, 1.5rem + 2.2vw, 3.25rem);
    font-style: italic;
    font-weight: 900;
    font-stretch: 116%;
    line-height: 1;
    letter-spacing: -0.03em;
  }
  .stat__value .accent { font-style: inherit; }
  .stat__label { display: block; max-width: 24ch; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

  @media (max-width: 860px) {
    .stats__list { grid-template-columns: 1fr 1fr; }
    .stat { padding: 28px 20px; }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
  }

  /* How it works: three steps that climb, like the bar in the logo ------------------------ */
  /* Cards share a baseline and their tops climb left to right. */
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
    padding: 0;
    list-style: none;
  }
  .step {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 28px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-m);
    background: var(--card);
    transition: border-color 0.3s, transform 0.4s var(--ease-out);
  }
  .step:nth-child(1) { margin-top: 64px; }
  .step:nth-child(2) { margin-top: 32px; }
  .step:hover { border-color: var(--line); transform: translateY(-4px); }
  .step__label {
    margin: 24px 6px 8px;
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 700;
    font-stretch: 110%;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .step h3 { margin: 0 6px 10px; font-size: 1.4rem; }
  .step > p:not(.step__label) { margin-inline: 6px; font-size: 0.98rem; }

  @media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; }
    .step:nth-child(1), .step:nth-child(2) { margin-top: 0; }
  }

  /* Miniature app screens, rebuilt from the real UI (decorative, aria-hidden) */
  .mini {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 204px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: var(--black);
    color: var(--text);
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .mini__label {
    color: var(--lime);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .mini__title { color: var(--cream); font-size: 0.9rem; font-weight: 700; line-height: 1.2; }
  .mini__sub { margin-top: -6px; color: var(--muted); font-size: 0.72rem; }
  .mini__pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
  .mini__pills li {
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-weight: 600;
  }
  .mini__pills .is-on { border-color: var(--lime); background: var(--lime); color: var(--graphite); }
  .mini__pills--small li { padding: 4px 9px; font-size: 0.72rem; }
  .mini__rows { display: grid; padding: 0; list-style: none; }
  .mini__rows li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .mini__rows li:last-child { border-bottom: 0; }
  .mini__rows b { color: var(--cream); font-weight: 650; }
  .mini__rows span { color: var(--muted); white-space: nowrap; }
  .mini__btns { display: flex; gap: 8px; margin-top: auto; }
  .mini__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--lime);
    border-radius: var(--radius-pill);
    background: var(--lime);
    color: var(--graphite);
    font-size: 0.74rem;
    font-weight: 700;
  }
  .mini__btn--ghost { border-color: var(--line); background: none; color: var(--cream); }
  .mini__sentence { color: var(--cream); font-size: 0.86rem; font-weight: 600; line-height: 1.35; }
  .mini__meter { display: grid; gap: 5px; }
  .mini__meter-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
  }
  .mini__meter-head span:last-child { color: var(--muted); font-weight: 500; }
  .mini__bar { height: 5px; overflow: hidden; border-radius: 3px; background: var(--line-soft); }
  .mini__bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
  .fill-28 { width: 28%; }
  .fill-33 { width: 33%; }

  /* Case studies -------------------------------------------------------------------------- */
  .section--band {
    border-block: 1px solid var(--line-soft);
    background:
      radial-gradient(60% 45% at 50% 0%, rgb(207 245 0 / 0.07), transparent 70%),
      var(--surface);
  }
  .cases { container-type: inline-size; }
  .case-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 0;
    list-style: none;
  }
  .cases__dots { display: none; }
  .cases__note {
    max-width: 70ch;
    margin-top: 28px;
    color: var(--muted);
    font-size: 0.88rem;
  }

  .case {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    overflow: clip;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-l);
    background: var(--card);
    transition: border-color 0.3s;
  }
  .case:hover { border-color: var(--line); }

  /* Photo with the real app moment tucked under it. Kept small on purpose. */
  .case__visual { display: grid; align-content: start; gap: 12px; padding: 12px; }
  .case__media {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card-raised);
  }
  .case__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
  }
  .case:hover .case__media img { transform: scale(1.03); }
  /* Vertical focal points keep the phone in frame when a card crops the photo. */
  .case--train .case__media img { object-position: 50% 100%; }
  .case--log .case__media img { object-position: 50% 25%; }
  .case--eat .case__media img { object-position: 50% 50%; }
  .case--progress .case__media img { object-position: 50% 50%; }

  .case__badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: var(--radius-pill);
    background: rgb(0 0 0 / 0.66);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--cream);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .case__badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lime);
  }

  .case__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 10px 22px 24px;
  }
  .case__kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
  }
  .case__kicker b {
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .case__title {
    font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2rem);
    font-style: italic;
    font-weight: 900;
    font-stretch: 112%;
    line-height: 1.04;
    letter-spacing: -0.02em;
  }

  /* The moment, what GitSwole does, what changes. Stacked on narrow cards, side by side on wide ones. */
  .story { display: grid; gap: 16px; margin: 0; }
  .story__row { padding-left: 16px; border-left: 2px solid var(--line); }
  .story__row--do { border-left-color: var(--lime-edge); }
  .story__row--result { border-left-color: var(--lime); }
  .story dt {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .story__row--do dt,
  .story__row--result dt { color: var(--lime); }
  .story dd { margin: 0; color: var(--text); font-size: 0.95rem; line-height: 1.5; }
  .story__row--result dd { color: var(--cream); font-weight: 560; }

  /* A piece of the real UI, mirroring the app's own cards and lime eyebrows */
  .ui {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--black);
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.3;
  }
  .ui__text { display: block; min-width: 0; }
  .ui strong { display: block; color: var(--cream); font-size: 0.86rem; font-weight: 650; }
  .ui small {
    display: block;
    margin-bottom: 2px;
    color: var(--lime);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .ui__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--lime);
    color: var(--graphite);
  }
  .ui__icon svg { width: 17px; height: 17px; }
  .ui__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    margin-left: auto;
    padding: 8px 12px;
    border-radius: var(--radius-pill);
    background: var(--graphite);
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .mini__btn svg,
  .ui__btn svg { width: 10px; height: 10px; flex: none; }
  .ui--lime { border-color: var(--lime); background: var(--lime); color: rgb(28 31 34 / 0.78); }
  .ui--lime strong { color: var(--graphite); }
  .ui--lime small { color: rgb(28 31 34 / 0.7); }
  .ui__meter { display: block; margin-top: 8px; }
  .ui__meter .mini__bar { height: 4px; }

  .case__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding: 0; list-style: none; }
  .case__tags li {
    padding: 6px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-pill);
    background: rgb(255 255 255 / 0.02);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 550;
  }

  /* Narrow: a swipeable row with the next card peeking in, instead of four tall cards. */
  @container (max-width: 599px) {
    .case-list {
      display: flex;
      gap: 12px;
      margin-inline: calc(var(--gutter) * -1);
      padding: 0 var(--gutter) 4px;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scroll-snap-type: x mandatory;
      scroll-padding-inline: var(--gutter);
      scrollbar-width: none;
    }
    .case-list::-webkit-scrollbar { display: none; }
    .case { flex: 0 0 min(86vw, 400px); scroll-snap-align: start; }
    .case__body { gap: 14px; padding: 8px 18px 20px; }
    .story { gap: 14px; }
    .story dd { font-size: 0.92rem; }
    .cases__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
    .cases__dots span {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--line);
      transition: width 0.3s var(--ease-out), background-color 0.3s;
    }
    .cases__dots .is-active { width: 24px; border-radius: 4px; background: var(--lime); }
  }
  /* Middle: two stacked cards side by side. */
  @container (min-width: 600px) and (max-width: 1099px) {
    .case-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  /* Wide: photo and app moment on the left, the story across three columns on the right. */
  @container (min-width: 1100px) {
    .case { grid-template-columns: 340px minmax(0, 1fr); grid-template-rows: auto; }
    .case__media { aspect-ratio: 4 / 3; }
    .case__body { gap: 20px; padding: 28px 34px 26px 14px; }
    .story { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
    .story__row { padding: 14px 0 0; border-left: 0; border-top: 2px solid var(--line); }
    .story__row--do { border-top-color: var(--lime-edge); }
    .story__row--result { border-top-color: var(--lime); }
  }

  /* Progression ladder -------------------------------------------------------------------- */
  .ladder-wrap {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: center;
    gap: clamp(36px, 7vw, 104px);
  }
  .ladder-wrap .lede + .lede { margin-top: 16px; }

  .ladder-figure {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-l);
    background: var(--surface);
  }
  .ladder {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
    gap: clamp(8px, 1.4vw, 14px);
    height: clamp(300px, 32vw, 400px);
    padding: 0;
    list-style: none;
  }
  .ladder__step { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
  .ladder__bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px clamp(10px, 1.4vw, 16px);
    border: 1px solid var(--line);
    border-radius: 14px 14px 6px 6px;
    background: var(--card-raised);
  }
  .ladder__step:nth-child(1) .ladder__bar { height: 36%; }
  .ladder__step:nth-child(2) .ladder__bar { height: 52%; }
  .ladder__step:nth-child(3) .ladder__bar { height: 68%; }
  .ladder__step:nth-child(4) .ladder__bar { height: 90%; }

  .ladder__week {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .ladder__sets {
    color: var(--cream);
    font-size: clamp(1.05rem, 0.8rem + 1vw, 1.45rem);
    font-style: italic;
    font-weight: 900;
    font-stretch: 112%;
    line-height: 1.1;
  }
  .ladder__load { color: var(--text); font-size: 0.88rem; }
  .ladder__flag {
    align-self: flex-start;
    margin-top: auto;
    padding: 5px 10px;
    border: 1px solid var(--lime-edge);
    border-radius: var(--radius-pill);
    background: var(--lime-soft);
    color: var(--lime);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
  }
  .ladder__step--up .ladder__flag { border-color: var(--graphite); background: var(--graphite); }
  @media (min-width: 481px) {
    .ladder__flag { white-space: nowrap; }
  }
  .ladder-wrap .h2 { margin-bottom: 24px; font-size: clamp(2rem, 1.2rem + 2.6vw, 3.2rem); }
  .privacy-band .h2 { font-size: clamp(1.9rem, 1.15rem + 2vw, 2.7rem); }
  .ladder__step--up .ladder__bar { border-color: var(--lime); background: var(--lime); }
  .ladder__step--up .ladder__week { color: rgb(28 31 34 / 0.7); }
  .ladder__step--up .ladder__sets,
  .ladder__step--up .ladder__load { color: var(--graphite); }

  .ladder-figure figcaption {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.88rem;
  }

  @media (max-width: 900px) {
    .ladder-wrap { grid-template-columns: 1fr; }
  }
  @media (max-width: 480px) {
    .ladder-figure { padding: 14px; }
    .ladder { gap: 6px; height: 280px; }
    .ladder__bar { padding: 10px 8px; }
    .ladder__week { font-size: 0.6rem; letter-spacing: 0.06em; }
    .ladder__sets { font-size: 0.98rem; font-stretch: 100%; }
    .ladder__load { font-size: 0.76rem; }
    .ladder__week, .ladder__sets, .ladder__load { white-space: nowrap; }
    /* The caption spells out what the flags say. */
    .ladder__flag { display: none; }
  }

  /* Bento --------------------------------------------------------------------------------- */
  .bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  .tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    grid-column: span 2;
    padding: 30px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-l);
    background: var(--card);
    transition: border-color 0.3s;
  }
  .tile:hover { border-color: var(--line); }
  .tile--wide { grid-column: span 3; }
  .tile .icon-badge { margin-bottom: 6px; }
  .tile h3 { font-size: 1.35rem; }
  .tile p { font-size: 0.98rem; }
  .tile__visual {
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 28px;
  }

  @media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile, .tile--wide { grid-column: span 1; }
    .tile--wide { grid-column: 1 / -1; }
  }
  @media (max-width: 640px) {
    .bento { grid-template-columns: 1fr; }
    .tile { padding: 24px; }
  }

  /* Chat mock */
  .chat { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 380px; }
  .chat__msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.45;
  }
  .chat__msg--me {
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    background: var(--lime);
    color: var(--graphite);
    font-weight: 550;
  }
  .chat__msg--coach {
    align-self: flex-start;
    border: 1px solid var(--line);
    border-bottom-left-radius: 6px;
    background: var(--card-raised);
    color: var(--text);
  }
  .chat__who {
    display: block;
    margin-bottom: 4px;
    color: var(--lime);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  /* Feature index ------------------------------------------------------------------------ */
  .details { margin-top: clamp(48px, 7vw, 80px); }
  .details__title { margin-bottom: 20px; font-size: 1.15rem; font-stretch: 100%; }
  .details__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 10px;
    padding: 0;
    list-style: none;
  }
  .details__list li {
    position: relative;
    padding: 14px 16px 14px 44px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 550;
  }
  .details__list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 1px solid var(--lime-edge);
    border-radius: 5px;
    background: var(--lime-soft);
  }
  .details__list li::after {
    content: "";
    position: absolute;
    left: 21px;
    top: 50%;
    width: 5px;
    height: 9px;
    margin-top: -6px;
    border: solid var(--lime);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  @media (max-width: 560px) {
    .details__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .details__list li { padding: 12px 10px 12px 34px; font-size: 0.86rem; line-height: 1.3; }
    .details__list li::before { left: 10px; }
    .details__list li::after { left: 15px; }
  }

  /* Privacy band -------------------------------------------------------------------------- */
  .privacy-band {
    position: relative;
    overflow: hidden;
    padding: clamp(32px, 6vw, 72px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-xl);
    background:
      radial-gradient(120% 120% at 100% 0%, rgb(207 245 0 / 0.1), transparent 50%),
      var(--surface);
  }
  .privacy-band__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
    align-items: start;
    gap: clamp(32px, 5vw, 64px);
  }
  .privacy-band .lede { margin-block: 20px 28px; }
  .privacy-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 0;
    list-style: none;
  }
  .privacy-point .icon-badge { margin-bottom: 16px; }
  .privacy-point h3 { margin-bottom: 8px; font-size: 1.15rem; font-stretch: 100%; }
  .privacy-point p { font-size: 0.96rem; }
  .text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lime);
    font-weight: 700;
    text-decoration: none;
  }
  .text-link svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
  .text-link:hover svg { transform: translateX(4px); }

  @media (max-width: 900px) {
    .privacy-band__grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 560px) {
    .privacy-points { grid-template-columns: 1fr; gap: 24px; }
  }

  /* FAQ ----------------------------------------------------------------------------------- */
  .faq { max-width: 880px; margin-inline: auto; border-top: 1px solid var(--line-soft); }
  .faq__item { border-bottom: 1px solid var(--line-soft); }
  .faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
    color: var(--cream);
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
    font-weight: 650;
    list-style: none;
    cursor: pointer;
  }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after {
    content: "";
    flex: none;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background:
      linear-gradient(var(--lime), var(--lime)) center / 12px 2px no-repeat,
      linear-gradient(var(--lime), var(--lime)) center / 2px 12px no-repeat;
    transition: transform 0.35s var(--ease-out), background-color 0.3s;
  }
  .faq__item[open] summary::after { transform: rotate(45deg); background-color: var(--lime-soft); }
  .faq__item summary:hover { color: #fff; }
  .faq__answer { max-width: 70ch; padding-bottom: 26px; }
  .faq__answer p + p { margin-top: 12px; }

  @supports selector(::details-content) {
    .faq__item::details-content {
      block-size: 0;
      overflow: clip;
      transition: block-size 0.4s var(--ease-out), content-visibility 0.4s allow-discrete;
    }
    .faq__item[open]::details-content { block-size: auto; }
  }

  /* Home: free tools teaser ------------------------------------------------------------------- */
  .teaser-list { display: grid; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
  .teaser-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: var(--card);
    color: var(--cream);
    font-weight: 650;
    text-decoration: none;
    transition: border-color 0.25s, background-color 0.25s;
  }
  .teaser-list a:hover { border-color: var(--lime-edge); background: color-mix(in srgb, var(--lime) 5%, var(--card)); }
  .teaser-list small { display: block; margin-top: 2px; color: var(--muted); font-size: 0.82rem; font-weight: 500; }
  .teaser-list svg { flex: none; width: 18px; height: 18px; color: var(--lime); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  .tools-band { padding-block: var(--section-y); }
  .tools-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; gap: clamp(28px, 5vw, 72px); }
  .tools-band .h2 { margin-top: 14px; }
  .tools-band .lede { margin-top: 20px; }
  .tools-band .lede + .lede { margin-top: 12px; }
  .tools-band .text-link { margin-top: 22px; }
  @media (max-width: 900px) { .tools-band__grid { grid-template-columns: minmax(0, 1fr); } }

  .notfound__more { margin-top: 24px; color: var(--muted); font-size: 0.95rem; }
  .notfound__more a { color: var(--cream); }

  /* Closing CTA --------------------------------------------------------------------------- */
  .cta-band {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 48px);
    overflow: hidden;
    padding: clamp(36px, 7vw, 88px);
    border-radius: var(--radius-xl);
    background: var(--lime);
    color: var(--graphite);
  }
  /* The dumbbell mark, oversized and tone-on-tone. */
  .cta-band::after {
    content: "";
    position: absolute;
    right: -6%;
    bottom: -18%;
    z-index: -1;
    width: 58%;
    aspect-ratio: 2;
    background: var(--graphite);
    -webkit-mask: url("../brand/mark.svg") center / contain no-repeat;
    mask: url("../brand/mark.svg") center / contain no-repeat;
    opacity: 0.08;
    transform: rotate(-12deg);
  }
  .cta-band__icon {
    width: clamp(88px, 10vw, 128px);
    border-radius: 24%;
    box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.5);
  }
  .cta-band h2 {
    color: var(--graphite);
    font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.4rem);
    line-height: 0.95;
  }
  .cta-band p {
    max-width: 46ch;
    margin-block: 16px 28px;
    color: rgb(28 31 34 / 0.82);
    font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  }
  .cta-band__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
  .cta-band__soon { color: rgb(28 31 34 / 0.75); font-size: 0.92rem; font-weight: 600; }
  .cta-band :focus-visible { outline-color: var(--graphite); }

  @media (max-width: 720px) {
    .cta-band { grid-template-columns: 1fr; }
  }
}

/* ------------------------------------------------------------------------------------------ */
@layer pages {
  /* Legal pages */
  .page-hero {
    position: relative;
    padding-block: clamp(48px, 8vw, 104px) clamp(36px, 5vw, 56px);
    border-bottom: 1px solid var(--line-soft);
    overflow: clip;
  }
  .page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
      linear-gradient(var(--line-soft) 1px, transparent 1px),
      linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(ellipse 60% 90% at 85% 0%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse 60% 90% at 85% 0%, #000 10%, transparent 70%);
  }
  .page-hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 1.4rem + 4.6vw, 4.75rem);
    line-height: 0.95;
  }
  .page-hero .lede { margin-bottom: 18px; }
  .page-hero__meta { color: var(--muted); font-size: 0.92rem; }

  .legal {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: clamp(32px, 6vw, 88px);
    padding-block: clamp(40px, 6vw, 80px) var(--section-y);
  }
  .legal__toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100svh - var(--header-h) - 48px);
    overflow: auto;
    overscroll-behavior: contain;
  }
  .legal__toc h2 {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .legal__toc ol {
    display: grid;
    gap: 2px;
    padding: 0;
    border-left: 1px solid var(--line-soft);
    list-style: none;
  }
  .legal__toc a {
    display: block;
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    border-left: 2px solid transparent;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
    text-decoration: none;
  }
  .legal__toc a:hover { color: var(--cream); }
  .legal__toc a.is-active { border-left-color: var(--lime); color: var(--lime); }

  .legal__body { max-width: 74ch; }
  .legal__body section { margin-bottom: 52px; }
  .legal__body h2 {
    margin-bottom: 16px;
    font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  }
  .legal__body h3 { margin: 26px 0 8px; font-size: 1.12rem; font-stretch: 100%; }
  .legal__body p + p { margin-top: 14px; }
  .legal__body ul:not(.checklist) {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    padding-left: 1.25em;
  }
  .legal__body ul:not(.checklist) li::marker { color: var(--lime); }
  .legal__body a { color: var(--cream); }
  .legal__body .checklist { margin-top: 16px; }

  .summary-card {
    margin-bottom: 56px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-l);
    background:
      radial-gradient(100% 140% at 100% 0%, rgb(207 245 0 / 0.08), transparent 55%),
      var(--card);
  }
  .summary-card h2 { font-size: 1.5rem; margin-bottom: 4px; }

  .callout {
    margin: 18px 0;
    padding: 18px 22px;
    border-left: 3px solid var(--lime);
    border-radius: 0 var(--radius-s) var(--radius-s) 0;
    background: var(--lime-soft);
    color: var(--cream);
  }

  .table-wrap {
    margin: 18px 0;
    overflow-x: auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-m);
  }
  .data-table { width: 100%; min-width: 620px; font-size: 0.94rem; }
  .data-table th,
  .data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
  }
  .data-table thead th {
    background: var(--card);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .data-table tbody th { color: var(--cream); font-weight: 650; }
  .data-table tbody tr:last-child > * { border-bottom: 0; }
  .pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--lime-soft);
    color: var(--lime);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .legal__body { min-width: 0; }

  @media (max-width: 900px) {
    /* minmax(0, …) so the wide data table scrolls inside its wrapper instead of widening the page. */
    .legal { grid-template-columns: minmax(0, 1fr); }
    .legal__toc {
      position: static;
      max-height: none;
      padding: 20px;
      border: 1px solid var(--line-soft);
      border-radius: var(--radius-m);
      background: var(--card);
    }
  }

  /* 404 */
  .notfound {
    display: grid;
    place-items: center;
    min-height: calc(100svh - var(--header-h) - 200px);
    padding-block: 64px;
    text-align: center;
  }
  .notfound img { width: min(320px, 70vw); margin: 0 auto 36px; transform: rotate(-8deg); }
  .notfound h1 { margin-bottom: 14px; font-size: clamp(2.4rem, 1.5rem + 4vw, 4rem); }
  .notfound p { margin: 0 auto 32px; max-width: 44ch; }
}

/* ------------------------------------------------------------------------------------------ */
@layer pages {
  @media print {
    :root { color-scheme: light; }
    body { background: #fff; color: #111; font-size: 11pt; }
    .site-header, .site-footer, .legal__toc, .skip-link { display: none !important; }
    .page-hero { padding: 0 0 12pt; border: 0; }
    .page-hero::before { display: none; }
    h1, h2, h3, strong { color: #000; }
    .legal { display: block; padding: 0; }
    .legal__body { max-width: none; }
    .summary-card, .callout, .table-wrap { border-color: #999; background: none; color: #000; }
    .data-table thead th { background: #eee; color: #000; }
    .pill { border: 1px solid #000; background: none; color: #000; }
    a { color: #000; text-decoration: underline; }
  }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    /* Hero entrance, no JS required. */
    .hero__copy > * { animation: enter 0.9s var(--ease-out) both; }
    .hero__copy > :nth-child(2) { animation-delay: 0.08s; }
    .hero__copy > :nth-child(3) { animation-delay: 0.16s; }
    .hero__copy > :nth-child(4) { animation-delay: 0.24s; }
    .hero__copy > :nth-child(5) { animation-delay: 0.32s; }
    .hero__visual { animation: enter-visual 1.2s 0.15s var(--ease-out) both; }

    .hero-chip--a { animation: bob 7s ease-in-out infinite; }
    .hero-chip--b { animation: bob 7s -3.5s ease-in-out infinite; }

    /* The entrance never starts fully transparent: browsers do not count transparent pixels as painted,
       so a fade from 0 would push First and Largest Contentful Paint to the end of the animation. */
    @keyframes enter {
      from { opacity: 0.35; transform: translateY(24px); }
    }
    @keyframes enter-visual {
      from { opacity: 0.6; transform: scale(0.94); }
    }
    @keyframes bob {
      50% { transform: translateY(-10px); }
    }

    /* Scroll-driven reveals where supported (Chrome, Edge, Safari 26+). Elsewhere content simply shows. */
    @supports (animation-timeline: view()) {
      [data-reveal] {
        animation: reveal linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
      }
      .ladder__bar {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 10% entry 100%;
      }
      @container (max-width: 599px) {
        .case[data-reveal] { animation: none; }
      }
      @keyframes reveal {
        from { opacity: 0; transform: translateY(36px); }
      }
      @keyframes rise {
        from { clip-path: inset(80% 0 0 0 round 14px 14px 6px 6px); }
        to { clip-path: inset(0 0 0 0 round 14px 14px 6px 6px); }
      }
    }
  }
}
