:root {
  --font: "Berkeley Mono", "TX-02", "Commit Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-display: clamp(3.25rem, 9vw, 8.5rem);
  --t-title: clamp(1.9rem, 3.8vw, 2.9rem);
  --t-lead: clamp(1.25rem, 2.2vw, 1.7rem);
  --t-body: 1.125rem;
  --t-caption: 0.875rem;
  --lh-body: 1.65;

  --night: #07130f;
  --night-deep: #040a08;
  --leaf: #1b6b4c;
  --ink: #e6f2ec;
  --ink-2: rgba(230, 242, 236, 0.72);
  --ink-3: rgba(230, 242, 236, 0.46);
  --green: #5cffb0;
  --cyan: #62e8e2;
  --green-glow: rgba(92, 255, 176, 0.35);
  --cyan-glow: rgba(98, 232, 226, 0.3);
  --on-green: #04120c;

  --glass: rgba(255, 255, 255, 0.05);
  --glass-2: rgba(255, 255, 255, 0.08);
  --glass-line: rgba(255, 255, 255, 0.11);
  --glass-hi: rgba(255, 255, 255, 0.22);
  --well: rgba(3, 10, 7, 0.55);
  --radius: 20px;
  --radius-sm: 12px;

  --perf: 6px;
  --frame: 12px;
  --gate: 20px;
  --reel: 36px;
  --act: 64px;
  --intermission: 112px;

  --topbar: 88px;
  --gutter: clamp(20px, 5vw, 96px);
}

* { box-sizing: border-box; }

html { scroll-padding-top: var(--topbar); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(92, 255, 176, 0.28); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Sky */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    url("../img/stars.svg") repeat,
    radial-gradient(120% 80% at 50% -10%, #12402d 0%, var(--night) 55%, var(--night-deep) 100%);
}

.sky i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.sky i:nth-child(1) {
  width: 70vmax;
  height: 70vmax;
  left: -22vmax;
  top: -32vmax;
  background: radial-gradient(closest-side, rgba(27, 107, 76, 0.55), transparent 70%);
  animation: drift-a 52s ease-in-out infinite alternate;
}

.sky i:nth-child(2) {
  width: 60vmax;
  height: 60vmax;
  right: -26vmax;
  top: 8vmax;
  background: radial-gradient(closest-side, rgba(98, 232, 226, 0.14), transparent 70%);
  animation: drift-b 64s ease-in-out infinite alternate;
}

.sky i:nth-child(3) {
  width: 52vmax;
  height: 52vmax;
  left: 18vmax;
  bottom: -30vmax;
  background: radial-gradient(closest-side, rgba(92, 255, 176, 0.16), transparent 70%);
  animation: drift-c 58s ease-in-out infinite alternate;
}

@keyframes drift-a { to { transform: translate(9vmax, 7vmax); } }
@keyframes drift-b { to { transform: translate(-10vmax, 9vmax); } }
@keyframes drift-c { to { transform: translate(12vmax, -8vmax); } }

/* Glass */

.glass {
  position: relative;
  isolation: isolate;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035) 60%, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  box-shadow:
    inset 0 1px 0 var(--glass-hi),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 30px 80px -30px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

.glass::before,
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
}

.glass::before {
  background:
    radial-gradient(90% 55% at 15% -5%, rgba(255, 255, 255, 0.16), transparent 60%),
    radial-gradient(60% 40% at 100% 100%, rgba(92, 255, 176, 0.08), transparent 60%);
}

.glass::after {
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.06) 35%, rgba(98, 232, 226, 0) 60%, rgba(92, 255, 176, 0.35) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Caret */

.caret {
  display: inline-block;
  width: 0.5em;
  height: 0.82em;
  margin-left: 0.1em;
  vertical-align: -0.06em;
  background: var(--green);
  box-shadow: 0 0 22px var(--green-glow);
  animation: blink 1.1s steps(2, start) infinite;
}

@keyframes blink { to { visibility: hidden; } }

/* Top bar */

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 12px var(--gutter) 0;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: var(--gate);
  border-radius: 999px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand .caret { width: 0.45em; height: 0.75em; }

.pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--green);
  background: rgba(92, 255, 176, 0.08);
  border: 1px solid rgba(92, 255, 176, 0.35);
  box-shadow: 0 0 16px -2px var(--green-glow), inset 0 0 10px rgba(92, 255, 176, 0.12);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: color 0.2s, background-color 0.2s;
}

.icon-link:hover { color: var(--ink); background: var(--glass); }

.icon-link svg { width: 18px; height: 18px; }

.topnav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.topnav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 1rem;
}

.topnav a:hover { color: var(--ink); background: var(--glass); }

.topnav .icon-link { padding: 0; margin-left: 4px; }

.nav-toggle {
  font: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.nav-toggle:not([hidden]) { display: none; }

/* Landing */

.landing {
  padding: 0 var(--gutter);
}

.hero { padding: var(--act) 0 0; }

.hero-icon {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: var(--gate);
  border-radius: 24px;
  box-shadow: 0 16px 40px -12px var(--green-glow);
}

.display {
  margin: 0;
  font-size: var(--t-display);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.lead {
  margin: var(--gate) 0 0;
  font-size: var(--t-lead);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-blurb {
  margin: var(--frame) 0 0;
  color: var(--ink-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--frame);
  margin-top: var(--reel);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 1px 0 var(--glass-hi);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.btn:hover { border-color: rgba(255, 255, 255, 0.3); }

.btn-primary {
  color: var(--green);
  border-color: rgba(92, 255, 176, 0.45);
}

.btn-primary:hover {
  border-color: var(--green);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 0 28px -6px var(--green-glow);
}

/* Terminal illustration */

.term {
  margin: var(--reel) 0 0;
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--glass-line);
}

.dots { display: inline-flex; gap: 7px; }

.dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.term-cmd { color: var(--ink-2); }

.term-cmd::before { content: "$ "; color: var(--green); }

.typed {
  display: inline-block;
  vertical-align: bottom;
  overflow: hidden;
  white-space: nowrap;
  width: 14ch;
}

.term-replay {
  margin-left: auto;
  font: inherit;
  font-size: 12px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
}

.term-replay:hover { color: var(--green); border-color: rgba(92, 255, 176, 0.5); }

.term-body {
  display: grid;
  grid-template-columns: 24ch minmax(0, 1fr) 21ch;
  min-height: 24em;
}

.pane {
  margin: 0;
  padding: 16px 14px;
  color: var(--ink-2);
  font: inherit;
  white-space: pre;
  overflow: hidden;
}

.term-files { border-right: 1px solid var(--glass-line); }

.term-files b,
.term-outline b { color: var(--green); font-weight: 600; }

.term-outline i,
.term-doc .tbl { color: var(--ink-3); font-style: normal; }

.term-outline { padding: 16px 12px 16px 0; text-align: right; }

.term-doc {
  padding: 16px 24px;
  overflow: hidden;
}

.row { position: relative; height: 1.5em; }

.raw,
.out {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  white-space: pre;
}

.raw { color: var(--ink-2); visibility: hidden; }

.out .chip,
.term-status .chip {
  background: var(--green);
  color: var(--on-green);
  padding: 0 0.6ch;
  font-weight: 700;
  border-radius: 3px;
  box-shadow: 0 0 18px -2px var(--green-glow);
}

.out b { color: var(--ink); }

.out .h2 { color: var(--cyan); font-weight: 600; }

.out .rule { font-weight: 400; opacity: 0.8; }

.out.code { background: var(--glass); margin: 0 -8px; padding: 0 8px; border-radius: 3px; }

.out .bar { color: var(--green); }

.out .lang { position: absolute; right: 1ch; color: var(--ink-3); }

.out .kw { color: var(--cyan); }

.out .flag { color: var(--green); }

.out .td { color: var(--ink); }

.out .th { color: var(--ink); font-weight: 600; background: var(--glass); }

.term-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--glass-line);
}

.term-status .hints { color: var(--ink-3); }

.term-status .pos { margin-left: auto; font-weight: 600; }

.term.play .typed {
  border-right: 2px solid var(--green);
  animation: typing 1.1s steps(14, end) 0.3s both, type-caret 0.9s step-end infinite;
}

.term.play .raw {
  visibility: visible;
  animation: raw-out 0.5s ease both;
  animation-delay: calc(1.7s + var(--i, 0) * 70ms);
}

.term.play .out {
  animation: out-in 0.6s ease both;
  animation-delay: calc(1.7s + var(--i, 0) * 70ms);
}

.term.play .term-files,
.term.play .term-outline,
.term.play .term-status {
  animation: fade-in 0.7s ease 1.9s both;
}

@keyframes typing { from { width: 0; } to { width: 14ch; } }
@keyframes type-caret { 50% { border-color: transparent; } }
@keyframes raw-out { to { opacity: 0; visibility: hidden; transform: translateY(-4px); filter: blur(2px); } }
@keyframes out-in { from { opacity: 0; transform: translateY(5px); filter: blur(3px); } }
@keyframes fade-in { from { opacity: 0; } }

/* Features */

.features { margin-top: var(--intermission); }

.title {
  margin: 0;
  font-size: var(--t-title);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.section-lead {
  margin: var(--gate) 0 0;
  color: var(--ink-2);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gate);
  margin-top: var(--reel);
}

.feature {
  display: block;
  padding: var(--gate);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s;
}

.feature:hover { border-color: rgba(92, 255, 176, 0.35); }

.mini {
  margin: 0 0 var(--gate);
  padding: 14px 16px;
  min-height: 11.5em;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--well);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  white-space: pre;
  overflow: auto;
}

.mini b { color: var(--green); font-weight: 600; }

.mini i { font-style: normal; color: var(--ink-3); }

.mini u {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
  background: rgba(98, 232, 226, 0.12);
}

.feature h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 500;
}

.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
}

/* Demo */

.demo { margin-top: var(--intermission); }

.demo-frame {
  margin: var(--reel) 0 0;
  padding: 10px;
  overflow: hidden;
}

.demo-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 8px);
  background: var(--well);
}

/* Pipeline */

.pipeline { margin-top: var(--intermission); }

.pipe-wrap { margin-top: var(--reel); overflow-x: auto; }

.pipe {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  font-family: var(--font);
}

.pipe-edges {
  color: var(--ink-3);
  stroke: currentColor;
  stroke-dasharray: 6 8;
  animation: flow 1.4s linear infinite;
}

@keyframes flow { to { stroke-dashoffset: -28; } }

.pipe-nodes rect { fill: rgba(255, 255, 255, 0.05); stroke: var(--glass-line); }

.pipe-nodes text { fill: var(--ink); font-size: 18px; text-anchor: middle; }

.node-key rect { stroke: rgba(98, 232, 226, 0.55); }

.node-out rect { stroke: rgba(92, 255, 176, 0.55); }

.pipe-notes text { fill: var(--ink-3); font-size: 14px; text-anchor: middle; }

/* Landing readme */

.readme {
  margin-top: var(--intermission);
  padding: var(--act);
}

/* Contribute */

.cta {
  margin-top: var(--intermission);
  padding: var(--act);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--act);
  align-items: center;
}

.cta-term {
  margin: 0;
  padding: 22px 24px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--well);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cta-term i { font-style: normal; color: var(--green); }

.cta-term .caret { width: 0.55em; height: 0.9em; vertical-align: -0.1em; margin-left: 0; }

/* Docs shell */

.shell {
  padding: var(--reel) var(--gutter) var(--act);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 250px;
  gap: var(--act);
  align-items: start;
}

.files {
  position: sticky;
  top: var(--topbar);
  border-right: 1px solid var(--glass-line);
  padding-right: var(--gate);
  font-size: 1rem;
}

.files-head { font-weight: 600; margin-bottom: 6px; }

.files-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.files-list li {
  display: flex;
  gap: 8px;
  padding: 3px 0;
}

.tree { color: var(--ink-3); }

.files-list a { color: var(--ink-2); text-decoration: none; }

.files-list a:hover { color: var(--ink); }

.files-list [aria-current] a { color: var(--green); }

.doc { min-width: 0; }

.outline-col { position: sticky; top: var(--topbar); }

.outline {
  padding: 22px 16px 14px;
  border-radius: 14px;
  font-size: 0.9375rem;
}

.outline-title {
  position: absolute;
  top: -0.75em;
  left: 12px;
  padding: 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  background: #0b1f17;
  border: 1px solid var(--glass-line);
  border-radius: 6px;
  line-height: 1.5;
}

.outline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.outline-list a {
  display: block;
  padding: 3px 0 3px 10px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
}

.outline-list a:hover { color: var(--ink); }

.outline-list .tree { margin-right: 6px; }

.ol-3 a { padding-left: 10px; font-size: 0.875rem; }

.ol-3 .tree { margin-left: 1ch; }

.outline-list a[aria-current] { color: var(--green); border-left-color: var(--green); }

/* Prose */

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

.prose h1 {
  margin: 0 0 var(--gate);
  font-size: var(--t-title);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.prose h1 + p {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.prose h2 {
  width: fit-content;
  margin: var(--act) 0 var(--gate);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--cyan);
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
}

.prose h3 {
  margin: var(--reel) 0 var(--frame);
  font-size: 1.25rem;
  font-weight: 600;
}

.prose h3::before { content: "### "; color: var(--ink-3); font-weight: 400; }

.prose h4 { margin: var(--reel) 0 var(--frame); font-size: 1.0625rem; font-weight: 600; }

.prose p { margin: 0 0 1.2em; }

.prose a {
  color: var(--cyan);
  text-decoration-color: rgba(98, 232, 226, 0.4);
  text-underline-offset: 0.2em;
}

.prose a:hover { color: var(--ink); text-decoration-color: var(--cyan); }

.prose strong { color: var(--ink); font-weight: 600; }

.prose em { color: var(--ink-2); }

.prose code {
  font-size: 0.92em;
  padding: 0.1em 0.45em;
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(98, 232, 226, 0.1);
  border: 1px solid rgba(98, 232, 226, 0.16);
}

.prose pre {
  position: relative;
  margin: var(--gate) 0 var(--reel);
  padding: 18px 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  background: var(--well);
  border: 1px solid var(--glass-line);
  border-left: 3px solid var(--green);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: auto;
}

.prose pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: inherit;
  color: var(--ink);
  background: none;
}

.prose pre[class*="language-"]::before {
  position: absolute;
  top: 8px;
  right: 72px;
  font-size: 12px;
  color: var(--ink-3);
}

.prose pre.language-sh::before { content: "sh"; }
.prose pre.language-markdown::before { content: "markdown"; }
.prose pre.language-mermaid::before { content: "mermaid"; }
.prose pre.language-rust::before { content: "rust"; }
.prose pre.language-toml::before { content: "toml"; }

.copy {
  position: absolute;
  top: 6px;
  right: 8px;
  font: inherit;
  font-size: 12px;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 10px;
  cursor: pointer;
}

.copy:hover { color: var(--green); border-color: rgba(92, 255, 176, 0.4); }

.token.comment { color: var(--ink-3); }
.token.string,
.token.attr-value { color: var(--green); }
.token.keyword,
.token.builtin,
.token.number,
.token.boolean { color: var(--cyan); }
.token.function { color: var(--ink); }
.token.operator,
.token.punctuation { color: var(--ink-2); }
.token.parameter,
.token.variable { color: var(--green); }
.token.title,
.token.important { color: var(--cyan); font-weight: 600; }
.token.url { color: var(--cyan); }

.prose blockquote {
  margin: var(--gate) 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--green);
  color: var(--ink-2);
  font-style: italic;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose ul { list-style: none; padding-left: 1.5em; margin: 0 0 1.2em; }

.prose ul li { position: relative; margin: 0.35em 0; }

.prose ul li::before {
  content: "•";
  position: absolute;
  left: -1.3em;
  color: var(--green);
}

.prose ul ul li::before { content: "◦"; color: var(--cyan); }

.prose ul ul ul li::before { content: "▪"; color: var(--ink-2); }

.prose ol { padding-left: 1.6em; margin: 0 0 1.2em; }

.prose ol li { margin: 0.35em 0; }

.prose ol li::marker { color: var(--green); }

.table-wrap {
  margin: var(--gate) 0 var(--reel);
  overflow-x: auto;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: rgba(3, 10, 7, 0.4);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.prose th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 2px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

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

.prose hr {
  border: 0;
  border-top: 1px solid var(--glass-line);
  margin: var(--act) 0;
}

.prose img { max-width: 100%; }

.kbd-page td:first-child code {
  display: inline-block;
  margin: 2px 0;
  padding: 2px 9px;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.kbd-page td:first-child { white-space: nowrap; }

#built-in-themes + .table-wrap :is(th, td):not(:last-child) { white-space: nowrap; }

/* Pager */

.pager {
  display: flex;
  justify-content: space-between;
  gap: var(--gate);
  margin-top: var(--act);
  padding-top: var(--gate);
  border-top: 1px solid var(--glass-line);
}

.pager a {
  display: flex;
  flex-direction: column;
  padding: 12px 18px;
  color: var(--ink);
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.pager a:hover { border-color: rgba(92, 255, 176, 0.4); }

.pager small {
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.pager-next { margin-left: auto; text-align: right; }

/* Footer */

.site-foot {
  margin: var(--intermission) var(--gutter) 0;
  padding: var(--reel) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gate);
  color: var(--ink-3);
  font-size: var(--t-caption);
  border-top: 1px solid var(--glass-line);
}

.site-foot {
  align-items: center;
}

.social { display: inline-flex; gap: 4px; }

/* Responsive */

@media (max-width: 1140px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); gap: var(--reel); }
  .outline-col { display: none; }
}

@media (max-width: 960px) {
  .term-body { grid-template-columns: 22ch minmax(0, 1fr); }
  .term-outline { display: none; }
}

@media (max-width: 840px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav-toggle:not([hidden]) { display: inline-block; }
  .files {
    display: none;
    position: fixed;
    inset: 72px 16px auto 16px;
    z-index: 30;
    padding: var(--gate);
    border: 1px solid var(--glass-line);
    border-radius: var(--radius);
    background: rgba(6, 17, 13, 0.94);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  }
  .nav-open .files { display: block; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .readme { padding: var(--reel) var(--gate); }
  .cta { grid-template-columns: minmax(0, 1fr); gap: var(--reel); padding: var(--reel) var(--gate); }
  .topbar { top: 8px; margin-top: 8px; padding: 8px 16px; }
  .topnav a:nth-child(2), .topnav a:nth-child(3) { display: none; }
  .pill { display: none; }
}

@media (max-width: 640px) {
  :root { --act: 44px; --intermission: 80px; --gutter: 16px; }
  body { font-size: 1rem; }
  .term-body { grid-template-columns: minmax(0, 1fr); }
  .term-files { display: none; }
  .term-doc { padding: 14px 16px; overflow-x: auto; }
  .prose h2 { font-size: 1.5rem; }
  .pager { flex-direction: column; }
  .pager-next { margin-left: 0; }
  .prose pre { font-size: 0.875rem; }
  .kbd-page td:first-child,
  #built-in-themes + .table-wrap :is(th, td):not(:last-child) { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .sky i, .caret, .pipe-edges { animation: none; }
  .term.play .typed, .term.play .raw, .term.play .out,
  .term.play .term-files, .term.play .term-outline, .term.play .term-status { animation: none; }
  .term.play .raw { visibility: hidden; }
  * { transition-duration: 0.01ms !important; }
}
