/* The shell every page shares: colour and type tokens, the page scrollbars, the top bar, buttons,
   code figures, the footer, and the focus and selection rules. */

/* moonvec — a printed-instrument look for a numerical library.
   Palette and rhythm borrow the gravity of scientific documentation: deep navy, teal, warm paper,
   thin rules, and a serif voice for headings. */

:root {
  --paper: #f7f5f0;
  --surface: #fffefa;
  --surface-2: #f0ede5;
  --panel: #0e2a3a;
  --panel-2: #123346;
  --panel-ink: #eaf2f4;
  --panel-dim: #8fadb9;
  --ink: #0e2430;
  --ink-2: #445b66;
  --ink-3: #5e7078;
  --rule: #dcd8ce;
  --rule-2: #c6c1b5;
  --blue: #1b5c88;
  --blue-soft: #b9d3e3;
  --teal: #3d97ad;
  --amber: #b8832b;
  --code-bg: #0c2130;
  --code-ink: #e6eef1;
  --code-dim: #7f9aa6;
  --shadow: 0 1px 2px rgb(14 36 48 / 6%), 0 12px 32px -18px rgb(14 36 48 / 30%);
  --glass: color-mix(in srgb, var(--surface) 72%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 90%, transparent);
  --shadow-soft: 0 1px 1px rgb(14 36 48 / 5%), 0 14px 30px -24px rgb(14 36 48 / 36%);
  --shadow-lift: 0 2px 4px rgb(14 36 48 / 7%), 0 26px 44px -26px rgb(14 36 48 / 40%);
  --wash-warm: color-mix(in srgb, var(--amber) 14%, transparent);
  --wash-cool: color-mix(in srgb, var(--blue) 9%, transparent);
  /* The two planes of the lattice: a surface that hides the far half of the lower one while letting
     the dot grid faintly through. Dark needs a larger share of ink to sit at the same distance above
     its card, which is why this is a token and not a formula. */
  --plane: color-mix(in srgb, var(--ink) 11%, var(--glass-strong));
  --plane-far: color-mix(in srgb, var(--ink) 7%, var(--glass));
  --ease: cubic-bezier(0.2, 0.62, 0.2, 1);
  --fast: 140ms;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "Source Code Pro", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1180px;
  --radius: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1720;
    --surface: #0f1f2a;
    --surface-2: #132734;
    --panel: #08141c;
    --panel-2: #0d2230;
    --panel-ink: #e6eef1;
    --panel-dim: #7f9aa6;
    --ink: #e8eef0;
    --ink-2: #a8bcc6;
    --ink-3: #7c919b;
    --rule: #1f3340;
    --rule-2: #2b4553;
    --blue: #7db9dd;
    --blue-soft: #244a60;
    --teal: #66c2d4;
    --amber: #d7a852;
    --code-bg: #07131b;
    --code-ink: #dfe9ec;
    --code-dim: #6f8b97;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -20px rgb(0 0 0 / 70%);
  --glass: color-mix(in srgb, var(--surface) 74%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 92%, transparent);
  --shadow-soft: 0 1px 2px rgb(0 0 0 / 26%), 0 18px 38px -26px rgb(0 0 0 / 66%);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / 32%), 0 30px 52px -28px rgb(0 0 0 / 74%);
  --wash-warm: color-mix(in srgb, var(--amber) 8%, transparent);
  --wash-cool: color-mix(in srgb, var(--teal) 10%, transparent);
  --plane: color-mix(in srgb, var(--ink) 18%, var(--glass-strong));
  --plane-far: color-mix(in srgb, var(--ink) 10%, var(--glass));
    --glass: color-mix(in srgb, var(--surface) 74%, transparent);
    --glass-strong: color-mix(in srgb, var(--surface) 92%, transparent);
    --shadow-soft: 0 1px 2px rgb(0 0 0 / 26%), 0 18px 38px -26px rgb(0 0 0 / 66%);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 32%), 0 30px 52px -28px rgb(0 0 0 / 74%);
    --wash-warm: color-mix(in srgb, var(--amber) 8%, transparent);
    --wash-cool: color-mix(in srgb, var(--teal) 10%, transparent);
    --plane: color-mix(in srgb, var(--ink) 18%, var(--glass-strong));
    --plane-far: color-mix(in srgb, var(--ink) 10%, var(--glass));
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0b1720;
  --surface: #0f1f2a;
  --surface-2: #132734;
  --panel: #08141c;
  --panel-2: #0d2230;
  --panel-ink: #e6eef1;
  --panel-dim: #7f9aa6;
  --ink: #e8eef0;
  --ink-2: #a8bcc6;
  --ink-3: #7c919b;
  --rule: #1f3340;
  --rule-2: #2b4553;
  --blue: #7db9dd;
  --blue-soft: #244a60;
  --teal: #66c2d4;
  --amber: #d7a852;
  --code-bg: #07131b;
  --code-ink: #dfe9ec;
  --code-dim: #6f8b97;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -20px rgb(0 0 0 / 70%);
  --glass: color-mix(in srgb, var(--surface) 74%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 92%, transparent);
  --shadow-soft: 0 1px 2px rgb(0 0 0 / 26%), 0 18px 38px -26px rgb(0 0 0 / 66%);
  --shadow-lift: 0 2px 6px rgb(0 0 0 / 32%), 0 30px 52px -28px rgb(0 0 0 / 74%);
  --wash-warm: color-mix(in srgb, var(--amber) 8%, transparent);
  --wash-cool: color-mix(in srgb, var(--teal) 10%, transparent);
  --plane: color-mix(in srgb, var(--ink) 18%, var(--glass-strong));
  --plane-far: color-mix(in srgb, var(--ink) 10%, var(--glass));
  color-scheme: dark;
}

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

html,
button,
input,
textarea,
select {
  /* Readers should see the characters they have to type, not the ligature the font would draw. Form
     controls do not inherit, so they are named here as well. */
  font-variant-ligatures: no-contextual;
}

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  /* Two washes, warm from the left and cool from the right: the paper is lit rather than flat, and
     every translucent surface below picks up some of that light. */
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 640px at 10% -14%, var(--wash-warm), transparent 70%),
    radial-gradient(1000px 720px at 100% 0%, var(--wash-cool), transparent 72%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: color-mix(in srgb, var(--teal) 34%, transparent);
  color: var(--ink);
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal);
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code,
pre,
kbd,
samp {
  font-family: var(--mono);
}

:not(pre) > code {
  font-size: 0.86em;
  padding: 0.08em 0.34em;
  border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  overflow-wrap: anywhere;
}

/* ---------- page scrollbar: hidden at the top, present once the page moves ---------- */

@supports selector(::-webkit-scrollbar) {
  html::-webkit-scrollbar {
    width: 11px;
    height: 11px;
  }
  html::-webkit-scrollbar-track {
    background: transparent;
  }
  html::-webkit-scrollbar-thumb {
    border-radius: 99px;
    border: 3px solid transparent;
    background-clip: content-box;
    background-color: color-mix(in srgb, var(--ink) 26%, transparent);
  }
  html::-webkit-scrollbar-thumb:hover {
    background-color: color-mix(in srgb, var(--ink) 44%, transparent);
  }
  html.at-top::-webkit-scrollbar-thumb {
    background-color: transparent;
  }
}

@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink) 26%, transparent) transparent;
  }
  html.at-top {
    scrollbar-color: transparent transparent;
  }
}

/* ---------- inner scroll areas: thin, dim at rest, deeper under the pointer ---------- */

.scroller {
  overflow: auto;
  overscroll-behavior: contain;
}

@supports selector(::-webkit-scrollbar) {
  :is(.scroller, pre, .guide-nav ol)::-webkit-scrollbar {
    width: 9px;
    height: 9px;
  }
  :is(.scroller, pre, .guide-nav ol)::-webkit-scrollbar-track {
    background: transparent;
  }
  :is(.scroller, pre, .guide-nav ol)::-webkit-scrollbar-thumb {
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: content-box;
    background-color: color-mix(in srgb, var(--ink) 13%, transparent);
  }
  :is(.scroller, pre, .guide-nav ol):hover::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--ink) 30%, transparent);
  }
}

@supports not selector(::-webkit-scrollbar) {
  :is(.scroller, pre, .guide-nav ol) {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--ink) 18%, transparent) transparent;
  }
}

/* ---------- shell ---------- */

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

@media (width <= 600px) {
  .wrap {
    width: min(100% - 32px, var(--wrap));
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}

html:not(.at-top) .topbar {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--rule) 70%, transparent),
    0 14px 28px -26px rgb(14 36 48 / 45%);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 62px;
  flex-wrap: wrap;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  /* Measured in rem, so the mark, the controls and the glyphs follow the reader's own type size
     rather than sitting at a fixed number of pixels beside text that has grown. */
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
}

.brand-name {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.brand-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid var(--rule-2);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule-2);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--teal);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--ink);
  border-color: var(--rule);
  background: var(--surface);
}

.icon-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

@media (width <= 860px) {
  .topbar-inner {
    gap: 10px 20px;
  }
  .brand-sub {
    display: none;
  }
  .nav {
    order: 3;
    width: 100%;
    gap: 22px;
    padding-bottom: 6px;
    overflow-x: auto;
  }
  .nav a {
    white-space: nowrap;
    font-size: 14px;
  }
}

@media (width <= 420px) {
  .nav {
    gap: 18px;
  }
}

/* ---------- shared type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  user-select: none;
}

.section-index {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--teal);
  user-select: none;
}

.lead {
  font-size: clamp(17px, 1.35vw, 19.5px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
}

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

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: calc(0.64em + 0.08em) 1.1em calc(0.64em - 0.08em);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
    border-color var(--fast) var(--ease), transform var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease);
}

.btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -18px rgb(14 36 48 / 70%);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
  flex: none;
  transition: transform var(--fast) var(--ease);
}

.btn:hover svg {
  transform: translateX(2px);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}

.btn.ghost:hover {
  border-color: var(--ink);
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.install {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--rule);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 9px 10px 9px 14px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  max-width: 100%;
}

.install .prompt {
  color: var(--teal);
  user-select: none;
}

.install .cmd {
  overflow-wrap: anywhere;
}

.copy {
  margin-left: 6px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: calc(0.42em + 0.06em) 0.66em calc(0.42em - 0.06em);
  /* Wide enough for "Copied", so the label change does not move the code block's head. */
  min-width: 4.7em;
  text-align: center;
  border-radius: 2px;
  cursor: pointer;
  user-select: none;
}

.copy {
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease),
    background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.copy:hover {
  color: var(--ink);
  border-color: var(--rule-2);
  background: var(--glass-strong);
}
.copy:active {
  transform: translateY(1px);
}
.copy[data-copied="true"] {
  color: var(--teal);
  border-color: color-mix(in srgb, var(--teal) 45%, var(--rule));
}

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

.code-figure {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--code-ink) 12%, transparent);
  background: color-mix(in srgb, #fff 3%, transparent);
  user-select: none;
}

.code-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--code-dim);
}

.code-head .copy {
  margin-left: auto;
  background: transparent;
  border-color: color-mix(in srgb, var(--code-ink) 18%, transparent);
  color: var(--code-dim);
}

.code-head .copy:hover {
  color: var(--code-ink);
  border-color: color-mix(in srgb, var(--code-ink) 34%, transparent);
}

.code-figure pre {
  margin: 0;
  padding: 15px 18px 17px;
  font-size: 13px;
  line-height: 1.62;
  color: var(--code-ink);
  overflow-x: auto;
  tab-size: 2;
}

.code-figure pre code {
  font: inherit;
  white-space: pre;
}

.tok-key {
  color: #8fc7e8;
}

.tok-fn {
  color: #d9c48a;
}

.tok-str {
  color: #9fd3a8;
}

.tok-num {
  color: #e3b07a;
}

.tok-com {
  color: #6d8792;
  font-style: italic;
}

.tok-type {
  color: #c3a8e0;
}

.output {
  margin: 0;
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
  padding: 12px 18px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre;
}

.output .label {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
  user-select: none;
}

.figure-stack .output {
  margin-top: -1px;
}

.page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--rule);
}

.page-head h1 {
  font-size: clamp(2.1rem, 3.8vw, 3rem);
  margin: 14px 0 14px;
}

.note {
  position: relative;
  padding: 14px 18px 14px 20px;
  background: color-mix(in srgb, var(--teal) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--rule));
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0 0 20px;
}

.note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--teal);
  clip-path: polygon(0 0, 100% 10%, 100% 90%, 0 100%);
}

.note strong {
  color: var(--ink);
}

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

.footer {
  border-top: 1px solid var(--rule);
  padding: 36px 0 46px;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer .brand-name {
  font-size: 13px;
}

.footer-note {
  font-size: 13px;
  color: var(--ink-3);
  max-width: 44ch;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

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

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------- utilities ---------- */

.sr-only {
  position: absolute;
  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(--blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 14px;
}

.skip-link:focus {
  top: 10px;
}

/* theme toggle: one glyph of the pair is drawn at a time */

.icon-btn .i-sun {
  display: none;
}

html[data-theme="dark"] .icon-btn .i-sun {
  display: block;
}

html[data-theme="dark"] .icon-btn .i-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .icon-btn .i-sun {
    display: block;
  }
  html:not([data-theme="light"]) .icon-btn .i-moon {
    display: none;
  }
}


/* A drag across the page takes the article, not the shell. Only text that can be copied — headings,
   prose, code and its output, reference signatures, parameter tables, the command in the install
   line — takes part in a selection. The bars, the labels, the controls and every diagram are chrome:
   one list, shared by all four pages, so a new page cannot forget one of them. */
:where(
  .brand,
  .brand-sub,
  .nav,
  .nav-tools,
  .icon-btn,
  .btn,
  .copy,
  .skip-link,
  .eyebrow,
  .hero-note,
  .section-index,
  .card-index,
  .install .prompt,
  .code-head,
  .output .label,
  .panel,
  .panel-head,
  .panel-foot,
  .array-frame,
  .buffer-figure,
  .buffer-row,
  .buffer-caption,
  .stride-grid,
  .bcast-label,
  .bcast-op,
  .bcast-join,
  .bcast-grid,
  .bcast-note,
  .space-figure,
  .space-caption,
  .space-strip,
  .space-strip-label,
  .space-readout,
  .numbers,
  .package .path,
  .package ul,
  .package li,
  .footer-links,
  .guide-nav,
  .api-side,
  .api-package > header,
  .operand-label,
  .grid-frame,
  .picker,
  .demo-tag,
  .demo-actions,
  .field-label,
  .stage-legend,
  .fit-readout dt
) {
  -webkit-user-select: none;
  user-select: none;
}

/* A diagram must not start a drag-and-drop of its own file. */
svg,
img {
  -webkit-user-drag: none;
  user-select: none;
}

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (width <= 900px) {
  /* A fixed backdrop is the one thing a phone scrolls badly. */
  body {
    background-attachment: scroll;
  }
}

/* ---------- inline icons ----------

   An arrow in running text is a glyph, so it is drawn rather than typed: one symbol, rotated, sized
   in em. It takes the size of the text it sits in and the colour of the text around it. */

/* Not `display: none`: a symbol inside a hidden tree is not reliably resolved by every engine. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  /* A filled triangle has more optical weight than a letter of the same height, so it is set a
     little smaller than the em and raised to sit on the baseline. */
  width: 0.72em;
  height: 0.72em;
  display: inline-block;
  vertical-align: -0.04em;
  fill: currentColor;
  flex: none;
}

.ico.r {
  transform: rotate(90deg);
}

.ico.d {
  transform: rotate(180deg);
}

.ico.l {
  transform: rotate(-90deg);
}

.key-pair {
  display: inline-flex;
  gap: 0.36em;
  align-items: center;
  vertical-align: -0.02em;
}
