/* SPDX-License-Identifier: LGPL-3.0-only
 * SPDX-FileCopyrightText: Copyright (C) 2026 mplx <jennifer@mplx.dev>
 *
 * site.css - the Jennifer website.
 *
 * A dark datasheet: a near-neutral ground with a green cast, ember-orange
 * rubrication, moss green for the metadata layer, hairline rules, and one
 * engineered grotesque set against a mono. Two self-hosted variable fonts,
 * no CDN, no framework.
 */

/* ------------------------------------------------------------------ fonts */

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

@font-face {
  font-family: "Spline Sans Mono";
  src: url("/fonts/splinesansmono-variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  --ink-900: #0c100e;
  --ink-850: #101512;
  --ink-800: #131a16;
  --ink-750: #18201b;
  --ink-700: #1f2822;
  --ink-650: #27322b;

  --paper: #f1efe7;
  --paper-2: #d7dbd1;
  --muted: #9aa79b;
  --faint: #6f7d72;

  --ember: #f4772f;
  --ember-lt: #ff9351;
  --ember-dk: #b8500f;

  --moss: #5fc48a;
  --moss-lt: #86d9a5;

  --line: rgba(238, 242, 232, 0.10);
  --line-2: rgba(238, 242, 232, 0.18);
  --glow: rgba(244, 119, 47, 0.20);

  /* Surfaces layered on the ground, and the ground itself as channels, so the
     bands, the sticky bar and the backdrop scrim can all follow the theme. */
  --ground-rgb: 12, 16, 14;
  --on-accent: #0c100e;
  --wash: rgba(238, 242, 232, 0.03);
  --wash-2: rgba(238, 242, 232, 0.06);
  --shade: rgba(0, 0, 0, 0.28);
  --shade-2: rgba(0, 0, 0, 0.32);
  --shadow: rgba(0, 0, 0, 0.85);
  --code-bg: linear-gradient(180deg, #222c26 0%, #1a231e 100%);
  --terminal-bg: linear-gradient(180deg, #202a24 0%, #18211c 100%);
  --backdrop-bg: linear-gradient(158deg, #18211c 0%, #0f1613 58%, #0b100e 100%);
  --backdrop-opacity: 0.58;

  --syn-comment: #6e7d74;
  --syn-keyword: #ff8a4c;
  --syn-type: #e9c06a;
  --syn-literal: #e6d17a;
  --syn-number: #e6d17a;
  --syn-string: #7fd096;
  --syn-builtin: #4fc2a4;
  --syn-title: #ffc09b;
  --syn-variable: #f1efe7;
  --syn-symbol: #e9c06a;

  /* One engineered grotesque in two roles - the width axis separates them:
     display runs expanded, text runs normal. Swap both lines for another
     technical sans (Roboto, IBM Plex Sans) and nothing else has to change. */
  --font-display: "Archivo", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Spline Sans Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --r: 4px;
  --r-lg: 12px;
  --gutter: clamp(1.15rem, 3.2vw, 3rem);
  --sec-pad: clamp(4.5rem, 9vw, 8.5rem);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

/* ------------------------------------------------------------------ light
   The token names keep their roles across both themes: `--ink-*` are the
   surfaces, `--paper*` / `--muted` / `--faint` are the ink written on them.
   The light values are declared twice on purpose - once for the system
   preference (unless the reader has explicitly chosen dark) and once for the
   explicit choice - because a media query and an attribute selector cannot be
   merged into one rule. */

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --ink-900: #f6f7f8;
    --ink-850: #ffffff;
    --ink-800: #eef0f2;
    --ink-750: #e7eaee;
    --ink-700: #dce0e5;
    --ink-650: #c9cfd6;

    --paper: #10151a;
    --paper-2: #2c333b;
    --muted: #54606c;
    --faint: #78838f;

    --ember: #c2410c;
    --ember-lt: #9a3412;
    --ember-dk: #7c2d0c;

    --moss: #12795a;
    --moss-lt: #0d6349;

    --line: rgba(16, 21, 26, 0.13);
    --line-2: rgba(16, 21, 26, 0.2);
    --glow: rgba(244, 119, 47, 0.14);

    --ground-rgb: 246, 247, 248;
    --on-accent: #ffffff;
    --wash: rgba(16, 21, 26, 0.035);
    --wash-2: rgba(16, 21, 26, 0.06);
    --shade: rgba(16, 21, 26, 0.04);
    --shade-2: rgba(16, 21, 26, 0.045);
    --shadow: rgba(16, 21, 26, 0.18);
    --code-bg: linear-gradient(180deg, #e1e8f0 0%, #d8e1ea 100%);
    --terminal-bg: linear-gradient(180deg, #e1e8f0 0%, #d8e1ea 100%);
    --backdrop-bg: linear-gradient(158deg, #ffffff 0%, #f2f5f8 58%, #e8ecf1 100%);
    --backdrop-opacity: 0.92;

    --syn-comment: #6b7683;
    --syn-keyword: #c2410c;
    --syn-type: #8a6410;
    --syn-literal: #9a7018;
    --syn-number: #9a7018;
    --syn-string: #15803d;
    --syn-builtin: #0f766e;
    --syn-title: #9a3412;
    --syn-variable: #10151a;
    --syn-symbol: #8a6410;
  }
}

:root[data-theme="light"] {
  color-scheme: light;

  --ink-900: #f6f7f8;
  --ink-850: #ffffff;
  --ink-800: #eef0f2;
  --ink-750: #e7eaee;
  --ink-700: #dce0e5;
  --ink-650: #c9cfd6;

  --paper: #10151a;
  --paper-2: #2c333b;
  --muted: #54606c;
  --faint: #78838f;

  --ember: #c2410c;
  --ember-lt: #9a3412;
  --ember-dk: #7c2d0c;

  --moss: #12795a;
  --moss-lt: #0d6349;

  --line: rgba(16, 21, 26, 0.13);
  --line-2: rgba(16, 21, 26, 0.2);
  --glow: rgba(244, 119, 47, 0.14);

  --ground-rgb: 246, 247, 248;
  --on-accent: #ffffff;
  --wash: rgba(16, 21, 26, 0.035);
  --wash-2: rgba(16, 21, 26, 0.06);
  --shade: rgba(16, 21, 26, 0.04);
  --shade-2: rgba(16, 21, 26, 0.045);
  --shadow: rgba(16, 21, 26, 0.18);
  --code-bg: linear-gradient(180deg, #e1e8f0 0%, #d8e1ea 100%);
  --terminal-bg: linear-gradient(180deg, #e1e8f0 0%, #d8e1ea 100%);
  --backdrop-bg: linear-gradient(158deg, #ffffff 0%, #f2f5f8 58%, #e8ecf1 100%);
  --backdrop-opacity: 0.92;

  --syn-comment: #6b7683;
  --syn-keyword: #c2410c;
  --syn-type: #8a6410;
  --syn-literal: #9a7018;
  --syn-number: #9a7018;
  --syn-string: #15803d;
  --syn-builtin: #0f766e;
  --syn-title: #9a3412;
  --syn-variable: #10151a;
  --syn-symbol: #8a6410;
}

/* ------------------------------------------------------------------ base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--paper-2);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 620px at 8% -12%, var(--glow), transparent 62%),
    radial-gradient(1000px 640px at 102% 8%, rgba(95, 196, 138, 0.11), transparent 62%),
    linear-gradient(180deg, var(--ink-800) 0%, var(--ink-900) 46%);
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------- backdrop
   A real Jennifer program - content/backdrop.j, highlighted by the same pass
   as every sample on the page - set into an editor window and tilted away in
   3D. It is decoration, so it is aria-hidden, inert to the pointer, and dim
   enough that nothing in front of it loses contrast. */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1600px;
  perspective-origin: 60% 24%;
  opacity: var(--backdrop-opacity);
}

/* The scrim: darkens the middle of the viewport, where the text runs, and
   lets the tilted plane read in the margins and the gaps between sections. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(76% 64% at 30% 46%, rgba(var(--ground-rgb), 0.97) 0%, rgba(var(--ground-rgb), 0.84) 44%, rgba(var(--ground-rgb), 0) 88%),
    radial-gradient(58% 48% at 78% 62%, rgba(var(--ground-rgb), 0.84) 0%, rgba(var(--ground-rgb), 0) 76%),
    linear-gradient(to bottom, rgba(var(--ground-rgb), 0) 48%, rgba(var(--ground-rgb), 0.8) 100%);
}

.backdrop-pane {
  position: absolute;
  top: -26%;
  left: -18%;
  width: 128vw;
  height: 152vh;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: var(--backdrop-bg);
  box-shadow: 0 80px 140px -60px var(--shadow);
  overflow: hidden;
  transform-origin: 50% 30%;
  transform: rotateX(17deg) rotateY(-15deg) rotateZ(-3deg) translateZ(-140px);
}

.backdrop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.9rem 1.6rem;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--faint);
}

.backdrop-file::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.7rem;
  border-radius: 50%;
  background: var(--moss);
  vertical-align: middle;
}

.backdrop-body {
  display: flex;
  gap: 1.6rem;
  padding: 1.8rem 1.6rem;
  font-size: 1.02rem;
  line-height: 1.9;
}

.backdrop-gutter {
  flex: none;
  color: var(--faint);
  opacity: 0.45;
  text-align: right;
  font-size: inherit;
  line-height: inherit;
}

.backdrop-code {
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
}

@media (prefers-reduced-motion: no-preference) {
  .backdrop-pane {
    animation: backdrop-drift 100s ease-in-out infinite alternate;
  }
}

@keyframes backdrop-drift {
  from {
    transform: rotateX(17deg) rotateY(-15deg) rotateZ(-3deg) translateZ(-140px) translateY(0);
  }
  to {
    transform: rotateX(15deg) rotateY(-13deg) rotateZ(-2deg) translateZ(-140px) translateY(-2.5%);
  }
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.30;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

main,
header,
footer,
section {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 100;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
}

p {
  margin: 0;
}

a {
  color: var(--paper);
  text-decoration-color: rgba(244, 119, 47, 0.5);
  text-underline-offset: 0.24em;
  text-decoration-thickness: 1px;
  transition: color 0.18s var(--ease), text-decoration-color 0.18s var(--ease);
}

a:hover {
  color: var(--ember-lt);
  text-decoration-color: var(--ember-lt);
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

p > code,
li > code {
  color: var(--paper);
  background: var(--wash-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.06em 0.34em;
  font-size: 0.86em;
}

pre {
  margin: 0;
}

/* highlighted blocks paint their own colors; never chip them */
pre code {
  background: none;
  border: 0;
  padding: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background: var(--ember);
  color: var(--on-accent);
}

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

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
}

/* a shell prompt, not the language's variable sigil - hence the green */
.sigil {
  color: var(--moss);
  user-select: none;
}

.ext {
  display: inline-block;
  margin-left: 0.28em;
  font-size: 0.82em;
  color: var(--ember);
  transition: transform 0.2s var(--ease);
}

.skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.8rem 1.2rem;
  background: var(--ember);
  color: var(--on-accent);
  font-family: var(--font-mono);
}

.skiplink:focus {
  left: 0;
}

/* the ledger spine: one continuous hairline down each side of the page */
.wrap {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: var(--gutter);
  border-inline: 1px solid var(--line);
}

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(var(--ground-rgb), 0.74);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.5rem;
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--paper);
  white-space: nowrap;
}

.brand-mark {
  display: block;
  border-radius: 9px;
}

.brand-word {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* The full name is the brand for a search engine and for a first-time reader;
   it is also 22 characters the header cannot always spare, so it steps aside
   before the navigation does. */
.brand-suffix {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8em;
}

/* The brand holds the left edge; the links and the switch are one cluster on
   the right. Spreading the three apart instead would open the slack between
   the last link and the switch, which reads as a hole rather than as spacing. */
.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(0.75rem, 1.5vw, 1.35rem);
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

/* Every item keeps its natural width. A flex item that may shrink wraps its
   text instead, which is what turned this row into two and a half lines. */
.nav > * {
  flex: none;
}

/* The switches sit outside the scrolling navigation, so they stay reachable on
   a narrow screen instead of disappearing off the end of it. */
.topbar-tools {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.6rem;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.nav-gh {
  font-family: var(--font-mono);
  flex: none;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.nav-link:hover,
.nav-gh:hover,
.nav-link.is-here {
  color: var(--paper);
  border-bottom-color: var(--ember);
}

.nav-gh {
  color: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.36rem 0.8rem;
}

.nav-gh:hover {
  border-color: var(--ember);
  background: rgba(244, 119, 47, 0.09);
}

/* the color-theme switch: scripted-only, so it is hidden until theme.js runs */
.themeswitch {
  display: none;
  align-items: center;
  flex: none;
  white-space: nowrap;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 0.34rem 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.js .themeswitch {
  display: inline-flex;
}

.themeswitch:hover {
  color: var(--paper);
  border-color: var(--ember);
  background: rgba(244, 119, 47, 0.09);
}

/* The swatch shows which theme is in force, in fixed colors that mean the
   same thing in both: pale disc = light, dark disc = dark. */
.themeswitch-dot {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: linear-gradient(90deg, #f6f7f8 0 50%, #10151a 50% 100%);
}

.themeswitch[data-mode="light"] .themeswitch-dot {
  background: #f6f7f8;
}

.themeswitch[data-mode="dark"] .themeswitch-dot {
  background: #10151a;
}

.themeswitch-label {
  min-width: 2.6em;
  text-align: left;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line);
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 1.6rem;
}

.eyebrow-name,
.eyebrow-meta {
  display: block;
}

/* the name leads, the descriptor follows a shade quieter */
.eyebrow-name {
  color: var(--paper);
  margin-bottom: 0.4rem;
}

.eyebrow-name .dot {
  color: var(--ember);
}

.eyebrow .sep {
  color: var(--ember);
  margin-inline: 0.4em;
}

.eyebrow .lit {
  color: var(--paper);
  text-transform: none;
}

.hero-h1 {
  font-size: clamp(2.05rem, 3.5vw, 3.15rem);
  line-height: 1;
  letter-spacing: -0.034em;
  font-weight: 700;
  margin-bottom: 1.6rem;
}

.hero-h1 .l1,
.hero-h1 .l2 {
  display: block;
}

.hero-h1 .l2 {
  color: var(--ember);
  margin-left: -0.015em;
}

.hero-lede {
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  color: var(--paper-2);
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.82rem 1.4rem;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
    border-color 0.18s var(--ease), box-shadow 0.24s var(--ease), color 0.18s var(--ease);
}

.btn-primary {
  background: var(--ember);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 12px 28px -16px rgba(244, 119, 47, 0.85);
}

.btn-primary:hover {
  background: var(--ember-lt);
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -16px rgba(244, 119, 47, 0.9);
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--ember);
  color: var(--ember-lt);
  transform: translateY(-2px);
}

.cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 30rem;
  padding: 0.75rem 0.75rem 0.75rem 1rem;
  border: 1px dashed rgba(244, 119, 47, 0.45);
  border-radius: var(--r);
  background: rgba(244, 119, 47, 0.06);
}

.cmd code {
  font-size: 0.9rem;
  color: var(--paper);
  overflow-x: auto;
  white-space: nowrap;
}

.copy {
  flex: none;
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  transition: all 0.18s var(--ease);
}

.copy:hover {
  color: var(--paper);
  border-color: var(--ember);
  background: rgba(244, 119, 47, 0.14);
}

.copy.is-done {
  color: var(--ember);
  border-color: var(--ember);
}

.cmd-note {
  margin-top: 0.7rem;
  font-size: 0.76rem;
  color: var(--faint);
}

.cmd-note a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.cmd-note a:hover {
  color: var(--ember-lt);
}

.hero-code-note {
  margin-top: 1rem;
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--faint);
}

.hero-code-note a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

/* ------------------------------------------------------------------ tabs */

.tabs {
  position: relative;
}

.tab-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.tablist {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.tablist::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}

.tab:hover {
  color: var(--paper-2);
}

.panel {
  display: none;
}

.tabs input:nth-of-type(1):checked ~ .panels > .panel:nth-child(1),
.tabs input:nth-of-type(2):checked ~ .panels > .panel:nth-child(2),
.tabs input:nth-of-type(3):checked ~ .panels > .panel:nth-child(3),
.tabs input:nth-of-type(4):checked ~ .panels > .panel:nth-child(4),
.tabs input:nth-of-type(5):checked ~ .panels > .panel:nth-child(5),
.tabs input:nth-of-type(6):checked ~ .panels > .panel:nth-child(6),
.tabs input:nth-of-type(7):checked ~ .panels > .panel:nth-child(7),
.tabs input:nth-of-type(8):checked ~ .panels > .panel:nth-child(8),
.tabs input:nth-of-type(9):checked ~ .panels > .panel:nth-child(9),
.tabs input:nth-of-type(10):checked ~ .panels > .panel:nth-child(10) {
  display: block;
}

.tabs input:nth-of-type(1):checked ~ .tablist > .tab:nth-child(1),
.tabs input:nth-of-type(2):checked ~ .tablist > .tab:nth-child(2),
.tabs input:nth-of-type(3):checked ~ .tablist > .tab:nth-child(3),
.tabs input:nth-of-type(4):checked ~ .tablist > .tab:nth-child(4),
.tabs input:nth-of-type(5):checked ~ .tablist > .tab:nth-child(5),
.tabs input:nth-of-type(6):checked ~ .tablist > .tab:nth-child(6),
.tabs input:nth-of-type(7):checked ~ .tablist > .tab:nth-child(7),
.tabs input:nth-of-type(8):checked ~ .tablist > .tab:nth-child(8),
.tabs input:nth-of-type(9):checked ~ .tablist > .tab:nth-child(9),
.tabs input:nth-of-type(10):checked ~ .tablist > .tab:nth-child(10) {
  color: var(--paper);
  border-bottom-color: var(--ember);
}

.tabs input:nth-of-type(1):focus-visible ~ .tablist > .tab:nth-child(1),
.tabs input:nth-of-type(2):focus-visible ~ .tablist > .tab:nth-child(2),
.tabs input:nth-of-type(3):focus-visible ~ .tablist > .tab:nth-child(3),
.tabs input:nth-of-type(4):focus-visible ~ .tablist > .tab:nth-child(4),
.tabs input:nth-of-type(5):focus-visible ~ .tablist > .tab:nth-child(5),
.tabs input:nth-of-type(6):focus-visible ~ .tablist > .tab:nth-child(6),
.tabs input:nth-of-type(7):focus-visible ~ .tablist > .tab:nth-child(7),
.tabs input:nth-of-type(8):focus-visible ~ .tablist > .tab:nth-child(8),
.tabs input:nth-of-type(9):focus-visible ~ .tablist > .tab:nth-child(9),
.tabs input:nth-of-type(10):focus-visible ~ .tablist > .tab:nth-child(10) {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.panel-blurb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
  max-width: 40rem;
}

/* ------------------------------------------------------------------ code */

.code {
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--code-bg);
  box-shadow: 0 34px 64px -34px var(--shadow);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.66rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.code-file {
  font-size: 0.76rem;
  color: var(--paper-2);
}

.code-file::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--moss);
  vertical-align: middle;
}

.code-lines {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.code-body {
  padding: 1.15rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.79rem;
  line-height: 1.75;
  color: var(--muted);
  tab-size: 4;
}

.code-body code {
  font-size: inherit;
}

.code-out {
  border-top: 1px dashed var(--line-2);
  background: var(--shade);
  padding: 0.85rem 1.25rem 1rem;
}

.code-cmd {
  font-size: 0.74rem;
  color: var(--paper-2);
  margin-bottom: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.code-stdout {
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--moss-lt);
  overflow-x: auto;
  white-space: pre;
}

.code-stdout.is-error {
  color: var(--ember-lt);
}

/* highlight.js token classes, emitted by src/highlight.j */
.hljs-comment, .hljs-quote { color: var(--syn-comment); font-style: italic; }
.hljs-keyword { color: var(--syn-keyword); }
.hljs-type { color: var(--syn-type); }
.hljs-literal { color: var(--syn-literal); }
.hljs-number { color: var(--syn-number); }
.hljs-string { color: var(--syn-string); }
.hljs-built_in { color: var(--syn-builtin); }
.hljs-title { color: var(--syn-title); }
.hljs-variable { color: var(--syn-variable); font-weight: 500; }
.hljs-symbol { color: var(--syn-symbol); font-weight: 500; }
.hljs-meta { color: var(--syn-comment); }

/* ------------------------------------------------------------------ stats */

.stats {
  border-bottom: 1px solid var(--line);
  background: rgba(var(--ground-rgb), 0.72);
}

.stats-in {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: clamp(1.8rem, 3.5vw, 2.8rem) clamp(1rem, 2vw, 1.8rem);
  border-left: 1px solid var(--line);
}

.stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.stat-value {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.1rem, 3.8vw, 2.95rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}

.stat-label {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
}

.stat-label a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.stat-label a:hover {
  color: var(--ember);
  border-bottom-color: currentColor;
}

.stat-note {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ------------------------------------------------------------------ sections */

.section {
  padding-block: var(--sec-pad);
}

.section-rule {
  border-top: 1px solid var(--line);
  background: rgba(var(--ground-rgb), 0.66);
}

.sec-head {
  max-width: 46rem;
  margin-bottom: clamp(2.4rem, 4vw, 3.6rem);
}

.sec-index {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1rem;
}

.sec-title {
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  letter-spacing: -0.03em;
  font-weight: 650;
}

.sec-title.small {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 1rem;
}

.sec-lede {
  margin-top: 1.1rem;
  font-size: 1.04rem;
  color: var(--muted);
}

.sec-more {
  margin-top: 2rem;
  font-size: 0.82rem;
}

.sec-more a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 0.15rem;
}

.sec-more a:hover {
  color: var(--ember-lt);
  border-bottom-color: var(--ember);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}

.card {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  background: var(--ink-850);
  transition: background 0.24s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--ember);
  transition: width 0.42s var(--ease);
}

.card:hover {
  background: var(--ink-750);
}

.card:hover::after {
  width: 100%;
}

.card-n {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ember);
  margin-bottom: 0.9rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}

.card-body {
  font-size: 0.94rem;
  color: var(--muted);
}

/* ------------------------------------------------------------------ stances */

.stances {
  border-top: 1px solid var(--line);
}

.stance {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 2.2rem);
  align-items: baseline;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.24s var(--ease);
}

.stance:hover {
  background: var(--wash);
}

.stance-n {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ember);
}

.stance-title {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.stance-text {
  font-size: 0.94rem;
  color: var(--muted);
  max-width: 62ch;
}

/* ------------------------------------------------------------------ toolchain */

.terminal {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--terminal-bg);
  overflow: hidden;
  box-shadow: 0 30px 60px -34px var(--shadow);
}

.tool {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.85rem clamp(1rem, 2.2vw, 1.6rem);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s var(--ease);
}

.tool:last-child {
  border-bottom: 0;
}

.tool:hover {
  background: rgba(244, 119, 47, 0.06);
}

.tool code {
  font-size: 0.84rem;
  color: var(--paper);
  white-space: nowrap;
  overflow-x: auto;
  background: none;
  border: 0;
  padding: 0;
}

.tool-text {
  font-size: 0.88rem;
  color: var(--faint);
}

/* ------------------------------------------------------------------ ecosystem */

.eco-card {
  display: block;
  padding: clamp(1.5rem, 2.4vw, 2.1rem);
  background: var(--ink-850);
  text-decoration: none;
  transition: background 0.24s var(--ease);
}

.eco-card:hover {
  background: var(--ink-750);
}

.eco-host {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--moss);
  margin-bottom: 0.85rem;
}

.eco-title {
  font-weight: 700;
  font-size: 1.16rem;
  margin-bottom: 0.6rem;
  color: var(--paper);
}

.eco-card:hover .ext {
  transform: translate(3px, -3px);
}

.eco-text {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ------------------------------------------------------------------ notice */

.notice {
  border: 1px solid var(--line);
  border-left: 2px solid var(--ember);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  background: rgba(244, 119, 47, 0.07);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  max-width: 58rem;
}

.notice-title {
  font-weight: 700;
  font-size: 1.24rem;
  margin-bottom: 0.8rem;
}

.notice-text {
  font-size: 0.98rem;
  color: var(--paper-2);
}

.notice-more {
  margin-top: 1.1rem;
  font-size: 0.82rem;
}

.notice-more a {
  color: var(--ember-lt);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 119, 47, 0.42);
}

/* ------------------------------------------------------------------ closer */

.closer {
  border-top: 1px solid var(--line);
  padding-block: clamp(4rem, 8vw, 7rem);
  text-align: center;
}

.closer-in {
  display: grid;
  justify-items: center;
  gap: 2rem;
}

.closer-h {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  letter-spacing: -0.032em;
  font-weight: 700;
  max-width: 17ch;
}

.closer-h .accent {
  color: var(--ember);
}

/* ------------------------------------------------------------------ page heads */

.pagehead {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

/* A page head is already the top of the page. Left alone, its own bottom
   padding and the section's full top padding stack into a band of nothing
   between the lede and the first thing worth reading. */
.pagehead + .section {
  padding-top: clamp(2rem, 3.6vw, 3rem);
}

.page-h1 {
  font-size: clamp(2.05rem, 4.4vw, 3.2rem);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.page-lede {
  margin-top: 1.2rem;
  max-width: 44rem;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  color: var(--muted);
}

/* ------------------------------------------------------------------ install */

/* the releases block: one destination that answers every "where do I get it" */
/* The top-of-page pointer at the releases themselves: the copy holds a reading
   column on the left, the button sits on the right and is vertically centered,
   so the block fills its width instead of trailing off into empty space. */
.releases {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem);
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--ember);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  background: var(--ink-850);
}

.releases-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 26rem;
}

.releases-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ember);
}

.releases-text {
  font-size: 0.96rem;
  color: var(--paper-2);
}

.releases-cta {
  flex: none;
}

.releases-cta:hover .ext {
  transform: translate(3px, -3px);
}

.install-lede a {
  color: var(--paper-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.install-lede a:hover {
  color: var(--ember);
  border-bottom-color: var(--ember);
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.install-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-850);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  transition: border-color 0.24s var(--ease), transform 0.24s var(--ease);
}

.install-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

/* However long a platform's lede runs, the command blocks line up along the
   foot of the row instead of floating at three different heights. */
.install-head {
  margin-bottom: 1.1rem;
}

.install-card .shell {
  margin-top: auto;
}

.install-label {
  font-weight: 700;
  font-size: 1.16rem;
  margin-bottom: 0.45rem;
}

/* a platform with no support promise says so where the name is */
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--faint);
}

.install-lede {
  font-size: 0.9rem;
  color: var(--faint);
}

/* a block you are meant to run: the moss rule marks it, the way the ember rule
   marks a notice you are meant to read. */
.shell {
  position: relative;
  border: 1px solid var(--line-2);
  border-left: 2px solid rgba(95, 196, 138, 0.38);
  border-radius: var(--r);
  background: var(--shade-2);
  padding: 1rem 1.1rem;
}

.shell pre {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--paper);
  overflow-x: auto;
  white-space: pre;
  padding-bottom: 2.2rem;
}

.shell .copy {
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
}

.verify {
  max-width: 40rem;
  margin-block: clamp(2.5rem, 5vw, 4rem);
}

.nextsteps ul {
  display: grid;
  gap: 0.1rem;
  max-width: 46rem;
  border-top: 1px solid var(--line);
}

.nextsteps li {
  border-bottom: 1px solid var(--line);
}

.nextsteps a {
  display: block;
  padding: 0.95rem 0.2rem;
  font-size: 0.96rem;
  color: var(--paper-2);
  text-decoration: none;
  transition: padding-left 0.24s var(--ease), color 0.18s var(--ease);
}

.nextsteps a:hover {
  color: var(--ember-lt);
  padding-left: 0.7rem;
}

/* ------------------------------------------------------------------ showcase */

.samples {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
}

.samples + .notice {
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.sample {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: start;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
}

.sample-copy {
  position: sticky;
  top: 6rem;
}

.sample-n {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ember);
  margin-bottom: 0.9rem;
}

.sample-title {
  font-weight: 700;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  letter-spacing: -0.025em;
  margin-bottom: 0.8rem;
}

.sample-blurb {
  font-size: 0.96rem;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.sample-file {
  font-size: 0.74rem;
  color: var(--faint);
  word-break: break-all;
}

.sample-file a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.sample-file a:hover {
  color: var(--paper);
  border-bottom-color: var(--ember);
}

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

.notfound-in {
  display: grid;
  justify-items: start;
  gap: 1.4rem;
  max-width: 46rem;
  padding-block: clamp(2rem, 6vw, 5rem);
}

.nf-code {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-size: clamp(4.6rem, 15vw, 10rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: var(--ember);
}

.nf-figure {
  width: 100%;
  margin-block: 1rem;
}

/* ------------------------------------------------------------------ footer */

.footer {
  border-top: 1px solid var(--line);
  background: rgba(var(--ground-rgb), 0.82);
  padding-top: clamp(3rem, 6vw, 5rem);
}

.footer-in {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer-brand img {
  border-radius: 10px;
  margin-bottom: 1.1rem;
}

.colophon {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 30rem;
}

.engine {
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.footer-h {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 500;
  margin-bottom: 1rem;
}

.footer-col li + li {
  margin-top: 0.55rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--paper);
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  justify-content: space-between;
  padding-block: 1.2rem 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}

.legal a {
  color: var(--faint);
  text-decoration: none;
}

.legal a:hover {
  color: var(--ember-lt);
}

.legal code {
  color: var(--paper-2);
}

/* ------------------------------------------------------------------ motion */

@media (prefers-reduced-motion: no-preference) {
  .anim .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .anim .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

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

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------------ responsive */

/* The suffix is the first thing to go: German navigation is longer than
   English, and the row has to hold whichever language is being read. */
@media (max-width: 1400px) {
  .brand-suffix {
    display: none;
  }
}

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

  .hero-copy {
    max-width: 40rem;
  }

  .sample {
    grid-template-columns: minmax(0, 1fr);
  }

  .sample-copy {
    position: static;
  }

  .footer-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar-in {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding-block: 0.7rem;
  }

  /* brand and switches share the first row; the links scroll on the second */
  .topbar-tools {
    margin-left: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    padding-bottom: 0.3rem;
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  }

  .stats-in {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .stance {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }

  .stance-text {
    grid-column: 2;
  }

  .tool {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
}

@media (max-width: 620px) {
  .backdrop {
    opacity: 0.3;
  }

  .stats-in {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:first-child {
    border-top: 0;
  }

  .footer-in {
    grid-template-columns: minmax(0, 1fr);
  }

}
