/* Base: fonts, tokens, reset, focus. */
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0b0c;
  --bg-sidebar: #0b0c0d;
  --bg-raised: #101214;
  --bg-code: #0d0f10;
  --line: #202428;
  --line-soft: #191c1f;
  --line-strong: #2c3136;
  --text: #f0f2f4;
  --text-body: #a5abb1;
  --text-strong: #dde1e5;
  --text-muted: #7f868d;
  --text-faint: #757c84;
  --accent: #d8a657;
  --accent-soft: rgba(216, 166, 87, 0.14);
  --accent-line: rgba(216, 166, 87, 0.45);
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-width: 292px;
  --content-width: 764px;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #151006;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Layout: sidebar, shell, page frame, pager, footer, icon buttons. */
/* ---------- shell ---------- */

.shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 26px 18px 18px 26px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  flex: none;
  border-radius: 7px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.brand-name {
  font-size: 14.5px;
  font-weight: 570;
  letter-spacing: -0.015em;
}

.brand-tag {
  margin-left: 1px;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  margin-top: 26px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0e1011;
  color: var(--text-muted);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: #111315;
}

.search-trigger svg {
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
}

.search-trigger span {
  flex: 1;
}

.search-trigger kbd,
.search-field kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  background: #0a0b0c;
}

.sidebar-nav {
  margin-top: 28px;
  padding-bottom: 24px;
}

.nav-group {
  margin-bottom: 27px;
}

.nav-group-title {
  margin: 0 0 8px;
  padding-left: 9px;
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-list,
.nav-sub-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  position: relative;
  display: block;
  padding: 5px 9px;
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 120ms ease, background 120ms ease;
}

.nav-link:hover {
  color: var(--text-strong);
  background: #111315;
}

.nav-link.is-active {
  color: var(--text);
  font-weight: 520;
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: -1px;
  width: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-sub-list {
  margin: 3px 0 5px 9px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.nav-sub {
  display: block;
  padding: 4px 5px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 120ms ease;
}

.nav-sub:hover {
  color: var(--text-strong);
}

.nav-sub.is-current {
  color: var(--accent);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.sidebar-foot a {
  color: var(--text-muted);
  text-decoration: none;
}

.sidebar-foot a:hover {
  color: var(--text);
}

.foot-divider {
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}

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

.page {
  margin-left: var(--sidebar-width);
}

.mobile-bar {
  display: none;
}

main {
  width: 100%;
  max-width: calc(var(--content-width) + 112px);
  margin: 0 auto;
  padding: 78px 56px 110px;
}

.prose {
  max-width: var(--content-width);
}

.prose h1 {
  max-width: 18ch;
  margin: 0 0 22px;
  color: var(--text);
  font-size: 44px;
  font-weight: 570;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.prose-home h1 {
  max-width: 14ch;
  font-size: 54px;
}

.prose h1 + p {
  margin: 0 0 36px;
  color: #b5bbc1;
  font-size: 19px;
  line-height: 1.62;
  letter-spacing: -0.008em;
}

.prose p {
  margin: 0 0 21px;
}

.prose h2 {
  position: relative;
  margin: 58px 0 18px;
  color: var(--text);
  font-size: 27px;
  font-weight: 570;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
  scroll-margin-top: 92px;
}

.prose h3 {
  position: relative;
  margin: 38px 0 12px;
  color: var(--text-strong);
  font-size: 18.5px;
  font-weight: 590;
  line-height: 1.35;
  letter-spacing: -0.012em;
  scroll-margin-top: 92px;
}

.heading-link {
  position: absolute;
  top: 0.12em;
  left: -0.72em;
  display: block;
  width: 0.6em;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.55em;
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease;
}

.heading-link::before {
  content: "#";
}

h2:hover > .heading-link,
h3:hover > .heading-link,
.heading-link:focus-visible {
  opacity: 1;
}

.heading-link:hover {
  color: var(--accent);
}

.prose a:not(.heading-link) {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: #3d434a;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

.prose a:not(.heading-link):hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

.prose strong {
  color: var(--text-strong);
  font-weight: 590;
}

.prose em {
  color: var(--text-strong);
}

.prose ul,
.prose ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.prose li {
  margin: 7px 0;
  padding-left: 2px;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose ol > li::marker {
  font-family: var(--mono);
  font-size: 0.82em;
}

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

.prose blockquote {
  margin: 28px 0;
  padding: 2px 0 2px 20px;
  border-left: 1.5px solid var(--accent-line);
  color: #b0b6bc;
}

.prose blockquote p {
  margin: 0 0 12px;
}

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

.prose blockquote strong:first-child {
  color: var(--accent);
}

/* ---------- pager ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  max-width: var(--content-width);
  margin-top: 66px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.pager-link {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
}

.pager-link span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.pager-link strong {
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 520;
}

.pager-link:hover strong {
  color: var(--accent);
}

.pager-next {
  text-align: right;
}

.page-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  max-width: var(--content-width);
  margin-top: 34px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
}

.page-foot a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-foot a:hover {
  color: var(--accent);
}


.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0e1011;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

/* ---------- page transitions ---------- */

/* Cross-document view transitions (Chrome/Edge 126+, Safari 18+). The sidebar
   and the mobile bar keep their names, so they stay put while the content
   crossfades and the scroll position is reset behind the snapshot. */
@view-transition {
  navigation: auto;
}

.sidebar {
  view-transition-name: sidebar;
}

.mobile-bar {
  view-transition-name: topbar;
}

::view-transition-old(sidebar),
::view-transition-new(sidebar),
::view-transition-old(topbar),
::view-transition-new(topbar) {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 1ms !important;
  }
}

/* Content: prose, code, tables, figures, the mobile system map. */
/* ---------- code ---------- */

.prose :not(pre) > code {
  padding: 2px 5px;
  border: 1px solid #252a2f;
  border-radius: 4px;
  background: #141719;
  color: #d9dee3;
  font-family: var(--mono);
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

.code-block {
  margin: 28px 0;
  border: 1px solid #22272b;
  border-radius: 9px;
  background: var(--bg-code);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 35px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid #1d2125;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.01em;
}

.copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease;
}

.copy:hover {
  color: var(--text-strong);
  background: #191c1f;
}

.copy.is-copied {
  color: var(--accent);
}

.copy svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.code-block pre {
  margin: 0;
  padding: 15px 18px 17px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.code-block code {
  display: block;
  color: #c7ccd1;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 2;
  white-space: pre;
}

/* ---------- tables ---------- */

.table-wrap {
  margin: 28px 0;
  border: 1px solid #22272b;
  border-radius: 9px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.55;
}

.table-wrap th {
  padding: 10px 14px;
  border-bottom: 1px solid #262b30;
  background: #101214;
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 560;
  text-align: left;
  white-space: nowrap;
}

.table-wrap td {
  padding: 11px 14px;
  border-bottom: 1px solid #1a1e21;
  color: #9da4ab;
  vertical-align: top;
}

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

.table-wrap td:first-child {
  color: #b9bfc5;
}

.table-wrap code {
  white-space: nowrap;
}

/* ---------- figures ---------- */

.diagram {
  margin: 40px 0 48px;
  padding: 8px 8px 0;
  border: 1px solid #1f2428;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(216, 166, 87, 0.035), transparent 60%),
    #0b0d0e;
  overflow: hidden;
}

.diagram svg {
  width: 100%;
  height: auto;
}

.diagram .d-name {
  fill: #e3e6e9;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.diagram .d-sub {
  fill: #858c94;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
}

.diagram .d-base {
  fill: #6d747b;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}


.diagram figcaption {
  margin: 2px -8px 0;
  padding: 13px 18px 15px;
  border-top: 1px solid #1a1e21;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
}

.diagram figcaption strong {
  color: var(--text-muted);
  font-weight: 500;
}

.diagram-mobile {
  display: none;
}

/* Chrome: search dialog, 404 page. */
/* ---------- search ---------- */

.search-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 13vh 16px 24px;
  background: rgba(5, 6, 7, 0.72);
  backdrop-filter: blur(7px);
}

.search-dialog[hidden] {
  display: none;
}

.search-panel {
  width: min(640px, 100%);
  max-height: min(70vh, 620px);
  display: flex;
  flex-direction: column;
  border: 1px solid #2a3035;
  border-radius: 12px;
  background: #101214;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}

.search-field svg {
  flex: none;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 1.4;
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search-field input::placeholder {
  color: var(--text-faint);
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-results {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.search-result {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  text-decoration: none;
}

.search-result[aria-selected="true"],
.search-result:hover {
  background: #181b1e;
}

.search-result .result-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 2px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 10px;
}

.search-result .result-title {
  display: block;
  color: var(--text-strong);
  font-size: 13.5px;
  font-weight: 520;
  line-height: 1.4;
}

.search-result .result-text {
  display: -webkit-box;
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result mark {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 2px;
}

.search-empty {
  padding: 26px 16px;
  color: var(--text-faint);
  font-size: 13px;
}

.search-hint {
  margin: 0;
  padding: 10px 15px 12px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.search-hint span {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9.5px;
}

body.search-open,
body.menu-open {
  overflow: hidden;
}

.menu-backdrop {
  display: none;
}

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

.not-found main {
  max-width: 620px;
  margin: 0 auto;
  padding: 16vh 24px;
}

.not-found .eyebrow {
  margin: 48px 0 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.not-found h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 40px;
  font-weight: 570;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-link {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: var(--accent-line);
  text-underline-offset: 4px;
}

/* Responsive and motion. All media queries live here. */
@media (prefers-reduced-motion: no-preference) {
  .diagram .flow {
    stroke-opacity: 0;
    animation: flow-in 700ms cubic-bezier(0.2, 0.65, 0.2, 1) 200ms forwards;
  }

  @keyframes flow-in {
    to {
      stroke-opacity: 0.85;
    }
  }
}
@media (max-width: 720px) {
  .diagram > svg {
    display: none;
  }

  .diagram-mobile {
    display: block;
    padding: 12px 14px 6px;
  }

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

  .map-stack li {
    position: relative;
    margin: 0;
    padding: 0 0 17px 23px;
  }

  .map-stack li::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 0;
    left: 4px;
    width: 1px;
    background: #2c3238;
  }

  .map-stack li:last-child::before {
    display: none;
  }

  .map-stack li::after {
    content: "";
    position: absolute;
    top: 5px;
    left: 1px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: #0b0d0e;
  }

  .map-name {
    display: block;
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 550;
    line-height: 1.3;
  }

  .map-sub {
    display: block;
    margin-top: 1px;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.5;
  }

  .map-branch {
    margin-top: 2px;
    padding-top: 13px;
    border-top: 1px dashed #2c3238;
  }

  .map-branch p {
    margin: 0 0 8px;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 9.5px;
  }

  .map-branch > div {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .map-branch span {
    padding: 6px 7px;
    border: 1px solid #252a2e;
    border-radius: 4px;
    background: #0e1011;
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.3;
    text-align: center;
  }

  .map-clock {
    margin: 12px 0 0;
    color: var(--text-faint);
    font-family: var(--mono);
    font-size: 9.5px;
    line-height: 1.5;
  }

  .diagram figcaption {
    padding: 12px 14px 14px;
    font-size: 10px;
  }
}
@media (max-width: 960px) {
  body.menu-open .menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(5, 6, 7, 0.55);
    backdrop-filter: blur(2px);
  }
}
@media (max-width: 1080px) {
  :root {
    --content-width: 720px;
  }

  main {
    padding-right: 44px;
    padding-left: 44px;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: min(320px, 86vw);
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 60px rgba(0, 0, 0, 0.4);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .page {
    margin-left: 0;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 11, 12, 0.88);
    backdrop-filter: blur(12px);
  }

  .brand-mobile {
    flex: 1;
  }

  .brand-mobile .brand-mark {
    width: 22px;
    height: 22px;
  }

  main {
    max-width: calc(var(--content-width) + 48px);
    padding: 42px 24px 84px;
  }

  .prose h1 {
    font-size: 39px;
  }

  .prose-home h1 {
    font-size: 45px;
  }

  .prose h2 {
    margin-top: 52px;
  }

  .heading-link {
    display: none;
  }

  .search-dialog {
    padding-top: 9vh;
  }
}
@media (max-width: 600px) {
  main {
    padding: 32px 19px 72px;
  }

  .prose h1 {
    font-size: 34px;
  }

  .prose-home h1 {
    font-size: 38px;
  }

  .prose h1 + p {
    font-size: 17.5px;
    margin-bottom: 34px;
  }

  .prose h2 {
    font-size: 23px;
    margin-top: 46px;
  }

  .prose h3 {
    font-size: 17px;
  }

  .prose p {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .code-block {
    margin-right: -4px;
    margin-left: -4px;
  }

  .code-block code {
    font-size: 11.5px;
  }

  .table-wrap {
    margin-right: -4px;
    margin-left: -4px;
  }

  .table-wrap table {
    font-size: 12.5px;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 9px 11px;
  }

  .diagram {
    margin-right: -6px;
    margin-left: -6px;
  }

  .diagram figcaption {
    font-size: 10px;
  }

  .pager {
    gap: 16px;
  }

  .page-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .search-dialog {
    padding: 0;
    place-items: stretch;
  }

  .search-panel {
    width: 100%;
    max-height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .search-hint {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
@media print {
  .sidebar,
  .mobile-bar,
  .pager,
  .page-foot,
  .search-dialog,
  .heading-link {
    display: none !important;
  }

  .page {
    margin: 0;
  }

  main {
    max-width: none;
    padding: 0;
  }

  body {
    background: #fff;
    color: #222;
  }

  .prose h1,
  .prose h2,
  .prose h3,
  .prose strong {
    color: #111;
  }
}
