/* SaturnAI — the one visual language for saturnai.tools and saturnai.dev.
   Served at /design/assets/saturn.css; generated into dist/assets/ by build.mjs;
   saturnai.dev's /assets/css/global.css is THIS file with the font path
   rewritten (tools/sync-kit.mjs). Source: site/saturn.css. Never hand-edit a
   generated copy.

   v2 — the Astra launch grammar (SPEC-ASTRA §2/§3), on the SPEC §2 tokens.
   True black under one sky behind the whole page (the library drawn
   as a galaxy on the -18° ring), a split display hero, a centered claim, a
   16:9 media card, one reading measure, pill controls, hairline-framed
   cards, evidence in place of adjectives.

   THE MECHANISM — the verdict — is unchanged: every surface renders the
   stamped PASS / REVISE / REJECT with its evidence line, and the -18° ring is
   the mark, the focus state and the seal.

   DELIBERATELY ABSENT: gradients, glows, blur, shadows, imagery, badge piles,
   stat strips, bento grids, blanket scroll reveals, the default grotesk. Depth is a hairline
   on white-at-alpha over the canvas — never a gray ramp, never a shadow.

   Faces: Instrument Sans variable (OFL 1.1, wght 400-700 / wdth 75-100) for
   display and body; Commit Mono for labels, values, receipts and numbers.
   Self-hosted woff2 only, font-src 'self'. Both Commit Mono license texts
   ship beside the files. */

/* ---------------------------------------------------------------- */
/* Faces                                                             */

@font-face {
  font-family: "Instrument Sans";
  src: url("/saturnai/assets/fonts/instrument-sans-variable.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallback so the first paint never shifts when the real face
   swaps in (font-loading-discipline: preload + size-adjust + subset). */
@font-face {
  font-family: "Instrument Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 97.5%;
  ascent-override: 96%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Commit Mono";
  src: url("/saturnai/assets/fonts/commit-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Mono";
  src: url("/saturnai/assets/fonts/commit-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Commit Fallback";
  src: local("Consolas"), local("DejaVu Sans Mono"), local("Menlo");
  size-adjust: 104%;
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* ---------------------------------------------------------------- */
/* Registered tokens — typed so they can be animated without JS      */

@property --saturn-draw { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@property --saturn-stamp-ink { syntax: "<color>"; inherits: true; initial-value: oklch(68% 0.13 150); }

:root {
  /* The program's palette (dshcode ui-skin-saturn, read 2026-09-16): a monochrome
     identity — void #0a0a0a, ink #efefef, a WHITE accent #f5f5f5 — with amber,
     blue, green and red as its state families. The operator's call the same
     afternoon: "Premium black/white only. think x.com. Glass … not only black
     and white, but core colors". So: x.com's true black under the sky, the
     program's ink and white accent for every control, the program's amber-500
     kept as the brand's gold where the brand illustrates (the loop, tier S, live
     values), and the state families for the verdict. Surfaces are glass. */
  --saturn-bg:        #000000;
  --saturn-void:      #0a0a0a;
  --saturn-surface:   #111111;
  --saturn-raised:    #181818;
  --saturn-hover:     #222222;
  --saturn-ink:       #efefef;
  --saturn-ink-muted: #a0a0a0;
  --saturn-accent:    #f5f5f5;   /* the program's white accent — controls, the mark */
  --saturn-accent-ink: #000000;
  --saturn-gold:      #dda43a;   /* amber-500 — the brand's warmth */
  --saturn-gold-ink:  #000000;
  --saturn-amber:     #eec04d;   /* amber-400 */
  --saturn-blue:      #7fa8cc;   /* blue-400 */
  --saturn-green:     #5cab70;   /* green-400 */
  --saturn-red:       #e0685f;   /* red-400 */

  /* Hairline strokes carry depth — white at alpha, the program's own weights. */
  --saturn-rule:      rgba(255, 255, 255, .13);
  --saturn-rule-soft: rgba(255, 255, 255, .085);
  --saturn-rule-hot:  rgba(255, 255, 255, .26);

  /* Surfaces as white-at-alpha over the canvas, never a gray ramp. */
  --saturn-fill-soft: rgba(255, 255, 255, .06);
  --saturn-fill:      rgba(255, 255, 255, .10);
  --saturn-fill-hot:  rgba(255, 255, 255, .16);

  /* Glass — the sky blurs through every panel. */
  --saturn-glass:        rgba(255, 255, 255, .045);
  --saturn-glass-border: rgba(255, 255, 255, .14);
  --saturn-glass-blur:   18px;
  --saturn-panel:        var(--saturn-glass);

  /* Verdict states — the program's state families; the only place a hue means something. */
  --saturn-pass:   var(--saturn-green);
  --saturn-revise: var(--saturn-amber);
  --saturn-reject: var(--saturn-red);

  /* Motion system (SPEC §2) — named, not per-screen guesswork. */
  --saturn-dur-1: 120ms;
  --saturn-dur-2: 200ms;
  --saturn-dur-3: 320ms;
  --saturn-ease-standard: cubic-bezier(.2, 0, 0, 1);
  --saturn-ease-out:      cubic-bezier(0, 0, 0, 1);
  --saturn-ease-exit:     cubic-bezier(.4, 0, 1, 1);

  --saturn-ring-tilt: -18deg;

  /* Geometry — the Astra measures: a 668px reading column at 1440, 24px
     gutters, 16px card radius, 9999px pills, a 64px top bar. */
  --saturn-col: 640px;
  --saturn-wide: 920px;
  --saturn-max: 1200px;
  --saturn-gutter: clamp(16px, 3vw, 24px);
  --saturn-pad: clamp(16px, 3vw, 40px);
  --saturn-radius: 16px;
  --saturn-pill: 9999px;
  --saturn-top: 64px;

  /* The type ladder — every role fluid between 375 and 1440 (astra-launch-
     grammar: clamp() on the whole scale, tracking opening as the size falls). */
  --saturn-type-xl:   clamp(2.5rem, 1.6rem + 3.9vw, 4rem);          /* the split words 40–64 */
  --saturn-type-h1:   clamp(2rem, 1.35rem + 2.75vw, 3.25rem);       /* the claim 32–52 */
  --saturn-type-h2:   clamp(1.5rem, 1.25rem + 1.05vw, 1.875rem);    /* section 24–30 */
  --saturn-type-h3:   clamp(1.125rem, 1.05rem + .3vw, 1.25rem);     /* 18–20 */
  --saturn-type-lede: clamp(1.0625rem, 1rem + .3vw, 1.25rem);       /* 17–20 */
  --saturn-type-p:    1.0625rem;                                    /* 17 */
  --saturn-type-p2:   .9375rem;                                     /* 15 */
  --saturn-type-meta: .8125rem;                                     /* 13 */
  --saturn-type-label: .6875rem;                                    /* 11 */

  --saturn-font-display: "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
  --saturn-font-body:    "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
  --saturn-font-mono:    "Commit Mono", "Commit Fallback", ui-monospace, monospace;

  /* Kit aliases — saturn-canvas.js reads --kit-* first, then --saturn-*. */
  --kit-bg: var(--saturn-bg);
  --kit-surface: var(--saturn-surface);
  --kit-ink: var(--saturn-ink);
  --kit-ink-muted: color-mix(in oklch, var(--saturn-blue) 60%, var(--saturn-ink-muted));
  --kit-accent: var(--saturn-gold);
  --kit-pass: var(--saturn-pass);
  --kit-revise: var(--saturn-revise);
  --kit-reject: var(--saturn-reject);

  /* Legacy aliases — the page-scoped stylesheets on saturnai.dev (harness.css)
     and their scripts read the short names; every one resolves to a token above. */
  --bg: var(--saturn-bg);
  --surface: var(--saturn-surface);
  --ink: var(--saturn-ink);
  --ink-muted: var(--saturn-ink-muted);
  --accent: var(--saturn-accent);
  --accent-ink: var(--saturn-accent-ink);
  --gold: var(--saturn-gold);
  --line: var(--saturn-rule);
  --line-strong: var(--saturn-rule-hot);
  --font-display: var(--saturn-font-display);
  --font-body: var(--saturn-font-body);
  --font-mono: var(--saturn-font-mono);

  color-scheme: dark;
}

/* Cross-document continuity: the mark and the page frame persist between
   pages instead of a white flash. */
@view-transition { navigation: auto; }

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--saturn-bg);
  color: var(--saturn-ink);
  font: 400 var(--saturn-type-p) / 1.6 var(--saturn-font-body);
  font-variation-settings: "wdth" 100;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Everything but the sky sits above it. :where() keeps this at zero
   specificity, so a fixed top bar or sky label keeps its own position (the
   0,1,1 form of this rule outranked them and silently made them relative). */
body > :where(:not(.sky)) { position: relative; z-index: 1; }

/* Optical leading: trim the face's own half-leading so headings sit on the
   rule instead of floating above it. */
h1, h2, h3, .hero-split, .stamp-word {
  text-box: trim-both cap alphabetic;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; text-wrap: pretty; }

a {
  color: inherit;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  text-decoration-color: var(--saturn-rule-hot);
  transition: text-decoration-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
a:hover { text-decoration-color: var(--saturn-ink); }
/* Every prose link is a real target: block + inline padding lift an inline
   link's hit box to the 44px floor (min of width and height — a short word like
   "Blog" needs the inline padding) without disturbing the line box it sits in. */
main a:not(.pill):not(.loop-step):not(.top-brand), .foot a:not(.pill):not(.top-brand) {
  padding-block: 16px; margin-block: -16px; padding-inline: 8px; margin-inline: -8px;
}
code, kbd, samp { font-family: var(--saturn-font-mono); font-size: .93em; }

/* The focus state IS the mark: a hairline ring at the signature tilt. */
:focus-visible { outline: 1px solid var(--saturn-accent); outline-offset: 3px; }

.sr, .visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip, .skip-link {
  position: absolute; left: -9999px; top: 10px; z-index: 9;
  background: var(--saturn-ink); color: var(--saturn-bg);
  padding: 17px 18px; text-decoration: none;
  font: 500 12px/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .13em;
}
.skip:focus, .skip-link:focus { left: 10px; }

/* ---------------------------------------------------------------- */
/* The sky — one canvas behind the whole page                        */

.sky {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  background: var(--saturn-bg);
}
.sky-canvas { display: block; width: 100%; height: 100%; }

/* The name of the card under the pointer — placed by main.js through custom
   properties (never a style attribute: saturnai.dev serves style-src 'self'). */
.sky-label {
  position: fixed; left: 0; top: 0; z-index: 4;
  pointer-events: none;
  translate: var(--x, -999px) var(--y, -999px);
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 11px;
  border: 1px solid var(--saturn-rule);
  border-radius: var(--saturn-pill);
  background: rgba(0, 0, 0, .55);
  font: 400 12px/1.2 var(--saturn-font-mono);
  color: var(--saturn-ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--saturn-dur-1) var(--saturn-ease-standard);
}
.sky-label[data-on] { opacity: 1; }
.sky-label b { font-weight: 500; }
.sky-label span { color: var(--saturn-ink-muted); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }
.sky-label .tier-S { color: var(--saturn-gold); }

/* ---------------------------------------------------------------- */
/* The mark                                                          */

/* The wordmark: "Saturn" in ink, "AI" in the secondary gold (izzy, 2026-09-16). */
.brand-ai { color: var(--saturn-gold); }
.hero-split span + span { color: var(--saturn-gold); }

/* The program's glyph (dshcode SaturnGlyph): a solid planet, a ring at -18deg
   passing behind its top and in front of its bottom, drawn in the white accent. */
.mark { width: 24px; height: 24px; flex: none; color: var(--saturn-accent); }
.mark .ring { fill: none; stroke: var(--saturn-gold); stroke-width: 4.5; stroke-linecap: round; }
.mark .planet { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- */
/* The top bar — transparent over the sky, a hairline once scrolled   */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 6;
  height: var(--saturn-top);
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--saturn-pad);
  border-bottom: 1px solid transparent;
  background-color: rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(var(--saturn-glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--saturn-glass-blur)) saturate(160%);
  transition: background-color var(--saturn-dur-2) var(--saturn-ease-standard),
              border-color var(--saturn-dur-2) var(--saturn-ease-standard);
}
.top[data-scrolled] {
  background-color: rgba(0, 0, 0, .6);
  border-bottom-color: var(--saturn-glass-border);
}
.top-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 15px/1 var(--saturn-font-display);
  letter-spacing: -.012em; text-decoration: none; color: var(--saturn-ink);
  padding: 10px 4px; margin: -10px -4px;
}
.top-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.top-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 500 var(--saturn-type-meta)/1 var(--saturn-font-body);
  color: var(--saturn-ink-muted); text-decoration: none;
  padding: 0 12px; border-radius: var(--saturn-pill);
  transition: color var(--saturn-dur-1) var(--saturn-ease-standard),
              background-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.top-nav a:hover { color: var(--saturn-ink); background-color: var(--saturn-fill-soft); }
.top-nav a[aria-current="page"] { color: var(--saturn-ink); background-color: var(--saturn-fill); }
.top-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: var(--saturn-pill);
  border: 1px solid var(--saturn-rule); background: transparent; color: var(--saturn-ink);
  cursor: pointer; place-items: center;
}
.top-toggle span, .top-toggle span::before, .top-toggle span::after {
  display: block; width: 16px; height: 1.5px; background: currentColor; position: relative;
  transition: translate var(--saturn-dur-2) var(--saturn-ease-standard), rotate var(--saturn-dur-2) var(--saturn-ease-standard);
}
.top-toggle span::before, .top-toggle span::after { content: ""; position: absolute; left: 0; }
.top-toggle span::before { top: -5px; }
.top-toggle span::after { top: 5px; }
.top-toggle[aria-expanded="true"] span { background: transparent; }
.top-toggle[aria-expanded="true"] span::before { translate: 0 5px; rotate: 45deg; }
.top-toggle[aria-expanded="true"] span::after { translate: 0 -5px; rotate: -45deg; }

@media (max-width: 900px) {
  .top { gap: 12px; }
  .top-toggle { display: grid; }
  .top-acts { margin-left: 0; }
  .top-acts .pill.soft { display: none; }
  .top-nav {
    display: none;
    position: fixed; top: calc(var(--saturn-top) + 8px); left: 12px; right: 12px;
    flex-direction: column; align-items: stretch; gap: 4px; margin: 0;
    padding: 10px;
    border: 1px solid var(--saturn-glass-border); border-radius: var(--saturn-radius);
    /* Opaque: the bar's own backdrop-filter stops a nested blur from reaching the
       page, so a translucent drawer showed the text beneath it (same fix as the
       Connect panel). The tone is what glass reads as over true black. */
    background: color-mix(in srgb, var(--saturn-void), #ffffff 4.5%);
  }
  .top-nav a { padding: 14px 14px; font-size: 15px; }
  .top[data-open] .top-nav { display: flex; }
}

/* ---------------------------------------------------------------- */
/* Pills — the one control shape                                     */

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 9999px;
  font: 500 14px/1 var(--saturn-font-body); letter-spacing: -.005em;
  text-decoration: none; color: var(--saturn-ink);
  background: transparent; border: 1px solid var(--saturn-rule);
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--saturn-dur-1) var(--saturn-ease-standard),
              border-color var(--saturn-dur-1) var(--saturn-ease-standard),
              color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.pill:hover { border-color: var(--saturn-rule-hot); background-color: var(--saturn-fill-soft); }
.pill.primary { background: var(--saturn-accent); color: var(--saturn-accent-ink); border-color: var(--saturn-accent); font-weight: 600; }
.pill.primary:hover { background: #ffffff; border-color: #ffffff; }
.pill.soft { background: var(--saturn-fill); border-color: transparent; }
.pill.soft:hover { background: var(--saturn-fill-hot); }
.pill.ghost { border-color: var(--saturn-rule); }
.pill.small { padding: 0 14px; font-size: var(--saturn-type-meta); }
.pill .arrow { font-family: var(--saturn-font-mono); font-size: 12px; opacity: .8; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acts.center { justify-content: center; }

/* ---------------------------------------------------------------- */
/* The hero — the split name over the sky, then the claim, then the   */
/* media card                                                         */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: var(--saturn-top) var(--saturn-pad) 0;
}
.hero-split {
  position: absolute; inset: 0; margin: 0;
  /* Two columns + a centered gap so each word sits just outside the ring,
     not pinned to the viewport edges. library-galaxy.js: min(27vw, 42vh). */
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: max(140px, calc(min(54vw, 84vh) + 96px));
  align-items: center;
  padding: 0 24px;
  pointer-events: none;
  font-family: var(--saturn-font-display);
  font-size: var(--saturn-type-xl); font-weight: 500;
  letter-spacing: -.03em; line-height: 1;
  font-variation-settings: "wdth" 100, "wght" 500;
  color: var(--saturn-ink);
  white-space: nowrap;
}
.hero-split > span:first-child { justify-self: end; }
.hero-split > span:last-child { justify-self: start; }
/* type-motion: the two words land on the wide end of the wdth axis. */
.hero-split span { animation: saturn-widen 640ms var(--saturn-ease-out) both; }
.hero-split span + span { animation-delay: 90ms; }
@keyframes saturn-widen {
  from { font-variation-settings: "wdth" 78, "wght" 500; opacity: 0; translate: 0 6px; }
  to   { font-variation-settings: "wdth" 100, "wght" 500; opacity: 1; translate: 0 0; }
}
.hero-cue {
  position: absolute; bottom: 28px; left: 50%; translate: -50% 0;
  display: grid; justify-items: center; gap: 10px;
  font: 400 var(--saturn-type-label)/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .16em; color: var(--saturn-ink-muted);
}
.hero-cue::after {
  content: ""; width: 1px; height: 28px;
  background: linear-gradient(var(--saturn-ink-muted), transparent);
  animation: saturn-cue 1.8s var(--saturn-ease-standard) infinite;
}
@keyframes saturn-cue { 0% { opacity: 0; translate: 0 -6px; } 40% { opacity: 1; } 100% { opacity: 0; translate: 0 6px; } }

.beat {
  position: relative;
  padding: clamp(32px, 10vh, 112px) var(--saturn-pad) 0;
  padding-top: calc(var(--saturn-top) + clamp(24px, 8vh, 96px));
  display: grid; justify-items: center; text-align: center; gap: 22px;
}
.hero-claim {
  font-family: var(--saturn-font-display);
  font-size: var(--saturn-type-h1); font-weight: 500;
  letter-spacing: -.03em; line-height: 1.06;
  font-variation-settings: "wdth" 100, "wght" 500;
  max-width: 22ch;
}
.hero-lede {
  font-size: var(--saturn-type-lede); line-height: 1.5;
  color: var(--saturn-ink-muted); max-width: 56ch;
}
.hero-fine {
  font: 400 12px/1.6 var(--saturn-font-mono);
  color: var(--saturn-ink-muted); max-width: 64ch;
}

.hero-media {
  position: relative;
  max-width: var(--saturn-wide);
  margin: clamp(36px, 7vh, 72px) auto 0;
  padding: 0 var(--saturn-pad);
}
.media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--saturn-radius);
  border: 1px solid var(--saturn-rule);
  background: var(--saturn-panel);
  overflow: hidden;
  display: grid; place-items: center;
}
.media.auto { aspect-ratio: auto; min-height: 320px; }
.media:has(> .loop) { aspect-ratio: auto; padding: 0; }
.media > * { min-width: 0; }
.media-cap {
  margin: 12px auto 0; max-width: 64ch;
  font: 400 12.5px/1.6 var(--saturn-font-mono);
  color: var(--saturn-ink-muted); text-align: center;
}

/* ---------------------------------------------------------------- */
/* The reading column — one measure for prose, cards and captions     */

.section { position: relative; padding-block: clamp(56px, 9vw, 112px); }
.section.tight { padding-block: clamp(32px, 5vw, 64px); }
.read {
  max-width: calc(var(--saturn-col) + 2 * var(--saturn-gutter));
  margin-inline: auto;
  padding: 0 var(--saturn-gutter);
}
.wide {
  max-width: calc(var(--saturn-wide) + 2 * var(--saturn-pad));
  margin-inline: auto;
  padding: 0 var(--saturn-pad);
}
.read > * + *, .wide > * + * { margin-top: 20px; }
.read > *, .wide > *, .card-body > *, .panel > * { min-width: 0; }
.read h2, .wide h2 {
  font-family: var(--saturn-font-display);
  font-size: var(--saturn-type-h2); font-weight: 500;
  letter-spacing: -.012em; line-height: 1.25;
  margin-top: 52px;
}
.read > h2:first-child, .wide > h2:first-child, .eyebrow + h2 { margin-top: 12px; }
.read h3, .wide h3 {
  font-family: var(--saturn-font-display);
  font-size: var(--saturn-type-h3); font-weight: 500;
  letter-spacing: -.008em; line-height: 1.35;
  margin-top: 28px;
}
:where(.read) p, :where(.wide) > p { font-size: var(--saturn-type-p); line-height: 1.6; }
.muted { color: var(--saturn-ink-muted); }
.small { font-size: var(--saturn-type-p2); }
.fine {
  font: 400 12.5px/1.65 var(--saturn-font-mono);
  color: var(--saturn-ink-muted); max-width: 70ch;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 400 var(--saturn-type-label)/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .16em; color: var(--saturn-ink-muted);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--saturn-rule-hot); flex: none; }
.eyebrow.center { justify-content: center; }
.center { text-align: center; }
.lede { font-size: var(--saturn-type-lede); line-height: 1.5; }

/* ---------------------------------------------------------------- */
/* Glass — every framed surface lets the sky blur through it           */

.card, .media, .quote, .verdict, .value, .pg-out, .tabs, .sky-label, .pill.soft {
  background-color: var(--saturn-glass);
  border-color: var(--saturn-glass-border);
  -webkit-backdrop-filter: blur(var(--saturn-glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--saturn-glass-blur)) saturate(160%);
}
.card.hot { border-color: var(--saturn-rule-hot); }
@media (max-width: 640px) { :root { --saturn-glass-blur: 12px; } }

/* ---------------------------------------------------------------- */
/* Tabs — a pill group; every panel shows stacked without JS          */

.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--saturn-rule);
  border-radius: var(--saturn-pill);
}
.tab {
  min-height: 44px; padding: 0 16px;
  border: 0; border-radius: var(--saturn-pill);
  background: transparent; color: var(--saturn-ink-muted);
  font: 500 var(--saturn-type-meta)/1 var(--saturn-font-body);
  cursor: pointer;
  transition: color var(--saturn-dur-1) var(--saturn-ease-standard),
              background-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.tab:hover { color: var(--saturn-ink); }
.tab[aria-selected="true"] { color: var(--saturn-ink); background-color: var(--saturn-fill); }
.panels { margin-top: 18px; display: grid; gap: 16px; }
.panel[hidden] { display: none; }

/* ---------------------------------------------------------------- */
/* Cards — a hairline frame on ink-at-alpha, never a shadow           */

.card {
  border: 1px solid var(--saturn-rule);
  border-radius: var(--saturn-radius);
  background: var(--saturn-panel);
  padding: clamp(18px, 2.6vw, 28px);
}
.card-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 8px 16px; margin-bottom: 14px;
}
.card-title { font: 500 var(--saturn-type-h3)/1.3 var(--saturn-font-display); letter-spacing: -.008em; margin: 0; }
.card-body > * + * { margin-top: 12px; }
.card-body p { font-size: var(--saturn-type-p2); line-height: 1.55; max-width: 72ch; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cards .card { margin: 0; }
.card.hot { border-color: var(--saturn-rule-hot); }

/* The library card — one real row from library.json rendered as a plate. */
.libcard-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  font: 400 var(--saturn-type-label)/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .14em; color: var(--saturn-ink-muted);
}
.libcard-meta .tier-S { color: var(--saturn-gold); }
.libcard-line { font-size: var(--saturn-type-p2); line-height: 1.55; }
.libcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.libcard-tags span {
  font: 400 11px/1 var(--saturn-font-mono); color: var(--saturn-ink-muted);
  border: 1px solid var(--saturn-rule-soft); border-radius: var(--saturn-pill); padding: 7px 10px;
}

/* ---------------------------------------------------------------- */
/* Chart — real counts as bars; widths set through --n/--max by JS    */

.chart { margin: 0; }
.chart figcaption { margin-top: 14px; font: 400 12.5px/1.6 var(--saturn-font-mono); color: var(--saturn-ink-muted); max-width: 72ch; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li {
  display: grid; grid-template-columns: minmax(10rem, 17rem) 1fr auto;
  align-items: center; gap: 6px 14px;
  font: 400 var(--saturn-type-meta)/1.4 var(--saturn-font-mono);
}
.bar-label { color: var(--saturn-ink); }
.bar-label small { display: block; color: var(--saturn-ink-muted); font-size: 11px; line-height: 1.45; margin-top: 2px; }
.bar {
  position: relative; height: 8px; border-radius: 4px;
  background: var(--saturn-fill-soft); overflow: hidden;
}
.bar::after {
  content: ""; position: absolute; inset: 0;
  width: calc(var(--n, 0) / var(--max, 1) * 100%);
  border-radius: 4px;
  background: color-mix(in oklch, var(--saturn-ink) 62%, transparent);
  transition: width var(--saturn-dur-3) var(--saturn-ease-out);
}
.bars li[data-hot] .bar::after { background: var(--saturn-gold); }
.bar-n { color: var(--saturn-ink); min-width: 3ch; text-align: right; font-weight: 500; }

/* ---------------------------------------------------------------- */
/* Quote — only verbatim lines, attributed to the page they live on   */

.quote {
  margin: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--saturn-rule); border-radius: var(--saturn-radius);
  font-family: var(--saturn-font-display);
  font-size: clamp(1.1875rem, 1.05rem + .7vw, 1.5rem); font-weight: 500;
  letter-spacing: -.012em; line-height: 1.35;
}
.quote p { margin: 0; }
.quote-by {
  margin-top: 14px;
  font: 400 12px/1.5 var(--saturn-font-mono);
  color: var(--saturn-ink-muted); text-transform: uppercase; letter-spacing: .12em;
}

/* ---------------------------------------------------------------- */
/* Facts, rows, steps, faq, values                                    */

.facts {
  margin: 0; display: grid; grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  font: 400 var(--saturn-type-meta)/1.6 var(--saturn-font-mono);
}
.facts > div { display: contents; }
.facts dt { color: var(--saturn-ink-muted); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; padding-top: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts .hot { color: var(--saturn-gold); }

.rows { display: grid; }
.row {
  display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr) auto;
  gap: 8px 20px; align-items: start;
  padding: 16px 0; border-top: 1px solid var(--saturn-rule-soft);
}
.rows .row:last-child { border-bottom: 1px solid var(--saturn-rule-soft); }
.row-name { font: 500 var(--saturn-type-p2)/1.4 var(--saturn-font-display); letter-spacing: -.005em; }
.row-name a { text-decoration: none; }
.row-name a:hover { text-decoration: underline; }
.row-note { font-size: 14px; line-height: 1.5; color: var(--saturn-ink-muted); }
.row-note code { color: var(--saturn-ink); }
.state {
  display: inline-flex; align-items: center;
  font: 400 10.5px/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .14em; color: var(--saturn-ink-muted);
  border: 1px solid var(--saturn-rule); border-radius: var(--saturn-pill);
  padding: 7px 10px; white-space: nowrap;
}
.state.open { color: var(--saturn-gold); border-color: var(--saturn-rule-hot); }
.state.wait { color: var(--saturn-revise); border-color: color-mix(in oklch, var(--saturn-revise) 44%, var(--saturn-bg)); }

.steps { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; counter-reset: s; display: grid; }
:where(.read, .wide) > .steps:first-child { margin-top: 0; }
.steps > li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start;
  padding: 20px 0; border-top: 1px solid var(--saturn-rule-soft);
}
/* A grid child's minimum is its content — a code block would widen the whole
   column past the viewport; 0 lets the value scroll inside itself instead. */
.steps > li > * { min-width: 0; }
.steps > li::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  width: 44px; height: 44px; border-radius: var(--saturn-pill);
  border: 1px solid var(--saturn-rule); color: var(--saturn-gold);
  font: 500 12px/42px var(--saturn-font-mono); text-align: center;
}
.steps > li.now::before { background: var(--saturn-gold); color: var(--saturn-gold-ink); border-color: var(--saturn-gold); }
.steps > li.done::before { content: "✓"; color: var(--saturn-gold); }
.steps h3 { margin: 10px 0 6px; font: 500 var(--saturn-type-h3)/1.3 var(--saturn-font-display); letter-spacing: -.008em; }
.steps p { margin: 0; font-size: var(--saturn-type-p2); line-height: 1.55; color: var(--saturn-ink-muted); }
.steps p + p { margin-top: 8px; }
.steps .value { margin-top: 12px; }

.faq { display: grid; border-top: 1px solid var(--saturn-rule-soft); }
.faq details { border-bottom: 1px solid var(--saturn-rule-soft); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0;
  font: 500 var(--saturn-type-h3)/1.3 var(--saturn-font-display); letter-spacing: -.008em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--saturn-ink-muted); font: 400 20px/1 var(--saturn-font-mono); }
.faq details[open] summary::after { content: "–"; }
.faq details > p { margin: 0 0 20px; font-size: var(--saturn-type-p2); line-height: 1.55; color: var(--saturn-ink-muted); max-width: 62ch; }

/* The one line — a copy-pasteable value with its copy control. */
.value {
  display: flex; align-items: stretch; min-width: 0; max-width: 100%;
  border: 1px solid var(--saturn-rule); border-radius: 12px;
  background: var(--saturn-panel); overflow: hidden;
}
.value code {
  flex: 1 1 auto; min-width: 0; padding: 14px 16px;
  font-size: 13px; line-height: 1.6; white-space: pre; overflow-x: auto; color: var(--saturn-ink);
}
.value .copy, .copy {
  flex: none; min-height: 48px; min-width: 88px; padding: 0 16px;
  border: 0; border-left: 1px solid var(--saturn-rule);
  background: transparent; color: var(--saturn-ink-muted); cursor: pointer;
  font: 500 11px/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .14em;
  transition: color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.value .copy:hover, .value .copy.did, .value .copy.is-copied { color: var(--saturn-accent); }
.copy-status { font: 400 12px/1.5 var(--saturn-font-mono); color: var(--saturn-ink-muted); margin-top: 8px; min-height: 1.5em; }

/* ---------------------------------------------------------------- */
/* THE VERDICT CARD — the one object every Saturn surface renders     */

.verdict {
  position: relative;
  border: 1px solid var(--saturn-rule); border-radius: var(--saturn-radius);
  background: var(--saturn-panel);
  padding: clamp(16px, 2.4vw, 24px);
  display: grid; gap: 16px;
}
.verdict + .verdict { margin-top: 16px; }
.verdict-head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--saturn-rule-soft); padding-bottom: 14px;
}
/* The stamp: the ring is drawn, then the word lands. Two motions, both
   asserting the same fact — this verdict was earned, not asserted. */
.stamp { position: relative; display: inline-grid; place-items: center; width: 118px; height: 58px; flex: none; }
.stamp-ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--saturn-stamp-ink); }
.stamp-ring ellipse {
  fill: none; stroke: currentColor; stroke-width: 1.25;
  stroke-dasharray: 100; stroke-dashoffset: 0;
  animation: saturn-draw-ring var(--saturn-dur-3) var(--saturn-ease-out) both;
}
@keyframes saturn-draw-ring { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.stamp-word {
  position: relative;
  font: 500 15px/1 var(--saturn-font-mono);
  letter-spacing: .26em; text-indent: .26em; text-transform: uppercase;
  color: var(--saturn-stamp-ink);
  animation: saturn-land var(--saturn-dur-2) var(--saturn-ease-standard) both;
  animation-delay: var(--saturn-dur-2);
}
@keyframes saturn-land { from { opacity: 0; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
.verdict[data-verdict="PASS"]   { --saturn-stamp-ink: var(--saturn-pass); }
.verdict[data-verdict="REVISE"] { --saturn-stamp-ink: var(--saturn-revise); }
.verdict[data-verdict="REJECT"] { --saturn-stamp-ink: var(--saturn-reject); }
.verdict-of { display: grid; gap: 4px; min-width: 0; }
.verdict-of b { font: 500 13px/1.3 var(--saturn-font-mono); overflow-wrap: anywhere; }
.verdict-of span {
  font: 400 10.5px/1.5 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .15em; color: var(--saturn-ink-muted);
}
.verdict-evidence { font: 400 13px/1.62 var(--saturn-font-mono); color: var(--saturn-ink); margin: 0; overflow-wrap: anywhere; }
.verdict-rubric { margin: 0; display: grid; }
.verdict-rubric > div {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--saturn-rule-soft);
  font: 400 12.5px/1.5 var(--saturn-font-mono);
}
.verdict-rubric dt { color: var(--saturn-ink-muted); overflow-wrap: anywhere; }
.verdict-rubric dd { margin: 0; color: var(--saturn-ink); }
.verdict-rubric dd.score { font-weight: 500; }
.verdict-rubric dd.mark-pass   { color: var(--saturn-pass); }
.verdict-rubric dd.mark-revise { color: var(--saturn-revise); }
.verdict-rubric dd.mark-reject { color: var(--saturn-reject); }
.verdict-foot { font: 400 11.5px/1.6 var(--saturn-font-mono); color: var(--saturn-ink-muted); margin: 0; }

/* ---------------------------------------------------------------- */
/* The playground — a real call to the real brain, inside the media   */

.pg { width: 100%; display: grid; gap: 16px; padding: clamp(16px, 3vw, 28px); }
.pg-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.pg-field { flex: 1 1 22rem; display: grid; gap: 7px; min-width: 0; }
.pg-field label {
  font: 400 10.5px/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .16em; color: var(--saturn-ink-muted);
}
.pg-field input {
  font: 400 16px/1.4 var(--saturn-font-mono);
  min-height: 48px; padding: 12px 16px;
  color: var(--saturn-ink); background: rgba(0, 0, 0, .45);
  border: 1px solid var(--saturn-rule); border-radius: var(--saturn-pill);
  transition: border-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.pg-field input:hover, .pg-field input:focus { border-color: var(--saturn-rule-hot); outline: none; }
.pg-field input:focus-visible { outline: 1px solid var(--saturn-accent); outline-offset: 2px; }
.pg-field input::placeholder { color: var(--saturn-ink-muted); }
.pg-form .pill { align-self: end; min-height: 48px; }
.pg-out { margin: 0; border: 1px solid var(--saturn-rule); border-radius: 12px; }
.pg-out[hidden] { display: none; }
.pg-row {
  display: grid; grid-template-columns: minmax(8.5rem, 10rem) 1fr;
  gap: 4px clamp(12px, 2vw, 22px);
  padding: 13px clamp(14px, 2vw, 20px);
  border-bottom: 1px solid var(--saturn-rule-soft);
  font: 400 13px/1.62 var(--saturn-font-mono);
}
.pg-row:last-child { border-bottom: 0; }
.pg-row > dt { text-transform: uppercase; letter-spacing: .15em; font-size: 10.5px; line-height: 2; color: var(--saturn-ink-muted); }
.pg-row > dd { margin: 0; overflow-wrap: anywhere; }
.pg-row .hot { color: var(--saturn-gold); }
.pg-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.pg-slots li::before { content: "· "; color: var(--saturn-ink-muted); }
.pg-err { color: var(--saturn-reject); }
.pg-fine { font: 400 11.5px/1.6 var(--saturn-font-mono); color: var(--saturn-ink-muted); margin: 0; }
/* scramble-then-decode: the glyphs settle as the real value arrives. */
.decoding, .is-decoding { color: var(--saturn-ink-muted); }

/* ---------------------------------------------------------------- */
/* The loop — an orbital drawing; the five steps are real links on it */
/* izzy: "redo this, make it premium looks like slop". Generated markup:
   tools/render-loop.mjs. Saturn's bands on the -18° tilt, a bezel, the planet
   the near side of the ring passes in front of; the page's step lit in gold,
   the path already travelled drawn in gold, a light orbiting in the loop's
   direction. Hairlines stay one device pixel (vector-effect) where nothing
   animates their dash. */

.loop {
  position: relative; width: 100%;
  display: grid; gap: clamp(10px, 1.6vw, 18px);
  padding: clamp(14px, 2.4vw, 30px) clamp(12px, 2.6vw, 36px) clamp(18px, 2.6vw, 30px);
}
.loop-stage { position: relative; width: 100%; max-width: 1000px; margin-inline: auto; aspect-ratio: 16 / 9; }
.loop-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

/* the rings — broad faint bands, crisp edges */
.loop-band { fill: none; stroke: #ffffff; }
.loop-band--c { stroke-width: 34; stroke-opacity: .012; }
.loop-band--b { stroke-width: 86; stroke-opacity: .026; }
.loop-band--a { stroke-width: 48; stroke-opacity: .018; }
.loop-edge { fill: none; stroke: #ffffff; stroke-opacity: .15; stroke-width: 2.2; }
.loop-edge--bright { stroke-opacity: .3; }
.loop-orbit { stroke-opacity: .46; stroke-width: 2.4; }
.loop-near.loop-edge { stroke-opacity: .2; }
.loop-near.loop-edge--bright { stroke-opacity: .36; }
.loop-near.loop-orbit { stroke-opacity: .5; }
.loop-bezel { fill: none; stroke: #ffffff; stroke-opacity: .2; stroke-width: 1; vector-effect: non-scaling-stroke; }

/* the planet — a dark body, a lit limb, faint bands */
.loop-planet-body { fill: #000000; }
.loop-planet-light { fill: #ffffff; fill-opacity: .04; }
.loop-planet-band { fill: none; stroke: #ffffff; stroke-opacity: .045; stroke-width: 1; vector-effect: non-scaling-stroke; }
.loop-planet-limb { fill: none; stroke: #ffffff; stroke-opacity: .55; stroke-width: 1.25; vector-effect: non-scaling-stroke; }

/* the path travelled and the orbiting light */
.loop-travelled { fill: none; stroke: var(--saturn-gold); stroke-width: 4; stroke-linecap: round; }
.loop-comet { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 12 988; stroke-dashoffset: 0; opacity: 0; }
.loop-comet--tail { stroke-width: 2.5; stroke-dasharray: 70 930; stroke-dashoffset: 58; }

/* the step dots on the orbit */
.loop-dot-ring { fill: #000000; stroke: #ffffff; stroke-opacity: .32; stroke-width: 1; vector-effect: non-scaling-stroke; }
.loop-dot-core { fill: #ffffff; fill-opacity: .78; }
.loop-dot.is-current .loop-dot-ring { stroke: var(--saturn-gold); stroke-opacity: .8; }
.loop-dot.is-current .loop-dot-core { fill: var(--saturn-gold); fill-opacity: 1; }
.loop-dot-halo { fill: none; stroke: var(--saturn-gold); stroke-opacity: .3; stroke-width: 1; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }

/* the steps — real links, placed on the ring */
.loop-steps { list-style: none; margin: 0; padding: 0; }
.loop-step {
  position: absolute; z-index: 1;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 44px; padding: 0 16px 0 12px;
  border-radius: 9999px; border: 1px solid var(--saturn-glass-border);
  background: color-mix(in srgb, var(--saturn-void), #ffffff 4.5%);
  color: var(--saturn-ink); text-decoration: none; white-space: nowrap;
  font: 500 14px/1 var(--saturn-font-body); letter-spacing: -.005em;
  transition: border-color var(--saturn-dur-1) var(--saturn-ease-standard),
              background-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.loop-step-n { font: 500 11px/1 var(--saturn-font-mono); letter-spacing: .06em; color: var(--saturn-ink-muted); }
.loop-step:hover { border-color: var(--saturn-rule-hot); background: color-mix(in srgb, var(--saturn-void), #ffffff 9%); }
.loop-step[aria-current="step"] { background: var(--saturn-accent); border-color: var(--saturn-accent); color: #000000; }
.loop-step[aria-current="step"] .loop-step-n { color: rgba(0, 0, 0, .5); }
/* Positions are the generator's geometry (step angle on the orbit, rotated -18°). */
.loop-step[data-step="point"]  { left: 31.702%; top: 36.089%; translate: -50% calc(-100% - 22px); }
.loop-step[data-step="study"]  { left: 76.336%; top: 17.815%; translate: -50% calc(-100% - 20px); }
.loop-step[data-step="commit"] { left: 84.575%; top: 44.020%; translate: -50% 24px; }
.loop-step[data-step="build"]  { left: 45.032%; top: 78.489%; translate: -50% 26px; }
.loop-step[data-step="grade"]  { left: 12.355%; top: 73.587%; translate: -50% 24px; }
.loop-caption { margin: 0; text-align: center; font: 400 12.5px/1.6 var(--saturn-font-mono); color: var(--saturn-ink-muted); }

/* motion — armed once on screen by main.js; nothing moves without it */
.loop[data-motion="armed"] .loop-edge { stroke-dasharray: 100; animation: saturn-draw-ring 1.6s var(--saturn-ease-out) both; }
.loop[data-motion="armed"] .loop-edge--bright { animation-delay: 120ms; }
.loop[data-motion="armed"] .loop-orbit { animation-delay: 240ms; }
.loop[data-motion="armed"] .loop-travelled { stroke-dasharray: 100; animation: saturn-draw-ring 1.2s var(--saturn-ease-out) 700ms both; }
.loop[data-motion="armed"] .loop-comet { opacity: .9; animation: loop-orbit 16s linear 1.6s infinite; }
.loop[data-motion="armed"] .loop-comet--tail { opacity: .24; animation-name: loop-orbit-tail; }
.loop[data-motion="armed"] .loop-dot-halo { animation: loop-pulse 2.8s var(--saturn-ease-standard) 1.4s infinite; }
.loop[data-motion="armed"] .loop-steps li { animation: loop-step-in var(--saturn-dur-3) var(--saturn-ease-out) both; }
.loop[data-motion="armed"] .loop-steps li:nth-child(1) { animation-delay: 360ms; }
.loop[data-motion="armed"] .loop-steps li:nth-child(2) { animation-delay: 480ms; }
.loop[data-motion="armed"] .loop-steps li:nth-child(3) { animation-delay: 600ms; }
.loop[data-motion="armed"] .loop-steps li:nth-child(4) { animation-delay: 720ms; }
.loop[data-motion="armed"] .loop-steps li:nth-child(5) { animation-delay: 840ms; }
@keyframes loop-orbit { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -1000; } }
@keyframes loop-orbit-tail { from { stroke-dashoffset: 58; } to { stroke-dashoffset: -942; } }
@keyframes loop-pulse { 0% { transform: scale(.7); opacity: .9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
@keyframes loop-step-in { from { opacity: 0; } to { opacity: 1; } }

/* phones — the drawing stays; the steps become a row of five under it */
@media (max-width: 640px) {
  .loop-stage { aspect-ratio: auto; display: grid; gap: 14px; }
  .loop-art { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9; }
  .loop-edge { stroke-width: 3.6; }
  .loop-orbit { stroke-width: 4; }
  .loop-travelled { stroke-width: 7; }
  .loop-comet { stroke-width: 7; }
  .loop-comet--tail { stroke-width: 4.5; }
  .loop-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .loop-step, .loop-step[data-step] {
    position: static; translate: none; width: 100%;
    flex-direction: column; justify-content: center; gap: 5px;
    min-height: 56px; padding: 8px 2px; border-radius: 14px; font-size: 12.5px;
  }
}

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

.foot {
  margin-top: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--saturn-rule);
  padding: clamp(40px, 6vw, 72px) var(--saturn-pad) clamp(32px, 4vw, 48px);
  background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(var(--saturn-glass-blur));
  backdrop-filter: blur(var(--saturn-glass-blur));
}
.foot-inner {
  max-width: var(--saturn-max); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px;
}
.foot-brand { display: grid; gap: 14px; align-content: start; }
.foot-sentence { font-size: 14px; line-height: 1.55; color: var(--saturn-ink-muted); max-width: 32ch; }
.foot h2 { font: 400 var(--saturn-type-label)/1 var(--saturn-font-mono); text-transform: uppercase; letter-spacing: .16em; color: var(--saturn-ink-muted); }
.foot ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.foot li a { font-size: 14px; color: var(--saturn-ink); text-decoration: none; }
.foot li a:hover { text-decoration: underline; }
.foot-bottom {
  max-width: var(--saturn-max); margin: 32px auto 0; padding-top: 20px;
  border-top: 1px solid var(--saturn-rule-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  font: 400 12px/1.6 var(--saturn-font-mono); color: var(--saturn-ink-muted);
}
.foot-bottom p { margin: 0; }
@media (max-width: 760px) { .foot-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-inner { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- */
/* Scroll choreography — two reveals, one native, one observed        */

/* Native path: the browser drives the reveal off scroll position. */
.reveal {
  animation: saturn-reveal linear both;
  animation-timeline: view();
  animation-range: entry 8% entry 46%;
}
@keyframes saturn-reveal { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
/* Observed path (the kit's [data-reveal] contract): hidden until .is-in. */
[data-reveal] {
  opacity: 0; translate: 0 16px;
  transition: opacity var(--saturn-dur-3) var(--saturn-ease-out), translate var(--saturn-dur-3) var(--saturn-ease-out);
}
[data-reveal].is-in { opacity: 1; translate: 0 0; }
html:not(.js) [data-reveal] { opacity: 1; translate: 0 0; }

/* The kit's interaction contract, styled here so a page loads ONE stylesheet. */
[data-magnetic] { will-change: translate; transition: translate var(--saturn-dur-2) var(--saturn-ease-out); touch-action: manipulation; }
@media (hover: none), (pointer: coarse) { [data-magnetic] { transition: none; } }
[data-copy] { position: relative; transition: translate var(--saturn-dur-1) var(--saturn-ease-standard); }
[data-copy].is-pressed { translate: 0 1px; }
.copy-ring { position: absolute; inset: -6px; pointer-events: none; color: var(--saturn-gold); opacity: 0; }
.copy-ring svg { width: 100%; height: 100%; overflow: visible; }
.copy-ring ellipse { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 100; stroke-dashoffset: 100; }
[data-copy].is-copied .copy-ring { opacity: 1; }
[data-copy].is-copied .copy-ring ellipse { animation: saturn-draw-ring var(--saturn-dur-2) var(--saturn-ease-out) both; }
[data-vt="ring"] { view-transition-name: saturn-ring; }
[data-vt="h1"] { view-transition-name: saturn-h1; }

/* ---------------------------------------------------------------- */
/* Legacy plate — the library viewer's own header until its shell     */
/* moves to .top. Kept minimal.                                       */

.plate {
  max-width: var(--saturn-max); margin: 0 auto;
  padding: 24px var(--saturn-pad) 16px;
  display: flex; flex-wrap: wrap; align-items: flex-end;
  gap: 18px 48px; justify-content: space-between;
  border-bottom: 1px solid var(--saturn-rule);
}
.plate-id { display: flex; align-items: center; gap: 14px; }
.plate .mark { width: 40px; height: 40px; }
.plate-word { font: 700 clamp(26px, 1.5rem + 1.5vw, 38px)/.95 var(--saturn-font-display); letter-spacing: -.028em; text-transform: uppercase; }
.plate-sub { font: 400 var(--saturn-type-label)/1 var(--saturn-font-mono); text-transform: uppercase; letter-spacing: .17em; color: var(--saturn-ink-muted); margin-top: 9px; }
.plate-facts { margin: 0; display: grid; grid-template-columns: auto auto; gap: 3px clamp(14px, 2vw, 30px); }
.plate-facts > div { display: contents; }
.plate-facts dt { font: 400 10px/1.9 var(--saturn-font-mono); text-transform: uppercase; letter-spacing: .15em; color: var(--saturn-ink-muted); }
.plate-facts dd { margin: 0; font: 400 12.5px/1.9 var(--saturn-font-mono); }

/* ---------------------------------------------------------------- */
/* The reduced-motion contract — CSS half; the kit + page JS carry the */
/* other half                                                         */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, [data-reveal] { opacity: 1; translate: none; }
  .loop-comet { display: none; }
  .loop-dot-halo { animation: none; }
  .hero-cue::after { animation: none; opacity: .6; }
  @view-transition { navigation: none; }
}

/* ---------------------------------------------------------------- */
/* 640px and under — nothing scrolls sideways but code                */

@media (max-width: 760px) {
  .bars li { grid-template-columns: 1fr auto; grid-template-areas: "label n" "bar bar"; gap: 6px 12px; padding-bottom: 6px; }
  .bar-label { grid-area: label; }
  .bar-n { grid-area: n; }
  .bar { grid-area: bar; }
}
@media (max-width: 640px) {
  /* Phone ring is ~0.5W — keep the words at the sides so they stay readable and do not collide. */
  .hero-split {
    display: flex;
    justify-content: space-between;
    column-gap: 12px;
    gap: 12px;
    padding: 0 16px;
  }
  .hero-split > span:first-child,
  .hero-split > span:last-child { justify-self: auto; }
  .value code { white-space: pre-wrap; overflow-wrap: anywhere; }
  /* The pill group scrolls sideways on a phone instead of wrapping (x.com). */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; padding: 0 14px; }
  .row { grid-template-columns: 1fr; gap: 6px; }
  .row .state { justify-self: start; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { padding-top: 10px; }
  .bars li { grid-template-columns: 1fr auto; grid-template-areas: "label n" "bar bar"; gap: 6px 12px; padding-bottom: 6px; }
  .bar-label { grid-area: label; }
  .bar-n { grid-area: n; }
  .bar { grid-area: bar; }
  .verdict-rubric > div { gap: 8px; font-size: 11.5px; }
  .verdict-of span { letter-spacing: .1em; }
  .stamp { width: 104px; height: 52px; }
  .value { flex-wrap: wrap; }
  .value .copy { width: 100%; border-left: 0; border-top: 1px solid var(--saturn-rule); }
  .pg-row { grid-template-columns: 1fr; gap: 2px; }
  .steps > li { grid-template-columns: 36px 1fr; gap: 12px; }
  .steps > li::before { width: 36px; height: 36px; line-height: 34px; font-size: 11px; }
}

/* ---------------------------------------------------------------- */
/* Connect — the top bar's dropdown (site/kit/saturn-connect.js)      */
/* The operator, 2026-09-16: "a connect tab at the top that drops     */
/* down with a copy paste bar to put in your ai and a quick           */
/* description on how to connect. also have a link to the connect     */
/* page". No JS: the tab is a plain link. With JS: a disclosure       */
/* button over a glass panel; a full-width sheet at 900px and under.  */

/* The panel hangs from the action group, so its right edge meets the primary
   pill's right edge instead of running past the bar's padding. */
.top-acts { position: relative; }
.connect { display: flex; align-items: center; }
.connect-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; min-width: 44px; padding: 0 12px 0 14px; margin: 0;
  border: 0; border-radius: var(--saturn-pill);
  background: transparent; color: var(--saturn-ink);
  font: 500 var(--saturn-type-meta)/1 var(--saturn-font-body); letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color var(--saturn-dur-1) var(--saturn-ease-standard),
              background-color var(--saturn-dur-1) var(--saturn-ease-standard);
}
a.connect-tab { padding: 0 14px; }
.connect-tab:hover { background-color: var(--saturn-fill-soft); }
.connect-tab[aria-expanded="true"] { background-color: var(--saturn-fill); }
.connect-chev {
  width: 10px; height: 10px; flex: none;
  fill: none; stroke: var(--saturn-ink-muted); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: scale var(--saturn-dur-2) var(--saturn-ease-standard);
}
a.connect-tab .connect-chev { display: none; }
.connect-tab[aria-expanded="true"] .connect-chev { scale: 1 -1; stroke: var(--saturn-ink); }

/* The panel — glass tone, opaque. The bar's own backdrop-filter makes it the
   backdrop root for everything inside it, so a blur here never reaches the
   page: measured in Chrome over the states page's headline (390 and 1440px),
   a .72 fill showed the words sharp, .9/.95 still ghosted them, and the
   nested .value glass painted a ghost of the page into the panel even over a
   solid fill. So the panel is the colour the glass token renders over black
   (void + 4.5% white), with the glass hairline and radius, and nothing inside
   the bar blurs a second time. Opacity + a 6px drop over --saturn-dur-2; the
   exit holds display until the fade ends (allow-discrete). */
.connect-panel {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 1;
  width: 420px; max-width: calc(100vw - 24px);
  display: grid; gap: 14px; justify-items: start;
  padding: 18px;
  border: 1px solid var(--saturn-glass-border); border-radius: var(--saturn-radius);
  background-color: color-mix(in srgb, var(--saturn-void), #ffffff 4.5%);
  color: var(--saturn-ink); text-align: left;
  opacity: 1; translate: 0 0;
  transition-property: opacity, translate, display;
  transition-duration: var(--saturn-dur-2);
  transition-timing-function: var(--saturn-ease-out);
  transition-behavior: allow-discrete;
}
.connect-panel[hidden] { display: none; opacity: 0; translate: 0 -6px; }
@starting-style { .connect-panel { opacity: 0; translate: 0 -6px; } }
.connect-panel > * { margin: 0; min-width: 0; max-width: 100%; }
.connect-panel .value {
  justify-self: stretch; border-color: var(--saturn-glass-border);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.connect-lede {
  font: 400 14px/1.5 var(--saturn-font-body); letter-spacing: -.005em;
  text-transform: none; color: var(--saturn-ink);
}
.connect-panel .value code {
  padding: 12px 14px; font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The copy button carries only the kit's [data-copy] hook, not .copy — the
   .tools connect page wires every ".value .copy" with its own routine, and
   one press must copy once. So the .value .copy look is restated here. */
.connect-copy {
  position: relative; flex: none; min-height: 44px; min-width: 76px; padding: 0 14px; margin: 0;
  border: 0; border-left: 1px solid var(--saturn-rule);
  background: transparent; color: var(--saturn-ink-muted); cursor: pointer;
  font: 500 11px/1 var(--saturn-font-mono);
  text-transform: uppercase; letter-spacing: .14em;
  transition: color var(--saturn-dur-1) var(--saturn-ease-standard);
}
.connect-copy:hover, .connect-copy.is-copied { color: var(--saturn-accent); }
.connect-more {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 2px; margin-block: -6px;
  font: 500 var(--saturn-type-meta)/1 var(--saturn-font-body);
  color: var(--saturn-ink); text-decoration: underline;
  text-decoration-color: var(--saturn-rule-hot);
}
.connect-more:hover { text-decoration-color: var(--saturn-ink); }
.connect-more .arrow { font-family: var(--saturn-font-mono); font-size: 12px; color: var(--saturn-ink-muted); }

/* Phones — the nav is a drawer; the tab stays in the bar and the panel is
   a sheet under it, in the drawer's place (the bar is its containing block). */
@media (max-width: 900px) {
  .top-acts { position: static; }
  .connect-panel {
    position: fixed; top: calc(var(--saturn-top) + 8px); left: 12px; right: 12px;
    width: auto; max-width: none;
  }
}
/* The bar at phone width holds the brand, the menu, the Connect tab and the
   primary pill only down to ~480px. Under that the pill yields: it goes where
   the tab's panel already goes (the connect page), and the panel carries the
   line itself. Neither 44px control may shrink to make room. */
.top-toggle, .connect { flex: none; }
/* Just above the drawer breakpoint the full row (brand, five links, the tab,
   two pills) needs ~960px; under 980px the soft pill yields first, as it
   already does on phones, so no nav link wraps. */
@media (min-width: 901px) and (max-width: 980px) {
  .top-acts:has(> .connect) .pill.soft { display: none; }
}
@media (max-width: 480px) {
  .top-acts:has(> .connect) .pill.primary { display: none; }
}
@media (max-width: 640px) {
  .connect-panel .value .connect-copy { width: 100%; border-left: 0; border-top: 1px solid var(--saturn-rule); }
}
@media (prefers-reduced-motion: reduce) {
  .connect-panel, .connect-panel[hidden] { translate: none; }
  @starting-style { .connect-panel { translate: none; } }
}
