/* Borrowed Torch — shared styles */
:root {
  --bg: #050302;
  --surface: #0d0907;
  --surface-2: #15100c;
  --line: rgba(233, 194, 122, .16);
  --line-strong: rgba(233, 194, 122, .35);
  --gold: #e9c27a;
  --gold-dim: #a8834a;
  --text: #d9cbb4;
  --muted: #8a7a63;
  --ember: 255, 140, 40;
  --flame: #f28c28;
  --display: Cinzel, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --header-h: 60px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* what is scrolled to stays clear of the sticky header: the target of a link, and an element of the page that gets the
   keyboard focus (not scroll-padding on the page: the search box in the header would count as hidden behind it, and
   each key typed in it would scroll the page up) */
:target, main :focus { scroll-margin-top: calc(var(--header-h) + 16px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}
main { flex: 1; position: relative; z-index: 1; }
img, svg { max-width: 100%; }
a { color: var(--gold); }
a:hover { color: #fff3d6; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.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;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--gold); color: var(--bg); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header / top menu ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 3, 2, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .05em;
}
.brand img { width: 24px; height: 24px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .03em;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: rgba(233, 194, 122, .08); color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--gold); background: rgba(233, 194, 122, .1); }
/* the menu and the search box (or its button), together at the right */
.site-header-end { display: flex; align-items: center; gap: 4px 12px; }
/* the brand on a row of its own and the menu centred under it, from the width where the brand, the menu items and the
   search button stop fitting on one row */
@media (max-width: 760px) {
  :root { --header-h: 104px; }
  .site-header-inner { justify-content: center; padding: 6px 12px 4px; }
  .site-header-end { justify-content: center; gap: 4px; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 0 12px; }
}
/* on a phone the menu has its row to itself: the search button goes up beside the brand and the items close up. A
   screen too narrow even for that scrolls the row sideways rather than breaking it onto a second line, which would
   make the header taller than --header-h says */
@media (max-width: 520px) {
  .site-search-open { position: absolute; top: 6px; right: 8px; }
  .site-header-end { width: 100%; gap: 0; }
  .site-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { flex-wrap: nowrap; justify-content: flex-start; gap: 2px; width: max-content; margin: 0 auto; }
  .site-nav a { padding: 0 6px; font-size: .88rem; white-space: nowrap; }
}

/* ---------- Section menu (_includes/section-nav.html) ---------- */
/* under the top menu, on the pages of a section (the Kindling engine's): its name, then its pages as tabs on the bar's
   bottom line. It scrolls away with the page; the header alone stays */
.section-nav {
  position: relative;
  z-index: 2;
  background: rgba(13, 9, 7, .7);
  border-bottom: 1px solid var(--line);
}
.section-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
}
.section-nav-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--gold);
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .05em;
}
.section-nav-title img { width: 22px; height: 22px; flex: none; }
.section-nav ul { list-style: none; display: flex; gap: 4px; align-self: stretch; }
.section-nav ul a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  min-height: 48px;
  padding: 0 14px;
  position: relative;
  top: 1px;
  border-bottom: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .03em;
  transition: color .2s, border-color .2s;
}
.section-nav ul a:hover { color: var(--gold); border-bottom-color: var(--line-strong); }
.section-nav ul a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
/* on a phone the name has a row of its own and the tabs start under it, the first tab's text in line with the name */
@media (max-width: 520px) {
  .section-nav-title { min-height: 40px; padding-top: 4px; }
  .section-nav ul { width: 100%; margin-left: -10px; }
  .section-nav ul a { min-height: 44px; padding: 0 10px; }
}

/* ---------- Site search (assets/js/search.js) ---------- */
.site-header-inner { position: relative; }
.site-search { position: relative; }
.site-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(233, 194, 122, .04);
  color: var(--muted);
  transition: border-color .2s, background .2s;
}
.site-search-box:hover { border-color: var(--line-strong); }
.site-search-box:focus-within { border-color: var(--gold-dim); background: var(--surface); color: var(--text); }
.site-search-box > svg { flex: none; }
.site-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
}
.site-search-input::placeholder { color: var(--muted); opacity: 1; }
.site-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.site-search-key {
  flex: none;
  min-width: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 18px;
  text-align: center;
}
.site-search-box:focus-within .site-search-key { visibility: hidden; }
.site-search-open, .site-search-close {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.site-search-close { width: 38px; height: 38px; }
.site-search-open:hover, .site-search-close:hover { background: rgba(233, 194, 122, .08); color: var(--gold); }
.site-search-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(520px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .65);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.site-search-panel[hidden] { display: none; }
.site-search-results { list-style: none; }
.site-search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.site-search-results a:hover, .site-search-results [aria-selected="true"] > a { background: rgba(233, 194, 122, .09); }
.site-search-name { display: block; color: var(--gold); font-size: .92rem; font-weight: 500; overflow-wrap: anywhere; }
.site-search-page { display: block; color: var(--muted); font-size: .74rem; letter-spacing: .03em; }
.site-search-snippet { display: block; margin-top: 2px; color: var(--muted); font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.site-search-results mark { border-radius: 2px; background: rgba(233, 194, 122, .2); color: var(--gold); }
.site-search-snippet mark { color: var(--text); }
.site-search-note { padding: 10px 12px; color: var(--muted); font-size: .88rem; }
.site-search-note:empty { display: none; }
/* on a narrow screen a button, which opens the box over the whole header */
@media (max-width: 860px) {
  .site-search { position: static; }
  .site-search-open { display: inline-flex; }
  .site-search-box, .site-search-key { display: none; }
  .site-search.is-open::before { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--bg); }
  .site-search.is-open .site-search-box {
    display: flex;
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 16px;
    right: 16px;
    width: auto;
    height: 44px;
    padding-right: 2px;
    transform: translateY(-50%);
  }
  .site-search.is-open .site-search-close { display: inline-flex; }
  /* (16px: a smaller text makes a phone zoom in when the box gets the focus) */
  .site-search-input { font-size: 16px; }
  .site-search-panel { top: calc(100% + 4px); left: 16px; right: 16px; width: auto; max-height: calc(100vh - var(--header-h) - 24px); }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px 16px 32px;
  font-size: .8rem;
  color: var(--muted);
}

/* ---------- Shared building blocks ---------- */
.page { max-width: 1080px; margin: 0 auto; padding: 56px 16px 64px; }
.eyebrow {
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: .03em;
}
.lead { font-size: 1.1rem; color: var(--text); max-width: 60ch; }
.section-title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: 1.4rem;
  letter-spacing: .03em;
  margin-bottom: 16px;
}
.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .04em;
  transition: background .2s, border-color .2s, color .2s;
}
.button:hover { background: rgba(233, 194, 122, .1); border-color: var(--gold); color: #fff3d6; }
.button.primary { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }
.button.primary:hover { background: #f4d79f; color: var(--bg); }
.pill {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-dim);
  white-space: nowrap;
}
.pill.flame { color: var(--flame); border-color: rgba(242, 140, 40, .45); }
/* the style badge after the heading of an element that has a style class: a link to the glossary page of the style
   (see _layouts/docs.html) */
.pill.style-badge {
  margin-left: .7em;
  vertical-align: middle;
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  transition: color .15s, border-color .15s, background .15s;
}
.pill.style-badge:hover, .pill.style-badge:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(233, 194, 122, .1);
}
/* the title's row spaces its parts itself */
.doc-header h1 .style-badge { margin-left: 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.card {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
a.card { transition: border-color .2s, background .2s; }
a.card:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.card h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 6px;
}
.card p { font-size: .92rem; color: var(--muted); }

/* ---------- Kindling engine pages ---------- */
.engine-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.engine-hero img { width: 168px; height: 168px; flex: none; }
.engine-hero-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.engine-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.page section + section { margin-top: 56px; }
.section-lead { margin-bottom: 8px; }
/* the road map (_data/roadmap.yml): a column per stage, its colour and its items' dots from its state */
.roadmap {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin-top: 24px;
}
.roadmap-done { --stage: var(--gold-dim); }
.roadmap-now { --stage: var(--flame); }
.roadmap-next { --stage: var(--muted); }
.roadmap-stage {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 3px 0 var(--stage);
}
.roadmap-now {
  background:
    radial-gradient(circle at 85% 0%, rgba(var(--ember), .1), transparent 60%),
    var(--surface);
}
.roadmap-stage h3 {
  margin-bottom: 14px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stage);
}
.roadmap-stage ul { list-style: none; display: grid; gap: 14px; }
.roadmap-stage li { position: relative; padding-left: 22px; }
/* a dot on the title's line: filled when done, glowing while in progress, an outline while planned */
.roadmap-stage li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .5em;
  width: 9px;
  height: 9px;
  border: 2px solid var(--stage);
  border-radius: 50%;
}
.roadmap-done li::before, .roadmap-now li::before { background: var(--stage); }
.roadmap-now li::before { box-shadow: 0 0 8px rgba(var(--ember), .7); }
.roadmap-stage h4 { font-size: .98rem; font-weight: 600; color: var(--gold); }
.roadmap-stage h4 a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.roadmap-stage h4 a:hover { color: #fff3d6; text-decoration-color: currentColor; }
.roadmap-stage p { font-size: .9rem; color: var(--muted); }
.pkg-group {
  margin: 28px 0 12px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.card.pkg { display: flex; flex-direction: column; gap: 8px; }
.card.pkg h3 {
  display: block;
  margin: 0;
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-size: .95rem;
  font-weight: 600;
  color: var(--gold);
  overflow-wrap: anywhere;
}
.card.pkg .pkg-badge { display: block; height: 20px; width: auto; align-self: flex-start; }
.card.pkg p { color: var(--text); font-size: .9rem; }
.card.pkg .pkg-needs { margin-top: auto; padding-top: 4px; color: var(--muted); font-size: .8rem; }

/* ---------- Games page ---------- */
.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 0%, rgba(var(--ember), .12), transparent 55%),
    var(--surface);
}
.game-card h2 { font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 1.5rem; }
.game-card p { color: var(--text); max-width: 60ch; }

/* ---------- Downloads page ---------- */
.downloads { display: grid; gap: 20px; margin-top: 32px; }
/* the Games card's look, holding one app */
.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 85% 0%, rgba(var(--ember), .12), transparent 55%),
    var(--surface);
}
.download-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.download-card h2 { font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 1.5rem; }
.download-card p { color: var(--text); max-width: 65ch; }
/* the reset takes every list's indent away; this one keeps its bullets */
.download-features { display: grid; gap: 6px; padding-left: 1.2em; font-size: .95rem; max-width: 70ch; }
.download-features li::marker { color: var(--gold-dim); }
.download-card .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.download-card .download-needs { color: var(--muted); font-size: .85rem; }
.download-card .download-note {
  max-width: none;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

/* ---------- Docs ---------- */
.docs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 48px;
}
.docs-nav { flex: 1 1 220px; max-width: 260px; position: sticky; top: calc(var(--header-h) + 24px); }
.docs-body { flex: 999 1 560px; min-width: 0; }
.docs-menu > summary {
  display: none;
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--gold);
  font-weight: 500;
}
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary::after { content: "▾"; color: var(--muted); }
.docs-menu[open] > summary::after { content: "▴"; }
.docs-group + .docs-group { margin-top: 22px; }
.docs-group-title {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  padding-left: 12px;
}
.docs-group ul { list-style: none; }
.docs-group a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-size: .93rem;
}
.docs-group a:hover { color: var(--gold); border-left-color: var(--line-strong); }
.docs-group a[aria-current="page"] { color: var(--gold); border-left-color: var(--gold); background: rgba(233, 194, 122, .06); }
/* a group that is a tree (the UI): its title and its nodes open with a caret */
.docs-tree > summary, .docs-node > summary { list-style: none; cursor: pointer; }
.docs-tree > summary::-webkit-details-marker, .docs-node > summary::-webkit-details-marker { display: none; }
.docs-tree > summary { display: flex; align-items: center; gap: 2px; }
/* the caret centered in its box, the box over the line of the node's list (8px in + half of 13px = the middle of the 1px
   line 14px in) */
.docs-tree > summary::before, .docs-node > summary::before {
  content: "▸";
  flex: none;
  width: 13px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  transition: transform .15s;
}
.docs-tree[open] > summary::before, .docs-node[open] > summary::before { transform: rotate(90deg); }
.docs-tree > summary:hover, .docs-tree > summary:hover::before { color: var(--gold); }
.docs-tree > summary { padding-left: 0; }
/* a tree's title starts 12px in, as the other groups' titles do, and its caret hangs in the space before it: the glyph
   starts 3px left of the sidebar, where it has no ink, so the ink spans 0 to 7px and the box stays centered on it */
.docs-tree > summary::before { margin-left: -3px; text-align: left; }
.docs-node > summary { display: flex; align-items: center; padding-left: 8px; }
.docs-node > summary > a { flex: 1; min-width: 0; padding-left: 4px; }
.docs-node > summary:hover::before { color: var(--gold); }
.docs-node ul { margin-left: 14px; border-left: 1px solid var(--line); }
.docs-node > ul > li > a { padding-left: 16px; }
/* a group of the tree that is no page (the kinds of the glossary's types) */
.docs-node-label { flex: 1; padding: 7px 12px 7px 4px; color: var(--text); font-size: .93rem; }
.docs-node > summary:hover .docs-node-label { color: var(--gold); }
.docs-types a { padding-top: 4px; padding-bottom: 4px; font-family: var(--mono); font-size: .8rem; font-variant-ligatures: none; overflow-wrap: anywhere; }
.docs-members a { padding-top: 4px; padding-bottom: 4px; font-family: var(--mono); font-size: .8rem; font-variant-ligatures: none; overflow-wrap: anywhere; }
.docs-members a[aria-current="location"] { border-left-color: var(--kind, var(--gold)); background: color-mix(in srgb, var(--kind, #e9c27a) 16%, transparent); }
/* the sections of a page, its ## headings (see _includes/docs-sections.html), like a book's contents */
.docs-sections a { padding-top: 4px; padding-bottom: 4px; font-size: .85rem; }
.docs-sections a[aria-current="location"] { color: var(--gold); border-left-color: var(--gold); background: rgba(233, 194, 122, .06); }
/* a page's sections and an entry's members start right of their page's link, whose bar follows the caret: a
   highlighted one never looks a level above its page (the tree's line stays under the caret) */
.docs-node > ul.docs-sections > li > a, .docs-node > ul.docs-members > li > a { margin-left: 14px; padding-left: 10px; }
/* a sidebar taller than the window scrolls on its own */
@media (min-width: 861px) {
  .docs-groups { max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}
@media (max-width: 860px) {
  .docs { padding-top: 20px; }
  .docs-nav { position: static; max-width: none; flex-basis: 100%; }
  .docs-menu > summary { display: flex; }
  .docs-menu[open] .docs-groups { margin-top: 12px; padding: 16px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
}

.doc-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.doc-header .crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.doc-header .crumbs a { color: var(--muted); }
.doc-header .crumbs a:hover { color: var(--gold); }
.doc-header h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-family: var(--display);
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: .02em;
}
.doc-header .lead { margin-top: 10px; color: var(--muted); }

/* Article typography */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  margin-top: 2.2em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--gold);
  letter-spacing: .02em;
}
.prose h3 { margin-top: 1.8em; font-size: 1.1rem; font-weight: 600; color: #ecdcc0; }
/* a sub-heading inside a section: on the UI pages, an enum before the table of its values */
.prose h4 {
  margin-top: 1.7em;
  padding: 2px 0 2px 12px;
  border-left: 3px solid var(--gold-dim);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gold);
}
.prose h4 code { font-size: .95em; color: var(--gold); border-color: var(--line-strong); background: rgba(233, 194, 122, .1); }
.prose h4 + p { margin-top: .5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose strong { color: #f0e3cc; }
.prose .card h3 { margin: 0 0 6px; color: var(--gold); font-size: 1.02rem; }
.prose .card p { margin: 0; }
/* code shows the characters as typed: no ligatures (Cascadia Code would draw => as an arrow) */
.prose code {
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-size: .88em;
  padding: .1em .38em;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #f0d7a8;
}
.prose pre {
  overflow-x: auto;
  font-variant-ligatures: none;
  padding: 16px 18px;
  border-radius: 12px;
  background: #0b0806;
  border: 1px solid var(--line);
  line-height: 1.55;
}
.prose pre code { padding: 0; border: 0; background: none; color: #e6d8c2; font-size: .86rem; }
/* the kind of a member name on the UI pages, in the colors of the code highlighting (and a blue): a plain property, a
   method, an event, a dependency property. The name's own chip takes the color in the tables, the headings and the legends, and
   the name's link in the sidebar */
.prop, .kb-prop, .kind-prop { --kind: #c9b28a; }
.dp, .kb-dp, .kind-dp { --kind: #f2a65a; }
.method, .kb-method, .kind-method { --kind: #b5c77a; }
.event, .kb-event, .kind-event { --kind: #8ab4d8; }
.prose .prop code, .prose .dp code, .prose .method code, .prose .event code, .prose .kb {
  color: var(--kind);
  border-color: color-mix(in srgb, var(--kind) 55%, transparent);
  background: color-mix(in srgb, var(--kind) 13%, transparent);
}
.prose .kb {
  font-family: var(--mono);
  font-size: .88em;
  font-variant-ligatures: none;
  padding: .1em .38em;
  border: 1px solid;
  border-radius: 5px;
  white-space: nowrap;
}
.docs-members a[class*="kind-"] { color: var(--kind); border-left-color: color-mix(in srgb, var(--kind) 45%, transparent); }
.docs-members a[class*="kind-"]:hover { background: color-mix(in srgb, var(--kind) 10%, transparent); border-left-color: var(--kind); }
.docs-members a[class*="kind-"][aria-current="location"] { border-left-color: var(--kind); background: color-mix(in srgb, var(--kind) 18%, transparent); }
/* the legend row at the top of a page whose names are colored by kind */
.prose .kind-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 1.6em;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.prose .kind-legend-title { margin-right: 4px; color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
/* a name that links to its glossary entry: the chip itself is the link */
.prose a.ref { text-decoration: none; white-space: nowrap; }
/* in a table a linked signature wraps at its spaces, and a long name where the docs layout lets it (a long one made its
   table wider than the page); a wrapped chip keeps its padding and border on every line */
.prose td a.ref { white-space: normal; }
.prose td code { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.prose a.ref code { transition: border-color .15s, background .15s; }
/* the types linked inside a code chip (a signature, a handler, a generic type): the chip's color, a faint underline */
.prose code a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 2px; }
.prose code a:hover, .prose code a:focus-visible { color: var(--gold); text-decoration-color: currentColor; }
.prose a.ref:hover code, .prose a.ref:focus-visible code {
  border-color: var(--kind, var(--gold-dim));
  background: color-mix(in srgb, var(--kind, #e9c27a) 24%, transparent);
}
/* the arrow after a name in a glossary heading: the member's table on its topic page (the arrow from a symbol font
   loaded for it alone, see base.html) */
.prose .ctx {
  display: inline-block;
  margin-left: .45em;
  padding: 0 .42em;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--gold-dim);
  font-family: "Noto Sans Symbols 2", var(--sans);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  vertical-align: .08em;
}
.prose .ctx:hover, .prose .ctx:focus-visible { color: var(--gold); border-color: var(--gold-dim); background: rgba(233, 194, 122, .08); }
.prose .highlighter-rouge + .highlighter-rouge, .prose div.highlight { margin-top: 1em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; display: block; overflow-x: auto; }
/* a cursor picture in a table (the Example column of the mouse cursors): at its own size, on the line, never shrunk */
.prose td img.cursor { vertical-align: middle; max-width: none; }
/* on a soft mid-tone, so a dark cursor (the text I-beam) shows as well as the light and golden ones; the padding goes
   around the picture's own size (content-box), so it is not scaled */
.prose td img.cursor { box-sizing: content-box; padding: 2px; border-radius: 6px; background: #6e6252; }
/* a hover and a pressed cursor side by side, also where the description takes most of the row */
.prose td:has(> img.cursor) { white-space: nowrap; }
/* an example texture of a texture set (on the styles page): on a faint checkerboard, so its transparent parts and its
   outline show; the padding goes around the picture's own size */
.prose td img.texture {
  vertical-align: middle;
  max-width: none;
  box-sizing: content-box;
  padding: 3px;
  border-radius: 6px;
  background: repeating-conic-gradient(#2c241c 0 25%, #1a140f 0 50%) 0 0 / 10px 10px;
}
/* the scroll bars of wide code blocks and tables, in the site's colors instead of the browser's */
.prose pre, .prose table {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.prose pre:hover, .prose table:hover { scrollbar-color: var(--gold-dim) transparent; }
@supports not (scrollbar-color: auto) {
  .prose pre::-webkit-scrollbar, .prose table::-webkit-scrollbar { height: 8px; }
  .prose pre::-webkit-scrollbar-track, .prose table::-webkit-scrollbar-track { background: transparent; }
  .prose pre::-webkit-scrollbar-thumb, .prose table::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; }
  .prose pre:hover::-webkit-scrollbar-thumb, .prose table:hover::-webkit-scrollbar-thumb { background: var(--gold-dim); }
}
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--gold); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose blockquote { padding: 12px 18px; border-left: 3px solid var(--gold-dim); background: var(--surface); border-radius: 0 10px 10px 0; color: var(--text); }

/* Screenshots of rendered UI (rendered at 2x, shown at their logical size) */
.prose .shot { margin-top: 1.4em; }
.prose .shot img {
  display: block;
  /* the canvas around the picture, in its own color: the rounded corners cut into it, not into the picture's
     frame; outside the picture's size (content-box), so the picture isn't scaled */
  box-sizing: content-box;
  max-width: calc(100% - 18px);
  height: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #100c09;
}
.prose .shot figcaption { margin-top: 6px; font-size: .85rem; color: var(--muted); }

/* "To write" placeholder callouts in draft articles */
.prose .todo {
  padding: 12px 16px;
  border: 1px dashed rgba(242, 140, 40, .5);
  border-radius: 10px;
  background: rgba(242, 140, 40, .05);
  color: var(--muted);
  font-size: .92rem;
}
.prose .todo::before {
  content: "To write";
  display: block;
  margin-bottom: 2px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--flame);
}

.doc-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 74ch;
}
.doc-pager a {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--gold);
}
.doc-pager a:hover { border-color: var(--line-strong); background: var(--surface); }
.doc-pager a span { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.doc-pager a.next { text-align: right; }

/* Rouge syntax colors (C# and friends) */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs, .highlight .cd { color: #7d6f5c; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kc { color: #f2a65a; }
.highlight .kt, .highlight .nc, .highlight .nn { color: #e9c27a; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sc, .highlight .se, .highlight .si { color: #b5c77a; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh { color: #d99a6c; }
.highlight .nf, .highlight .fm { color: #f0d7a8; }
.highlight .na, .highlight .nb { color: #c9b28a; }
.highlight .o, .highlight .p { color: #b9a68a; }
.highlight .err { color: inherit; background: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
