/* uc.surf: "surf at golden hour". No JavaScript.
   Base palette (unchanged): warm paper by day, warm charcoal by night, amber accent.
   Extended palette: sunset coral, sea teal, sage, dusk violet. Every text color passes WCAG AA
   on every background in both themes. Motion is slow and decorative, and all of it stops
   under prefers-reduced-motion. */

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;
  --bg: #f6f1e7;
  --bg-2: #f0e8da;
  --surface: #ede5d6;
  --card: #faf6ef;
  --text: #2a251f;
  --muted: #5c5246;
  --accent: #87531a;
  --rule: #e0d6c5;
  --rule-strong: #cbbda6;

  --sun: #e9a55a;
  --coral: #a6482f;
  --sea: #2b6a6e;
  --sage: #4f6e43;
  --dusk: #67578b;
  --sunset: linear-gradient(100deg, var(--accent), var(--coral) 48%, var(--dusk));

  --btn-a: #eaa75c;
  --btn-b: #e48f73;
  --btn-text: #2a1a0e;
  --glass: rgb(246 241 231 / 0.72);
  --shadow-rgb: 74 52 28;
  --shadow: 0 1px 2px rgb(var(--shadow-rgb) / 0.06), 0 14px 34px -16px rgb(var(--shadow-rgb) / 0.22);
  --shadow-lift: 0 2px 6px rgb(var(--shadow-rgb) / 0.08), 0 30px 60px -22px rgb(var(--shadow-rgb) / 0.36);

  --sev-critical: #a1392f;
  --sev-high: #9c4f1b;
  --sev-medium: #7d620b;
  --sev-low: #46693f;
  --sev-info: #44607f;

  /* the hero scene */
  --sky-1: #eec39a;
  --sky-2: #f4d7b4;
  --sky-3: #f8e8d4;
  --sun-core: #fbd08c;
  --sun-edge: #ec9a52;
  --glow: #f2a65e;
  --glow-a: 0.55;
  --sea-1: #bfd3c9;
  --sea-2: #97bbb4;
  --sea-3: #659a96;
  --sea-4: #3f7477;
  --crest: #f6f1e7;
  --hill-far: #ddbfa6;
  --hill-near: #c9a088;
  --bird: #7a6656;
  --board: #c4643f;
  --rider: #2a251f;
  --star: #fff8e8;
  --crater: #cdb88f;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Fluid type: body text is 18px on phones and 21px on large screens (follows browser settings). */
  --text-sm: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --text-base: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
  --text-lg: clamp(1.3rem, 1.16rem + 0.6vw, 1.6rem);
  --text-xl: clamp(1.6rem, 1.36rem + 1.1vw, 2.15rem);
  --text-2xl: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  --text-hero: clamp(3.1rem, 1.9rem + 5.6vw, 6.6rem);

  --wide: 76rem;
  --measure: 44rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 22px;
  --radius-lg: 32px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a17;
    --bg-2: #201d19;
    --surface: #26231f;
    --card: #23201c;
    --text: #e4dbca;
    --muted: #b0a693;
    --accent: #dbb47c;
    --rule: #34302a;
    --rule-strong: #4a443b;

    --sun: #f0c48a;
    --coral: #ee9a80;
    --sea: #7cc0be;
    --sage: #a9c29a;
    --dusk: #b9abd9;

    --btn-a: #e8b273;
    --btn-b: #e79a80;
    --btn-text: #1c140c;
    --glass: rgb(28 26 23 / 0.72);
    --shadow-rgb: 0 0 0;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 34px -16px rgb(0 0 0 / 0.6);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.3), 0 30px 60px -22px rgb(0 0 0 / 0.75);

    --sev-critical: #e8988c;
    --sev-high: #e3a77b;
    --sev-medium: #d5bd6f;
    --sev-low: #a7c79d;
    --sev-info: #a5bad3;

    --sky-1: #101219;
    --sky-2: #1b1a25;
    --sky-3: #2c2430;
    --sun-core: #f4e9cf;
    --sun-edge: #d9c49b;
    --glow: #e8d2a3;
    --glow-a: 0.32;
    --sea-1: #34474b;
    --sea-2: #2b3e45;
    --sea-3: #22353d;
    --sea-4: #1a2b32;
    --crest: #7cc0be;
    --hill-far: #2e2833;
    --hill-near: #3a303f;
    --board: #ee9a80;
    --rider: #e4dbca;
    --crater: #c9b48a;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--text); --rule: var(--rule-strong); }
}

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

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  scroll-padding-top: 6rem;
  scrollbar-color: var(--rule-strong) transparent;
  accent-color: var(--accent);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: 400 var(--text-base) / 1.7 var(--font-sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
/* Paper grain, behind all content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .3 0 0 0 0 .16 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  body::before { filter: invert(1); opacity: 0.35; }
}
main { flex: 1 0 auto; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.wrap.measure { width: min(100% - 2 * var(--gutter), var(--measure)); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); margin: 0 0 1rem; }
h2 { font-size: var(--text-xl); margin: 0 0 1rem; }
h3 { font-size: var(--text-lg); margin: 0 0 0.4rem; }
p, ul, ol, dl, blockquote, pre { margin: 0 0 1.1em; }
p, li, dd { text-wrap: pretty; }
strong { font-weight: 650; }
[id] { scroll-margin-top: 6rem; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: color 0.2s ease, text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
}
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--coral) 26%, var(--bg)); color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
pre {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 4;
}
pre code { background: none; padding: 0; font-size: 0.82em; overflow-wrap: normal; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; top: 1rem; z-index: 100; }
.skip:focus { left: 1rem; background: var(--card); padding: 0.4rem 0.8rem; border-radius: 10px; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- buttons, pills, chips */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.45em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform 0.3s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary {
  color: var(--btn-text);
  background: linear-gradient(100deg, var(--btn-a), var(--btn-b));
  box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--coral) 80%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.35);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.45) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.9s var(--ease);
}
.btn-primary:hover { color: var(--btn-text); box-shadow: 0 18px 32px -14px color-mix(in srgb, var(--coral) 85%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.35); }
.btn-primary:hover::after { transform: translateX(110%); }
.btn-ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--card) 60%, transparent);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.btn-small { padding: 0.55em 1em; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  margin: 0 0 1.75rem;
  padding: 0.4em 1.05em 0.4em 0.85em;
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 75%, transparent);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.pill-dot { position: relative; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--sea); }
.pill-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--sea); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.12em 0.75em;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--muted);
  font-size: 0.92em;
  line-height: 1.5;
  white-space: nowrap;
}
.status-fixed, .status-published, .status-accepted { color: var(--sage); border-color: color-mix(in srgb, var(--sage) 50%, transparent); }
.status-reported, .status-triaged, .status-found { color: var(--sea); border-color: color-mix(in srgb, var(--sea) 50%, transparent); }

[data-eco] { --eco: var(--accent); }
[data-eco="go"] { --eco: var(--sea); }
[data-eco="rust"], [data-eco="ruby"] { --eco: var(--coral); }
[data-eco="python"], [data-eco="php"], [data-eco="haskell"], [data-eco="elixir"], [data-eco="post"] { --eco: var(--dusk); }
[data-eco="java"], [data-eco="kotlin"], [data-eco="c"], [data-eco="cpp"], [data-eco="csharp"], [data-eco="dotnet"] { --eco: var(--sage); }
.eco {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--eco, var(--accent));
}
.eco-dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.3em color-mix(in srgb, currentColor 18%, transparent);
}

/* Severity: a five-bar meter plus the word (never color alone). */
.sevmeter { --sev: var(--muted); display: inline-flex; align-items: center; gap: 0.5em; color: var(--sev); font-weight: 600; font-size: var(--text-sm); }
.meter { display: inline-flex; align-items: flex-end; gap: 2px; height: 0.95em; }
.meter i { display: block; width: 4px; border-radius: 2px; background: color-mix(in srgb, var(--sev) 22%, var(--rule)); }
.meter i:nth-child(1) { height: 40%; }
.meter i:nth-child(2) { height: 55%; }
.meter i:nth-child(3) { height: 70%; }
.meter i:nth-child(4) { height: 85%; }
.meter i:nth-child(5) { height: 100%; }
.lvl-1 i:nth-child(-n+1), .lvl-2 i:nth-child(-n+2), .lvl-3 i:nth-child(-n+3), .lvl-4 i:nth-child(-n+4), .lvl-5 i { background: currentColor; }
.sev-critical { --sev: var(--sev-critical); }
.sev-high { --sev: var(--sev-high); }
.sev-medium { --sev: var(--sev-medium); }
.sev-low { --sev: var(--sev-low); }
.sev-info { --sev: var(--sev-info); }

/* ---------------------------------------------------------------- header (sticky glass) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent);
  view-transition-name: site-header;
}
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-lift linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
}
@keyframes header-lift {
  to { border-bottom-color: var(--rule); box-shadow: 0 12px 30px -20px rgb(var(--shadow-rgb) / 0.45); }
}
.header-inner { display: flex; align-items: center; gap: 0.75rem 1.25rem; min-height: 4.4rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.mark { width: 1.3em; height: 1.3em; flex: none; overflow: visible; }
.mark-wave { fill: var(--accent); }
.mark-sun { fill: var(--coral); transform-box: fill-box; transform-origin: center; transition: transform 0.6s var(--ease); }
.brand:hover .mark-sun { transform: translateY(-30%) scale(1.15); }
.nav { display: flex; gap: 0.2rem; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.nav a {
  display: block;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 85%, transparent); }
.nav a[aria-current] { color: var(--text); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.header-cta { color: var(--text); background: var(--card); border-color: var(--rule-strong); }
.header-cta:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 54rem) {
  .header-inner { flex-wrap: wrap; padding-block: 0.6rem; min-height: 0; }
  .nav-wrap { order: 3; width: 100%; overflow-x: auto; margin-inline: -0.5rem; padding-bottom: 0.15rem; }
  .header-cta span { display: none; }
  .header-cta { padding: 0.55em; }
}

/* ---------------------------------------------------------------- aurora backdrops */
.aurora {
  position: absolute;
  inset: -30% -10% auto;
  height: 150%;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 66%);
  mask-image: linear-gradient(180deg, #000 45%, transparent 66%);
  background:
    radial-gradient(36% 40% at 12% 28%, color-mix(in srgb, var(--coral) 20%, transparent), transparent 70%),
    radial-gradient(34% 40% at 88% 16%, color-mix(in srgb, var(--sun) 30%, transparent), transparent 70%),
    radial-gradient(40% 46% at 72% 82%, color-mix(in srgb, var(--sea) 16%, transparent), transparent 70%),
    radial-gradient(30% 36% at 28% 92%, color-mix(in srgb, var(--dusk) 15%, transparent), transparent 70%);
}
.entry[data-severity] .aurora {
  background:
    radial-gradient(36% 44% at 8% 20%, color-mix(in srgb, var(--sev) 18%, transparent), transparent 70%),
    radial-gradient(34% 44% at 92% 30%, color-mix(in srgb, var(--eco) 20%, transparent), transparent 70%),
    radial-gradient(40% 46% at 60% 100%, color-mix(in srgb, var(--sun) 18%, transparent), transparent 70%);
}
.entry[data-severity="critical"] { --sev: var(--sev-critical); }
.entry[data-severity="high"] { --sev: var(--sev-high); }
.entry[data-severity="medium"] { --sev: var(--sev-medium); }
.entry[data-severity="low"] { --sev: var(--sev-low); }
.entry[data-severity="info"] { --sev: var(--sev-info); }

/* ---------------------------------------------------------------- home hero */
.hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(2.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: var(--text-hero); line-height: 0.98; letter-spacing: -0.035em; margin: 0 0 1.5rem; }
.hero h1 em, .page-hero h1 em { font-style: italic; padding-right: 0.08em; color: var(--coral); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero h1 em, .page-hero h1 em {
    background: var(--sunset);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.lede { font-size: var(--text-lg); line-height: 1.6; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

/* The scene: golden hour over the sea, a moonlit night in dark mode. */
.scene {
  position: relative;
  aspect-ratio: 6 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 42%, var(--sky-3) 60%);
  box-shadow: var(--shadow-lift);
  rotate: 1.5deg;
}
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
  pointer-events: none;
}
.scene-art { display: block; width: 100%; height: 100%; }
.sun-core { stop-color: var(--sun-core); }
.sun-edge { stop-color: var(--sun-edge); }
.glow-in { stop-color: var(--glow); stop-opacity: var(--glow-a); }
.glow-out { stop-color: var(--glow); stop-opacity: 0; }
.stars { opacity: 0; }
.star { fill: var(--star); }
.craters { opacity: 0; }
.craters circle { fill: var(--crater); }
.bird { fill: none; stroke: var(--bird); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hill-far { fill: var(--hill-far); }
.hill-near { fill: var(--hill-near); }
.wave-1 path { fill: var(--sea-1); }
.wave-2 path { fill: var(--sea-2); }
.wave-3 path { fill: var(--sea-3); }
.wave-4 path { fill: var(--sea-4); }
.wave-4 .crest { fill: none; stroke: var(--crest); stroke-width: 2.5; stroke-linecap: round; opacity: 0.6; }
.wave-4 .crest-2 { stroke-width: 1.5; opacity: 0.25; }
.shimmer rect { fill: var(--sun-core); opacity: 0.75; }
.board { fill: var(--board); }
.rider { fill: none; stroke: var(--rider); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.rider-head { fill: var(--rider); }
@media (prefers-color-scheme: dark) {
  .stars { opacity: 1; }
  .craters { opacity: 0.4; }
  .bird { opacity: 0; }
  .shimmer rect { opacity: 0.45; }
}

/* ---------------------------------------------------------------- stats */
.stats {
  list-style: none;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
}
.stat {
  --c: var(--accent);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 1.3rem 1.4rem 1.2rem 1.6rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.stat::before { content: ""; position: absolute; left: 0; top: 1.2rem; bottom: 1.2rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.stat::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -30%;
  top: -60%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 18%, transparent), transparent);
}
.stat:nth-child(4n+2) { --c: var(--coral); }
.stat:nth-child(4n+3) { --c: var(--sea); }
.stat:nth-child(4n+4) { --c: var(--dusk); }
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 1.7rem + 2vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c);
}
.stat-label { display: block; margin-top: 0.35rem; color: var(--muted); font-size: var(--text-sm); }

/* ---------------------------------------------------------------- topics band */
.marquee {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: var(--bg-2);
  padding-block: 1.1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee-track[aria-hidden="true"] { display: none; }
.marquee-track li {
  --c: var(--accent);
  display: flex;
  align-items: center;
  padding-inline: 1.4rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 1.05rem + 1.4vw, 2.2rem);
  white-space: nowrap;
}
.marquee-track li::after { content: "✦"; margin-left: 2.8rem; font-style: normal; font-size: 0.55em; color: var(--c); }
.marquee-track li:nth-child(5n+2) { --c: var(--coral); }
.marquee-track li:nth-child(5n+3) { --c: var(--sea); }
.marquee-track li:nth-child(5n+4) { --c: var(--dusk); }
.marquee-track li:nth-child(5n+5) { --c: var(--sage); }
.marquee-track li:nth-child(even) { color: var(--muted); }

/* ---------------------------------------------------------------- sections */
.section { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.section-tight { padding-top: clamp(1rem, 3vw, 2rem); }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head > * { grid-column: 1; }
.section-head > .more { grid-column: 2; grid-row: 2; }
.section-head h2 { font-size: var(--text-2xl); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.section-note { color: var(--muted); margin: 0; }
.section-lede { font-size: var(--text-lg); line-height: 1.6; max-width: 40em; margin: 0.5rem 0 0; }
@media (max-width: 40rem) {
  .section-head { grid-template-columns: 1fr; }
  .section-head > .more { grid-column: 1; grid-row: auto; justify-self: start; }
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker span {
  display: inline-grid;
  place-items: center;
  min-width: 2.4em;
  height: 2.4em;
  border-radius: 999px;
  border: 1px solid currentColor;
  letter-spacing: 0;
  font-size: 0.85em;
}
.kicker::after { content: ""; width: 3rem; height: 1px; background: currentColor; opacity: 0.5; }
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.45em 1.05em;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--text);
  text-decoration: none;
  font-size: var(--text-sm);
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.more:hover { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.more span { display: inline-block; transition: transform 0.3s var(--ease); }
.more:hover span { transform: translateX(4px); }

/* Colored bands with a wavy top edge. */
.band { isolation: isolate; background: var(--bg-2); }
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(45% 50% at 0% 65%, color-mix(in srgb, var(--sea) 13%, transparent), transparent 70%),
    radial-gradient(40% 50% at 100% 95%, color-mix(in srgb, var(--coral) 11%, transparent), transparent 70%);
}
.band-dusk::before {
  background:
    radial-gradient(45% 50% at 100% 60%, color-mix(in srgb, var(--dusk) 14%, transparent), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, color-mix(in srgb, var(--sun) 16%, transparent), transparent 70%);
}
.band-edge {
  position: absolute;
  left: 0;
  bottom: calc(100% - 1px);
  display: block;
  width: 100%;
  height: clamp(16px, 3vw, 40px);
  fill: var(--bg-2);
}

/* ---------------------------------------------------------------- cards */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 3vw, 1.8rem);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.45s ease;
}
/* Animated gradient border, shown on hover. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle), var(--accent), var(--coral), var(--dusk), var(--sea), var(--accent));
  -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, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40%;
  right: -25%;
  width: 75%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--eco) 20%, transparent), transparent);
  opacity: 0.7;
  transition: transform 0.7s var(--ease), opacity 0.7s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: 1; transform: scale(1.3) translate(-8%, 8%); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.card-num {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--rule-strong);
  transition: -webkit-text-stroke-color 0.45s ease;
}
.card:hover .card-num { -webkit-text-stroke-color: var(--eco); }
.card-title { font-size: var(--text-lg); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.5rem; }
.card-title a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-title span, .entry-hero h1 span { display: inline-block; max-width: 100%; }
.card-title, .entry-hero h1 { overflow-wrap: break-word; }
.card:hover .card-title a { color: var(--accent); }
@supports selector(:has(a)) {
  .card-title a:focus-visible { outline: none; }
  .card:has(.card-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
}
.card-sub { font-family: var(--font-mono); font-size: 0.86em; color: var(--muted); margin: 0 0 0.9rem; overflow-wrap: anywhere; }
.card-text { margin: 0 0 1.25rem; }
.card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.75rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--rule-strong);
  font-size: var(--text-sm);
  color: var(--muted);
}
.card-date { margin-left: auto; font-variant-numeric: tabular-nums; }

.empty-card {
  display: grid;
  justify-items: start;
  gap: 0.4rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  border: 1.5px dashed var(--rule-strong);
  background: color-mix(in srgb, var(--card) 60%, transparent);
}
.empty-icon { width: 2.8rem; height: 2.8rem; padding: 0.6rem; border-radius: 14px; color: var(--dusk); background: color-mix(in srgb, var(--dusk) 14%, transparent); }
.empty-title { font-family: var(--font-serif); font-size: var(--text-xl); line-height: 1.2; margin: 0.6rem 0 0; }
.empty-card p:last-child { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- how it works */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.step {
  --c: var(--sea);
  position: relative;
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.step:nth-child(3n+2) { --c: var(--coral); }
.step:nth-child(3n) { --c: var(--dusk); }
.step-icon {
  display: grid;
  place-items: center;
  width: 3.3rem;
  height: 3.3rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  transition: transform 0.5s var(--ease);
}
.step:hover .step-icon { transform: rotate(-8deg) scale(1.08); }
.step-icon .icon { width: 1.6rem; height: 1.6rem; }
.step-num { display: block; margin-bottom: 0.3rem; font-family: var(--font-mono); font-size: 0.92rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.step h3 { font-size: var(--text-xl); margin: 0 0 0.5rem; }
.step p { margin: 0; }
.principles {
  list-style: none;
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}
.principle {
  --c: var(--accent);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  border: 1px solid var(--rule);
}
.principle:nth-child(2n) { --c: var(--sage); }
.principle .icon { width: 2.6rem; height: 2.6rem; padding: 0.55rem; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.principle p { margin: 0; }

/* ---------------------------------------------------------------- about */
.about-text {
  max-width: 32em;
  margin: 1.5rem 0 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.2rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}
.about-text::before { content: "“"; display: block; height: 0.5em; font-size: 3.6em; line-height: 0.75; color: var(--coral); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .about-text::before { background: var(--sunset); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

/* ---------------------------------------------------------------- FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.faq-aside { position: sticky; top: 7rem; }
.faq-aside h2 { font-size: var(--text-2xl); letter-spacing: -0.03em; margin: 0 0 1rem; }
@media (max-width: 56rem) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
}
.qa-list { border-top: 1px solid var(--rule-strong); }
.qa { border-bottom: 1px solid var(--rule-strong); }
.qa summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0.25rem;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa-num { font-family: var(--font-mono); font-size: 0.92rem; color: var(--accent); }
.qa summary h3 { margin: 0; transition: color 0.2s ease; }
.qa summary:hover h3 { color: var(--accent); }
.qa summary::after {
  content: "";
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  background:
    linear-gradient(currentColor 0 0) center / 0.75rem 1.5px no-repeat,
    linear-gradient(currentColor 0 0) center / 1.5px 0.75rem no-repeat;
  transition: transform 0.35s var(--ease), color 0.3s ease, border-color 0.3s ease;
}
.qa[open] summary::after { transform: rotate(45deg); color: var(--accent); border-color: var(--accent); }
.qa-answer { padding: 0 3.25rem 1.4rem 3.4rem; }
.qa-answer p { margin: 0; }
@media (max-width: 36rem) { .qa-answer { padding-inline: 0.25rem; } }

/* ---------------------------------------------------------------- list pages */
.page-hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(3rem, 8vw, 6.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-hero h1 { font-size: var(--text-hero); line-height: 1; letter-spacing: -0.035em; margin: 0.75rem 0 1.25rem; }
.page-hero .lede { max-width: 38em; }
.page-hero .stats { margin-top: 2rem; }
.page-hero .section-note { margin-top: 1rem; }
.inline-icon { display: inline-flex; align-items: center; gap: 0.35em; }
.inline-icon .icon { width: 1.1em; height: 1.1em; }

/* Category filter: radio buttons + :has(), no JavaScript. Shown when 2+ categories exist. */
.filter { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 2rem; padding: 0; border: 0; min-inline-size: 0; }
.filter input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.45em 1.1em;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--card);
  font-size: var(--text-sm);
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.filter label:hover { color: var(--text); border-color: var(--accent); }
.filter input:checked + label {
  color: var(--btn-text);
  background: linear-gradient(100deg, var(--btn-a), var(--btn-b));
  border-color: transparent;
  box-shadow: 0 10px 22px -14px var(--coral);
}
.filter input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.filter .count { font-variant-numeric: tabular-nums; opacity: 0.75; }
main:has(#cat-security:checked) .finding:not([data-category="security"]),
main:has(#cat-bugs:checked) .finding:not([data-category="bugs"]),
main:has(#cat-docs:checked) .finding:not([data-category="docs"]),
main:has(#cat-performance:checked) .finding:not([data-category="performance"]) { display: none; }

/* ---------------------------------------------------------------- article pages (finding, post) */
.crumbs { font-size: var(--text-sm); margin-bottom: 1.4rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.crumbs li + li::before { content: "→"; margin-right: 0.5rem; color: var(--rule-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.entry-hero { position: relative; isolation: isolate; overflow: clip; padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.entry-hero h1 { font-size: clamp(1.9rem, 1.3rem + 3vw, 4rem); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 1.25rem; max-width: 20em; }
.entry-hero .lede { max-width: 40em; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 0 0 1.25rem; font-size: var(--text-sm); }
.byline { color: var(--muted); font-size: var(--text-sm); margin: 1rem 0 0; }

.entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  grid-template-areas: "main side";
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.entry-side { grid-area: side; position: sticky; top: 6.5rem; }
.entry-main { grid-area: main; min-width: 0; }
@media (max-width: 60rem) {
  .entry-grid { grid-template-columns: 1fr; grid-template-areas: "side" "main"; }
  .entry-side { position: static; }
}
.facts {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 1.5rem 1.5rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.facts::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--sunset); }
.facts > div { display: grid; grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr); align-items: baseline; gap: 0.25rem 1rem; padding: 0.65rem 0; border-bottom: 1px dashed var(--rule); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: var(--text-sm); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .chip { font-size: var(--text-sm); }
.facts .cvss { display: block; width: fit-content; margin-top: 0.35rem; }
@media (max-width: 36rem) { .facts > div { grid-template-columns: 1fr; gap: 0; } }

.timeline h2 { font-size: var(--text-xl); margin: 0 0 1.25rem; }
.timeline ol { list-style: none; margin: 0; padding: 0 0 0 1.75rem; }
.timeline li {
  --c: var(--accent);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
  padding-bottom: 1.1rem;
}
.timeline li:nth-child(4n+1) { --c: var(--sea); }
.timeline li:nth-child(4n+2) { --c: var(--coral); }
.timeline li:nth-child(4n+3) { --c: var(--accent); }
.timeline li:nth-child(4n+4) { --c: var(--dusk); }
.timeline li:last-child { --c: var(--muted); }
.timeline li::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -1.75rem;
  top: 0.45em;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent);
}
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(-1.75rem + 0.425rem - 1px);
  top: 1em;
  bottom: -0.85em;
  width: 2px;
  background: linear-gradient(var(--c), var(--rule-strong));
}
.timeline time { flex: 0 0 9.5em; color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
@media (max-width: 36rem) { .timeline time { flex-basis: 100%; } }
.raw { margin-top: 2.5rem; color: var(--muted); font-size: var(--text-sm); }

.prose { margin: 0 0 3rem; }
.post .prose { margin-top: 0.5rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: var(--text-xl); margin: 2.2em 0 0.6em; }
.prose h3 { margin: 1.8em 0 0.5em; }
.prose h4 { font-size: 1em; margin: 1.6em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.35em; }
.prose li::marker { color: var(--coral); }
.prose blockquote {
  margin: 1.5em 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--coral);
  border-radius: 0 16px 16px 0;
  background: color-mix(in srgb, var(--coral) 7%, transparent);
}
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; height: 2px; background: var(--sunset); opacity: 0.4; margin: 2.5em 0; border-radius: 2px; }
.prose img { max-width: 100%; height: auto; border-radius: 16px; }
.post .raw { margin-bottom: clamp(4rem, 8vw, 6rem); }

.nf-code {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(6rem, 3rem + 14vw, 14rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 2px var(--coral);
  opacity: 0.7;
}
.not-found { padding-bottom: clamp(4rem, 10vw, 8rem); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding-top: clamp(3rem, 7vw, 5rem);
  font-size: var(--text-sm);
  color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 54rem) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 30rem) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { margin: 0.75rem 0 0; max-width: 20em; }
.footer-col h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-col a { color: var(--text); text-decoration-color: transparent; }
.footer-col a:hover { color: var(--accent); text-decoration-color: currentColor; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.footer-base p { margin: 0; }
.wordmark {
  margin: clamp(1rem, 4vw, 2.5rem) 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(5rem, 1rem + 20vw, 19rem);
  line-height: 0.78;
  letter-spacing: -0.055em;
  white-space: nowrap;
  user-select: none;
  color: color-mix(in srgb, var(--accent) 20%, transparent);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .wordmark {
    background: var(--sunset);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.3;
    -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 95%);
    mask-image: linear-gradient(180deg, #000 35%, transparent 95%);
  }
}
.footer-waves { position: relative; display: block; width: 100%; height: clamp(40px, 6vw, 84px); margin-top: -2.25rem; }
.fwave-1 path { fill: color-mix(in srgb, var(--sea) 18%, var(--bg-2)); }
.fwave-2 path { fill: color-mix(in srgb, var(--dusk) 22%, var(--bg-2)); }
.fwave-3 path { fill: color-mix(in srgb, var(--sea) 38%, var(--bg-2)); }

/* Reading progress on long pages (scroll-driven, CSS only). */
.progress { display: none; }
@supports (animation-timeline: scroll()) {
  .progress {
    display: block;
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    height: 3px;
    background: var(--sunset);
    transform-origin: 0 50%;
    transform: scaleX(0);
    pointer-events: none;
    animation: progress linear both;
    animation-timeline: scroll(root block);
  }
}

/* ---------------------------------------------------------------- motion (only when not reduced) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; }
  ::view-transition-group(*) { animation-duration: 0.5s; animation-timing-function: var(--ease); }

  .aurora { animation: aurora 26s ease-in-out infinite alternate; }
  .hero h1 em, .page-hero h1 em { animation: sheen 10s ease-in-out infinite alternate; }
  .pill-dot::after { animation: ping 2.8s cubic-bezier(0, 0, 0.2, 1) infinite; }
  .scene { transition: rotate 0.8s var(--ease); }
  .scene:hover { rotate: 0deg; }

  .wave { animation: drift 40s linear infinite; }
  .wave-2 { animation-duration: 32s; animation-direction: reverse; }
  .wave-3 { animation-duration: 24s; }
  .wave-4 { animation-duration: 17s; }
  .sun-glow { transform-box: fill-box; transform-origin: center; animation: breathe 7s ease-in-out infinite alternate; }
  .shimmer rect { transform-box: fill-box; transform-origin: center; animation: shimmer 4s ease-in-out infinite alternate; }
  .shimmer rect:nth-child(2) { animation-delay: -1.3s; }
  .shimmer rect:nth-child(3) { animation-delay: -2.6s; }
  .surfer { transform-box: fill-box; transform-origin: 50% 100%; animation: ride 6s ease-in-out infinite; }
  .bird { animation: glide 9s ease-in-out infinite alternate; }
  .bird-2 { animation-delay: -4s; }
  .star { animation: twinkle 3.5s ease-in-out infinite alternate; }
  .star:nth-child(3n) { animation-delay: -1.2s; animation-duration: 4.5s; }
  .star:nth-child(3n+1) { animation-delay: -2.4s; }

  .marquee-track { flex: none; flex-wrap: nowrap; justify-content: space-around; min-width: 100%; width: auto; animation: marquee 60s linear infinite; }
  .marquee-track[aria-hidden="true"] { display: flex; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  .card:hover::before { animation: spin 5s linear infinite; }
  .fwave { animation: drift-wide 60s linear infinite; }
  .fwave-2 { animation-duration: 45s; animation-direction: reverse; }
  .fwave-3 { animation-duration: 32s; }

  .qa::details-content {
    block-size: 0;
    overflow-y: clip;
    transition: block-size 0.4s var(--ease), content-visibility 0.4s allow-discrete;
  }
  .qa[open]::details-content { block-size: auto; }
  .qa:target, .card:target { animation: glow 2.6s ease-out both; }

  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 85%; }
  }
}

@keyframes aurora {
  50% { transform: translate3d(3%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) scale(1.03) rotate(3deg); }
}
@keyframes sheen { to { background-position: 100% 0; } }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes drift { to { transform: translateX(-600px); } }
@keyframes drift-wide { to { transform: translateX(-1200px); } }
@keyframes breathe { to { transform: scale(1.08); opacity: 0.8; } }
@keyframes shimmer { to { transform: scaleX(0.55); opacity: 0.25; } }
@keyframes ride {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-5px) rotate(3deg); }
}
@keyframes glide { to { transform: translate(16px, -7px); } }
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 1; } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes spin { to { --angle: 360deg; } }
@keyframes reveal { from { opacity: 0; translate: 0 32px; scale: 0.97; } }
@keyframes glow { from { background-color: color-mix(in srgb, var(--accent) 16%, transparent); } }
@keyframes progress { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .progress, .skip, .filter, .scene, .marquee, .aurora, .wordmark, .footer-waves, .band-edge { display: none; }
  body::before { display: none; }
  html, body, .band, .site-footer { background: #fff; color: #000; }
  a { color: inherit; }
  .card, .facts, .step { break-inside: avoid; box-shadow: none; }
}

/* generated by tools/build.py: card title -> page title morph */
@media (prefers-reduced-motion: no-preference) {
  .vt-7f198603 { view-transition-name: vt-7f198603; }
  .vt-cbe7a5b9 { view-transition-name: vt-cbe7a5b9; }
  .vt-377d0346 { view-transition-name: vt-377d0346; }
  .vt-c4c6fc3d { view-transition-name: vt-c4c6fc3d; }
}
