/* Goblin's user guide: the download page's workshop wall (sage pegboard, paper, label-maker tape), set for reading.
   Light and dark follow the system; the toggle in the top bar sets <html data-theme="light|dark"> and remembers it. */
:root {
  --wall: #dce5cc; --hole: rgba(46, 63, 33, 0.17);
  --paper: #fbfaf3; --paper-edge: #e6e3d4; --paper-shade: #f3f1e6;
  --ink: #1b2415; --ink-2: #4b5941; --ink-3: #56634b; --line: rgba(27, 36, 21, 0.12);
  --overall: #ee5b26; --overall-deep: #c4421a; --brass: #e7ab2a; --brass-deep: #8a5c0a; --moss: #3d6a22;
  --cpu: #3f86e6; --memory: #8d82e8; --disk: #d99a16; --network: #1fa877; --gpu: #dd5a8f; --battery: #34b955;
  --heat: #ee7443; --projects: #e8682f; --firewall: #c2410c; --slate: #5b6b7e;
  /* Text on label-maker tape: dark ink on every color, white where the tape is dark enough for it. */
  --on-tape: #14190f; --on-slate: #fff; --on-ink: #fff;
  --get-bg: var(--ink); --get-fg: #fff; --since-ink: var(--overall-deep); --hand-ink: var(--overall-deep);
  --warn-ink: var(--overall-deep); --shadow: rgba(30, 40, 15, 0.55);
  --display: "Bricolage Grotesque", "Avenir Next Condensed", system-ui, sans-serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --wall: #141b12; --hole: rgba(0, 0, 0, 0.55);
    --paper: #1f271b; --paper-edge: #2f3a29; --paper-shade: #263021;
    --ink: #eef2e5; --ink-2: #b4c0a6; --ink-3: #8f9c81; --line: rgba(238, 242, 229, 0.11);
    --moss: #9cc76a; --cpu: #5a9cf3; --memory: #a39af2; --network: #2ec08b; --battery: #47cf68;
    --firewall: #e2622a; --slate: #8597ac; --brass-deep: #e7ab2a;
    --on-slate: #14190f; --on-ink: #14190f;
    --get-bg: var(--overall); --get-fg: #14190f; --since-ink: #ffb08a; --hand-ink: var(--brass); --warn-ink: #ff9a6c; --shadow: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --wall: #141b12; --hole: rgba(0, 0, 0, 0.55);
  --paper: #1f271b; --paper-edge: #2f3a29; --paper-shade: #263021;
  --ink: #eef2e5; --ink-2: #b4c0a6; --ink-3: #8f9c81; --line: rgba(238, 242, 229, 0.11);
  --moss: #9cc76a; --cpu: #5a9cf3; --memory: #a39af2; --network: #2ec08b; --battery: #47cf68;
  --firewall: #e2622a; --slate: #8597ac; --brass-deep: #e7ab2a;
  --on-slate: #14190f; --on-ink: #14190f;
  --get-bg: var(--overall); --get-fg: #14190f; --since-ink: #ffb08a; --hand-ink: var(--brass); --warn-ink: #ff9a6c; --shadow: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scroll-behavior: smooth; }
body {
  margin: 0; font: 17px/1.65 var(--sans); color: var(--ink);
  background-color: var(--wall);
  background-image: radial-gradient(circle, var(--hole) 2.4px, transparent 3px);
  background-size: 26px 26px; background-position: 13px 13px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration-color: var(--overall); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--overall); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1220px, 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-wide { width: min(1400px, 100% - var(--gutter) * 2); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip {
  position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--ink); color: var(--paper); padding: 11px 16px;
  border-radius: 10px; font-weight: 700; text-decoration: none; transition: top 0.15s;
}
.skip:focus { top: 12px; }
main:focus { outline: none; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--wall) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 21px/1 var(--display); letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.brand-guide { text-decoration: none; color: var(--ink-2); font-weight: 600; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.draft { font: 700 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: #fff; background: var(--overall-deep); padding: 6px 9px; border-radius: 3px; transform: rotate(-1.5deg); white-space: nowrap; }
.topnav { margin-right: auto; display: flex; gap: 4px; }
.topnav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.topnav a:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink); }
.get { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--get-fg); background: var(--get-bg); padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; cursor: pointer; padding: 0;
  background: var(--paper); border: 1px solid var(--paper-edge); color: var(--ink-2);
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; grid-area: 1 / 1; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
}

/* ---------- Search trigger (the real box opens over the page) ---------- */
.search-trigger {
  display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 13px; border-radius: 999px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--paper-edge); color: var(--ink-3); text-decoration: none;
  font: 500 14.5px/1 var(--sans); box-shadow: 0 6px 16px -14px var(--shadow);
}
.search-trigger:hover { border-color: color-mix(in srgb, var(--overall) 55%, var(--paper-edge)); color: var(--ink-2); }
.search-trigger svg { width: 16px; height: 16px; flex: none; }
.search-trigger .st-label { flex: 1; text-align: left; }
.st-kbd { font: 600 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.search-trigger.st-top { min-width: 210px; }
.search-trigger.st-side { width: 100%; height: 42px; border-radius: 12px; margin-bottom: 14px; }
.search-trigger.st-big { display: flex; width: min(620px, 100%); height: 58px; margin: 0 auto; border-radius: 18px; padding: 0 16px 0 18px; font-size: 18px; }
.search-trigger.st-big svg { width: 20px; height: 20px; }

/* ---------- Tape and badges ---------- */
.tape {
  --tape: var(--ink); --tape-fg: var(--on-tape);
  display: inline-block; padding: 6px 11px 5px; background: var(--tape); color: var(--tape-fg);
  font: 700 12px/1 var(--mono); font-variation-settings: "wdth" 85; letter-spacing: 0.16em; text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
  border-radius: 2px; transform: rotate(-1.2deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 -2px 0 rgba(0, 0, 0, 0.18) inset, 0 2px 4px rgba(0, 0, 0, 0.18);
  background-image: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 40%, rgba(0,0,0,0.12));
}
.since {
  display: inline-block; margin: 0 0 14px; padding: 4px 10px; border-radius: 999px;
  font: 600 13px/1.3 var(--sans); color: var(--since-ink); background: color-mix(in srgb, var(--overall) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--overall) 35%, transparent);
}
.card .since { margin: 0 0 0 8px; padding: 1px 7px; font-size: 11.5px; vertical-align: 2px; }

/* ---------- Hub ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 12px; text-align: center; }
.hand { font: 700 28px/1 var(--hand); color: var(--hand-ink); margin: 0 0 8px; transform: rotate(-2deg); }
.hero h1 { font: 800 clamp(44px, 8vw, 92px)/0.92 var(--display); font-variation-settings: "opsz" 96, "wdth" 78; letter-spacing: -0.035em; margin: 0 0 18px; }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--ink-2); max-width: 36em; margin: 0 auto 28px; }
.popular { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; font-size: 14.5px; color: var(--ink-3); align-items: center; }
.popular a { text-decoration: none; color: var(--ink-2); background: color-mix(in srgb, var(--paper) 75%, transparent); border: 1px solid var(--paper-edge); padding: 5px 12px; border-radius: 999px; }
.popular a:hover { color: var(--ink); border-color: var(--overall); }
.hub { padding-bottom: 40px; }
.hub > section { margin: 46px 0; }
.eyebrow { font: 700 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 16px; }
.more { margin: 14px 0 0; font-weight: 600; font-size: 15px; }
.more a { color: var(--ink-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.tile {
  background: var(--paper); border-radius: 18px; padding: 24px 24px 20px; display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 14px 28px -22px var(--shadow);
}
.tile .tape { align-self: flex-start; }
.tile h2 { font: 800 28px/1.05 var(--display); font-variation-settings: "wdth" 84; letter-spacing: -0.02em; margin: 16px 0 6px; }
.tile h2 a { text-decoration: none; }
.tile p { margin: 0 0 12px; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.tile ul { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid var(--line); }
.tile li a { display: block; text-decoration: none; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink); }
.tile li a:hover { color: var(--overall-deep); }
.tile-more { margin-top: auto; font-weight: 700; font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.tile-more:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Cards and task lists ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.card {
  display: block; text-decoration: none; padding: 18px 20px 19px; background: var(--paper); border-radius: 14px;
  box-shadow: 0 0 0 1px var(--paper-edge), 0 12px 24px -18px var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--paper-edge), 0 18px 30px -18px var(--shadow); }
.card b { display: block; font: 700 18px/1.25 var(--display); font-variation-settings: "wdth" 92; margin-bottom: 4px; }
.card span:not(.since) { color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px 12px; }
.task-list a {
  display: flex; flex-direction: column; gap: 1px; height: 100%; padding: 10px 14px 11px; border-radius: 12px; text-decoration: none;
  background: var(--paper); box-shadow: 0 0 0 1px var(--paper-edge);
}
.task-list a:hover { box-shadow: 0 0 0 1px var(--overall); }
.task-list b { font: 650 15.5px/1.35 var(--sans); color: var(--ink); }
.task-list span { font-size: 13px; color: var(--ink-3); }
.top-tasks { margin: 0 0 34px; }
.top-tasks h2, .list-title { font: 800 24px/1 var(--display); letter-spacing: -0.01em; margin: 0 0 14px; }
.count { margin: 0; font: 600 12px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- Search box (⌘K) ---------- */
body.gs-open { overflow: hidden; }
.gs-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start;
  padding: min(12vh, 110px) 16px 16px; background: rgba(14, 20, 11, 0.55);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.gs-overlay[hidden] { display: none; }
.gs-dialog {
  width: min(700px, 100%); max-height: min(78vh, 720px); display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.7);
}
.gs-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.gs-field svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.gs-input {
  flex: 1; min-width: 0; height: 62px; border: 0; background: transparent; color: var(--ink); font: 500 19px/1 var(--sans);
  -webkit-appearance: none; appearance: none;
}
.gs-input::placeholder { color: var(--ink-3); }
.gs-input:focus, .gs-input:focus-visible { outline: none; }
.gs-field:focus-within { box-shadow: inset 0 -2px 0 var(--overall); }
.gs-esc { font: 600 11px/1 var(--mono); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; background: transparent; cursor: pointer; }
.gs-body { overflow: auto; padding: 8px 8px 10px; flex: 1; overscroll-behavior: contain; }
.gs-group { padding: 12px 10px 6px; }
.gs-group .tape { font-size: 10.5px; padding: 5px 9px 4px; }
.gs-row {
  display: block; text-decoration: none; padding: 9px 12px 10px; border-radius: 11px; scroll-margin: 40px;
}
.gs-row:hover { background: color-mix(in srgb, var(--paper-shade) 70%, transparent); }
.gs-row[aria-selected="true"] { background: var(--paper-shade); box-shadow: inset 3px 0 0 var(--overall); }
.gs-row.sub { margin-left: 22px; padding-top: 6px; padding-bottom: 7px; border-left: 2px solid var(--line); border-radius: 0 11px 11px 0; }
.gs-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 700; font-size: 15.5px; }
.gs-title .gs-arrow { color: var(--ink-3); font-weight: 400; }
.gs-title .gs-h { font-weight: 650; color: var(--ink-2); }
.gs-row.sub .gs-title { font-size: 14.5px; }
.gs-snip { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; margin-top: 2px; overflow-wrap: anywhere; }
.gs-snip.tiny { color: var(--ink-3); }
mark { background: color-mix(in srgb, var(--brass) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.gs-empty { padding: 18px 16px 8px; color: var(--ink-2); font-size: 15px; }
.gs-empty p { margin: 0 0 10px; }
.gs-empty b { color: var(--ink); }
.gs-label { margin: 14px 12px 6px; font: 700 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.gs-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 4px; }
.gs-chips button, .chip {
  font: 600 14px/1 var(--sans); color: var(--ink-2); background: var(--paper-shade); border: 1px solid var(--paper-edge); border-radius: 999px;
  padding: 8px 13px; cursor: pointer; text-decoration: none;
}
.gs-chips button:hover, .chip:hover { color: var(--ink); border-color: var(--overall); }
.gs-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 16px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); background: var(--paper-shade);
}
.gs-foot kbd { font: 600 11px/1 var(--mono); border: 1px solid var(--paper-edge); background: var(--paper); border-radius: 4px; padding: 2px 5px; margin-right: 3px; color: var(--ink-2); }
.gs-foot a { margin-left: auto; font-weight: 700; color: var(--ink-2); }

/* Full results page and task filter */
.task-filter { position: relative; display: flex; align-items: center; margin: 0 0 22px; max-width: 560px; }
.task-filter svg { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.task-filter input {
  width: 100%; font: 500 16px/1 var(--sans); color: var(--ink); padding: 14px 16px 14px 43px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--paper-edge); -webkit-appearance: none; appearance: none;
}
.task-filter input:focus { outline: none; border-color: var(--overall); box-shadow: 0 0 0 3px color-mix(in srgb, var(--overall) 22%, transparent); }
.task-filter.big { max-width: 720px; }
.task-filter.big input { font-size: 19px; padding: 17px 18px 17px 48px; }
.none { color: var(--ink-2); }
.task-group { margin: 0 0 30px; }
.task-group[hidden], .task-list li[hidden] { display: none; }
.task-group-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.task-group-head h2 { margin: 0; font-size: inherit; line-height: 1; }
.task-group-head .tape { font-size: 14px; padding: 8px 14px 7px; }
.task-group:target .task-group-head h2 { text-decoration: underline; text-decoration-color: var(--overall); text-decoration-thickness: 3px; }
.result-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.result-count { margin: 0 0 16px; color: var(--ink-3); font-size: 14.5px; min-height: 1.4em; }
.rp-group { margin: 0 0 26px; }
.rp-group > .tape { margin-bottom: 12px; }
.rp-hit { background: var(--paper); border-radius: 14px; padding: 16px 20px 14px; margin: 0 0 12px; box-shadow: 0 0 0 1px var(--paper-edge); }
.rp-hit h3 { font: 700 19px/1.25 var(--display); font-variation-settings: "wdth" 92; margin: 0 0 3px; }
.rp-hit h3 a { text-decoration: none; }
.rp-hit h3 a:hover { text-decoration: underline; text-decoration-color: var(--overall); }
.rp-hit .rp-sum { margin: 0 0 6px; color: var(--ink-2); font-size: 15px; }
.rp-hit ul { list-style: none; margin: 8px 0 0; padding: 0; }
.rp-hit li { border-top: 1px solid var(--line); padding: 8px 0 2px; }
.rp-hit li a { font-weight: 650; font-size: 15px; }
.rp-hit li a::before { content: "# "; color: var(--ink-3); }
.rp-hit li p { margin: 2px 0 4px; font-size: 14px; color: var(--ink-2); }

/* ---------- Article layout ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; padding: 28px 0 40px; align-items: start; }
.side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding: 2px 6px 30px 2px; scrollbar-width: thin; }
.side nav { margin-top: 2px; }
.side-close { display: none; }
.side-link { display: block; text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 10px; margin-bottom: 8px; border-radius: 9px; background: var(--paper); box-shadow: 0 0 0 1px var(--paper-edge); }
.side-link.on { box-shadow: 0 0 0 2px var(--overall); }
.side-group { margin-bottom: 4px; }
.side-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font: 700 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
  padding: 10px 10px; border-radius: 8px;
}
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--ink-3)); flex: none; order: -1; }
.side-group summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
.side-group[open] summary::after { transform: rotate(45deg); }
.side-group summary:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink); }
.side ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 10px; }
.side li a { display: block; text-decoration: none; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; padding: 6px 10px; border-radius: 8px; }
.side li a:hover { background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink); }
.side li a.on { background: var(--paper); color: var(--ink); font-weight: 650; box-shadow: 0 0 0 1px var(--paper-edge); }
.side li a.overview { font-style: italic; }
.side li a i { font: 700 9.5px/1 var(--mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn-ink); margin-left: 6px; vertical-align: 1px; }
.side-toggle {
  display: none; align-items: center; gap: 8px; font: 600 14px/1 var(--sans); color: var(--ink); cursor: pointer;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 999px; padding: 9px 14px;
}
.side-toggle svg { width: 16px; height: 16px; }
.main-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 2px 0 12px; }
.crumbs { font-size: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.main { min-width: 0; }
.paper {
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 22px;
  padding: clamp(22px, 4.5vw, 54px); box-shadow: 0 20px 50px -30px var(--shadow);
}
.paper h1, .section-head h1 { font: 800 clamp(34px, 5.5vw, 56px)/1 var(--display); font-variation-settings: "opsz" 96, "wdth" 82; letter-spacing: -0.03em; margin: 16px 0 12px; overflow-wrap: anywhere; }
.summary { font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2); margin: 0 0 22px; }
.section-head { margin-bottom: 24px; }
.section-head .summary { max-width: 46em; margin-bottom: 12px; }

/* On this page: a box in the page on narrow screens, a sticky rail with a section marker on wide ones. */
.toc { background: var(--paper-shade); border-radius: 14px; padding: 14px 18px; margin: 0 0 26px; }
.toc b { font: 700 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.toc ul { margin: 8px 0 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.rail { display: none; }
@media (min-width: 1360px) {
  .shell.has-rail { grid-template-columns: 250px minmax(0, 1fr) 200px; }
  .has-rail .toc-inline { display: none; }
  .rail { display: block; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; scrollbar-width: thin; padding-top: 6px; }
  .toc-rail { background: none; padding: 0 0 0 14px; margin: 0; border-left: 1px solid var(--line); }
  .toc-rail ul { columns: 1; margin-top: 12px; }
  .toc-rail li { margin: 0; }
  .toc-rail a { display: block; font-size: 14px; line-height: 1.35; padding: 5px 8px 5px 10px; margin-left: -15px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
  .toc-rail a.active { color: var(--ink); font-weight: 650; border-left-color: var(--overall); background: color-mix(in srgb, var(--paper) 60%, transparent); }
  .toc-rail ul.sub { display: none; margin: 0 0 4px 12px; }
  .toc-rail li.open > ul.sub { display: block; }
  .toc-rail ul.sub a { font-size: 13px; color: var(--ink-3); }
  .toc-rail ul.sub a.active { color: var(--ink); }
  .has-rail .paper { padding: clamp(22px, 3.4vw, 44px); }
}

/* ---------- Prose ---------- */
.prose { max-width: 46em; overflow-wrap: break-word; }
.prose p, .prose li, .prose td, .prose th, .callout { overflow-wrap: anywhere; }
.prose pre, .prose pre code { overflow-wrap: normal; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose a { text-decoration-thickness: 1.5px; }
.prose h2 { font: 800 28px/1.15 var(--display); font-variation-settings: "wdth" 88; letter-spacing: -0.015em; margin: 46px 0 10px; position: relative; }
.prose h3 { font: 700 20px/1.3 var(--display); font-variation-settings: "wdth" 94; margin: 30px 0 6px; position: relative; }
.prose h4 { font: 700 16px/1.35 var(--sans); margin: 22px 0 4px; position: relative; }
.anchor {
  position: absolute; left: -1.15em; top: 0; width: 1.15em; text-align: center; text-decoration: none; color: var(--ink-3);
  opacity: 0; font: 500 0.8em var(--mono); line-height: inherit; transition: opacity 0.12s;
}
.prose h4 .anchor { font-size: 0.95em; }
h2:hover > .anchor, h3:hover > .anchor, h4:hover > .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--overall-deep); }
@keyframes flash { from { background: color-mix(in srgb, var(--brass) 42%, transparent); } to { background: transparent; } }
.prose h2:target, .prose h3:target, .prose h4:target { animation: flash 2.2s ease-out; border-radius: 6px; }
.anchor.copied { color: var(--moss); opacity: 1; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose code { font: 500 0.82em/1 var(--mono); background: var(--paper-shade); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; color: var(--ink); white-space: nowrap; }
.prose kbd {
  display: inline-block; font: 600 0.8em/1 var(--sans); padding: 3px 7px 4px; border-radius: 6px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--paper-edge); box-shadow: 0 2px 0 var(--paper-edge);
}
/* A path through the app, written **Settings › Clipbar**. */
.prose strong.path {
  font-weight: 600; font-size: 0.93em; color: var(--ink); background: var(--paper-shade); border: 1px solid var(--line);
  border-radius: 7px; padding: 1px 7px 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; line-height: 1.9;
}
.prose strong.path i { font-style: normal; font-weight: 700; color: var(--overall-deep); margin: 0 6px; }
:root[data-theme="dark"] .prose strong.path i { color: var(--brass); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose strong.path i { color: var(--brass); } }

/* Code, with a Copy button the script adds. */
.code { position: relative; margin: 16px 0 20px; }
.prose pre { margin: 0; padding: 14px 16px; background: var(--paper-shade); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.code[data-lang] pre { padding-top: 30px; }
.code[data-lang]::before {
  content: attr(data-lang); position: absolute; left: 14px; top: 9px; font: 600 10.5px/1 var(--mono); letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.prose pre code { font: 500 13px/1.6 var(--mono); background: none; border: 0; padding: 0; white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; font: 600 12px/1 var(--sans); color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--paper-edge); border-radius: 8px; padding: 6px 10px; cursor: pointer; opacity: 0; transition: opacity 0.12s;
}
.code:hover .copy-btn, .copy-btn:focus-visible, .copy-btn.done { opacity: 1; }
.copy-btn.done { color: var(--moss); }
@media (hover: none) { .copy-btn { opacity: 1; } }
.prose hr { border: 0; border-top: 1px dashed var(--line); margin: 36px 0; }
.table-scroll { overflow-x: auto; margin: 16px 0 20px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font: 700 11px/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.prose td { color: var(--ink-2); }
.prose td:first-child { color: var(--ink); font-weight: 600; min-width: 9em; }
@media (max-width: 640px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose thead { display: none; }
  .prose tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .prose td { border: 0; padding: 2px 0; }
  .prose td:not(:first-child)[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-3); }
  .prose code { white-space: normal; overflow-wrap: anywhere; }
}

/* Numbered lists are steps. */
.prose ol.steps { list-style: none; padding: 0; margin: 20px 0 24px; counter-reset: step; }
.prose ol.steps > li { counter-increment: step; position: relative; margin: 0; padding: 4px 0 20px 56px; min-height: 40px; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font: 800 19px/38px var(--display); text-align: center;
  box-shadow: 0 0 0 4px var(--paper);
}
.prose ol.steps > li::after { content: ""; position: absolute; left: 18px; top: 42px; bottom: 2px; width: 2px; background: var(--line); }
.prose ol.steps > li:last-child { padding-bottom: 4px; }
.prose ol.steps > li:last-child::after { display: none; }
.prose ol.steps ul, .prose ol.steps ol { margin: 6px 0 0; }

/* Tip, Note, Warning, New. */
.callout {
  display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 18px 14px 16px; margin: 18px 0;
  background: var(--paper-shade); border-left: 4px solid var(--ink-3);
}
.callout-body { min-width: 0; }
.callout p { margin: 0; color: var(--ink); }
.callout p + p { margin-top: 8px; }
.callout-ic { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--ink-3); }
.callout-tip { border-left-color: var(--moss); background: color-mix(in srgb, var(--moss) 9%, var(--paper)); }
.callout-tip .callout-ic { color: var(--moss); }
.callout-warning { border-left-color: var(--overall); background: color-mix(in srgb, var(--overall) 9%, var(--paper)); }
.callout-warning .callout-ic { color: var(--warn-ink); }
.callout-new { border-left-color: var(--brass); background: color-mix(in srgb, var(--brass) 12%, var(--paper)); }
.callout-new .callout-ic { color: var(--brass-deep); }

/* ---------- Screenshots ---------- */
.shot { margin: 22px 0 26px; }
.shot img { border-radius: 14px; box-shadow: 0 22px 44px -26px rgba(15, 22, 10, 0.6); width: 100%; }
.shot-zoom { display: block; cursor: zoom-in; border-radius: 14px; }
.shot figcaption { font-size: 14px; color: var(--ink-3); margin-top: 10px; text-align: center; }
.shot-compact .shot-zoom { max-width: 320px; margin-inline: auto; }
.shot-compact figcaption { max-width: 420px; margin-inline: auto; }
.shot-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.shot-ph {
  /* A compact strip until the picture exists, so a draft full of them still reads like a page. */
  min-height: 120px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 20px; text-align: center; border: 2px dashed color-mix(in srgb, var(--ink-3) 45%, transparent);
  background: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--ink-3) 7%, transparent) 14px 28px);
}
.shot-ph-tape { font: 700 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper); background: var(--ink-3); padding: 6px 10px; border-radius: 2px; transform: rotate(-1.5deg); }
.shot-ph-what { color: var(--ink-3); font-size: 14.5px; max-width: 30em; }

.lb { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 64px 24px; background: rgba(8, 12, 6, 0.9); }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: calc(100vh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -20px #000; background: var(--paper); }
.lb-cap { color: #e8eddc; font-size: 15px; text-align: center; max-width: 60em; margin: 0; }
.lb-count { position: absolute; top: 20px; left: 24px; color: #b4c0a6; font: 600 13px/1 var(--mono); }
.lb-btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); color: #fff; font-size: 24px; line-height: 1;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-btn:focus-visible { outline: 3px solid var(--overall); }
.lb-close { top: 14px; right: 18px; }
.lb-prev { left: 12px; top: 50%; margin-top: -23px; }
.lb-next { right: 12px; top: 50%; margin-top: -23px; }
.lb-btn[hidden] { display: none; }

/* ---------- Pager, related, footer, toast ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.pg { text-decoration: none; background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 14px; padding: 14px 18px; }
.pg:hover { border-color: var(--overall); }
.pg span { display: block; font-size: 13px; color: var(--ink-3); }
.pg b { font: 700 17px/1.3 var(--display); }
.pg.next { text-align: right; grid-column: 2; }
.related h2 { font: 800 24px/1 var(--display); margin: 30px 0 14px; }
footer { padding: 40px var(--gutter) 56px; text-align: center; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); margin-top: 40px; }
footer p { margin: 4px 0; }
footer a { color: var(--ink-2); }
footer img { width: 44px; height: 44px; margin: 0 auto 12px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 150; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); font: 600 14px/1 var(--sans); padding: 11px 16px; border-radius: 999px; transition: opacity 0.18s, transform 0.18s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(10, 14, 8, 0.5); }
.scrim[hidden] { display: none; }

/* ---------- Narrow screens ---------- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
  .side {
    position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(88vw, 340px); max-height: none; margin: 0;
    background: var(--paper); border-right: 1px solid var(--paper-edge); padding: 56px 14px 28px; overflow-y: auto;
    transform: translateX(-104%); visibility: hidden; transition: transform 0.22s ease, visibility 0s linear 0.22s;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
  }
  .side.open { transform: none; visibility: visible; transition: transform 0.22s ease; }
  .side-close {
    display: grid; place-items: center; position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    background: var(--paper-shade); border: 1px solid var(--paper-edge); color: var(--ink); font-size: 22px; line-height: 1;
  }
  .side-toggle { display: inline-flex; }
  .brand-guide, .topnav { display: none; }
  .topbar-in { gap: 8px; }
  .topbar-in .search-trigger.st-top { margin-left: auto; }
  .anchor { position: static; opacity: 0.55; margin-left: 0.4em; width: auto; display: inline-block; }
  .toc ul { columns: 1; }
}
@media (max-width: 700px) {
  .search-trigger.st-top { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .search-trigger.st-top .st-label, .search-trigger.st-top .st-kbd { display: none; }
  .get { padding: 9px 13px; font-size: 14px; }
  .lb { padding: 56px 12px 20px; }
  .lb-prev { left: 4px; top: auto; bottom: 14px; margin: 0; }
  .lb-next { right: 4px; top: auto; bottom: 14px; margin: 0; }
  .gs-overlay { padding-top: 10px; }
  .gs-dialog { max-height: calc(100vh - 20px); }
  .st-kbd { display: none; }
}
@media (max-width: 520px) {
  .pager { grid-template-columns: 1fr; }
  .pg.next { grid-column: 1; }
  .draft { display: none; }
  .tile { padding: 20px 18px 18px; }
  .paper { border-radius: 18px; }
  .callout { padding: 12px 14px 12px 12px; gap: 10px; }
  .prose ol.steps > li { padding-left: 48px; }
  .prose ol.steps > li::before { width: 34px; height: 34px; font-size: 17px; line-height: 34px; }
  .prose ol.steps > li::after { left: 16px; top: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Print: just the page ---------- */
@media print {
  :root { --wall: #fff; --paper: #fff; --paper-edge: #ccc; --paper-shade: #f4f4f4; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #ccc; }
  body { background: #fff; font-size: 11.5pt; }
  .topbar, .side, .rail, .toc, .pager, .related, footer, .main-bar .side-toggle, .anchor, .copy-btn, .gs-overlay, .lb, .toast, .skip, .scrim { display: none !important; }
  .shell { display: block; padding: 0; }
  .wrap, .wrap-wide { width: 100%; }
  .paper { border: 0; box-shadow: none; padding: 0; }
  .prose { max-width: none; }
  .prose a { text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .prose h2, .prose h3, .prose h4 { break-after: avoid; }
  .shot, .callout, pre, table, ol.steps > li { break-inside: avoid; }
  .tape { color: #000; background: none; border: 1px solid #000; box-shadow: none; transform: none; text-shadow: none; }
  .prose pre code { white-space: pre-wrap; }
  .shot-ph { border-color: #999; background: none; }
}
