/* LOOTOUT docs, "Frontier at war" (DECISIONS 5 Nov 2026). Two faces: Lilita One (--font-display) for headings,
   the nav, section and callout titles, buttons, labels and the search panel's header; Urbanist (--sans) for reading
   text, tables, code captions and small UI. The LOOTOUT wordmark is its own art. Colours come from palette v3
   (art/palette.txt): battle-worn steel and plate for the header band and the nav, scrub olive and khaki, brass for
   links and actions, rust for warnings, one team red (Join, danger), ink outlines. Never cream, never beige; every
   text colour below is measured AA against the surface it sits on, in both themes. */

@font-face {
  font-family: 'Urbanist';
  src:
    url('/docs/_assets/fonts/Urbanist-wght.woff2') format('woff2'),
    url('/docs/_assets/fonts/Urbanist-wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* the landing's own file (site/public/fonts, OFL text beside it), copied in by build.mjs: one source, never two */
@font-face {
  font-family: 'Lilita One';
  src: url('/docs/_assets/fonts/lilita-one-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* metric-matched fallback while it loads, so nothing jumps: Arial Bold scaled to Lilita One's advance widths
   (87.3%, measured in Chrome over a mixed heading sample) with Lilita's own ascent and descent (hhea 923 / 220 of
   1000), divided by that scale */
@font-face {
  font-family: 'Lilita One Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'), local('Helvetica-Bold');
  font-weight: 400;
  font-style: normal;
  size-adjust: 87.3%;
  ascent-override: 105.7%;
  descent-override: 25.2%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light;
  /* the page: cool field-manual white, never cream */
  --bg: #eef0f1;
  --bg-elev: #ffffff;
  --bg-soft: #e3e7ea;
  --hover: #dde2e6;
  --ink: #1f1032;
  --body: #2a2933;
  --muted: #4f5565;
  --line: #c4cad0;
  --line-2: #d9dee2;
  /* brass for actions and markers (the landing's button brass, ink on it 8.8:1); its deep step (palette haz2) for
     brass text on light */
  --accent: #e3ad44;
  --accent-ink: #7c5520;
  --link: #85561a;
  --link-line: rgba(176, 125, 44, 0.55);
  --active-bg: rgba(207, 159, 69, 0.2);
  /* a selected row in a pop-up: cool steel, crisp, never a cream tint */
  --sel-bg: #e3e7ea;
  --code-bg: #e6eaed;
  /* a search match: solid brass under ink (8.8:1), never a sand wash (QA 5 Nov) */
  --mark: #e3ad44;
  --focus: #1f1032;
  --shadow: 0 10px 30px -16px rgba(20, 19, 27, 0.4);
  --topbar-bg: #2f3140;
  /* ink outlines and hard comic shadows (cards, plates, buttons) */
  --edge: #1f1032;
  --edge-soft: rgba(31, 16, 50, 0.22);
  --plate-hi: rgba(255, 255, 255, 0.7);
  --rivet: #8d949e;
  --rivet-hi: #e9ecee;
  /* hover is a glow, never a lift or a size change (DECISIONS 22 Oct 10:00): a 3 px ring, under any shadow the
     element already has. Brass now, not the old cyan */
  --glow: 0 0 0 3px rgba(227, 173, 68, 0.55);
  /* one team red (palette red2, white text 6.4:1): danger only */
  --team: #b52337;
  --team-hi: #c62a3b;
  --on-team: #ffffff;
  /* the waitlist call to action, the landing's own .top-cta in both themes: brass under ink (8.8:1), the stamped
     bevel (a lit top line, a shaded foot) */
  --cta: #e3ad44;
  --cta-hi: #f2c766;
  --on-cta: #1f1032;
  --cta-bevel: linear-gradient(rgba(255, 255, 255, 0.34) 0 2px, transparent 2px calc(100% - 3px), rgba(31, 16, 50, 0.2) calc(100% - 3px));
  /* the steel band (header, nav, drawer, search header): the same battle-worn plate in both themes */
  --steel: #2a2c38;
  --steel-2: #393b4b;
  --steel-3: #23222e;
  --steel-line: #4a4e5e;
  --steel-edge: #14131b;
  --steel-ink: #eef0f1;
  --steel-muted: #b3b9c0;
  --steel-brass: #e3be6a;
  --steel-hover: rgba(255, 255, 255, 0.07);
  --steel-active: rgba(227, 190, 106, 0.16);
  /* brushed and worn: fine streaks, and a scuff of lighter wear near the top */
  --steel-grain:
    radial-gradient(140% 70% at 18% 0%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 62%),
    repeating-linear-gradient(
      178deg,
      rgba(255, 255, 255, 0.016) 0 1px,
      rgba(255, 255, 255, 0) 1px 3px,
      rgba(0, 0, 0, 0.04) 3px 4px,
      rgba(0, 0, 0, 0) 4px 7px
    );
  /* the landing's 8 x 8 pixel coin (plum ink rim, gold face, gold-3 shade, warm-white shine), crisp at any size */
  --coin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%231F1032' d='M2 0h4v1H2zM1 1h1v1H1zM6 1h1v1H6zM0 2h1v4H0zM7 2h1v4H7zM1 6h1v1H1zM6 6h1v1H6zM2 7h4v1H2z'/%3E%3Cpath fill='%23FDE77C' d='M2 1h4v1H2zM1 2h6v4H1zM2 6h4v1H2z'/%3E%3Cpath fill='%23DC800C' d='M6 2h1v4H6zM2 6h4v1H2zM4 3h1v2H4z'/%3E%3Cpath fill='%23FFFDD6' d='M2 2h1v2H2zM3 2h1v1H3z'/%3E%3C/svg%3E");

  /* callouts are stamped plates: a tinted plate, a coloured strip down the left, an ink outline, two rivets */
  --note-bg: #e9eef4;
  --note-line: #54607b;
  --note-ink: #2e3d5c;
  --tip-bg: #e8ecd9;
  --tip-line: #5b6236;
  --tip-ink: #3f4524;
  --warning-bg: #f7e6da;
  --warning-line: #934a2b;
  --warning-ink: #7a3a20;
  --danger-bg: #fbe1e3;
  --danger-line: #b52337;
  --danger-ink: #9a1c2e;
  --beta-bg: #f4f5f6;
  --beta-line: #b07d2c;
  --beta-ink: #6b4a14;
  --lore-bg: #e7e8dc;
  --lore-line: #6c6f4c;
  --lore-ink: #3f4129;

  --sans: 'Urbanist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Lilita One', 'Lilita One Fallback', 'Arial Black', ui-sans-serif, system-ui, sans-serif;
  --topbar-h: 64px;
}

/* dark: soot and plate, bright text, brass that glows */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #18181f;
    --bg-elev: #22232c;
    --bg-soft: #272833;
    --hover: #2e303b;
    --ink: #f3f4f1;
    --body: #d9dde1;
    --muted: #a3aab3;
    --line: #3a3c4a;
    --line-2: #2d2f3a;
    --accent: #e3be6a;
    --accent-ink: #e3be6a;
    --link: #e8c477;
    --link-line: rgba(227, 190, 106, 0.5);
    --active-bg: rgba(227, 190, 106, 0.14);
    --sel-bg: #31333f;
    --code-bg: #2a2b36;
    /* ink on the wash: 6.0:1 on a row, 5.2:1 on the selected row */
    --mark: rgba(227, 190, 106, 0.36);
    --focus: #e3be6a;
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.75);
    --topbar-bg: #2f3140;
    --edge: #0c0b10;
    --edge-soft: rgba(0, 0, 0, 0.45);
    --plate-hi: rgba(255, 255, 255, 0.06);
    --rivet: #4c5060;
    --rivet-hi: #8d949e;
    --glow: 0 0 0 3px rgba(227, 190, 106, 0.42);
    --steel: #252731;
    --steel-2: #343644;
    --steel-3: #1d1e27;

    --note-bg: #232a36;
    --note-line: #7d8ea5;
    --note-ink: #b8c8de;
    --tip-bg: #262b1d;
    --tip-line: #7a8148;
    --tip-ink: #c4cb8c;
    --warning-bg: #2f2019;
    --warning-line: #b86c3a;
    --warning-ink: #e6a774;
    --danger-bg: #33191e;
    --danger-line: #eb493f;
    --danger-ink: #ff9a8c;
    --beta-bg: #25262f;
    --beta-line: #cf9f45;
    --beta-ink: #e3be6a;
    --lore-bg: #282920;
    --lore-line: #8c8d62;
    --lore-ink: #cfcfa8;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #18181f;
  --bg-elev: #22232c;
  --bg-soft: #272833;
  --hover: #2e303b;
  --ink: #f3f4f1;
  --body: #d9dde1;
  --muted: #a3aab3;
  --line: #3a3c4a;
  --line-2: #2d2f3a;
  --accent: #e3be6a;
  --accent-ink: #e3be6a;
  --link: #e8c477;
  --link-line: rgba(227, 190, 106, 0.5);
  --active-bg: rgba(227, 190, 106, 0.14);
  --sel-bg: #31333f;
  --code-bg: #2a2b36;
  --mark: rgba(227, 190, 106, 0.36);
  --focus: #e3be6a;
  --shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.75);
  --topbar-bg: #2f3140;
  --edge: #0c0b10;
  --edge-soft: rgba(0, 0, 0, 0.45);
  --plate-hi: rgba(255, 255, 255, 0.06);
  --rivet: #4c5060;
  --rivet-hi: #8d949e;
  --glow: 0 0 0 3px rgba(227, 190, 106, 0.42);
  --steel: #252731;
  --steel-2: #343644;
  --steel-3: #1d1e27;

  --note-bg: #232a36;
  --note-line: #7d8ea5;
  --note-ink: #b8c8de;
  --tip-bg: #262b1d;
  --tip-line: #7a8148;
  --tip-ink: #c4cb8c;
  --warning-bg: #2f2019;
  --warning-line: #b86c3a;
  --warning-ink: #e6a774;
  --danger-bg: #33191e;
  --danger-line: #eb493f;
  --danger-ink: #ff9a8c;
  --beta-bg: #25262f;
  --beta-line: #cf9f45;
  --beta-ink: #e3be6a;
  --lore-bg: #282920;
  --lore-line: #8c8d62;
  --lore-ink: #cfcfa8;
}

/* ---------------------------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 20px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
}
::selection {
  background: #e3be6a;
  color: #1f1032;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
/* On the steel (the header, the nav and its phone drawer, the search pop-up's header, code blocks, the pixel
   inspector, the figure's zoom pill and the skip link, which shows over the header) the ring is brass in both
   themes: an ink ring there measures 1.1 to 1.6:1, brass 7.8:1 against the steel (WCAG 1.4.11 and 2.4.7; QA 5 Nov).
   The light plates keep the ink ring. */
.topbar,
.sidebar,
.search-head,
.code,
.inspect,
.fig-zoom,
.skip {
  --focus: var(--steel-brass);
}
/* Lilita One's ’ and hyphen, in display text only (lib/typeset.mjs marks them; QA 5 Nov): its ’ leaves about 0.1 em of
   air before the next letter ("What’ s"), and its hyphen is 0.455 em of ink, so "Stand-in" read as an en dash. The ’
   is pulled in, the hyphen narrowed to 0.27 em of ink, and a hyphenated word never breaks (.cw). The font's metrics
   are never edited (the OFL's Reserved Font Name). */
.ap {
  margin-inline: -0.03em -0.06em;
}
.cw {
  white-space: nowrap;
}
.hy {
  display: inline-block;
  transform: scaleX(0.6);
  margin-inline: -0.09em;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #1f1032;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  padding: 10px 14px;
  border: 2px solid #1f1032;
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.i {
  flex: none;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover {
  background: var(--hover);
}

/* ------------------------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--topbar-h);
  background: var(--steel-grain), linear-gradient(180deg, #3d4051 0%, var(--topbar-bg) 58%, #282a36 100%) var(--topbar-bg);
  border-bottom: 3px solid var(--steel-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 20px -14px rgba(0, 0, 0, 0.7);
  color: var(--steel-ink);
}
.topbar .icon-btn {
  color: var(--steel-ink);
}
.topbar .icon-btn:hover {
  background: var(--steel-hover);
}
.topbar-in {
  max-width: 1480px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand {
  display: block;
  flex: none;
  line-height: 0;
}
.brand img {
  height: 30px;
  width: auto;
  display: block;
}
.brand-docs {
  flex: none;
  margin-left: 4px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--steel-line);
  color: var(--steel-ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 340px;
  height: 40px;
  margin-left: 28px;
  padding: 0 8px 0 12px;
  border: 1.5px solid var(--steel-line);
  border-radius: 10px;
  background: rgba(10, 10, 14, 0.28);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.22);
  color: var(--steel-muted);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}
.search-btn:hover {
  border-color: var(--steel-brass);
}
.search-btn kbd {
  border-color: var(--steel-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--steel-ink);
}
.search-btn-text {
  flex: 1;
  text-align: left;
}
.search-kbd {
  font-size: 12px;
}
.top-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.top-links a {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--steel-ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  text-decoration: none;
}
/* The waitlist call to action: brass with its coin and an ink edge, in both themes, the landing's own Pick your
   username button, so the action keeps one colour from the docs to the city (29 Oct audit, V-9; 5 Nov look QA: brass
   is the primary action, red is Play and danger). Ink on brass 8.8:1 */
.top-links a:first-child {
  gap: 7px;
  padding: 0 14px 0 9px;
  background: var(--cta-bevel), var(--cta);
  color: var(--on-cta);
  box-shadow: 0 3px 0 var(--steel-edge);
  border: 2px solid var(--steel-edge);
  height: 34px;
  transition:
    background 0.12s,
    box-shadow 0.12s;
}
.join-coin {
  flex: none;
  width: 18px;
  height: 18px;
  background: var(--coin) center / 100% 100% no-repeat;
}
@media (hover: hover) and (pointer: fine) {
  .top-links a:first-child:hover {
    background: var(--cta-bevel), var(--cta-hi);
    box-shadow:
      0 3px 0 var(--steel-edge),
      0 0 0 5px rgba(227, 173, 68, 0.4);
  }
  .top-links a:first-child:hover .join-coin {
    animation: coinspin 0.36s steps(4);
  }
}
.top-links a:first-child:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--steel-edge);
}
@keyframes coinspin {
  50% {
    transform: scaleX(0.2);
  }
}
.top-links .top-x {
  padding: 0 10px;
}
.top-join .tl-short {
  display: none;
}
.top-links .top-x:hover {
  background: var(--steel-hover);
}
.theme-btn .i:last-child {
  display: none;
}
:root[data-theme='dark'] .theme-btn .i:first-child {
  display: none;
}
:root[data-theme='dark'] .theme-btn .i:last-child {
  display: block;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-btn .i:first-child {
    display: none;
  }
  :root:not([data-theme='light']) .theme-btn .i:last-child {
    display: block;
  }
}
.menu-btn {
  display: none;
  margin-left: -6px;
}

/* -------------------------------------------------------------------------------- layout */
.layout {
  max-width: 1480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr) 236px;
}
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 14px 56px 20px;
  border-right: 3px solid var(--steel-edge);
  background: var(--steel-grain), var(--steel);
  color: var(--steel-ink);
  /* the steel runs on to the window's left edge when the layout is narrower than the window */
  box-shadow:
    -280px 0 0 var(--steel),
    -560px 0 0 var(--steel),
    -840px 0 0 var(--steel);
  scrollbar-width: thin;
  scrollbar-color: var(--steel-line) transparent;
}
.sidebar-head,
.sidebar-search {
  display: none;
}
.sidebar-foot {
  margin: 26px 12px 8px;
  padding-top: 14px;
  border-top: 2px solid var(--steel-line);
}
.sidebar-foot p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
}
.sidebar .sidebar-foot a {
  display: inline;
  padding: 0;
  border-radius: 0;
  color: var(--steel-muted);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 650;
}
.sidebar .sidebar-foot a:hover {
  background: none;
  color: var(--steel-ink);
  text-decoration: underline;
}
.sidebar .sidebar-foot a.sidebar-join {
  display: none;
}
.nav-sec + .nav-sec {
  margin-top: 18px;
}
.nav-label {
  margin: 6px 12px 6px;
  color: var(--steel-brass);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar a {
  position: relative;
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: #d9dde1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 15.5px;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-decoration: none;
}
.sidebar a:hover {
  background: var(--steel-hover);
  color: #ffffff;
}
.sidebar a.sub {
  margin-left: 14px;
  padding-left: 14px;
  border-radius: 0 6px 6px 0;
  box-shadow: inset 2px 0 0 var(--steel-line);
  font-size: 14.5px;
}
.sidebar a.sub.active::before {
  top: 4px;
  bottom: 4px;
}
.sidebar a.active {
  background: var(--steel-active);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(227, 190, 106, 0.28);
}
.sidebar a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 0 2px 2px 0;
  background: var(--steel-brass);
}
.scrim {
  display: none;
}
.main {
  min-width: 0;
  padding: 44px 56px 88px;
}
.doc {
  max-width: 768px;
  margin: 0 auto;
}
.toc-col {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 46px 24px 40px 4px;
  scrollbar-width: thin;
}
.toc-label {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.toc ul,
.toc-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc ul {
  border-left: 2px solid var(--line);
}
.toc a {
  display: block;
  margin-left: -2px;
  padding: 4px 0 4px 13px;
  border-left: 3px solid transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  line-height: 1.4;
  text-decoration: none;
}
.toc .toc-l3 a {
  padding-left: 25px;
  font-size: 13px;
}
.toc a:hover {
  color: var(--ink);
}
.toc a.on {
  color: var(--ink);
  font-weight: 750;
  border-left-color: var(--accent);
}

/* ---------------------------------------------------------------------------- doc header */
.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 650;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--ink);
}
.doc-head h1,
.prose h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: clamp(2rem, 1.4rem + 2.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: 0;
}
.lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.22rem;
  font-weight: 520;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.doc-head {
  margin-bottom: 34px;
}
.toc-mobile {
  display: none;
  margin-top: 22px;
  border: 2px solid var(--edge);
  border-radius: 8px;
  background: var(--bg-elev);
  box-shadow: 0 3px 0 var(--edge-soft);
}
.toc-mobile summary {
  padding: 12px 16px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 16px;
  letter-spacing: 0.01em;
  cursor: pointer;
}
.toc-mobile ul {
  padding: 0 16px 12px;
}
.toc-mobile a {
  display: block;
  padding: 5px 0;
  color: var(--body);
  font-size: 15px;
  text-decoration: none;
}
.toc-mobile .toc-l3 a {
  padding-left: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------------- prose */
.prose {
  font-size: 1.0625rem;
  line-height: 1.72;
}
.prose > * + * {
  margin-top: 1.05em;
}
.prose > :first-child {
  margin-top: 0;
}
.prose p,
.prose ul,
.prose ol {
  margin-bottom: 0;
}
.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  scroll-margin-top: calc(var(--topbar-h) + 20px);
}
/* an h2 is a stencilled section plate: a rule under it with a brass tab at its start */
.prose h2 {
  margin: 2.3em 0 0;
  padding-bottom: 0.32em;
  background:
    linear-gradient(var(--accent), var(--accent)) left bottom / 44px 4px no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / 100% 2px no-repeat;
  font-size: 1.62rem;
  line-height: 1.2;
  letter-spacing: 0.005em;
}
.prose h3 {
  margin: 1.9em 0 0;
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.prose h4 {
  margin: 1.6em 0 0;
  font-size: 1.08rem;
  letter-spacing: 0.015em;
}
.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.6em;
}
.anchor {
  position: absolute;
  left: -0.95em;
  width: 0.9em;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s;
}
h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor,
.anchor:focus {
  opacity: 1;
}
.prose a {
  color: var(--link);
  font-weight: 680;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--link-line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.prose a:hover {
  text-decoration-color: var(--link);
}
.prose .ext {
  font-size: 0.8em;
  margin-left: 1px;
  text-decoration: none;
  display: inline-block;
}
.prose strong {
  color: var(--ink);
  font-weight: 740;
}
.prose ul,
.prose ol {
  padding-left: 1.35em;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose li > ul,
.prose li > ol {
  margin-top: 0.4em;
}
.prose ul > li::marker {
  color: var(--accent-ink);
  font-size: 1.1em;
}
.prose ol > li::marker {
  color: var(--muted);
  font-weight: 750;
}
.prose code {
  padding: 0.08em 0.38em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9em;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.6em;
  padding: 0 0.42em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8em;
  font-weight: 750;
  line-height: 1;
  vertical-align: 0.08em;
}
.prose hr {
  height: 2px;
  margin: 2.6em 0;
  border: 0;
  background: var(--line);
}
.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 2px 0 2px 18px;
  border-left: 4px solid var(--accent);
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 600;
}
.prose blockquote p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
.ri {
  display: inline-block;
  width: 1.08em;
  height: 1.08em;
  vertical-align: -0.17em;
}
.amt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.amt .ri {
  width: 16px;
  height: 16px;
  vertical-align: 0;
}
.data-missing {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* a box that scrolls sideways on this screen says so underneath (docs.js adds it) */
.scroll-cue {
  margin: 6px 2px 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-align: right;
}
.scroll-cue[hidden] {
  display: none;
}

/* -------------------------------------------------------------------------------- tables */
.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--edge);
  border-radius: 8px;
  background: var(--bg-elev);
  box-shadow: 0 3px 0 var(--edge-soft);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.5;
}
.table-wrap th {
  padding: 11px 14px;
  border-bottom: 2px solid var(--edge);
  background: var(--steel-2);
  color: var(--steel-ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table-wrap td {
  padding: 11px 14px;
  border-top: 1px solid var(--line-2);
  vertical-align: top;
}
.table-wrap tbody tr:first-child td {
  border-top: 0;
}
.table-wrap td:first-child {
  color: var(--ink);
  font-weight: 650;
}
.table-wrap tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-soft) 60%, transparent);
}
.table-wrap tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.a-right {
  text-align: right !important;
}
.a-center {
  text-align: center !important;
}
.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.table--wide table {
  min-width: 860px;
}
.table--counts .cnt-lv {
  color: var(--muted);
  font-size: 0.86em;
}
.table--hq td:last-child {
  min-width: 220px;
}

/* ------------------------------------------------------------------------------ callouts */
.callout {
  --c-bg: var(--note-bg);
  --c-line: var(--note-line);
  --c-ink: var(--note-ink);
  --rv: radial-gradient(circle at 42% 40%, var(--rivet-hi) 0 1.1px, var(--rivet) 1.9px 3.2px, var(--edge-soft) 3.4px 3.9px, transparent 4.3px);
  position: relative;
  padding: 14px 18px 15px;
  border: 2px solid var(--edge);
  border-left: 8px solid var(--c-line);
  border-radius: 6px;
  background:
    var(--rv) right 6px top 6px / 10px 10px no-repeat,
    var(--rv) right 6px bottom 6px / 10px 10px no-repeat,
    var(--c-bg);
  box-shadow:
    inset 0 1px 0 var(--plate-hi),
    0 3px 0 var(--edge-soft);
}
.callout--tip {
  --c-bg: var(--tip-bg);
  --c-line: var(--tip-line);
  --c-ink: var(--tip-ink);
}
.callout--warning {
  --c-bg: var(--warning-bg);
  --c-line: var(--warning-line);
  --c-ink: var(--warning-ink);
}
.callout--danger {
  --c-bg: var(--danger-bg);
  --c-line: var(--danger-line);
  --c-ink: var(--danger-ink);
}
.callout--beta {
  --c-bg: var(--beta-bg);
  --c-line: var(--beta-line);
  --c-ink: var(--beta-ink);
}
/* beta wears a hazard strip: brass and ink, painted over its left edge */
.callout--beta::before {
  content: '';
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -8px;
  width: 8px;
  border-radius: 6px 0 0 6px;
  background: repeating-linear-gradient(-45deg, var(--c-line) 0 6px, var(--edge) 6px 12px);
}
.callout--lore {
  --c-bg: var(--lore-bg);
  --c-line: var(--lore-line);
  --c-ink: var(--lore-ink);
  border-style: dashed;
  border-left-style: solid;
}
.callout--lore .callout-body {
  font-style: italic;
}
.callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.06rem;
  letter-spacing: 0.015em;
}
.callout-body {
  margin-top: 5px;
  font-size: 1rem;
  line-height: 1.65;
}
.callout-body > * + * {
  margin-top: 0.6em;
}
.callout-body > :first-child {
  margin-top: 0;
}
.callout-body p {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------------------- figures */
.fig {
  margin: 2em 0 0;
}
.prose > .fig + * {
  margin-top: 1.6em;
}
.fig-frame {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: 0 3px 0 var(--edge-soft);
}
.fig img {
  display: block;
  width: 100%;
  height: auto;
}
.fig--crop .fig-frame img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.fig figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.fig figcaption strong {
  color: var(--ink);
}
.fig-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px 6px 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(20, 19, 27, 0.84);
  color: #f3f4f1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.18s,
    transform 0.18s;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.fig-zoom .i {
  width: 15px;
  height: 15px;
}
.fig-frame:hover .fig-zoom,
.fig-zoom:focus-visible {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .fig-zoom {
    opacity: 0.92;
    transform: none;
  }
}
img.pixel,
.spr-img,
.spr-shadow,
.inspect-stage img,
.unit-stage img {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* The ground a sprite stands on: the war's scrub (palette v3 scrub3) with the whisper checker (scrubh2), 2:1 iso
   diamonds at 2x, as the landing's raid ground (STYLE v3 V6). The class keeps its old name: the pages use it. */
.lawn {
  background-color: #4c6224;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32' viewBox='0 0 64 32'%3E%3Cpath d='M32 0 64 16 32 32 0 16Z' fill='%23546A27'/%3E%3C/svg%3E");
  background-size: 64px 32px;
}

/* Sprite strips: real sprites at an integer scale (--s), anchored on their footprint. */
.strip {
  --s: var(--s-auto, 1);
  display: flex;
  justify-content: safe center;
  align-items: flex-end;
  gap: 2px;
  overflow-x: auto;
  padding: 20px 14px 14px;
  border: 1px solid #34481f;
  border-radius: 16px;
  scrollbar-width: thin;
}
.spr-cell {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spr-stage {
  position: relative;
  width: 100%;
}
.spr-stage img {
  position: absolute;
  max-width: none;
}
.spr-shadow {
  opacity: 1;
}
.lvl {
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 5px;
  background: #23222e;
  color: #f3f4f1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.lvl--max {
  color: #e3be6a;
}

/* Building spec cards */
.bcard {
  margin: 1.3em 0 0;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.bcard-art {
  --s: var(--s-auto, 2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 26px 16px 20px;
}
.bcard-art--empty span {
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(20, 19, 27, 0.82);
  color: #f3f4f1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 13.5px;
  letter-spacing: 0.02em;
}
.bcard-flag,
.ctile-flag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 3px 10px;
  border-radius: 5px;
  background: rgba(20, 19, 27, 0.86);
  color: #f3f4f1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bcard-flag--lvl {
  color: #e3be6a;
}
.bcard-body {
  padding: 16px 20px 18px;
  border-top: 2px solid var(--edge);
}
.bcard-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.bcard-desc {
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.45;
}
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 12px 18px;
  margin: 14px 0 0;
}
.fact dt {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.fact dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
/* family tags are stencilled plates: one fill each, ink edge, a light label (each pair measured 5.9:1 or better) */
.tag {
  flex: none;
  padding: 2px 9px;
  border-radius: 5px;
  background: var(--bg-soft);
  border: 1.5px solid var(--edge);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag--economy {
  background: #7c5520;
  color: #ffffff;
}
.tag--army {
  background: #b52337;
  color: #ffffff;
}
.tag--defence {
  background: #54607b;
  color: #ffffff;
}
.tag--farm {
  background: #41452a;
  color: #f3f4f1;
}
.tag--core {
  background: #23222e;
  color: #e3be6a;
}

/* Building catalogue */
.catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  margin-top: 1.4em;
}
.ctile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
  text-decoration: none !important;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
.ctile:hover {
  border-color: var(--accent-ink);
  box-shadow: var(--glow), 0 3px 0 var(--edge-soft);
}
.ctile-art {
  --s: var(--s-auto, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 172px;
  overflow: hidden;
}
.ctile-flag {
  left: 8px;
  top: 8px;
  font-size: 10px;
}
.ctile-name {
  padding: 11px 13px 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 15.5px;
  letter-spacing: 0.01em;
}
.ctile-meta {
  padding: 1px 13px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

/* Link cards */
.lcards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
  text-decoration: none !important;
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
.lcard:hover {
  border-color: var(--accent-ink);
  box-shadow: var(--glow), 0 3px 0 var(--edge-soft);
}
.lcard-art {
  --s: 0.5;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 68px;
  overflow: hidden;
  border-radius: 11px;
}
.lcard-art img {
  image-rendering: auto;
}
.lcard-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 84px;
  height: 68px;
  border-radius: 6px;
  background: var(--bg-soft);
}
.lcard-icon .ri {
  width: 34px;
  height: 34px;
}
.lcard-text {
  min-width: 0;
  flex: 1;
}
.lcard-title {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
.lcard-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 540;
  line-height: 1.45;
}
.lcard-go {
  flex: none;
  color: var(--muted);
  transition: color 0.16s;
}
.lcard:hover .lcard-go {
  color: var(--ink);
}

/* Steps */
.steps ol {
  list-style: none;
  padding-left: 0;
  counter-reset: step;
}
.steps ol > li {
  position: relative;
  min-height: 40px;
  margin: 0;
  padding: 4px 0 22px 54px;
}
.steps ol > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #1f1032;
  border-radius: 7px;
  background: var(--accent);
  box-shadow: 0 2px 0 #1f1032;
  color: #1f1032;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
}
.steps ol > li::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 40px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.steps ol > li:last-child::after {
  display: none;
}
.steps ol > li > strong:first-child {
  display: block;
  font-size: 1.08rem;
}

/* The mining chain */
.chain {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 1.5em;
}
.chain-node {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 14px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.chain-art,
.chain-icon {
  --s: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 128px;
  overflow: hidden;
  border-radius: 11px;
}
.chain-icon {
  background: var(--bg-soft);
}
.chain-icon .ri {
  width: 46px;
  height: 46px;
}
.chain-title {
  margin-top: 4px;
  padding: 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.06rem;
  letter-spacing: 0.01em;
}
.chain-sub {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.chain-arrow {
  align-self: center;
  color: var(--muted);
}

/* Zone map */
.zone-map {
  background: #1f1032;
}
.zpin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 11px 7px;
  border: 2px solid #1f1032;
  border-radius: 7px;
  background: rgba(248, 249, 250, 0.96);
  box-shadow: 0 2px 0 #1f1032;
  color: #1f1032 !important;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.zpin:hover {
  background: #e3be6a;
  box-shadow:
    var(--glow),
    0 2px 0 #1f1032;
}
.zpin-where {
  color: #4f5565;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
}

/* Units */
.unit-stage {
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 16px;
}
.unit-stage img {
  width: auto;
  height: 160px;
}

/* Palette and press kit */
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.swatch {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.swatch-chip {
  grid-row: 1 / span 3;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(31, 16, 50, 0.85);
}
.swatch-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.01em;
}
.swatch code {
  justify-self: start;
}
.swatch-use {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.wms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.wm {
  margin: 0;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.wm-stage {
  position: relative;
  aspect-ratio: 16 / 7;
}
.wm--light .wm-stage {
  background: #fff4dc;
}
.wm--dark .wm-stage {
  background: #1f1032;
}
.wm--sky .wm-stage {
  background: #4694ee;
}
.wm--lawn .wm-stage {
  background: #67b641;
}
.wm-stage img {
  position: absolute;
  inset: 20px 24px;
  width: calc(100% - 48px);
  height: calc(100% - 40px);
  max-width: none;
  object-fit: contain;
}
.wm figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

/* Code blocks */
.code {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 8px;
  background: #23222e;
  box-shadow: 0 3px 0 var(--edge-soft);
}
.code-title {
  padding: 9px 16px;
  border-bottom: 2px solid #14131b;
  background: var(--steel-grain), #343644;
  color: #e3be6a;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 750;
}
.code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: #e6e8ea;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  white-space: pre;
}
.code pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  white-space: inherit;
}
.code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1.5px solid #4a4e5e;
  border-radius: 6px;
  background: #343644;
  color: #eef0f1;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.code:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}
.code-title + .code-copy {
  top: 44px;
}

/* ------------------------------------------------------------------------- pager, footer */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 64px;
}
.pager a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px 15px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
  text-decoration: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.pager a:hover {
  border-color: var(--accent-ink);
  box-shadow: var(--glow), 0 3px 0 var(--edge-soft);
}
.pager-next {
  align-items: flex-end;
  text-align: right;
}
.pager-dir {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pager-dir .i {
  width: 15px;
  height: 15px;
}
.pager-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.doc-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.doc-foot p {
  margin: 0;
}
.doc-foot strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.02em;
}
.doc-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  min-width: 0;
}
.doc-foot a {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
}
.doc-foot a:hover {
  color: var(--ink);
}

/* --------------------------------------------------------------------------------- home */
.home-hero {
  margin-bottom: 8px;
}
.home-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 4px 12px 4px 8px;
  border: 2px solid var(--edge);
  border-radius: 6px;
  background: var(--steel-grain), #393b4b;
  box-shadow: 0 2px 0 var(--edge-soft);
  color: #e3be6a;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.home-eyebrow .ri {
  width: 18px;
  height: 18px;
}
.home-hero h1 {
  font-size: clamp(2.3rem, 1.5rem + 3vw, 3.4rem);
}
.home-hero .lead {
  max-width: 640px;
  font-size: 1.28rem;
}
.home-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  color: #1f1032 !important;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 17.5px;
  letter-spacing: 0.015em;
  text-decoration: none !important;
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}
/* brass: the docs' own action (ink on brass, 8.8:1 light, 10:1 dark) */
.btn--gold {
  background: var(--accent);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 3px 0 var(--edge);
}
.btn--plain {
  background: var(--bg-elev);
  color: var(--ink) !important;
  box-shadow: 0 3px 0 var(--edge);
}
.btn--gold:hover {
  box-shadow:
    var(--glow),
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 3px 0 var(--edge);
}
.btn--plain:hover {
  box-shadow:
    var(--glow),
    0 3px 0 var(--edge);
}
.btn--gold:active,
.btn--plain:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--edge);
}
.home-art {
  margin-top: 34px;
}
.home-art .fig-frame {
  border-radius: 10px;
  box-shadow:
    0 4px 0 var(--edge),
    var(--shadow);
}
.facts-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.facts-strip div {
  padding: 14px 16px;
}
.facts-strip div + div {
  border-left: 2px solid var(--line);
}
.facts-strip b {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.facts-strip span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 560;
  line-height: 1.4;
}

/* ------------------------------------------------------------------------------- search */
.search {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 11vh 16px 16px;
  background: rgba(12, 12, 17, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.search[hidden] {
  display: none;
}
.search-panel {
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  min-width: 0;
  max-height: 74vh;
  overflow: hidden;
  border: 3px solid var(--edge);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 6px 0 var(--edge),
    0 30px 90px -24px rgba(0, 0, 0, 0.6);
}
.search-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px 0 16px;
  border-bottom: 3px solid var(--edge);
  background: var(--steel-grain), linear-gradient(180deg, #3d4051 0%, #2f3140 100%) #2f3140;
  color: var(--steel-ink);
}
.search-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.search-title::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  border: 2px solid var(--steel-edge);
  border-radius: 2px;
  background: var(--steel-brass);
  vertical-align: 0.05em;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 0 12px 0 16px;
  border-bottom: 2px solid var(--line);
  color: var(--muted);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
}
.search-bar input::-webkit-search-cancel-button {
  display: none;
}
.search-esc {
  padding: 4px 8px;
  border: 1.5px solid var(--steel-line);
  border-radius: 6px;
  background: rgba(10, 10, 14, 0.3);
  color: var(--steel-ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.search-esc:hover {
  border-color: var(--steel-brass);
}
/* the build binds the title's words into a nowrap span, so the close button takes the free space itself */
.search-head .search-esc {
  flex: none;
  margin-left: auto;
}
.search-esc .i {
  display: none;
}
.search-results {
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}
.sr-empty {
  padding: 28px 16px;
  color: var(--muted);
  text-align: center;
}
.sr-group {
  margin: 6px 10px 4px;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sr-item {
  display: block;
  overflow-wrap: anywhere;
  padding: 9px 12px 10px;
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--body);
  text-decoration: none;
}
.sr-item[aria-selected='true'] {
  border-color: var(--edge);
  background: var(--sel-bg);
  box-shadow: inset 6px 0 0 var(--accent);
}
.sr-title {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 16.5px;
  letter-spacing: 0.01em;
}
.sr-title .sr-hash {
  color: var(--muted);
}
.sr-snip {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.search mark {
  padding: 0 1px;
  border-radius: 2px;
  background: var(--mark);
  /* full ink, not the snippet's muted grey: in dark, muted on the brass wash measured 2.5:1 (2.2 selected) */
  color: var(--ink);
}
.search-foot {
  display: flex;
  gap: 16px;
  padding: 9px 16px;
  border-top: 2px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.search-foot kbd {
  margin-right: 3px;
  font-size: 11px;
}

/* ------------------------------------------------------------------------ pixel inspect */
.inspect {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  background: #18181f;
  color: #f3f4f1;
}
.inspect[hidden] {
  display: none;
}
.inspect-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 18px;
  border-bottom: 3px solid #0c0b10;
  background: var(--steel-grain), linear-gradient(180deg, #3d4051 0%, #2f3140 100%) #2f3140;
}
.inspect-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 18px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.inspect-zoom {
  display: flex;
  gap: 4px;
}
.inspect-zoom button {
  padding: 6px 12px;
  border: 1.5px solid #4a4e5e;
  border-radius: 6px;
  background: rgba(10, 10, 14, 0.3);
  color: #f3f4f1;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.inspect-zoom button[aria-pressed='true'] {
  background: #e3be6a;
  border-color: #14131b;
  color: #1f1032;
}
.inspect .icon-btn {
  color: #f3f4f1;
}
.inspect .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.inspect-stage {
  flex: 1;
  overflow: auto;
  cursor: grab;
  overscroll-behavior: contain;
}
.inspect-stage.dragging {
  cursor: grabbing;
}
.inspect-stage img {
  display: block;
  max-width: none;
  margin: 24px auto;
}

/* ---------------------------------------------------------------------------- responsive */
/* ------------------------------------------------------------- cast gallery and downloads */
.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 1.6em 0 0;
}
.gallery--row {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.gal-item {
  flex: 1 1 0;
  min-width: max-content;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
}
.gal-stage {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 120px;
  padding: 16px 12px 12px;
}
.gal-stage img {
  display: block;
  max-width: none;
  image-rendering: pixelated;
}
.gal-item figcaption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 9px 12px 11px;
  border-top: 2px solid var(--line-2);
}
.gal-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.gal-sub {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.gal-cap {
  margin-top: 10px !important;
  color: var(--muted);
  font-size: 0.9rem;
}
.dls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 1.4em;
}
.dl {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.dl:hover {
  border-color: var(--accent-ink);
  box-shadow: var(--glow), 0 3px 0 var(--edge-soft);
}
.dl-pic {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff4dc;
  overflow: hidden;
}
.dl--sky .dl-pic {
  background: #4694ee;
}
.dl--dark .dl-pic {
  background: #1f1032;
}
.dl--gold .dl-pic {
  background: #f8bf2e;
}
.dl-pic img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.dl-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.dl-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.dl-what {
  color: var(--muted);
  font-size: 0.8rem;
}
.dl-go {
  flex: none;
  color: var(--muted);
}
.dl:hover .dl-go {
  color: var(--ink);
}
.table--sheet td:first-child {
  width: 1%;
  min-width: 112px;
  color: var(--ink);
  font-weight: 760;
}
.table--sheet tr:first-child td {
  border-top: 0;
}
.table-note {
  margin-top: 10px !important;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Legal pages: the version line under the title */
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 1.2em;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

/* ------------------------------------------------------------- no widows, no orphans (22 Oct) */
/* Headings and short UI text balance their lines; body copy avoids a lonely last word. The build also binds
   the last words of every block with non-breaking spaces (lib/widows.mjs), for browsers that ignore these. */
h1,
h2,
h3,
h4,
.lead,
.home-eyebrow,
.callout-title,
.lcard-title,
.pager-title,
.ctile-name,
.gal-name,
.dl-label,
.nav-label,
.toc a,
.sidebar a,
figcaption,
.table-note,
.facts-strip b,
.facts-strip span,
.status-chip,
.chain-title,
.chain-sub,
.swatch-name,
.sr-title,
.search-title,
.toc-label,
.doc-foot strong,
button,
.btn {
  text-wrap: balance;
}
.nb {
  white-space: nowrap;
}
.prose td .cell-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9em;
  font-weight: 560;
}
.prose p,
.prose li,
.prose td,
.prose th,
.prose dd,
.prose blockquote,
.callout-body,
.lcard-desc,
.dl-what,
.gal-sub,
.doc-foot p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ partner logos (Solana) */
/* Official marks, unaltered: the black file on light paper, the white file on dark (each kit ships both).
   Clear space comes from the frame's padding; no effects, no outlines, no gradient. */
.logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 1.6em;
}
.logo-tile {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 2px solid var(--edge);
  border-radius: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 1px 0 var(--plate-hi), 0 3px 0 var(--edge-soft);
  overflow: hidden;
}
.logo-stage {
  display: grid;
  place-items: center;
  height: 148px;
  padding: 28px 32px;
}
.logo-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: var(--logo-h, 28px);
}
.logo-tile figcaption {
  padding: 12px 18px 14px;
  border-top: 2px solid var(--line-2);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.logo-tile figcaption strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.logo-on-dark {
  display: none !important;
}
:root[data-theme='dark'] .logo-on-dark {
  display: block !important;
}
:root[data-theme='dark'] .logo-on-light {
  display: none !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-on-dark {
    display: block !important;
  }
  :root:not([data-theme='light']) .logo-on-light {
    display: none !important;
  }
}
.logo-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------- beta status matrix */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  font-size: 13px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status--live {
  background: var(--tip-bg);
  color: var(--tip-ink);
  box-shadow: inset 0 0 0 1.5px var(--tip-line);
}
.status--beta {
  background: var(--beta-bg);
  color: var(--beta-ink);
  box-shadow: inset 0 0 0 1.5px var(--beta-line);
}
.status--planned {
  background: var(--warning-bg);
  color: var(--warning-ink);
  box-shadow: inset 0 0 0 1.5px var(--warning-line);
}
.status--off {
  background: var(--bg-soft);
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

/* ------------------------------------------------------------------- calmer rhythm (22 Oct) */
.nav-sec + .nav-sec {
  margin-top: 24px;
}
.prose > * + * {
  margin-top: 1.15em;
}
.callout {
  padding: 18px 22px 18px;
}
.prose h2 {
  margin-top: 2.5em;
}

@media (max-width: 1260px) {
  .layout {
    grid-template-columns: 272px minmax(0, 1fr);
  }
  .toc-col {
    display: none;
  }
  .toc-mobile {
    display: block;
  }
  .main {
    padding: 40px 44px 80px;
  }
}

@media (max-width: 980px) {
  :root {
    --topbar-h: 58px;
  }
  /* Every control in the bar (and the drawer's ×) is a 44 px tap, and the row still fits a 360 px phone: tighter
     gaps and edges, and the menu and theme buttons reach 4 px into the gutter, so their icons sit about where they
     did. The wordmark, "Docs" and Join keep their look and get an invisible 44 px tall hit area (28 Oct audit, D-7) */
  .topbar-in {
    padding: 0 10px;
    gap: 4px;
  }
  .icon-btn {
    flex: none;
    width: 44px;
    height: 44px;
  }
  .menu-btn {
    display: inline-grid;
    margin-left: -4px;
  }
  .theme-btn {
    margin-right: -4px;
  }
  .brand,
  .brand-docs,
  .top-links .top-join {
    position: relative;
  }
  .brand::after,
  .brand-docs::after,
  .top-links .top-join::after {
    content: '';
    position: absolute;
    inset: -9px 0;
  }
  .brand-docs::after {
    inset: -8px -2px;
  }
  .top-links .top-join::after {
    inset: -6.5px -1.5px;
  }
  .brand img {
    height: 26px;
  }
  .brand-docs {
    font-size: 15px;
    padding-left: 8px;
  }
  /* a bare icon, like the menu and theme buttons beside it (29 Oct audit, V-21) */
  .search-btn {
    flex: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    justify-content: center;
    border-color: transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--steel-ink);
  }
  .search-btn:hover {
    border-color: transparent;
    background: var(--steel-hover);
  }
  .search-btn-text,
  .search-kbd {
    display: none;
  }
  .top-links {
    margin-left: 0;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 110;
    width: min(320px, 86vw);
    height: 100%;
    height: 100dvh;
    padding: 0 12px 40px 14px;
    background: var(--steel-grain), var(--steel);
    border-right: 3px solid var(--steel-edge);
    box-shadow: 20px 0 60px -30px rgba(0, 0, 0, 0.7);
    transform: translateX(-104%);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    visibility: hidden;
  }
  body.drawer-open .sidebar {
    transform: none;
    visibility: visible;
  }
  body.drawer-open {
    overflow: hidden;
  }
  .sidebar.dragging {
    transition: none;
  }
  .sidebar-head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 60px;
    margin: 0 -12px 10px -14px;
    padding: 0 8px 0 22px;
    background: var(--steel-grain), linear-gradient(180deg, #3d4051 0%, #2f3140 100%) #2f3140;
    border-bottom: 3px solid var(--steel-edge);
    color: var(--steel-ink);
  }
  .sidebar-head .icon-btn {
    margin-left: auto;
    color: var(--steel-ink);
  }
  .sidebar-head .icon-btn:hover {
    background: var(--steel-hover);
  }
  .sidebar .sidebar-brand {
    display: flex;
    padding: 0;
    border-radius: 0;
  }
  .sidebar .sidebar-brand:hover {
    background: none;
  }
  .sidebar-brand img {
    display: block;
    height: 26px;
    width: auto;
  }
  .sidebar-docs {
    padding-left: 10px;
    border-left: 2px solid var(--steel-line);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0.01em;
  }
  .sidebar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    margin: 0 0 14px;
    padding: 0 14px;
    border: 1.5px solid var(--steel-line);
    border-radius: 10px;
    background: rgba(10, 10, 14, 0.28);
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.22);
    color: var(--steel-muted);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }
  .sidebar-nav a {
    padding-top: 11.5px;
    padding-bottom: 11.5px;
    font-size: 15.5px;
  }
  .sidebar .sidebar-foot a.sidebar-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    margin-bottom: 14px;
    border: 2px solid var(--steel-edge);
    border-radius: 10px;
    background: var(--cta-bevel), var(--cta);
    box-shadow: 0 3px 0 var(--steel-edge);
    color: var(--on-cta);
    font-family: var(--font-display);
    font-size: 16.5px;
    font-weight: 400;
    letter-spacing: 0.015em;
    text-decoration: none;
  }
  .sidebar .sidebar-foot a.sidebar-join:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--steel-edge);
  }
  .sidebar .sidebar-foot p a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
  .scrim {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: block;
    background: rgba(12, 12, 17, 0.55);
  }
  .scrim[hidden] {
    display: none;
  }
  .main {
    padding: 28px 16px 64px;
  }
  .lcards,
  .wms {
    grid-template-columns: minmax(0, 1fr);
  }
  .chain {
    flex-direction: column;
  }
  /* each step is the art on the left, its title over its line on the right. (As a flex row the title and the line
     sat side by side, and the line's bound last words, "vaults and caches", pushed a 320 px phone sideways: 28 Oct
     QA, D-9) */
  .chain-node {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 2px;
  }
  .chain-art,
  .chain-icon {
    grid-row: span 2;
    align-self: center;
    height: 96px;
  }
  .chain-node .chain-title,
  .chain-node .chain-sub {
    grid-column: 2;
    padding: 0;
  }
  .chain-node .chain-title {
    align-self: end;
    margin-top: 0;
  }
  .chain-node .chain-sub {
    align-self: start;
  }
  .chain-arrow {
    transform: rotate(90deg);
  }
  .facts-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .facts-strip div:nth-child(3) {
    border-left: 0;
  }
  .facts-strip div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .strip {
    --s: 1;
    justify-content: flex-start;
  }
  .bcard-art {
    --s: 1;
    min-height: 160px;
  }
}

@media (max-width: 980px) {
  .top-join .tl-long {
    display: none;
  }
  .top-join .tl-short {
    display: inline;
  }
}

@media (max-width: 560px) {
  /* phones: a three-level strip fits the column (no sideways nudge); the cells overlap only their clear margins.
     Longer strips still scroll */
  .strip {
    gap: 0;
    padding: 16px 0 12px;
    justify-content: safe center;
  }
  .strip .spr-cell {
    margin-inline: -9px;
  }
  .gallery {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .inspect-bar {
    gap: 8px;
    padding: 0 6px 0 14px;
  }
  .inspect-zoom button {
    padding: 6px 9px;
  }
  .top-links a:first-child {
    padding: 0 10px;
  }
  .top-links .top-x {
    display: none;
  }
  .prose {
    font-size: 1.02rem;
  }
  .lead {
    font-size: 1.1rem;
  }
  .prose h2 {
    font-size: 1.42rem;
  }
  .catalogue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ctile-art {
    --s: 1;
    height: 140px;
  }
  .zpin {
    padding: 3px 7px;
    font-size: 10.5px;
    border-radius: 8px;
  }
  .zpin-where {
    display: none;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager-next {
    align-items: flex-start;
    text-align: left;
  }
  .search {
    padding: 0;
  }
  .search-panel {
    max-height: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .search-foot {
    display: none;
  }
  .anchor {
    display: none;
  }
}

@media (max-width: 389px) {
  /* the header row (menu, wordmark, Docs, search, Join, theme) is 352 px wide before the coin, which adds 26 px: below
     390 px Join keeps its cherry but drops the coin, so the row still fits a 360 px phone (and 320, without Docs) */
  .top-links .join-coin {
    display: none;
  }
}

@media (max-width: 359px) {
  /* the link cards' art shrinks and the arrow goes, so the text keeps about 200 px: two-line descriptions and
     one-line titles (29 Oct audit, V-26) */
  .lcard-art,
  .lcard-icon {
    width: 56px;
    height: 56px;
  }
  .lcard-art {
    --s: 0.38;
  }
  .lcard-go {
    display: none;
  }
  /* the smallest phones: the wordmark stands alone, so the 44 px controls fit without the page scrolling sideways
     (28 Oct audit, D-9). The drawer and the breadcrumb still say Docs */
  .brand-docs {
    display: none;
  }
  /* and a page title sets at 28 px, so a two- or three-word title fits one line: "Community Guidelines" bound
     whole pushed the page sideways, and "Account" sat alone over "and recovery" (28 Oct QA, D-9 and F-18). The
     build binds a title of three short words whole (lib/widows.mjs), and 20 characters fit 288 px at this size.
     The home page's big title keeps its size: its bound pieces are short */
  .doc-head h1,
  .prose > h1 {
    font-size: 1.75rem;
  }
}

@media (pointer: coarse) {
  /* touch: the small secondary links get 44 px tall taps (28 Oct audit, D-10). The breadcrumb and the press kit's
     Download links take the extra height from the space around them, so nothing moves */
  .doc-foot-links {
    row-gap: 0;
  }
  .doc-foot-links a,
  .wm figcaption a,
  .fig-zoom {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .wm figcaption a {
    margin: -10px 0;
  }
  .crumbs {
    align-items: center;
    margin: -11px 0 3px;
  }
  .crumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 0 -8px;
    padding: 0 8px;
  }
}

@media (hover: none) and (pointer: coarse) {
  /* touch screens have no keys to press (29 Oct audit, V-22): no "/" hints and no key footer, and the search's
     Esc chip becomes a 44 px × that closes it */
  .kbd-hint,
  .search-kbd,
  .search-foot {
    display: none;
  }
  .search-bar {
    padding-right: 6px;
  }
  .search-esc {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--steel-ink);
  }
  .search-esc-key {
    display: none;
  }
  .search-esc .i {
    display: block;
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar,
  .sidebar,
  .toc-col,
  .pager,
  .fig-zoom,
  .code-copy,
  .search,
  .inspect {
    display: none !important;
  }
  .layout {
    display: block;
  }
  .main {
    padding: 0;
  }
}
