/* rungent's site. The shell is acahti.dev's (Geist, a sidebar-grey frame around one white inset
   page) with rungent's teal; the theme follows the system. */

@font-face {
  font-family: "Geist Variable";
  src: url("/assets/geist-latin-wght-normal.19f9c925.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono Variable";
  src: url("/assets/geist-mono-latin-wght-normal.684ad5b5.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #fff;
  --foreground: #0a0a0a;
  --primary: #0d9488;
  --primary-foreground: #fff;
  --muted: #f5f5f5;
  --muted-foreground: #6b7080;
  --accent: #f5f5f5;
  --border: #e6e7eb;
  --ring: color-mix(in oklab, #0d9488 55%, transparent);
  --sidebar: #f5f6f8;
  --sidebar-accent: #eceef2;
  --code-bg: #f7f8fa;
  --radius: 0.625rem;
  --sans:
    "Geist Variable", -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "Geist Mono Variable", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --header: 3.5rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0c0d10;
    --foreground: #fafafa;
    --primary: #2dd4bf;
    --primary-foreground: #04201d;
    --muted: #262626;
    --muted-foreground: #a1a1a1;
    --accent: #262626;
    --border: #ffffff1a;
    --ring: color-mix(in oklab, #2dd4bf 55%, transparent);
    --sidebar: #101114;
    --sidebar-accent: #262626;
    --code-bg: #15161a;
  }
}

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

/* Scrollbars: no track, a thin thumb that shows only while its area scrolls (site.js sets
   .is-scrolling for a moment after each scroll). */
* {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.is-scrolling {
  scrollbar-color: color-mix(in oklab, var(--foreground) 30%, transparent) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
.is-scrolling::-webkit-scrollbar-thumb {
  background-color: color-mix(in oklab, var(--foreground) 30%, transparent);
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header) + 1rem);
}
body {
  margin: 0;
  background: var(--sidebar);
  color: var(--foreground);
  font: 400 15px / 1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}
code {
  font-family: var(--mono);
  font-size: 0.875em;
}
:not(pre) > code {
  background: var(--muted);
  border-radius: 0.375rem;
  padding: 0.125em 0.375em;
  overflow-wrap: anywhere;
}
pre {
  margin: 1.25em 0 0;
  padding: 0.875rem 1rem;
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: 400 13px / 1.65 var(--mono);
}
pre code {
  font-size: inherit;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--background);
  padding: 0.5rem 0.75rem;
}

/* The header, as in the app: brand left, actions right. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  background: var(--sidebar);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.mark {
  width: 22px;
  height: 22px;
}
/* The latest release next to the brand; it opens the release notes. */
.version {
  margin: 0 auto 0 -0.5rem;
  padding: 1px 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--muted-foreground);
  font: 500 12px / 1.5 var(--mono);
  text-decoration: none;
}
.version:hover {
  color: var(--foreground);
  border-color: var(--muted-foreground);
}
.mark-body {
  fill: var(--primary);
}
.mark-check {
  stroke: var(--primary-foreground);
}
.doc-nav ul,
.outline ul,
.bottom ul,
.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.actions-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lang {
  display: inline-flex;
  padding: 2px;
  border-radius: 0.5rem;
  background: var(--sidebar-accent);
}
.lang a {
  padding: 0.1875rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.lang a[aria-current] {
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 1px 2px #00000014;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2rem;
  padding: 0 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--foreground);
  text-decoration: none;
  font: 500 14px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  background: var(--primary);
  filter: brightness(1.08);
}
.btn-lg {
  height: 2.5rem;
  padding: 0 1.125rem;
}
.menu {
  display: none;
}
.menu summary {
  cursor: pointer;
  list-style: none;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 14px;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu[open] summary {
  background: var(--sidebar-accent);
}
.menu nav {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: calc(var(--header) - 0.25rem);
  max-height: calc(100dvh - var(--header));
  overflow-y: auto;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 8px 24px #0000001f;
}
.menu h2 {
  margin: 0.75rem 0.75rem 0.25rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
}
.menu a:hover,
.menu a[aria-current] {
  background: var(--accent);
}

/* Sidebar and the white inset page, as in the app's shell. */
.frame {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  min-height: calc(100dvh - var(--header));
}
.frame-full {
  grid-template-columns: minmax(0, 1fr);
}
.doc-nav {
  position: sticky;
  top: var(--header);
  align-self: start;
  max-height: calc(100dvh - var(--header));
  overflow-y: auto;
  padding: 0.75rem 0.5rem 2rem;
}
.doc-nav h2 {
  margin: 1rem 0.5rem 0.25rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.doc-nav > ul > li:first-child h2 {
  margin-top: 0.25rem;
}
.doc-nav > ul > li > a {
  font-weight: 500;
}
.doc-nav a {
  display: block;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
}
.doc-nav a:hover {
  background: var(--sidebar-accent);
}
.doc-nav a[aria-current] {
  background: var(--sidebar-accent);
  font-weight: 500;
}
.inset {
  margin: 0 0.5rem 0.5rem 0;
  min-width: 0;
  background: var(--background);
  border-radius: 0.75rem;
  box-shadow:
    0 1px 2px #0000000d,
    0 0 0 1px color-mix(in oklab, var(--border) 60%, transparent);
}
.frame-full .inset {
  margin-left: 0.5rem;
}
.page {
  display: grid;
  grid-template-columns: minmax(0, 46rem) 14rem;
  justify-content: center;
  gap: 3rem;
  padding: 2.5rem 2rem 4rem;
}

/* Documents: the app's typeset rhythm. */
.crumbs {
  display: flex;
  gap: 0.375rem;
  margin: 0 0 1rem;
  font-size: 13px;
  color: var(--muted-foreground);
}
.crumbs a {
  color: inherit;
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--foreground);
}
.doc h1 {
  margin: 0;
  font-size: 1.875rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.doc .lead {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
  color: var(--muted-foreground);
}
.doc .body {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  font-size: 15.5px;
  line-height: 1.75;
}
.doc .body > :first-child {
  margin-top: 1.25em;
}
.doc h2,
.doc h3,
.doc h4 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.doc h2 {
  margin: 2.25em 0 0;
  font-size: 1.3125rem;
  line-height: 1.4;
}
.doc h3 {
  margin: 1.75em 0 0;
  font-size: 1.0625rem;
  line-height: 1.45;
}
.doc h4 {
  margin: 1.5em 0 0;
  font-size: 1rem;
}
.anchor {
  margin-left: 0.375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 400;
  opacity: 0;
}
.doc :is(h2, h3, h4):hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}
.doc p {
  margin: 1em 0 0;
}
.doc ul,
.doc ol {
  margin: 1em 0 0;
  padding-left: 1.375em;
}
.doc li {
  margin-top: 0.375em;
}
.doc li > p:first-child {
  margin-top: 0;
}
.doc li::marker {
  color: var(--muted-foreground);
}
.doc blockquote {
  margin: 1.25em 0 0;
  padding: 0.25em 0 0.25em 1em;
  border-left: 3px solid var(--border);
  color: var(--muted-foreground);
}
.doc img {
  margin: 1.25em 0 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.doc figure {
  margin: 1.5em 0 0;
}
.doc figure img {
  margin: 0;
}
.doc figcaption {
  margin-top: 0.5rem;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.doc hr {
  margin: 2em 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.table-scroll {
  overflow-x: auto;
  margin: 1.25em 0 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.6;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5625rem 0.875rem;
  border-bottom: 1px solid var(--border);
}
thead th {
  height: 2.25rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted) 50%, transparent);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td code,
th code {
  white-space: nowrap;
  overflow-wrap: normal;
}
.doc-foot {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 13px;
  color: var(--muted-foreground);
}
.doc-foot a {
  color: inherit;
}

/* On this page, as the app's document outline. */
.outline {
  position: sticky;
  top: calc(var(--header) + 2.5rem);
  align-self: start;
  max-height: calc(100dvh - var(--header) - 4rem);
  overflow-y: auto;
  font-size: 13px;
}
.outline h2 {
  margin: 0 0 0.5rem;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.outline a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  color: var(--muted-foreground);
  text-decoration: none;
  line-height: 1.45;
}
.outline a:hover {
  color: var(--foreground);
  background: var(--accent);
}
.outline a[aria-current] {
  color: var(--foreground);
  background: var(--accent);
  font-weight: 500;
}
.outline .d3 a {
  padding-left: 1.25rem;
}

/* The overview's hero, and the not-found page. */
.hero {
  max-width: 64rem;
  margin: 0 auto;
  padding: 3.5rem 2rem 0;
}
.hero h1,
.home h1 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 22ch;
}
.hero .lead,
.home .lead {
  margin: 1rem 0 0;
  max-width: 46rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
}
.hero .shot {
  width: 100%;
  height: auto;
  margin-top: 2.5rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px -24px #04201d40;
}
.home {
  padding: 4rem 2rem 5rem;
}
.home section {
  max-width: 64rem;
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
}

/* Release notes: one section per release. */
.release + .release {
  margin-top: 3.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.doc .release h2 span {
  color: var(--muted-foreground);
  font-weight: 500;
}
.release-meta {
  margin: 0.25rem 0 0;
  font: 12px / 1.6 var(--mono);
  color: var(--muted-foreground);
}
.release > .lead {
  margin-top: 0.75rem;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.doc-home .body {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* Diagrams written in the docs as HTML, so they follow the theme and the page's language. */
.doc :is(.rail, .planes, .tiles) {
  margin: 1.5em 0 0;
  padding: 0;
  list-style: none;
  line-height: 1.45;
}
.doc :is(.rail, .planes, .tiles) li {
  margin: 0;
}
/* Track's stages in order: a dot per stage on one line, the evidence below. */
.rail {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.rail li {
  position: relative;
  padding: 1.5rem 0.375rem 0 0;
  font-size: 13px;
  color: var(--muted-foreground);
}
.rail li::before {
  content: "";
  position: absolute;
  top: 0.3125rem;
  left: 0;
  right: 0;
  height: 2px;
  background: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.rail li:last-child::before {
  display: none;
}
.rail li::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--background);
}
.rail b {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--foreground);
}
.rail span {
  display: block;
}
/* Layers from the people and agents who work down to the record that joins it all. */
.planes {
  display: grid;
  gap: 0.5rem;
}
.planes > li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}
.planes > li > b {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.planes ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.planes ul li {
  flex: 1 1 7rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  font-size: 13.5px;
  text-align: center;
}
.planes ul li small {
  display: block;
  font-size: 12px;
  color: var(--muted-foreground);
}
.planes .bar li {
  background: color-mix(in oklab, var(--primary) 8%, var(--background));
  border-color: color-mix(in oklab, var(--primary) 30%, var(--border));
}
.planes .main li {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 500;
}
.planes .main li small {
  color: color-mix(in oklab, var(--primary-foreground) 80%, transparent);
}
/* Cards linking onward. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.tiles a {
  display: block;
  height: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}
.tiles a:hover {
  border-color: color-mix(in oklab, var(--primary) 45%, var(--border));
  background: color-mix(in oklab, var(--primary) 4%, var(--background));
}
.tiles b {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.tiles span {
  color: var(--muted-foreground);
}

.bottom {
  padding: 2.5rem 2rem 1.5rem;
  font-size: 13px;
  color: var(--muted-foreground);
}
.footer-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.bottom h2 {
  margin: 0 0 0.625rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}
.bottom li + li {
  margin-top: 0.375rem;
}
.bottom a {
  color: var(--muted-foreground);
  text-decoration: none;
}
.bottom a:hover {
  color: var(--foreground);
}
.bottom p {
  margin: 0.625rem 0 0;
}
.colophon {
  max-width: 64rem;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 1200px) {
  .page {
    grid-template-columns: minmax(0, 46rem);
  }
  .outline {
    display: none;
  }
}
@media (max-width: 900px) {
  .menu {
    display: block;
  }
  .frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-nav {
    display: none;
  }
  .inset {
    margin: 0 0.5rem 0.5rem;
  }
  .rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 1.25rem;
  }
  .rail li:nth-child(4)::before {
    right: 50%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .page {
    padding: 1.5rem 1rem 3rem;
  }
  .home {
    padding: 2.5rem 1rem 3rem;
  }
  .hero {
    padding: 2rem 1rem 0;
  }
  .doc h1 {
    font-size: 1.5rem;
  }
  .rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rail li:nth-child(2n)::before {
    right: 50%;
  }
  .planes > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
  }
  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .bottom {
    padding: 2rem 1rem 1.5rem;
  }
}

/* The header's search: opens the site's ⌘K palette, which also asks rungent. */
.ask {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  height: 2rem;
  padding: 0 0.5rem 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--muted-foreground);
  font: 400 13px var(--sans);
  cursor: pointer;
}
.ask:hover {
  color: var(--foreground);
  border-color: var(--muted-foreground);
}
.ask kbd {
  font: 500 11px var(--mono);
  padding: 0 0.3rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}
.btn-icon {
  width: 2rem;
  padding: 0;
  color: var(--muted-foreground);
}
@media (max-width: 640px) {
  .ask span {
    display: none;
  }
}

/* The architecture (figures.mjs): three columns and the calls between them, in the page's colors. */
.arch {
  margin: 1.5em 0 0;
  color: var(--foreground);
}
.arch svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.hero .arch {
  margin-top: 2.5rem;
  max-width: 60rem;
}
.arch-panel {
  fill: color-mix(in oklab, var(--muted) 55%, transparent);
  stroke: var(--border);
}
.arch-panel.arch-r {
  fill: color-mix(in oklab, var(--primary) 7%, transparent);
  stroke: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.arch-title {
  font: 600 14px var(--sans);
  fill: var(--muted-foreground);
}
.arch-r + .arch-title {
  fill: var(--primary);
  font-size: 16px;
}
.arch-box rect {
  fill: var(--background);
  stroke: var(--border);
}
.arch-name {
  font: 600 14px var(--sans);
  fill: var(--foreground);
}
.arch-role {
  font: 12.5px var(--sans);
  fill: var(--muted-foreground);
}
.arch-flow line {
  stroke: var(--primary);
  stroke-width: 2;
}
.arch-flow polygon {
  fill: var(--primary);
}
.arch-flow text {
  font: 500 12.5px var(--sans);
  fill: var(--foreground);
}
.arch-result line {
  stroke-dasharray: 5 4;
}
.arch-flow-note {
  font: 11.5px var(--mono);
  fill: var(--muted-foreground);
}
.arch-trust rect {
  fill: color-mix(in oklab, var(--primary) 10%, transparent);
  stroke: color-mix(in oklab, var(--primary) 35%, var(--border));
}
.arch-trust text {
  font: 500 13.5px var(--sans);
  fill: var(--foreground);
}
/* A focused figure dims the other parts. */
.arch:not(.arch-is-all) .arch-panel:not(.arch-on) {
  opacity: 0.35;
}
.arch-is-surfaces .arch-panel.arch-s,
.arch-is-runtime .arch-panel.arch-r,
.arch-is-host .arch-panel.arch-h {
  stroke: var(--primary);
  stroke-width: 2;
}
.arch-is-trust .arch-trust rect {
  stroke: var(--primary);
  stroke-width: 2;
}

/* A request, step by step: a rail of numbered steps that wraps on narrow screens. */
.doc .steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.5rem;
  margin: 1.5em 0 0;
  padding: 0;
  list-style: none;
}
.doc .steps li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 0.75rem 0.875rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.doc .steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-foreground);
  font: 600 12px var(--sans);
}
.doc .steps b {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--foreground);
  font-size: 14px;
}
.doc .steps .host {
  background: color-mix(in oklab, var(--muted) 60%, var(--background));
}
.doc .steps .host::before {
  background: var(--muted-foreground);
}

/* Callouts written as blockquotes that start with a bold word. */
.doc blockquote.note {
  color: var(--foreground);
  border-left-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 5%, transparent);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.5em 1em;
}

/* Copy buttons on code blocks (site.js). */
.doc pre {
  position: relative;
}
.copy {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--background);
  color: var(--muted-foreground);
  font: 500 12px var(--sans);
  cursor: pointer;
  opacity: 0;
}
.doc pre:hover .copy,
.copy:focus-visible {
  opacity: 1;
}

/* The overview's rows: a small schematic beside the words about one part. */
.doc .dims {
  display: grid;
  gap: 0.25rem;
  margin: 1.5em 0 0;
}
.doc .dim {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.doc .dim:first-child {
  border-top: 0;
}
.doc .dim h3 {
  margin-top: 0;
}
.doc .dim p {
  margin-top: 0.375em;
}
.mini {
  margin: 0;
}
.mini svg {
  width: 100%;
  height: auto;
}
.mini-box {
  fill: color-mix(in oklab, var(--muted) 70%, transparent);
  stroke: var(--border);
}
.mini-box.mini-on {
  fill: color-mix(in oklab, var(--primary) 22%, transparent);
  stroke: var(--primary);
  stroke-width: 2;
}
.mini-line {
  stroke: color-mix(in oklab, var(--foreground) 35%, transparent);
  stroke-width: 2;
}
.mini-line.mini-on {
  stroke: var(--primary);
  stroke-width: 3;
}
.mini-dash {
  stroke-dasharray: 3 3;
}
.mini-band {
  fill: color-mix(in oklab, var(--muted) 70%, transparent);
}
.mini-band.mini-on {
  fill: var(--primary);
}
@media (max-width: 640px) {
  .doc .dim {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.875rem;
  }
}

/* The site's own rungent (islands/rungent.tsx) wears the site's teal. */
html .rungent-root {
  --rungent-accent: #0d9488;
  --rungent-accent-fg: #ffffff;
  --rungent-accent-soft: #e6f6f4;
  --rungent-font: var(--sans);
}
html .rungent-root[data-rungent-theme="dark"],
html .rungent-root[data-rungent-theme="system"] {
  --rungent-accent: #0d9488;
}
@media (prefers-color-scheme: dark) {
  html .rungent-root[data-rungent-theme="system"] {
    --rungent-accent: #2dd4bf;
    --rungent-accent-fg: #04201d;
    --rungent-accent-soft: #0b3b37;
  }
}

/* Narrow screens get the architecture stacked top to bottom. */
.arch .arch-tall {
  display: none;
}
.arch-trust-text {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  font: 500 13.5px / 1.35 var(--sans);
  color: var(--foreground);
}
@media (max-width: 640px) {
  .arch > svg:first-child {
    display: none;
  }
  .arch .arch-tall {
    display: block;
  }
  .arch .arch-name {
    font-size: 14px;
  }
  .arch .arch-role {
    font-size: 12.5px;
  }
  .arch .arch-title {
    font-size: 14px;
  }
  .top {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }
  .top .btn-icon {
    display: none;
  }
  .lang a,
  .menu summary {
    white-space: nowrap;
  }
  .actions-top {
    gap: 0.375rem;
  }
}

/* Prompts to paste into an agent (```text) wrap instead of scrolling: they are read whole. */
.doc pre:has(> code.language-text) {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding-right: 4.5rem;
}
