@font-face {
  font-family: Inter;
  src: url(/fonts/inter-latin.woff2) format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/mono-latin.woff2) format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/*
 * The palette follows the subject. Amber is the route a build travels (the dashed line in the project's own
 * artwork); ember and hot are a local machine under load; cool is the fleet that takes the work.
 */
:root {
  color-scheme: dark;
  --ink: #05070d;
  --raise: #080c16;
  --panel: #0b101c;
  --panel-2: #10172a;
  --line: rgb(196 212 255 / 0.09);
  --line-2: rgb(196 212 255 / 0.16);
  --line-3: rgb(196 212 255 / 0.28);
  --text: #e9edf6;
  --soft: #c4cbdb;
  --muted: #9aa4ba;
  --faint: #7d889f;
  --amber: #ffb547;
  --amber-2: #ffd08a;
  --heat: #ff8a3d;
  --hot: #ff5c3c;
  --cool: #5cc8ff;
  --cool-2: #a3e2ff;
  --teal: #2dd4bf;
  --ok: #4ade80;
  --no: #fb7185;
  --violet: #ab9dff;
  --sky: #8ec5ff;
  --chapter: var(--amber);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --wide: 84rem;
  --inset: clamp(1.1rem, 2.6vw, 2.1rem);
  --radius: 1.25rem;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: rgb(140 156 196 / 0.35) transparent;
}
@media (min-width: 1921px) {
  html {
    font-size: min(0.8334vw, 1.4rem);
  }
}
@media (prefers-reduced-motion: no-preference) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss03", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Film grain keeps the large dark fields from banding. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 899px) {
  body::after {
    content: none;
  }
}
h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd,
blockquote,
pre {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
::selection {
  background: rgb(255 181 71 / 0.32);
}
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 0.5rem;
}
:focus:not(:focus-visible) {
  outline: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.wrap {
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */
.d1,
.d2,
.d3 {
  font-weight: 800;
  text-wrap: balance;
  color: #fff;
}
.d1 {
  font-size: clamp(2.9rem, 7vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.d2 {
  font-size: clamp(2.3rem, 5.2vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.d3 {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.d4 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 0.9rem;
}
em.g {
  font-style: normal;
  color: var(--chapter);
}
/* slop-ok(S2): the one gradient on the site runs warm to cool, from your machine to the fleet. */
.d1 em.g {
  background: linear-gradient(96deg, #ff8a3d 0%, #ffb547 26%, #ffe2b0 50%, #a3e2ff 74%, #5cc8ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.62;
  color: var(--soft);
  text-wrap: pretty;
}
.lede code,
.kicker code,
.prose-sm code,
.split-list code,
.fig-foot code,
.aside code {
  font-size: 0.86em;
  padding: 0.08em 0.36em;
  border-radius: 0.4em;
  background: rgb(196 212 255 / 0.08);
  color: var(--text);
  white-space: nowrap;
}
.micro {
  font: 600 0.75rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.micro.asis {
  text-transform: none;
  letter-spacing: 0.02em;
}
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.txt {
  color: var(--amber-2);
  text-decoration: underline;
  text-decoration-color: rgb(255 208 138 / 0.35);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s;
}
.txt:hover {
  text-decoration-color: var(--amber-2);
}
code,
pre,
kbd {
  /* Show code as typed: no ligature turns >= into ≥. */
  font-variant-ligatures: none;
  font-feature-settings: "calt" 0, "liga" 0;
}
code {
  font-family: var(--mono);
  font-size: 0.9em;
}
kbd {
  font: 500 0.72rem/1 var(--mono);
  padding: 0.25em 0.45em;
  border-radius: 0.35rem;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.65rem 1.3rem;
  border-radius: 1rem;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.03);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition:
    background-color 0.25s,
    border-color 0.25s,
    transform 0.35s var(--ease),
    box-shadow 0.35s;
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}
.btn:hover {
  border-color: var(--line-3);
  background: rgb(255 255 255 / 0.06);
  transform: translateY(-1px);
}
.btn.go {
  background: var(--amber);
  border-color: var(--amber);
  color: #1d1102;
  box-shadow: 0 10px 40px -10px rgb(255 181 71 / 0.5);
}
.btn.go:hover {
  background: var(--amber-2);
  border-color: var(--amber-2);
}
.btn.sm {
  min-height: 2.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 0.8rem;
  font-size: 0.85rem;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* ---------- Header ---------- */
.kick {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
  font: 600 0.75rem/1.4 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--soft);
}
.kick .num {
  color: var(--chapter);
}
.dot {
  position: relative;
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--chapter) 70%, transparent);
}
.dot.on::after,
[aria-current] > .dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--chapter);
}
.skip {
  position: fixed;
  z-index: 120;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 0.8rem;
  background: var(--amber);
  color: #1d1102;
  font-weight: 700;
  transform: translateY(-5rem);
}
.skip:focus {
  transform: none;
}
.top {
  position: fixed;
  z-index: 80;
  inset: 0 0 auto;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.3s,
    border-color 0.3s;
}
.scrolled .top,
.solid .top {
  background: rgb(6 9 17 / 0.92);
  border-color: var(--line);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: calc(var(--wide) + 2 * var(--gutter));
  min-height: 4.25rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.brand .mark {
  width: 2.3rem;
  height: 1.75rem;
  overflow: visible;
}
.mark .box {
  fill: rgb(255 181 71 / 0.1);
  stroke: var(--amber);
  stroke-width: 1.6;
}
.mark .prompt {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark .route {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.3;
  stroke-dasharray: 2 2.2;
  stroke-linecap: round;
}
.mark .node {
  fill: var(--cool);
}
.chapters {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}
.chapters a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.7rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--soft);
  white-space: nowrap;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.chapters a:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.05);
}
.chapters a[aria-current] {
  color: #fff;
  background: rgb(255 255 255 / 0.07);
}
.chapters .dot {
  width: 0.6rem;
  height: 0.6rem;
}
.tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.find {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem 0.35rem 0.8rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line-2);
  color: var(--soft);
  font-size: 0.85rem;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.find:hover {
  border-color: var(--line-3);
  color: #fff;
}
.find svg {
  width: 1rem;
  height: 1rem;
}
.progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  opacity: 0;
  transition: opacity 0.3s;
}
.scrolled .progress {
  opacity: 1;
}
.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--heat), var(--amber), var(--cool));
  transform-origin: left;
  transform: scaleX(0);
}
.menu {
  display: none;
  position: relative;
}
.menu summary {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line-2);
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu summary svg {
  width: 1.2rem;
  height: 1.2rem;
}
.menu > nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  width: min(18rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - 6rem);
  overflow: auto;
  display: grid;
  gap: 0.15rem;
  padding: 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--line-2);
  background: rgb(9 13 24 / 0.98);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 0.7);
}
.menu > nav a:not(.btn) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border-radius: 0.7rem;
  color: var(--soft);
  font-weight: 500;
}
.menu > nav a:not(.btn):hover,
.menu > nav a[aria-current] {
  background: rgb(255 255 255 / 0.06);
  color: #fff;
}
.menu > nav .btn {
  margin-top: 0.4rem;
}
.menu hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.3rem 0;
}
@media (max-width: 1279px) {
  .chapters {
    display: none;
  }
  .bar {
    grid-template-columns: 1fr auto;
  }
  .menu {
    display: block;
  }
  .tools > .btn {
    display: none;
  }
}
@media (max-width: 520px) {
  .find span,
  .find kbd {
    display: none;
  }
  .find {
    width: 2.75rem;
    height: 2.75rem;
    justify-content: center;
    padding: 0;
  }
}

/* ---------- Footer ---------- */
footer.end {
  border-top: 1px solid var(--line);
  padding-block: 2.2rem calc(2.2rem + env(safe-area-inset-bottom));
  margin-top: 4rem;
}
.end .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.end-note {
  color: var(--muted);
  font-size: 0.9rem;
}
.end-note a {
  color: var(--soft);
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 0.2em;
}
.end nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  margin-left: auto;
  font-size: 0.9rem;
}
.end nav a {
  color: var(--soft);
  padding-block: 0.4rem;
}
.end nav a:hover,
.end-note a:hover {
  color: #fff;
}

/* ---------- Code ---------- */
.code {
  position: relative;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #070a13;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0.4rem 0 1rem;
}
.code-label {
  font: 600 0.72rem/1.4 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.code pre {
  overflow-x: auto;
  padding: 0.2rem 1rem 0.95rem;
  font: 400 0.84rem/1.65 var(--mono);
  color: var(--text);
  tab-size: 2;
}
.code pre:focus-visible {
  outline-offset: -2px;
}
.code.prompt pre code::before {
  content: "$ ";
  color: var(--amber);
  user-select: none;
}
.tk-c {
  color: var(--faint);
}
.tk-s {
  color: #ffd08a;
}
.tk-k {
  color: var(--cool-2);
}
.tk-n {
  color: #c7b8ff;
}
.code .copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid var(--line-2);
  background: rgb(9 13 24 / 0.92);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
  transition:
    color 0.2s,
    border-color 0.2s,
    opacity 0.2s;
}
.code .copy svg {
  width: 0.95rem;
  height: 0.95rem;
}
.code .copy:hover,
.code .copy[data-done] {
  color: #fff;
  border-color: var(--line-3);
  opacity: 1;
}
.code .copy[data-done] {
  color: var(--ok);
}

/* ---------- Search ---------- */
dialog.palette {
  width: min(42rem, calc(100vw - 2rem));
  max-height: min(36rem, calc(100svh - 6rem));
  margin: max(4.5rem, 10vh) auto auto;
  padding: 0;
  border-radius: 1.1rem;
  border: 1px solid var(--line-2);
  background: #0a0f1c;
  color: var(--text);
  box-shadow: 0 40px 120px -30px rgb(0 0 0 / 0.85);
  overflow: hidden;
}
dialog.palette[open] {
  display: flex;
  flex-direction: column;
}
dialog.palette::backdrop {
  background: rgb(2 4 9 / 0.66);
  backdrop-filter: blur(3px);
}
.q {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}
.q svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--muted);
  flex: none;
}
.q input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 1.05rem;
  outline: none;
}
.q input::placeholder {
  color: var(--faint);
}
.hits {
  overflow: auto;
  padding: 0.4rem;
}
.hits .note {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.hit {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
}
.hit[aria-selected="true"],
.hit:hover {
  background: rgb(255 255 255 / 0.06);
}
.hit strong {
  display: block;
  font-size: 0.95rem;
  color: #fff;
}
.hit small {
  font: 500 0.72rem/1.4 var(--mono);
  color: var(--faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hit p {
  margin-top: 0.2rem;
  font-size: 0.87rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
mark {
  background: rgb(255 181 71 / 0.22);
  color: #fff;
  border-radius: 0.2em;
  padding: 0 0.1em;
}
.keys {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
}

/* ---------- Docs ---------- */
.lib,
.reader {
  padding-top: calc(7rem + env(safe-area-inset-top));
}
.lib-head {
  max-width: 48rem;
  padding-bottom: 2.5rem;
}
.lib-head .lede {
  margin-top: 1.2rem;
}
.shelf {
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.shelf h2 {
  margin-bottom: 1rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 0.8rem;
}
.card {
  display: grid;
  gap: 0.4rem;
  padding: 1.15rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    border-color 0.2s,
    transform 0.3s var(--ease);
}
.card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
}
.card strong {
  font-size: 1.05rem;
  color: #fff;
}
.card p {
  color: var(--muted);
  font-size: 0.92rem;
}
.card .micro {
  color: var(--faint);
  font-size: 0.72rem;
}
.reader {
  display: grid;
  grid-template-columns: 14rem minmax(0, 46rem) 13rem;
  gap: 3rem;
  align-items: start;
}
.rail,
.onpage {
  position: sticky;
  top: 6rem;
  max-height: calc(100svh - 7rem);
  overflow: auto;
  font-size: 0.9rem;
}
.rail .micro,
.onpage .micro {
  margin: 1.2rem 0 0.5rem;
  font-size: 0.7rem;
}
.rail .micro:first-child,
.onpage .micro:first-child {
  margin-top: 0;
}
.rail a,
.onpage a {
  display: block;
  padding: 0.32rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--muted);
  border-left: 2px solid transparent;
}
.rail a:hover,
.onpage a:hover {
  color: #fff;
}
.rail a[aria-current],
.onpage a[aria-current] {
  color: #fff;
  background: rgb(255 255 255 / 0.05);
  border-left-color: var(--amber);
  border-radius: 0 0.5rem 0.5rem 0;
}
.reading > header {
  padding-bottom: 1.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}
.crumbs {
  font: 500 0.8rem/1.4 var(--mono);
  color: var(--faint);
  margin-bottom: 0.8rem;
}
.crumbs a:hover {
  color: #fff;
}
.reading .facts {
  margin-top: 0.8rem;
  color: var(--faint);
  font-size: 0.86rem;
}
.reading .facts a {
  color: var(--soft);
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 0.2em;
}
.inline-toc {
  display: none;
  margin-bottom: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel);
}
.inline-toc summary {
  min-height: 2.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
}
.inline-toc summary small {
  color: var(--faint);
  font-weight: 400;
}
.inline-toc ul {
  padding: 0 0.6rem 0.8rem;
}
.inline-toc a {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--muted);
}
.prose {
  color: var(--soft);
  font-size: 1.02rem;
  line-height: 1.72;
  overflow-wrap: break-word;
}
.prose > * + * {
  margin-top: 1rem;
}
.prose h2 {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #fff;
}
.prose > h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}
.prose h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  color: #fff;
}
.prose h4 {
  margin-top: 1.6rem;
  font-size: 1.02rem;
  color: #fff;
}
.prose .anchor {
  margin-left: 0.45rem;
  color: var(--faint);
  opacity: 0;
  font-weight: 400;
  transition: opacity 0.2s;
}
.prose :is(h2, h3, h4):hover .anchor,
.prose .anchor:focus-visible {
  opacity: 1;
}
.prose strong {
  color: var(--text);
}
.prose ul,
.prose ol {
  padding-left: 1.3rem;
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li::marker {
  color: var(--faint);
}
.prose li + li {
  margin-top: 0.35rem;
}
.prose :not(pre) > code {
  padding: 0.1em 0.38em;
  border-radius: 0.4em;
  background: rgb(196 212 255 / 0.08);
  color: var(--text);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
.prose a:not(.anchor) {
  color: var(--amber-2);
  text-decoration: underline;
  text-decoration-color: rgb(255 208 138 / 0.35);
  text-underline-offset: 0.2em;
}
.prose a:not(.anchor):hover {
  text-decoration-color: var(--amber-2);
}
.prose blockquote {
  padding: 0.6rem 1rem;
  border-left: 2px solid var(--amber);
  background: rgb(255 181 71 / 0.05);
  border-radius: 0 0.6rem 0.6rem 0;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: 2rem;
}
/* A heading already draws its own rule. */
.prose hr:has(+ h2) {
  display: none;
}
.tablewrap {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  overflow: hidden;
}
.tablescroll {
  overflow-x: auto;
}
.prose table,
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}
.prose th,
.prose td,
.compare th,
.compare td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.prose thead th,
.compare thead th {
  background: var(--panel-2);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.prose tr:last-child td,
.compare tr:last-child > * {
  border-bottom: 0;
}
.neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.neighbors a {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  color: #fff;
  font-weight: 600;
}
.neighbors a:hover {
  border-color: var(--line-3);
}
.neighbors small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--faint);
  font-weight: 500;
  font-size: 0.8rem;
}
.neighbors small svg {
  width: 0.9rem;
  height: 0.9rem;
}
.neighbors .next {
  text-align: right;
  justify-items: end;
}
@media (max-width: 1239px) {
  .reader {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
  .onpage {
    display: none;
  }
  .inline-toc {
    display: block;
  }
}
@media (max-width: 899px) {
  .reader {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .rail {
    position: static;
    max-height: none;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
  }
  .rail .micro {
    display: none;
  }
  .rail ul {
    display: contents;
  }
  .rail a {
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    padding: 0.45rem 0.75rem;
  }
  .rail a[aria-current] {
    border-color: var(--amber);
    border-radius: 0.7rem;
  }
}
@media (max-width: 599px) {
  .neighbors {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Touch ---------- */
@media (hover: none) {
  /* Section links can't wait for a hover that never comes. */
  .prose .anchor {
    opacity: 0.45;
  }
  .keys {
    display: none;
  }
}
@media (max-width: 599px) {
  .code .copy {
    min-height: 2.75rem;
  }
  .end nav a {
    padding-block: 0.7rem;
  }
}
.nowrap {
  white-space: nowrap;
}
