/* AFKify site styles. Hand-written, no build step.
   Colours are tokens on :root; light mode overrides them below. The palette comes from the
   "Night glow" logo (favicon.svg): a navy night-sky tile (#16224A to #0A0F22), a moonlight-blue
   cursor and moon (#B9E2FF) and a soft #7FC4FF glow. Use the tokens, never raw colours. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark light;

  /* Night sky: deep navy rather than neutral near-black. */
  --bg: #0a0f22;
  --bg-tint: #0d1429;
  --surface: #111a33;
  --surface-2: #18223f;
  --surface-3: #212c4d;
  --border: #222d4c;
  --border-strong: #334166;
  --text: #eef3ff;
  --text-muted: #a9b5d1;
  --text-faint: #8c99ba;
  /* Moonlight blue. Buttons are light blue with navy ink; hover and press go a deeper blue. */
  --accent: #b9e2ff;
  --accent-hover: #9ccbff;
  --accent-press: #84b8f5;
  --accent-ink: #0a0f22;
  --accent-text: #b9e2ff;
  --accent-soft: rgba(127, 196, 255, 0.12);
  --accent-line: rgba(156, 203, 255, 0.45);
  --accent-glow: rgba(127, 196, 255, 0.42);
  --accent-glow-strong: rgba(127, 196, 255, 0.6);
  --hl-glow: 0 0 34px rgba(127, 196, 255, 0.38);
  --comet: #f2f9ff;
  /* The logo tile is the same navy as the page, so it gets a faint moonlit edge in dark mode. */
  --logo-ring: 0 0 0 1px rgba(185, 226, 255, 0.12), 0 6px 18px -8px rgba(127, 196, 255, 0.5);
  --glow: rgba(127, 196, 255, 0.2);
  --warn-bg: #1c1a17;
  --warn-border: #4a3f17;
  --warn-text: #ffd27a;
  --no: #ff8a8a;
  --shade: rgba(2, 5, 18, 0.45);
  --backdrop: rgba(3, 6, 18, 0.55);
  --shadow: 0 1px 0 rgba(185, 226, 255, 0.05) inset, 0 24px 60px -24px rgba(2, 5, 18, 0.85);
  --focus: #b9e2ff;

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 20px;
  --max: 1160px;

  /* Height of the sticky header, including its 1px border. Anchors and focus scrolling use it, so
     nothing lands under the header. Each breakpoint sets it below; site.js re-measures the real
     header (text zoom, wrapping) and keeps it exact. */
  --header-h: 69px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spot: rgba(127, 196, 255, 0.1);
  --aura: rgba(70, 104, 232, 0.24);
  --star: #dcefff;
  --star-opacity: 0.9;
  --grid-opacity: 0.2;
  --grain-opacity: 0.07;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fc;
    --bg-tint: #edf1f9;
    --surface: #ffffff;
    --surface-2: #e9eef8;
    --surface-3: #dde4f2;
    --border: #d8dfee;
    --border-strong: #bcc7de;
    --text: #0d1430;
    --text-muted: #454f6b;
    --text-faint: #58627e;
    /* On white, text and links use a darker blue; filled buttons stay light blue with navy ink. */
    --accent: #9ccbff;
    --accent-hover: #7db5f5;
    --accent-press: #67a3ec;
    --accent-ink: #0a0f22;
    --accent-text: #1c55a6;
    --accent-soft: #e3f0ff;
    --accent-line: #84b4ea;
    --accent-glow: rgba(60, 130, 230, 0.32);
    --accent-glow-strong: rgba(60, 130, 230, 0.45);
    --hl-glow: none;
    --comet: #2f7de1;
    --logo-ring: 0 6px 14px -8px rgba(13, 20, 48, 0.5);
    --glow: rgba(110, 170, 255, 0.24);
    --warn-bg: #fff6df;
    --warn-border: #f0d58a;
    --warn-text: #6b4a00;
    --no: #b42318;
    --shade: rgba(13, 20, 48, 0.08);
    --backdrop: rgba(13, 20, 48, 0.28);
    --shadow: 0 1px 2px rgba(13, 20, 48, 0.06), 0 20px 50px -28px rgba(13, 20, 48, 0.35);
    --focus: #1c55a6;
    --spot: rgba(110, 170, 255, 0.16);
    --aura: rgba(120, 140, 255, 0.16);
    --star: #5b86c8;
    --star-opacity: 0.45;
    --grid-opacity: 0.35;
    --grain-opacity: 0.05;
  }
}

/* ---------- Base ---------- */

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

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

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

/* Safety net: with reduced motion everything snaps straight to its final state. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after,
  ::backdrop {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Anchors and the sticky header ----------
   Every anchor target and focusable element keeps clear of the sticky header (WCAG 2.4.11).
   Sections on the home page also get --anchor-gap from site.js: half the free space below the
   header when the section is shorter than that space, so it lands centred; 0 when it is taller,
   so its top sits just under the header. Without JS, sections align to the top under the header. */

[id],
a,
button,
input,
summary,
[tabindex] {
  scroll-margin-top: calc(var(--header-h) + 16px);
  scroll-margin-bottom: 16px;
}

#main {
  scroll-margin-top: var(--header-h);
}

main section[id] {
  scroll-margin-top: calc(var(--header-h) + var(--anchor-gap, 0px));
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

h1 {
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 700;
}

code,
.code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

mark.todo {
  background: #ffe066;
  color: #1a1400;
  border-radius: 4px;
  padding: 0 0.3em;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}

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

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

@media (max-width: 400px) {
  :root {
    --gutter: 16px;
  }
}

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.08s;
}

.btn .icon {
  transition: transform 0.35s var(--ease-spring);
}

.btn:hover .icon {
  transform: rotate(-10deg) scale(1.1);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 28px -10px var(--accent-glow);
}

/* A single sheen sweeps across on hover (behind the label). */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-110%) skewX(-18deg);
  pointer-events: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 14px 34px -12px var(--accent-glow-strong), 0 0 0 4px var(--accent-soft);
}

.btn-primary:active {
  background: var(--accent-press);
  box-shadow: 0 6px 18px -10px var(--accent-glow);
}

.btn-primary:hover::after {
  transform: translateX(330%) skewX(-18deg);
  transition: transform 0.8s var(--ease-out);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent-line);
  background: var(--surface-3);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-static {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  cursor: default;
}

.btn-static:hover,
.btn-static:active {
  transform: none;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.95rem;
  border-radius: 10px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
  /* Stays put while the rest of the page cross-fades between pages (see "Motion"). */
  view-transition-name: site-header;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  flex: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 25%; /* matches the tile's rx="16" on a 64 viewBox */
  box-shadow: var(--logo-ring);
  transition: transform 0.45s var(--ease-spring);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.07);
}

.brand-ify {
  color: var(--accent-text);
}

.site-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Underline that grows in on hover and stays for the section you're reading (site.js sets
   aria-current="true" while you scroll). */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-text);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.site-nav a:hover::after {
  transform: scaleX(0.35);
}

.site-nav a[aria-current] {
  color: var(--text);
}

.site-nav a[aria-current="true"]::after {
  transform: scaleX(1);
}

.header-cta {
  flex: none;
}

.nav-toggle {
  display: none;
}

/* Wide screens: the nav is a popover in the markup (it's the mobile menu), so undo the browser's
   popover styles and show it inline. */
@media (min-width: 861px) {
  .site-nav {
    display: block;
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    overflow: visible;
    background: none;
    color: inherit;
  }
}

/* Narrow screens: a compact sticky header with a Menu button that opens the nav as a sheet.
   The popover API does the opening, Esc and click-outside without JavaScript. */
@media (max-width: 860px) {
  :root {
    --header-h: 61px;
  }
  .header-inner {
    min-height: 60px;
    gap: 10px;
  }
  .header-cta {
    margin-left: auto;
  }

  @supports selector(:popover-open) {
    .nav-toggle {
      display: inline-grid;
      place-items: center;
      flex: none;
      width: 44px;
      height: 44px;
      padding: 0;
      border: 1px solid var(--border-strong);
      border-radius: 12px;
      background: var(--surface-2);
      color: var(--text);
      cursor: pointer;
      transition: border-color 0.2s ease, background-color 0.2s ease;
    }
    .nav-toggle:hover {
      border-color: var(--accent-line);
    }
    .nav-toggle-bars,
    .nav-toggle-bars::before,
    .nav-toggle-bars::after {
      display: block;
      width: 18px;
      height: 2px;
      border-radius: 2px;
      background: currentColor;
    }
    .nav-toggle-bars {
      position: relative;
      transition: background-color 0.2s ease;
    }
    .nav-toggle-bars::before,
    .nav-toggle-bars::after {
      content: "";
      position: absolute;
      left: 0;
      transition: transform 0.3s var(--ease-out);
    }
    .nav-toggle-bars::before {
      top: -6px;
    }
    .nav-toggle-bars::after {
      top: 6px;
    }
    .site-header:has(.site-nav:popover-open) .nav-toggle-bars {
      background-color: transparent;
    }
    .site-header:has(.site-nav:popover-open) .nav-toggle-bars::before {
      transform: translateY(6px) rotate(45deg);
    }
    .site-header:has(.site-nav:popover-open) .nav-toggle-bars::after {
      transform: translateY(-6px) rotate(-45deg);
    }

    .site-nav {
      position: fixed;
      inset: var(--header-h) 0 auto;
      width: auto;
      max-height: calc(100dvh - var(--header-h));
      margin: 0;
      padding: 10px var(--gutter) 20px;
      overflow-y: auto;
      border: 0;
      border-bottom: 1px solid var(--border);
      background: var(--bg);
      color: var(--text);
      box-shadow: 0 30px 50px -30px var(--shade);
      opacity: 0;
      transform: translateY(-10px);
      transition: opacity 0.2s ease, transform 0.3s var(--ease-out), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
    }
    .site-nav:popover-open {
      opacity: 1;
      transform: none;
    }
    @starting-style {
      .site-nav:popover-open {
        opacity: 0;
        transform: translateY(-10px);
      }
    }
    .site-nav::backdrop {
      top: var(--header-h, 61px);
      background: transparent;
      transition: background-color 0.3s ease, overlay 0.3s allow-discrete, display 0.3s allow-discrete;
    }
    .site-nav:popover-open::backdrop {
      background: var(--backdrop);
    }
    @starting-style {
      .site-nav:popover-open::backdrop {
        background: transparent;
      }
    }
    .site-nav ul {
      flex-direction: column;
      gap: 2px;
    }
    .site-nav a {
      padding: 13px 14px;
      border-radius: 12px;
      color: var(--text);
      font-size: 1.1rem;
    }
    .site-nav a::after {
      left: 14px;
      right: auto;
      width: 28px;
      bottom: 6px;
      transform-origin: left;
    }
    .site-nav a[aria-current="true"] {
      background: var(--accent-soft);
      color: var(--accent-text);
    }
  }

  /* Browsers without popovers: the old swipeable row of links, and a header that scrolls away
     (so nothing sticks over the content and the offset is 0). */
  @supports not selector(:popover-open) {
    :root {
      --header-h: 0px;
    }
    .site-header {
      position: static;
    }
    .header-inner {
      flex-wrap: wrap;
      gap: 0 12px;
      padding-top: 10px;
    }
    .site-nav {
      order: 3;
      flex: 1 0 100%;
      margin: 6px calc(-1 * var(--gutter)) 0;
      overflow-x: auto;
      scrollbar-width: none;
    }
    .site-nav::-webkit-scrollbar {
      display: none;
    }
    .site-nav ul {
      justify-content: space-between;
      min-width: max-content;
      padding: 0 calc(var(--gutter) - 12px) 8px;
      gap: 0;
    }
    .site-nav a {
      padding: 8px 9px;
      font-size: 0.94rem;
    }
  }
}

@media (max-width: 400px) {
  .brand {
    font-size: 1.25rem;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .header-cta .btn {
    padding-inline: 12px;
    font-size: 0.9rem;
  }
}

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

.section {
  padding-block: clamp(64px, 6vw + 32px, 120px);
}

.section-alt {
  background: var(--bg-tint);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.lead {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.55;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 6vw, 96px) clamp(64px, 7vw, 112px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: var(--grid-opacity);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 70%);
  pointer-events: none;
}

/* A second, deeper blue glow low down and a fine grain over the whole hero (both decorative). */
.hero-aura {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-aura::before {
  content: "";
  position: absolute;
  right: 4%;
  bottom: -38%;
  width: min(720px, 110vw);
  aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--aura), transparent 72%);
}

.hero-aura::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
}

/* A sparse starfield, densest near the top right where the moonlight glow sits. Two layers of
   dots (radial gradients on tiles of different sizes, so the pattern doesn't visibly repeat);
   in "Motion" they twinkle slowly out of step. Decorative, CSS only. */
.hero-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 78% 12%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 75% at 78% 12%, #000 15%, transparent 72%);
}

.hero-stars::before,
.hero-stars::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--star-opacity);
}

.hero-stars::before {
  background-image:
    radial-gradient(circle at 23px 41px, var(--star) 0.7px, transparent 1.5px),
    radial-gradient(circle at 151px 17px, var(--star) 0.6px, transparent 1.4px),
    radial-gradient(circle at 97px 173px, var(--star) 0.8px, transparent 1.6px),
    radial-gradient(circle at 211px 119px, var(--star) 1.1px, transparent 2.2px),
    radial-gradient(circle at 58px 233px, var(--star) 0.6px, transparent 1.4px);
  background-size: 257px 263px, 239px 211px, 293px 251px, 331px 307px, 227px 283px;
}

.hero-stars::after {
  background-image:
    radial-gradient(circle at 131px 67px, var(--star) 0.7px, transparent 1.5px),
    radial-gradient(circle at 37px 139px, var(--star) 1px, transparent 2px),
    radial-gradient(circle at 187px 211px, var(--star) 0.6px, transparent 1.4px),
    radial-gradient(circle at 271px 29px, var(--star) 0.8px, transparent 1.7px);
  background-size: 283px 241px, 349px 317px, 241px 269px, 311px 229px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  padding: 6px 14px 6px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.hero-badge .pill {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 .hl {
  color: var(--accent-text);
  text-shadow: var(--hl-glow);
}

.hero .lead {
  max-width: 560px;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta .icon {
  color: var(--accent-text);
  width: 18px;
  height: 18px;
}

.hero-art {
  position: relative;
  max-width: 560px;
  width: 100%;
  justify-self: end;
}

/* Pause control for the looping illustration (WCAG 2.2.2). A real checkbox, so it works without JS. */
.anim-toggle {
  position: absolute;
  left: 1.5%;
  bottom: 2.5%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.anim-toggle:hover {
  color: var(--text);
  border-color: var(--accent-line);
}

.anim-toggle:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.anim-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.anim-toggle .icon {
  width: 16px;
  height: 16px;
}

.anim-toggle .i-play,
.anim-toggle:has(input:checked) .i-pause {
  display: none;
}

.anim-toggle:has(input:checked) .i-play {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .anim-toggle {
    display: none;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-art {
    justify-self: center;
    max-width: 520px;
  }
}

/* ---------- Illustration (inline SVG) ---------- */

.ill text {
  font-family: var(--font-display);
  font-weight: 700;
}

.ill .t-strong {
  fill: var(--text);
}

.ill .t-muted {
  fill: var(--text-muted);
}

.ill .t-accent {
  fill: var(--accent-text);
}

.ill .t-ink {
  fill: var(--accent-ink);
}

.ill .t-xl {
  font-weight: 800;
}

.ill .card {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.ill .card-hi {
  fill: var(--surface);
  stroke: var(--accent-line);
  stroke-width: 2;
}

.ill .row {
  fill: var(--surface-2);
}

.ill .chip {
  fill: var(--surface-3);
}

.ill .chip-accent {
  fill: var(--accent-soft);
  stroke: var(--accent-line);
  stroke-width: 1.5;
}

.ill .fill-accent {
  fill: var(--accent);
}

.ill .fill-soft {
  fill: var(--accent-soft);
}

.ill .num {
  fill: var(--surface-3);
}

.ill .line {
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.ill .stroke-accent {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .stroke-muted {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .stroke-ink {
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ill .code-box {
  fill: var(--bg);
  stroke: var(--accent-line);
  stroke-width: 2;
  stroke-dasharray: 7 6;
}

.ill .key {
  fill: var(--surface);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.ill .shadow {
  fill: #020512;
  opacity: 0.35;
}

.ill .t-mono {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* The step that is running. Still on row 1 when nothing moves. */
.ill .run-hl {
  fill: var(--accent-soft);
  stroke: var(--accent-line);
  stroke-width: 1.5;
}

/* Parts that only exist while animating. */
.ill .scan,
.ill .cursor,
.ill .ripple,
.ill .plus-one,
.ill .run-ping,
.ill .type-cover,
.ill .caret {
  opacity: 0;
}

.ill .scan-stop-a {
  stop-color: var(--accent);
  stop-opacity: 0;
}

.ill .scan-stop-b {
  stop-color: var(--accent);
  stop-opacity: 0.5;
}

.ill .cursor-arrow {
  fill: var(--text);
  stroke: var(--surface);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.ill .ripple {
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 2;
}

.ill .type-cover-bg {
  fill: var(--bg);
}

.ill .type-cover-row {
  fill: var(--surface-2);
}

.ill .caret {
  fill: var(--accent-text);
}

.ill .bell,
.ill .spin,
.ill .run-ping,
.ill .ripple,
.ill .cursor-arrow,
.ill .ill-count,
.ill .pk-btn,
.ill .type-cover {
  transform-box: fill-box;
}

@media (prefers-color-scheme: light) {
  .ill .shadow {
    opacity: 0.08;
  }
}

/* ---------- Trust strip ---------- */

.trust {
  border-block: 1px solid var(--border);
  background: var(--bg-tint);
}

.trust ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  list-style: none;
  margin: 0;
  padding: 22px 0;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

.trust strong {
  display: block;
  color: var(--text);
}

.trust .icon {
  color: var(--accent-text);
}

@media (max-width: 960px) {
  .trust ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .trust ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
}

.step p {
  color: var(--text-muted);
  margin: 0;
}

.step .code {
  color: var(--text);
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  transition: transform 0.45s var(--ease-spring);
}

/* ---------- Cards: lift, accent border and a glow that follows the pointer ----------
   site.js sets --mx/--my on mouse-like pointers; without it the glow sits at the top centre. */

.step,
.feature,
.plan {
  position: relative;
  isolation: isolate;
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease, box-shadow 0.35s ease;
}

.step::after,
.feature::after,
.plan::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, -10%), var(--spot), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .step:hover,
  .feature:hover,
  .plan:not(.plan-pro):hover {
    border-color: var(--border-strong);
  }
  .step:hover,
  .feature:hover,
  .plan:hover {
    box-shadow: var(--shadow);
  }
  .step:hover::after,
  .feature:hover::after,
  .plan:hover::after {
    opacity: 1;
  }
}

.feature h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.note {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* ---------- Packs ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split-art {
  max-width: 540px;
  width: 100%;
  justify-self: center;
}

@media (max-width: 960px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split-art {
    order: 2;
  }
}

.checklist {
  display: grid;
  gap: 18px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

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

.checklist .feature-icon {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 10px;
}

.checklist h3 {
  font-size: 1.05rem;
  margin: 2px 0 2px;
}

.checklist p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.callout p {
  margin: 0;
  color: var(--text-muted);
}

.callout h3 {
  font-size: 1.08rem;
  margin: 0 0 4px;
}

.callout-accent {
  border-color: var(--accent-line);
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface);
}

/* ---------- Honest box ---------- */

.honest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.honest-col {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.honest-col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

.honest-col ul {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.honest-col li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  color: var(--text-muted);
}

.honest-col li .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.yes .icon {
  color: var(--accent-text);
}

.no .icon {
  color: var(--no);
}

.warn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--text);
}

.warn .icon {
  color: var(--warn-text);
  margin-top: 2px;
}

.warn p {
  margin: 0;
}

.warn strong {
  color: var(--warn-text);
}

@media (max-width: 760px) {
  .honest {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin-inline: auto;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.plan-pro {
  border: 2px solid var(--accent-line);
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--accent-soft), transparent 220px), var(--surface);
}

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* A short moonlight that runs round the Pro card's border: once when it scrolls in, and while
   hovered. Masked to the 2px border ring. */
.plan-pro::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 1;
  padding: 2px;
  border-radius: 22px;
  background: conic-gradient(from var(--spin), transparent 0 56%, color-mix(in srgb, var(--comet) 35%, transparent) 72%, var(--comet) 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0;
  pointer-events: none;
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.plan h3 {
  font-size: 1.6rem;
  margin: 0;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag-accent {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}

.plan-sub {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--font-display);
}

.price .amount {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price .per {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
}

.price-options {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.price-options li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.price-options .label {
  font-weight: 700;
}

.price-options .label small {
  display: block;
  color: var(--accent-text);
  font-weight: 700;
  font-size: 0.82rem;
}

.price-options .val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  text-align: right;
  line-height: 1.1;
}

.price-options .val span {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

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

.plan-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.plan-list .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--accent-text);
}

.plan-cta {
  margin-top: auto;
}

.plan-cta p {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.founder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 28px;
  max-width: 980px;
  margin: 20px auto 0;
  padding: 24px clamp(20px, 3vw, 32px);
  border-radius: 22px;
  border: 1px dashed var(--accent-line);
  background: var(--surface);
}

.founder-badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.founder-badge .icon {
  width: 30px;
  height: 30px;
}

.founder h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.founder p {
  margin: 0;
  color: var(--text-muted);
}

.founder .price {
  margin: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.founder .price .amount {
  font-size: 2.4rem;
}

.price-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 28px auto 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.93rem;
}

.price-notes li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
}

.price-notes .icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .price-notes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .founder {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }
  .founder .price {
    align-items: flex-start;
  }
}

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

.faq {
  max-width: 820px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.faq details {
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.3;
  border-radius: 16px;
}

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

/* The +/− tile: ::after is the tile and the horizontal bar, ::before the vertical bar, which turns
   flat when the answer is open. */
.faq summary {
  position: relative;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(var(--text-muted), var(--text-muted)) center / 12px 2px no-repeat, var(--surface-2);
  transition: background-color 0.2s ease;
}

.faq summary::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 35px;
  width: 2px;
  height: 12px;
  margin-top: -6px;
  background: var(--text-muted);
  transition: transform 0.35s var(--ease-out);
}

.faq details[open] summary::before {
  transform: rotate(90deg);
}

.faq summary:hover::after {
  background-color: var(--surface-3);
}

.faq .answer {
  padding: 0 22px 20px;
  color: var(--text-muted);
}

.faq .answer p:last-child,
.faq .answer ul:last-child {
  margin-bottom: 0;
}

.faq .answer strong {
  color: var(--text);
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(36px, 5vw, 64px);
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  text-align: center;
  view-timeline-name: --cta;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  z-index: -1;
  background: radial-gradient(42% 55% at 80% 18%, var(--glow), transparent 70%), radial-gradient(34% 45% at 18% 88%, var(--aura), transparent 70%);
  pointer-events: none;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  pointer-events: none;
}

.cta-band h2 {
  margin-bottom: 12px;
}

.cta-band .lead {
  max-width: 560px;
  margin: 0 auto 26px;
}

.cta-band .cta-row {
  justify-content: center;
  margin-bottom: 0;
}

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

.site-footer {
  margin-top: clamp(64px, 8vw, 112px);
  border-top: 1px solid var(--border);
  background: var(--bg-tint);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-block: 48px 32px;
}

.footer-grid h2 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid a {
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-about p {
  max-width: 420px;
  margin: 14px 0 0;
}

.footer-legal {
  padding-block: 20px 36px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-faint);
}

.footer-legal p {
  margin: 0 0 6px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-about {
    grid-column: 1 / -1;
  }
}

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

.page-head {
  padding-block: clamp(40px, 5vw, 72px) 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tint);
}

.page-head h1 {
  font-size: clamp(2.3rem, 1.6rem + 3vw, 3.6rem);
  margin-bottom: 12px;
}

.page-head .updated {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.prose-wrap {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding-top: 40px;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  font-size: 0.92rem;
}

.toc h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--border);
}

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.35;
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--accent);
}

@media (max-width: 900px) {
  .prose-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .toc {
    position: static;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
  }
  .toc ol {
    border-left: 0;
  }
  .toc a {
    padding-left: 0;
    border-left: 0;
  }
}

.prose {
  max-width: 740px;
  min-width: 0;
}

.prose h2 {
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.8rem);
  margin: 2.2em 0 0.6em;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.6em 0 0.5em;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
}

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

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--text-faint);
}

.summary-box {
  padding: 24px 26px;
  margin-bottom: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--accent-line);
}

.summary-box h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.summary-box ul {
  margin-bottom: 0;
}

.summary-box li {
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2em;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  min-width: 560px;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.prose th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose td:first-child {
  color: var(--text);
  font-weight: 600;
}

.prose .warn p,
.prose .warn {
  color: var(--text);
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.contact-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-card h2 {
  font-size: 1.2rem;
  margin: 12px 0 6px;
}

.contact-card p {
  margin: 0 0 14px;
}

.contact-card .big-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  word-break: break-word;
}

.contact-card .big-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.details-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 20px;
  margin: 0 0 1.2em;
}

.details-list dt {
  font-weight: 700;
  color: var(--text);
}

.details-list dd {
  margin: 0;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .details-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .details-list dd {
    margin-bottom: 10px;
  }
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}

.notfound .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 3rem + 10vw, 9rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--accent-text);
  margin: 0 0 8px;
}

.notfound .cta-row {
  justify-content: center;
}

/* ---------- Refinements ---------- */

.feature .note {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.founder .price {
  color: var(--text);
}

.founder .price .per {
  color: var(--text-muted);
}

.plan-includes {
  margin: 0 0 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-grid .brand {
  color: var(--text);
}

.footer-grid .brand:hover {
  text-decoration: none;
}

@media (max-width: 520px) {
  .cta-row-hero .btn {
    flex: 1 1 100%;
  }
  .hero-badge {
    font-size: 0.85rem;
  }
}

.contact-page {
  max-width: 860px;
  padding-top: 40px;
}

.contact-page > h2 {
  margin-top: 1.6em;
}

.contact-card .feature-icon {
  margin-bottom: 0;
}

.notfound h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
}

.notfound .lead {
  max-width: 520px;
  margin-inline: auto;
}

@media (min-width: 901px) {
  .toc {
    max-height: calc(100vh - var(--header-h) - 52px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* Tables become stacked cards on small screens. */
@media (max-width: 640px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
  .prose table {
    min-width: 0;
  }
  .prose thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .prose table,
  .prose tbody,
  .prose tr,
  .prose td {
    display: block;
    width: 100%;
  }
  .prose tr {
    margin-bottom: 12px;
    padding: 8px 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  .prose td,
  .prose tr:last-child td {
    padding: 6px 16px;
    border: 0;
  }
  .prose td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--text-faint);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* ==========================================================================
   Motion
   Everything that moves is below, inside prefers-reduced-motion: no-preference (the safety net
   near the top also stops anything else under "reduce"). Loops only run in the hero, which has a
   pause control and pauses off-screen; everything else plays once or follows the user.
   Continuous motion uses transform and opacity only. Reasoning: DESIGN-NOTES.md.
   ========================================================================== */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Page to page: a short cross-fade, with the header holding still. */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-group(root) {
    animation-duration: 0.25s;
  }

  /* ----- Hero entrance (once, on load) ----- */

  .hero-copy > * {
    animation: rise 0.7s var(--ease-out) both;
  }
  .hero-copy > :nth-child(2) {
    animation-delay: 0.06s;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 0.12s;
  }
  .hero-copy > :nth-child(4) {
    animation-delay: 0.18s;
  }
  .hero-copy > :nth-child(5) {
    animation-delay: 0.24s;
  }

  .ill-hero {
    animation: art-in 0.9s var(--ease-out) 0.12s both;
  }
  @keyframes art-in {
    from {
      opacity: 0;
      transform: translateY(20px) scale(0.98);
    }
  }

  .anim-toggle {
    animation: fade-in 0.6s ease 0.9s both;
  }

  /* ----- Hero background: two glows drifting slowly, stars twinkling out of step ----- */

  .hero::before {
    will-change: transform;
    animation: drift-a 19s ease-in-out infinite alternate;
  }
  .hero-aura::before {
    will-change: transform;
    animation: drift-b 23s ease-in-out infinite alternate;
  }
  @keyframes drift-a {
    to {
      transform: translate3d(-9%, 7%, 0) scale(1.12);
    }
  }
  @keyframes drift-b {
    to {
      transform: translate3d(-14%, -10%, 0) scale(1.18);
    }
  }
  .hero-stars::before {
    animation: twinkle 5.2s ease-in-out infinite alternate;
  }
  .hero-stars::after {
    animation: twinkle 7.4s ease-in-out -3.1s infinite alternate;
  }
  @keyframes twinkle {
    to {
      opacity: calc(var(--star-opacity) * 0.3);
    }
  }

  /* ----- Hero illustration: the macro runs in a 6 s loop ----- 
     0-1.2 s step 1 scans for "Bite!" · 1.2-2.4 s step 2, the cursor clicks · 2.4-3.6 s step 3,
     E is pressed · 3.6-4.8 s step 4, +1 and the counter ticks, the Discord bell rings ·
     4.8-6 s step 5, repeat spins and the highlight jumps back to row 1. */

  .ill-hero .run-hl {
    animation: run-hl 6s var(--ease-out) infinite;
  }
  @keyframes run-hl {
    0%, 16% { transform: translateY(0); }
    20%, 36% { transform: translateY(50px); }
    40%, 56% { transform: translateY(100px); }
    60%, 76% { transform: translateY(150px); }
    80%, 96% { transform: translateY(200px); }
    100% { transform: translateY(0); }
  }

  /* Each row's number lights up while its step runs (rows are offset by 1.2 s). */
  .ill-hero .step-row {
    --d: 0s;
  }
  .ill-hero .r2 {
    --d: -4.8s;
  }
  .ill-hero .r3 {
    --d: -3.6s;
  }
  .ill-hero .r4 {
    --d: -2.4s;
  }
  .ill-hero .r5 {
    --d: -1.2s;
  }
  .ill-hero .num {
    animation: num-on 6s var(--d) infinite;
  }
  .ill-hero .num-t {
    animation: num-t-on 6s var(--d) infinite;
  }
  @keyframes num-on {
    0%, 17% { fill: var(--accent); }
    21%, 100% { fill: var(--surface-3); }
  }
  @keyframes num-t-on {
    0%, 17% { fill: var(--accent-ink); }
    21%, 100% { fill: var(--text-muted); }
  }

  /* Step 1: a scan line sweeps the "Bite!" chip. */
  .ill-hero .scan {
    animation: scan 6s ease-in-out infinite;
  }
  @keyframes scan {
    0% { opacity: 0; transform: translateX(0); }
    3% { opacity: 1; }
    13% { opacity: 1; transform: translateX(150px); }
    17%, 100% { opacity: 0; transform: translateX(150px); }
  }

  /* Step 2: the cursor glides in and clicks. */
  .ill-hero .cursor {
    animation: cursor 6s var(--ease-out) infinite;
  }
  @keyframes cursor {
    0%, 9% { opacity: 0; transform: translate(392px, 338px); }
    13% { opacity: 1; transform: translate(380px, 326px); }
    24%, 36% { opacity: 1; transform: translate(262px, 229px); }
    42%, 100% { opacity: 0; transform: translate(286px, 250px); }
  }
  .ill-hero .cursor-arrow {
    transform-origin: 0 0;
    animation: cursor-press 6s infinite;
  }
  @keyframes cursor-press {
    0%, 25% { transform: scale(1); }
    27% { transform: scale(0.8); }
    30%, 100% { transform: scale(1); }
  }
  .ill-hero .ripple {
    transform-origin: center;
    animation: ripple 6s ease-out infinite;
  }
  @keyframes ripple {
    0%, 26% { opacity: 0; transform: scale(0.2); }
    27% { opacity: 0.9; transform: scale(0.3); }
    38%, 100% { opacity: 0; transform: scale(1.6); }
  }
  .ill-hero .r2 .chip {
    animation: chip-hit 6s infinite;
  }
  @keyframes chip-hit {
    0%, 26% { fill: var(--surface-3); }
    28%, 33% { fill: var(--accent-line); }
    40%, 100% { fill: var(--surface-3); }
  }

  /* Step 3: E is pressed. */
  .ill-hero .key-press {
    animation: key-press 6s infinite;
  }
  @keyframes key-press {
    0%, 45% { transform: translateY(0); }
    47%, 52% { transform: translateY(2.5px); }
    55%, 100% { transform: translateY(0); }
  }
  .ill-hero .key {
    animation: key-fill 6s infinite;
  }
  @keyframes key-fill {
    0%, 45% { fill: var(--surface); }
    47%, 53% { fill: var(--accent); }
    58%, 100% { fill: var(--surface); }
  }
  .ill-hero .key-t {
    animation: key-text 6s infinite;
  }
  @keyframes key-text {
    0%, 45% { fill: var(--text); }
    47%, 53% { fill: var(--accent-ink); }
    58%, 100% { fill: var(--text); }
  }

  /* Step 4: "+1" floats up and the counter ticks. Its loop is shifted so each iteration starts at
     3.72 s, when site.js adds 1 (animationiteration). */
  .ill-hero .ill-count {
    transform-origin: 0 100%;
    animation: count-tick 6s -2.28s infinite;
  }
  @keyframes count-tick {
    0% { transform: scale(1.12); fill: var(--accent-text); }
    12% { transform: scale(1); }
    30% { fill: var(--accent-text); }
    45%, 100% { transform: scale(1); fill: var(--text); }
  }
  .ill-hero .plus-one {
    animation: plus-one 6s ease-out infinite;
  }
  @keyframes plus-one {
    0%, 60% { opacity: 0; transform: translateY(8px); }
    63% { opacity: 1; }
    73% { opacity: 1; transform: translateY(-10px); }
    79%, 100% { opacity: 0; transform: translateY(-16px); }
  }
  .ill-hero .toast {
    animation: toast-bump 6s var(--ease-out) infinite;
  }
  @keyframes toast-bump {
    0%, 63% { transform: translateY(0); }
    67% { transform: translateY(-4px); }
    77%, 100% { transform: translateY(0); }
  }
  .ill .bell {
    transform-origin: 50% 10%;
  }
  .ill-hero .bell {
    animation: ring 6s infinite;
  }
  @keyframes ring {
    0%, 64% { transform: rotate(0); }
    66% { transform: rotate(16deg); }
    68% { transform: rotate(-14deg); }
    70% { transform: rotate(10deg); }
    72% { transform: rotate(-6deg); }
    74%, 100% { transform: rotate(0); }
  }

  /* Step 5: repeat. */
  .ill-hero .spin {
    transform-origin: center;
    animation: spin-once 6s var(--ease-out) infinite;
  }
  @keyframes spin-once {
    0%, 82% { transform: rotate(0); }
    96%, 100% { transform: rotate(360deg); }
  }

  /* "Running" status dot. */
  .ill-hero .run-ping {
    transform-origin: center;
    animation: ping 1.6s var(--ease-out) infinite;
  }
  @keyframes ping {
    from { opacity: 0.6; transform: scale(1); }
    to { opacity: 0; transform: scale(2.8); }
  }

  /* The pack code types in once, one character per step, with a caret. */
  .ill-hero .type-cover {
    opacity: 1;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    animation: type 0.95s steps(13, end) 1.25s backwards;
  }
  .ill-hero .caret {
    animation: caret-hero 0.95s steps(13, end) 1.25s both, blink 0.8s steps(1) 0.65s 5;
  }
  @keyframes type {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
  }
  @keyframes caret-hero {
    to { transform: translateX(206px); }
  }
  @keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
  }

  /* Pause: the toggle in the corner, or site.js when the hero is off-screen. */
  .hero:has(.anim-toggle input:checked) *,
  .hero:has(.anim-toggle input:checked)::before,
  .hero:has(.anim-toggle input:checked) *::before,
  .hero:has(.anim-toggle input:checked) *::after,
  .hero.is-offscreen *,
  .hero.is-offscreen::before,
  .hero.is-offscreen *::before,
  .hero.is-offscreen *::after {
    animation-play-state: paused !important;
  }

  /* ----- Scroll reveals -----
     site.js adds .rv only to content below the fold, then .is-in as it arrives (and removes .rv
     afterwards so hover transitions aren't delayed). Without JS nothing is ever hidden. */

  .rv {
    opacity: 0;
    transform: translateY(18px);
  }
  .rv.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease var(--rv-delay, 0s), transform 0.8s var(--ease-out) var(--rv-delay, 0s);
  }

  /* How it works: number tiles pop in as their cards arrive. */
  .step.is-in .step-num {
    animation: pop 0.6s var(--ease-spring) calc(var(--rv-delay, 0s) + 0.2s) both;
  }
  @keyframes pop {
    from {
      opacity: 0;
      transform: scale(0.4) rotate(-14deg);
    }
  }

  /* Packs illustration: the code types into the box, Import is pressed, the cards slide up. */
  .split-art.is-in .ill-packs .type-cover {
    opacity: 1;
    transform-origin: 100% 50%;
    transform: scaleX(0);
    animation: type 0.75s steps(13, end) 0.3s backwards;
  }
  .split-art.is-in .ill-packs .caret {
    animation: caret-packs 0.75s steps(13, end) 0.3s both, blink 0.8s steps(1) 0s 4;
  }
  @keyframes caret-packs {
    to { transform: translateX(162px); }
  }
  .split-art.is-in .pk-btn {
    transform-origin: center;
    animation: btn-press 0.45s var(--ease-out) 1.1s;
  }
  @keyframes btn-press {
    40% { transform: scale(0.92); }
  }
  .split-art.is-in .pk-card {
    animation: card-up 0.6s var(--ease-out) 1.25s both;
  }
  .split-art.is-in .pk-2 {
    animation-delay: 1.4s;
  }
  .split-art.is-in .pk-3 {
    animation-delay: 1.55s;
  }
  @keyframes card-up {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
  }
  .split-art.is-in .ill-packs .bell {
    animation: ring-once 0.9s ease 2.1s;
  }
  @keyframes ring-once {
    15% { transform: rotate(16deg); }
    35% { transform: rotate(-14deg); }
    55% { transform: rotate(9deg); }
    75% { transform: rotate(-5deg); }
  }

  /* Honesty section: ticks and crosses draw themselves in. */
  .honest-col.is-in .icon {
    stroke-dasharray: 26;
    animation: draw 0.6s var(--ease-out) both;
    animation-delay: calc(var(--rv-delay, 0s) + 0.25s + var(--i, 0) * 0.12s);
  }
  .honest-col li:nth-child(1) {
    --i: 1;
  }
  .honest-col li:nth-child(2) {
    --i: 2;
  }
  .honest-col li:nth-child(3) {
    --i: 3;
  }
  @keyframes draw {
    from { stroke-dashoffset: 26; }
    to { stroke-dashoffset: 0; }
  }

  /* Pricing: a light runs round the Pro card's border when it arrives, and while hovered. */
  .plan-pro.is-in::before {
    animation: comet 3.2s linear 0.5s both;
  }
  .plan-pro:hover::before {
    opacity: 1;
    animation: comet-loop 2.8s linear infinite;
  }
  @keyframes comet {
    0% { --spin: 0deg; opacity: 0; }
    10%, 82% { opacity: 1; }
    100% { --spin: 540deg; opacity: 0; }
  }
  @keyframes comet-loop {
    to { --spin: 360deg; }
  }

  /* FAQ: answers fade in when opened. */
  .faq details[open] > .answer {
    animation: answer-in 0.35s var(--ease-out);
  }
  @keyframes answer-in {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  /* Mobile menu links arrive one after another. */
  .site-nav:popover-open li {
    animation: rise 0.4s var(--ease-out) both;
  }
  .site-nav:popover-open li:nth-child(2) {
    animation-delay: 0.03s;
  }
  .site-nav:popover-open li:nth-child(3) {
    animation-delay: 0.06s;
  }
  .site-nav:popover-open li:nth-child(4) {
    animation-delay: 0.09s;
  }
  .site-nav:popover-open li:nth-child(5) {
    animation-delay: 0.12s;
  }

  /* 404: the number drops in. */
  .notfound .big {
    animation: drop-in 0.9s var(--ease-spring) both;
  }
  @keyframes drop-in {
    from {
      opacity: 0;
      transform: translateY(-36px) rotate(-6deg);
    }
  }
}

/* Hover movement (lift, icon pop, crown wiggle) only with a mouse and motion allowed. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .step:hover,
  .feature:hover,
  .plan:hover {
    transform: translateY(-4px);
  }
  .feature:hover .feature-icon,
  .checklist li:hover .feature-icon {
    transform: rotate(-8deg) scale(1.1);
  }
  .checklist .feature-icon {
    transition: transform 0.45s var(--ease-spring);
  }
  .founder:hover .founder-badge .icon {
    animation: wiggle 0.7s ease;
  }
  @keyframes wiggle {
    20% { transform: rotate(-12deg) scale(1.1); }
    45% { transform: rotate(10deg) scale(1.1); }
    70% { transform: rotate(-5deg); }
  }
}

/* Scroll-driven touches (Chrome, Edge, Safari 26+; elsewhere they simply don't run). */
@supports (animation-timeline: scroll()) {
  /* The header gains a soft shadow once the page moves under it. */
  .site-header::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 18px;
    background: linear-gradient(var(--shade), transparent);
    opacity: 0;
    pointer-events: none;
    animation: header-shade linear both;
    animation-timeline: scroll();
    animation-range: 0 140px;
  }

  @keyframes header-shade {
    to { opacity: 1; }
  }

  @media (prefers-reduced-motion: no-preference) {
    /* The closing call-to-action's glow slides across as you scroll past. */
    .cta-band::before {
      animation: cta-glow linear both;
      animation-timeline: --cta;
    }
    @keyframes cta-glow {
      from { transform: translateX(-10%); }
      to { transform: translateX(10%); }
    }
  }

  /* A little depth: the hero art lags behind the page as you scroll away (wide screens only). */
  @media (prefers-reduced-motion: no-preference) and (min-width: 961px) {
    .hero-art {
      animation: art-depth linear both;
      animation-timeline: scroll();
      animation-range: 0 700px;
    }
    @keyframes art-depth {
      to { translate: 0 44px; }
    }
  }
}
