/*
 * The whole look of docs.hungrit.com.
 *
 * Two themes share one structure: graphite (the product's own ground) and
 * paper. The drawings are ink on either, so they are coloured here through the
 * `--a-*` tokens and never carry a colour of their own. Coral is the only hue
 * on a page and is spent on what you can act on, plus one mark per drawing.
 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #0e0f11;
  --bg-deep: #0a0b0c;
  --panel: #141518;
  --panel-hi: #1a1b1f;
  --raised: rgba(255, 255, 255, 0.03);
  --raised-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.15);

  --accent: #ff6152;
  --accent-hi: #ff8175;
  --accent-deep: #c93424;
  --accent-soft: rgba(255, 97, 82, 0.1);
  --accent-line: rgba(255, 97, 82, 0.4);
  /* Text ON the coral: ink reads at 6.5:1, white would be 3.0:1. */
  --on-accent: #0e0e0e;
  --link: #ff8175;
  --success: #6fd49a;
  --success-bg: rgba(111, 212, 154, 0.06);
  --warn: #f2c94c;
  --danger: #ff7b8a;

  --text: #f4f2ee;
  --text-dim: #c4c1ba;
  --text-faint: #8b8881;

  /* ink drawings */
  --a-ink: #d9d3c7;
  --a-top: #1d1e22;
  --a-l: #17181b;
  --a-r: #121316;
  --a-hatch: 0.36;

  --radius-sm: 6px;
  --radius: 9px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);

  --topbar-h: 64px;
  --side-w: 272px;
  --outline-w: 248px;
  --measure: 800px;
  --measure-learn: 720px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-kw: #ff8a7e;
  --t-fn: #8cb8ff;
  --t-str: #e8bf92;
  --t-num: #f2d184;
  --t-cst: #f2d184;
  --t-com: #6f6c66;
  --t-dir: #7d7a73;
  --t-op: #9a968e;
  --t-punc: #a39f97;
  --t-var: #ece9e3;
  --t-key: #a9e4d0;
  --t-flag: #f2d184;
}

[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-deep: #efebe4;
  --panel: #fdfbf8;
  --panel-hi: #f2eee7;
  --raised: rgba(40, 30, 15, 0.03);
  --raised-hover: rgba(40, 30, 15, 0.06);
  --border: rgba(40, 30, 15, 0.11);
  --border-strong: rgba(40, 30, 15, 0.22);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 26px -14px rgba(60, 40, 20, 0.28);

  /* Links are text on paper here, and #c93424 is the coral that holds 5:1. */
  --link: #c93424;
  --accent-hi: #ff6152;
  --accent-soft: rgba(232, 64, 46, 0.08);
  --accent-line: rgba(232, 64, 46, 0.4);
  --success: #1d7a48;
  --success-bg: rgba(29, 122, 72, 0.06);
  --warn: #9a6a00;
  --danger: #b4233a;

  --text: #1b1a17;
  --text-dim: #45423c;
  --text-faint: #77736b;

  --a-ink: #2b2824;
  --a-top: #fdfbf8;
  --a-l: #f2eee7;
  --a-r: #e9e4db;
  --a-hatch: 0.42;

  --t-kw: #c93424;
  --t-fn: #1d5fbf;
  --t-str: #9a4a1c;
  --t-num: #a16207;
  --t-cst: #a16207;
  --t-com: #8a857b;
  --t-dir: #8a857b;
  --t-op: #5d5850;
  --t-punc: #6d6860;
  --t-var: #22201c;
  --t-key: #b02b1c;
  --t-flag: #a16207;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 24px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.7;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
.doc a:not([class]) {
  text-decoration: underline; text-decoration-color: var(--accent-line);
  text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: text-decoration-color .15s, color .15s;
}
.doc a:not([class]):hover { text-decoration-color: currentColor; }

::selection { background: rgba(255, 97, 82, 0.28); color: var(--text); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------------------------------------ art tokens */

.art { display: block; width: 100%; height: auto; overflow: visible; }
.art path, .art circle, .art ellipse {
  stroke-width: 1.15; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round;
}
.art .t { fill: var(--a-top); stroke: var(--a-ink); }
.art .l { fill: var(--a-l); stroke: var(--a-ink); }
.art .r { fill: var(--a-r); stroke: var(--a-ink); }
.art .k { fill: none; stroke: var(--a-ink); }
.art .h { fill: none; stroke: var(--a-ink); stroke-width: .7; opacity: var(--a-hatch); }
.art .d { fill: none; stroke: var(--a-ink); stroke-width: .8; stroke-dasharray: 3 3; opacity: .55; }
.art .x { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.art .xf { fill: var(--accent); stroke: none; }
.art .xd { fill: none; stroke: var(--accent); stroke-width: 1.1; stroke-dasharray: 3 3; }
.art .ld { fill: none; stroke: var(--text-faint); stroke-width: .8; opacity: .7; transition: stroke .2s, opacity .2s; }
.art .lbl { fill: var(--text-faint); font: 500 11px var(--mono); }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 8px;
  height: 100%; max-width: 1560px; margin: 0 auto; padding: 0 24px;
}

.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  margin-right: 22px; color: var(--text);
}
.brand img { display: block; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand-tag {
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; line-height: 1;
  padding: 4px 7px; border-radius: 6px;
  color: var(--text-dim); background: var(--raised-hover); border: 1px solid var(--border);
}
/* The mark is the bright coral, 3.0:1 on paper: nudge it toward BRAND_ON_LIGHT. */
[data-theme="light"] img[src^="/logo.png"] { filter: brightness(0.9); }

.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none; margin-right: 4px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-dim); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }

.topnav { display: flex; align-items: center; gap: 2px; }
.topnav-link {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 12px; border-radius: var(--radius);
  color: var(--text-dim); font-size: 14.5px; font-weight: 520;
  transition: color .15s, background .15s;
}
.topnav-link:hover { color: var(--text); background: var(--raised-hover); }
.topnav-link svg { width: 12px; height: 12px; opacity: .6; }
.topnav-link.active { color: var(--text); }
.topnav-link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 300px; height: 38px; margin-left: auto; padding: 0 8px 0 12px;
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-faint); font: inherit; font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--raised-hover); color: var(--text-dim); }
.search-trigger svg { width: 16px; height: 16px; flex: none; }
.search-text { flex: 1; text-align: left; }
.search-kbd, kbd {
  font-family: var(--font); font-size: 11px; font-weight: 550; line-height: 1.6;
  padding: 1px 7px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px;
  background: var(--panel); color: var(--text-faint);
}

.theme-toggle {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-dim); cursor: pointer; transition: background .15s, color .15s;
}
.theme-toggle:hover { background: var(--raised-hover); color: var(--text); }
.theme-toggle svg { width: 17px; height: 17px; }
.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ----------------------------------------------------------------- shell */

.shell {
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr) var(--outline-w);
  align-items: start;
  max-width: 1560px; margin: 0 auto;
}

/* --------------------------------------------------------------- sidebar */

.sidebar {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  padding: 26px 12px 20px 24px;
}
.sidenav { height: 100%; overflow-y: auto; padding-right: 8px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }

.side-group + .side-group { margin-top: 22px; }
.drawer-nav { display: none; }
.drawer-nav + .side-group { margin-top: 0; }
.side-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 6px; padding: 0 10px;
  font-size: 12.5px; font-weight: 600; color: var(--text-faint);
}
.side-title.page { font-size: 14.5px; color: var(--text); font-family: var(--display); font-weight: 650; }
.side-title .ico { width: 16px; height: 16px; flex: none; color: var(--text-faint); }
.side-title.page .ico { color: var(--accent); }
.sidenav ul { list-style: none; margin: 0; padding: 0; }

.side-link {
  position: relative; display: block; padding: 6px 10px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 14.2px; line-height: 1.45;
  transition: background .12s, color .12s;
}
.side-link:hover { background: var(--raised-hover); color: var(--text); }
.side-link.active { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.side-link.active::before {
  content: ""; position: absolute; left: -9px; top: 8px; bottom: 8px;
  width: 2px; border-radius: 2px; background: var(--accent);
}

/* --------------------------------------------------------------- content */

.content { min-width: 0; padding: 36px 56px 0; }
.doc { max-width: var(--measure); }

.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-faint); margin-bottom: 18px;
}
.crumbs a { color: var(--text-faint); text-decoration: none !important; transition: color .12s; }
.crumbs a:hover { color: var(--text); }
.crumb-sep { opacity: .5; }
.crumb-here { color: var(--text-dim); }

.page-art { float: right; width: 168px; margin: -6px 0 16px 28px; }

/* ------------------------------------------------------------------ hero */

.hero { margin: 0 0 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--accent); }
.hero h1 {
  margin: 0 0 14px; font-family: var(--display);
  font-size: 44px; line-height: 1.06; letter-spacing: -0.035em; font-weight: 700; color: var(--text);
}
.hero-lede { margin: 0; max-width: 620px; font-size: 18.5px; line-height: 1.6; color: var(--text-dim); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-notes {
  display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none;
  margin: 26px 0 0; padding: 0; font-size: 13.5px; color: var(--text-faint);
}
.hero-notes li { display: inline-flex; align-items: center; gap: 7px; }
.hero-notes svg { width: 15px; height: 15px; color: var(--accent); }

.hero:has(.mini) { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 36px; align-items: center; }
.hero-art.mini { margin: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s, border-color .15s, box-shadow .2s, color .15s;
}
.btn svg { width: 17px; height: 17px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset; }
.btn.primary:hover { background: #ff7465; box-shadow: 0 8px 24px -8px rgba(255, 97, 82, .55), 0 1px 0 rgba(255,255,255,.25) inset; }
.btn.ghost { border-color: var(--border-strong); color: var(--text); background: var(--raised); }
.btn.ghost:hover { background: var(--raised-hover); border-color: var(--text-faint); }

/* ------------------------------------------------------------- typography */

.doc h1 {
  margin: 0 0 14px; font-family: var(--display);
  font-size: 40px; line-height: 1.1; letter-spacing: -0.032em; font-weight: 700; color: var(--text);
}
.doc h2 {
  clear: both; margin: 60px 0 16px; font-family: var(--display);
  font-size: 27px; line-height: 1.2; letter-spacing: -0.025em; font-weight: 680; color: var(--text);
}
.doc h3 {
  margin: 36px 0 10px; font-size: 18px; letter-spacing: -0.012em; line-height: 1.35;
  font-weight: 650; color: var(--text);
}
.doc h4 { margin: 28px 0 8px; font-size: 15.5px; font-weight: 650; color: var(--text); }
.doc h1 + p { font-size: 18px; line-height: 1.65; color: var(--text-dim); }
.doc h1 + p, .doc h2 + p, .doc h3 + p { margin-top: 0; }

.anchor {
  margin-left: 10px; color: var(--text-faint); opacity: 0;
  font-weight: 400; text-decoration: none !important; transition: opacity .12s;
}
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor { opacity: .6; }
.anchor:hover { opacity: 1 !important; color: var(--accent); }

.doc p { margin: 16px 0; }
.doc strong { color: var(--text); font-weight: 640; }
.md-rule { border: 0; border-top: 1px solid var(--border); margin: 52px 0; }

.md-list { margin: 16px 0; padding-left: 22px; }
.md-list li { margin: 8px 0; }
.md-list li::marker { color: var(--text-faint); font-weight: 600; }
ul.md-list { list-style: none; padding-left: 2px; }
ul.md-list > li { position: relative; padding-left: 22px; }
ul.md-list > li::before {
  content: ""; position: absolute; left: 6px; top: .72em;
  width: 6px; height: 6px; border-radius: 2px; background: var(--accent); opacity: .75;
}
ul.md-list ul.md-list { margin: 8px 0; }

blockquote {
  margin: 24px 0; padding: 4px 0 4px 20px;
  border-left: 2px solid var(--border-strong); color: var(--text-dim); font-style: italic;
}
blockquote p { margin: 8px 0; }

:not(pre) > code {
  font-family: var(--mono); font-size: 0.86em;
  padding: 2px 6px; border-radius: 6px;
  background: var(--raised-hover); border: 1px solid var(--border);
  color: var(--text); white-space: nowrap;
}
a code { color: inherit; }

.doc img { max-width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); }

/* ------------------------------------------------------------ code blocks */

.code-block {
  margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); overflow: hidden; box-shadow: var(--shadow);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 42px; padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--border);
}
.code-lang {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: .02em;
}
.code-lang svg { display: none; }
.code-title {
  display: inline-flex; align-items: center; gap: 9px;
  min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35;
}
.code-title::before {
  content: ""; flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 30px; padding: 0 11px; border-radius: var(--radius-sm);
  background: none; border: 1px solid transparent;
  color: var(--text-faint); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.copy-btn:hover { background: var(--raised-hover); color: var(--text); border-color: var(--border); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.done { color: var(--success); }

.code-body { overflow-x: auto; scrollbar-width: thin; }
.code-block pre { margin: 0; padding: 16px 20px; }
.code-block code {
  display: block; counter-reset: codeline;
  font-family: var(--mono); font-size: 13.2px; line-height: 1.7;
  color: var(--t-var); white-space: pre; font-variant-ligatures: none;
}
.code-block .line { display: block; }
.code-block[data-gutter] .line { position: relative; padding-left: 3.2em; }
.code-block[data-gutter] .line::before {
  counter-increment: codeline; content: counter(codeline);
  position: absolute; left: 0; width: 2.1em; text-align: right;
  color: var(--text-faint); opacity: .45; user-select: none;
}

.t-kw { color: var(--t-kw); }
.t-fn { color: var(--t-fn); }
.t-str { color: var(--t-str); }
.t-num { color: var(--t-num); }
.t-cst { color: var(--t-cst); }
.t-com { color: var(--t-com); font-style: italic; }
.t-dir { color: var(--t-dir); }
.t-op { color: var(--t-op); }
.t-punc { color: var(--t-punc); }
.t-var { color: var(--t-var); }
.t-key { color: var(--t-key); }
.t-flag { color: var(--t-flag); }

/* ----------------------------------------------------------------- tables */

.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.md-table { width: 100%; border-collapse: collapse; font-size: 14.2px; }
.md-table th {
  padding: 11px 16px; text-align: left; font-weight: 600; font-size: 12.5px;
  color: var(--text-faint); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.md-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; }
.md-table tbody tr:first-child td { border-top: 0; }
.md-table tbody tr { transition: background .12s; }
.md-table tbody tr:hover { background: var(--raised); }
.md-table code { white-space: nowrap; }
.md-table .ta-left { text-align: left; }
.md-table .ta-center { text-align: center; }
.md-table .ta-right { text-align: right; }

.nav-table td:first-child { white-space: nowrap; font-weight: 600; }
.nav-table td:first-child a { color: var(--text); text-decoration: none; }
.nav-table tr { position: relative; }
.nav-table tr:hover td:first-child a { color: var(--link); }
.arrow-col { width: 38px; text-align: right; }
.row-arrow { color: var(--text-faint); opacity: .5; transition: opacity .15s, transform .15s, color .15s; display: inline-block; }
.nav-table tr:hover .row-arrow { opacity: 1; color: var(--accent); transform: translateX(3px); }

/* --------------------------------------------------------------- callouts */

.callout {
  display: flex; gap: 14px;
  margin: 26px 0; padding: 16px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel);
}
.callout-ico {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
}
.callout-ico svg { width: 17px; height: 17px; }
.callout-body { min-width: 0; flex: 1; }
.callout-body > :first-child { margin-top: 0; }
.callout-body > :last-child { margin-bottom: 0; }
.callout-title { margin: 3px 0 6px !important; font-weight: 650; color: var(--text); font-size: 15px; }
.callout-body p { margin: 10px 0; }
.callout-warning .callout-ico { background: rgba(242, 201, 76, .12); color: var(--warn); }
.callout-danger .callout-ico { background: rgba(255, 123, 138, .12); color: var(--danger); }
.callout-note .callout-ico, .callout-details .callout-ico { background: var(--raised-hover); color: var(--text-dim); }

/* ----------------------------------------------------------------- result
 * What the block above does, in one sentence, welded to the code. */
.result {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 24px 0; padding: 12px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--success-bg); color: var(--text-dim);
  font-size: 14px; line-height: 1.6;
}
.result > svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--success); }
.result > div { min-width: 0; }
.result p { margin: 0 !important; }
.result p + p { margin-top: 8px !important; }
.code-block:has(+ .result) {
  margin-bottom: 0;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.code-block + .result {
  margin-top: 0; border-top-color: transparent;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ------------------------------------------------------------------ cards */

/* A topic tile: drawing, name, one line, and an arrow that only moves. */
.tiles {
  clear: both; display: grid; gap: 14px; margin: 24px 0 32px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.tile {
  position: relative; display: flex; flex-direction: column;
  padding: 18px 18px 18px; min-height: 100%;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s, background .2s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--panel-hi); }
.tile-art {
  display: flex; align-items: center; justify-content: center;
  height: 112px; margin: -4px -4px 14px; border-radius: 10px;
  background: var(--raised); border: 1px solid var(--border);
}
.tile-art .art { width: auto; height: 88px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tile:hover .tile-art .art { transform: translateY(-3px) scale(1.04); }
.tile-title { font-weight: 650; font-size: 15.5px; color: var(--text); letter-spacing: -0.01em; line-height: 1.35; padding-right: 26px; }
.tile-text { margin-top: 4px; font-size: 13.8px; line-height: 1.55; color: var(--text-faint); }
.tile-go {
  position: absolute; right: 16px; bottom: 18px; color: var(--text-faint);
  opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s, color .2s;
}
.tile:not(.has-art) .tile-go { top: 18px; bottom: auto; opacity: .5; transform: none; }
.tile-go svg { width: 17px; height: 17px; display: block; }
.tile:hover .tile-go { opacity: 1; transform: none; color: var(--accent); }

/* The accent mark draws itself in when its card is pointed at. */
.tile:hover .art .x, .path-card:hover .art .x { animation: draw .7s ease both; stroke-dasharray: 1; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* The three ways in: bigger, the drawing sits to the right. */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 24px; }
.path-card {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto;
  padding: 24px 24px 22px; min-height: 260px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-xl);
  color: inherit; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s, background .2s;
}
.path-card:hover { transform: translateY(-3px); border-color: var(--accent-line); background: var(--panel-hi); }
.path-art { height: 124px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 18px; }
.path-art .art { width: auto; height: 118px; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.path-card:hover .path-art .art { transform: translateY(-4px); }
.path-title { font-family: var(--display); font-size: 24px; font-weight: 680; letter-spacing: -0.025em; color: var(--text); }
.path-text { margin-top: 6px; font-size: 14.5px; line-height: 1.6; color: var(--text-faint); }
.path-go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.path-go svg { width: 17px; height: 17px; color: var(--accent); transition: transform .2s; }
.path-card:hover .path-go svg { transform: translateX(4px); }

/* A course, read in order: number, name, what you get, how long. */
.steps { list-style: none; margin: 20px 0 28px; padding: 0; display: grid; gap: 10px; }
.step {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 18px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border); color: inherit;
  transition: border-color .2s, background .2s, transform .2s;
}
.step:hover { border-color: var(--border-strong); background: var(--panel-hi); transform: translateX(3px); }
.step-num {
  flex: none; width: 42px; font-family: var(--display); font-size: 22px; font-weight: 600;
  color: var(--text-faint); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  transition: color .2s;
}
.step:hover .step-num { color: var(--accent); }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-title { font-weight: 650; font-size: 16px; color: var(--text); }
.step-text { font-size: 14px; color: var(--text-faint); line-height: 1.5; margin-top: 2px; }
.step-meta {
  flex: none; font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  padding: 3px 9px; border-radius: 999px; background: var(--raised-hover); border: 1px solid var(--border);
}
.step-go { flex: none; color: var(--text-faint); transition: color .2s, transform .2s; }
.step-go svg { width: 18px; height: 18px; display: block; }
.step:hover .step-go { color: var(--accent); transform: translateX(3px); }

/* Short truths, numbered, in a grid. */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.fact {
  padding: 20px 22px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border);
}
.fact-num { display: block; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.fact p { margin: 0 !important; font-size: 14.8px; line-height: 1.65; }
.fact strong { display: block; margin-bottom: 4px; font-size: 16px; }

/* What a page is for, before any detail. */
.purpose {
  clear: both; margin: 26px 0 32px; padding: 20px 24px 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); box-shadow: var(--shadow);
}
.purpose-label {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px !important;
  font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
}
.purpose-label::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--accent); }
.purpose > p:not(.purpose-label) { margin: 0 0 10px; font-size: 16.5px; line-height: 1.6; color: var(--text); }
.purpose .md-list { margin: 10px 0 2px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 26px; }
.purpose .md-list li { margin: 4px 0; font-size: 14.5px; }
.purpose > :last-child { margin-bottom: 0; }

/* A page's verbs, sorted by what you want done. */
.glance { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 22px 0 8px; }
.glance-group {
  padding: 14px 8px 8px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--border);
}
.glance-title { margin: 0 10px 6px !important; font-size: 13.5px; font-weight: 650; color: var(--text); }
.glance ul { list-style: none; margin: 0; padding: 0; }
.glance a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 13.8px; line-height: 1.4; text-decoration: none !important;
  transition: background .12s, color .12s;
}
.glance a:hover { background: var(--raised-hover); color: var(--text); }
.glance a code { flex: none; font-size: 12px; padding: 1px 6px; color: var(--text-faint); transition: color .12s, border-color .12s; }
.glance a:hover code { color: var(--accent); border-color: var(--accent-line); }

/* The list of finished things a recipe page builds. */
.toc { clear: both; margin: 26px 0 8px; padding: 16px 10px 10px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--border); }
.toc-title { margin: 0 12px 6px !important; font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
.toc a {
  display: flex; align-items: baseline; gap: 10px; padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 14.5px; line-height: 1.45; color: var(--text-dim); text-decoration: none !important;
  transition: background .12s, color .12s;
}
.toc a:hover { background: var(--raised-hover); color: var(--text); }
.toc-num { flex: none; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); }
.toc a:hover .toc-num { color: var(--accent); }

/* Words on one side, the thing they describe on the other. */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: start; margin: 24px 0; }
.split-text > :first-child { margin-top: 0; }
.split-side > :first-child { margin-top: 0; }

.more-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14.5px; color: var(--text) !important; text-decoration: none !important;
}
.more-link svg { width: 17px; height: 17px; color: var(--accent); transition: transform .2s; }
.more-link:hover svg { transform: translateX(4px); }

/* ----------------------------------------------------------------- pager */

.pager {
  display: flex; gap: 14px; max-width: var(--measure);
  margin-top: 64px;
}
.pager-gap { flex: 1; }
.pager-link {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel); transition: border-color .2s, background .2s;
}
.pager-link:hover { border-color: var(--accent-line); background: var(--panel-hi); }
.pager-link.next { text-align: right; }
.pager-label { font-size: 12.5px; color: var(--text-faint); }
.pager-link.prev .pager-label::before { content: "\2190  "; }
.pager-link.next .pager-label::after { content: "  \2192"; }
.pager-title { font-size: 15.5px; font-weight: 650; color: var(--text); }

.updated { margin: 48px 0 0 !important; font-size: 12.5px; color: var(--text-faint); }
.updated:empty { display: none; }

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  max-width: var(--measure); margin-top: 72px; padding: 32px 0 44px;
  border-top: 1px solid var(--border); font-size: 13.5px;
}
.foot-brand { max-width: 300px; }
.foot-mark { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--display); font-weight: 650; font-size: 15px; }
.foot-brand p { margin: 10px 0 0; color: var(--text-faint); line-height: 1.6; }
.foot-cols { display: flex; gap: 48px; }
.foot-cols div { display: flex; flex-direction: column; gap: 7px; }
.foot-cols p { margin: 0 0 3px; font-weight: 600; color: var(--text); }
.foot-cols a { color: var(--text-faint); transition: color .12s; }
.foot-cols a:hover { color: var(--text); }

/* --------------------------------------------------------------- outline */

.outline {
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 38px 24px 40px 8px; scrollbar-width: thin;
}
.outline-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--text-faint); }
.outline-nav ul { list-style: none; margin: 0; padding: 0; }
.outline-nav > ul { border-left: 1px solid var(--border); }
.outline-nav li { position: relative; }
.outline-nav a {
  display: block; padding: 5px 12px; margin-left: -1px; border-left: 1px solid transparent;
  font-size: 13.2px; line-height: 1.45; color: var(--text-faint); transition: color .12s, border-color .12s;
}
.outline-nav a:hover { color: var(--text); }
.outline-nav a.active { color: var(--text); border-left-color: var(--accent); font-weight: 550; }
.outline-nav ul ul a { padding-left: 24px; }
.out-item.collapsed > ul { display: none; }
.out-chev {
  position: absolute; left: -22px; top: 5px;
  width: 16px; height: 16px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--text-faint); cursor: pointer;
}
.out-chev svg { width: 13px; height: 13px; transition: transform .15s; }
.out-item.collapsed .out-chev svg { transform: rotate(-90deg); }

.aside-card {
  margin-top: 28px; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--panel);
}
.aside-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-bottom: 10px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent);
}
.aside-ico .ico { width: 17px; height: 17px; }
.aside-title { margin: 0 0 4px; font-size: 14.5px; font-weight: 650; color: var(--text); }
.aside-text { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--text-faint); }
.aside-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
}
.aside-btn span { color: var(--accent); transition: transform .2s; display: inline-block; }
.aside-btn:hover span { transform: translateX(3px); }

/* ------------------------------------------------------------------ home */

[data-layout="home"] .shell { grid-template-columns: minmax(0, 1fr); max-width: none; }
[data-layout="home"] .sidebar,
[data-layout="home"] .outline { display: none; }
[data-layout="home"] .content { padding: 0 32px; }
[data-layout="home"] .doc,
[data-layout="home"] .site-footer { max-width: 1240px; margin-inline: auto; }

[data-layout="home"] .hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: center;
  min-height: 560px; margin: 0 0 24px; padding: 40px 0 20px;
}
[data-layout="home"] .hero h1 { font-size: 64px; line-height: 1.0; letter-spacing: -0.045em; margin-bottom: 20px; }
[data-layout="home"] .hero-lede { font-size: 19px; }

.hero-art.scene { margin: 0; padding-left: 110px; }
.scene-box { position: relative; }
.hero-art.scene .art { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero-label {
  position: absolute; width: 190px; font-size: 12.5px; line-height: 1.45; color: var(--text-faint);
  animation: fade .6s ease both;
}
.hero-label.l { transform: translate(-100%, -50%); text-align: right; padding-right: 8px; }
.hero-label.r { transform: translate(0, -50%); padding-left: 8px; }
.hero-label b { display: flex; align-items: baseline; gap: 6px; color: var(--text); font-weight: 650; font-size: 13.5px; margin-bottom: 1px; }
.hero-label.l b { justify-content: flex-end; }
.hero-label i { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--accent); }
.hero-label.n1 { animation-delay: .35s; } .hero-label.n2 { animation-delay: .45s; }
.hero-label.n3 { animation-delay: .55s; } .hero-label.n4 { animation-delay: .65s; }
.hero-art:has(.n1:hover) .ld1, .hero-art:has(.n2:hover) .ld2,
.hero-art:has(.n3:hover) .ld3, .hero-art:has(.n4:hover) .ld4 { stroke: var(--accent); opacity: 1; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }

[data-layout="home"] .doc h2 { font-size: 30px; margin-top: 72px; }
[data-layout="home"] .updated { display: none; }
[data-layout="home"] .doc h2 + p { color: var(--text-faint); margin-top: -6px; }
[data-layout="home"] .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[data-layout="home"] .doc > p, [data-layout="home"] .doc > .md-list { max-width: 720px; }

/* ----------------------------------------------------------- learn layouts
 * `learn` is a tutorial, read top to bottom once: no right rail, shorter
 * lines, bigger type. `recipe` keeps the rail, because you land on a recipe
 * looking for one variant of it. Chosen per section in `site.json`. */
[data-layout="learn"] .doc,
[data-layout="recipe"] .doc { max-width: var(--measure-learn); font-size: 16.5px; line-height: 1.78; }
[data-layout="learn"] .pager, [data-layout="recipe"] .pager,
[data-layout="learn"] .site-footer, [data-layout="recipe"] .site-footer { max-width: var(--measure-learn); }
[data-layout="learn"] .doc p, [data-layout="recipe"] .doc p { margin: 20px 0; }
[data-layout="learn"] .md-list li, [data-layout="recipe"] .md-list li { margin: 9px 0; }
[data-layout="learn"] .md-table, [data-layout="recipe"] .md-table { font-size: 15px; }
[data-layout="learn"] .code-block code,
[data-layout="recipe"] .code-block code { font-size: 13.5px; }
[data-layout="learn"] .callout, [data-layout="recipe"] .callout { font-size: 15.5px; }
[data-layout="learn"] .tiles, [data-layout="recipe"] .tiles { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

[data-layout="index"] .outline { display: none; }
[data-layout="index"] .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
[data-layout="index"] .doc, [data-layout="index"] .pager, [data-layout="index"] .site-footer { max-width: 1040px; }
[data-layout="index"] .doc > p { max-width: 720px; }
[data-layout="index"] .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[data-layout="index"] .tiles:not(:has(.has-art)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

[data-layout="learn"] .shell { max-width: 1200px; grid-template-columns: var(--side-w) minmax(0, 1fr); }
[data-layout="learn"] .outline { display: none; }

/* ------------------------------------------------------- navigation */

.nav-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; pointer-events: none;
}
.nav-bar.busy { opacity: 1; animation: nav-crawl 8s cubic-bezier(0.1, 0.8, 0.2, 1) forwards; }
@keyframes nav-crawl { 0% { transform: scaleX(0); } 40% { transform: scaleX(0.7); } 100% { transform: scaleX(0.96); } }

@view-transition { navigation: none; }
::view-transition-old(root) { animation: vt-out .12s ease both; }
::view-transition-new(root) { animation: vt-in .18s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(4px); } }

@media (prefers-reduced-motion: reduce) {
  .nav-bar.busy { animation: none; transform: scaleX(0.6); }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .hero-art.scene .art, .hero-label, .tile:hover .art .x, .path-card:hover .art .x { animation: none; }
  .tile, .path-card, .step, .btn { transition: none; }
}

/* ---------------------------------------------------------------- search */

.search-modal {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
  background: rgba(8, 8, 9, 0.6); backdrop-filter: blur(4px);
}
[data-theme="light"] .search-modal { background: rgba(60, 50, 35, 0.25); }
.search-modal[hidden] { display: none; }
.search-panel {
  width: min(680px, 92vw); max-height: 72vh; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .55);
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.search-field svg { width: 18px; height: 18px; color: var(--text-faint); flex: none; }
.search-field input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; }
.search-results { overflow-y: auto; padding: 8px; }
.search-hit { display: block; padding: 10px 12px; border-radius: var(--radius); border: 1px solid transparent; }
.search-hit:hover, .search-hit.sel { background: var(--accent-soft); border-color: var(--accent-line); }
.search-hit .hit-sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.search-hit .hit-title { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin: 2px 0; }
.search-hit .hit-text { display: block; font-size: 13px; color: var(--text-faint); line-height: 1.5; }
.search-hit mark { background: rgba(255, 97, 82, .24); color: var(--text); border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 28px 16px; text-align: center; color: var(--text-faint); font-size: 14px; }
.search-foot {
  display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-faint);
}
.search-foot span { display: inline-flex; align-items: center; gap: 5px; }

.scrim { position: fixed; inset: var(--topbar-h) 0 0; background: rgba(8, 8, 9, .55); z-index: 30; }
.scrim[hidden] { display: none; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1400px) { .content { padding: 36px 44px 0; } }

@media (max-width: 1240px) {
  .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .outline { display: none; }
  [data-layout="home"] .tiles, [data-layout="index"] .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  [data-layout="home"] .hero h1 { font-size: 54px; }
  .hero-label { width: 160px; font-size: 12px; }
}

@media (max-width: 1060px) {
  [data-layout="home"] .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 12px; }
  .hero-art.scene { max-width: 640px; margin: 0 auto; padding: 0 120px; }
  .paths { grid-template-columns: minmax(0, 1fr); }
  .path-card { min-height: 0; grid-template-columns: minmax(0, 1fr) 150px; grid-template-rows: auto 1fr auto; }
  .path-art { grid-column: 2; grid-row: 1 / span 3; margin: 0; justify-content: center; }
  .path-title, .path-text, .path-go { grid-column: 1; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 900px) {
  .menu-btn { display: flex; }
  .brand { margin-right: 8px; }
  .topnav-link { padding: 0 9px; font-size: 14px; }
  .search-trigger { width: 38px; padding: 0; justify-content: center; flex: none; }
  .search-text, .search-kbd { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  [data-layout="learn"] .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; z-index: 35;
    width: 290px; background: var(--bg); border-right: 1px solid var(--border);
    transform: translateX(-104%); transition: transform .22s ease;
  }
  body.nav-open .sidebar { transform: none; }
  .content, [data-layout="home"] .content { padding: 26px 20px 0; }
  .hero h1 { font-size: 34px; }
  [data-layout="home"] .hero { padding-top: 12px; }
  [data-layout="home"] .hero h1 { font-size: 42px; }
  .hero-art.scene { padding: 0; }
  .hero-label { display: none; }
  .doc h1 { font-size: 32px; }
  .doc h2, [data-layout="home"] .doc h2 { font-size: 23px; margin-top: 44px; }
  [data-layout="home"] .tiles, [data-layout="index"] .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero:has(.mini) { grid-template-columns: minmax(0, 1fr) 120px; gap: 16px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .purpose .md-list, .toc ol { grid-template-columns: minmax(0, 1fr); }
  .pager { flex-direction: column; }
  .page-art { width: 120px; margin-left: 16px; }
  [data-layout="learn"] .code-block code,
  [data-layout="recipe"] .code-block code { font-size: 12.6px; }
  [data-layout="learn"] .md-table,
  [data-layout="recipe"] .md-table { font-size: 14px; }
  [data-layout="learn"] .doc p, [data-layout="recipe"] .doc p { margin: 17px 0; }
}

@media (max-width: 560px) {
  /* The section links move into the drawer; see `Site.drawer_nav`. */
  .topnav { display: none; }
  .drawer-nav { display: block; }
  .drawer-nav + .side-group { margin-top: 22px; }
  .topbar-inner { padding: 0 14px; gap: 6px; }
  .brand-tag { display: none; }
  .search-trigger { margin-left: auto; }
  .sidebar { width: min(88vw, 300px); }
  .content, [data-layout="home"] .content { padding: 22px 16px 0; }
  [data-layout="home"] .hero h1 { font-size: 36px; }
  .hero-lede, [data-layout="home"] .hero-lede { font-size: 17px; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  [data-layout="home"] .tiles, [data-layout="index"] .tiles, .tiles { grid-template-columns: minmax(0, 1fr); }
  .hero:has(.mini) { grid-template-columns: minmax(0, 1fr); }
  .tile.has-art { display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 14px; align-items: center; }
  .tile.has-art .tile-art { grid-row: 1 / span 2; height: 80px; margin: 0; }
  .tile.has-art .tile-art .art { height: 62px; }
  .tile.has-art .tile-go { display: none; }
  .path-card { grid-template-columns: minmax(0, 1fr) 96px; padding: 20px; }
  .path-art .art { height: 84px; }
  .step { gap: 12px; padding: 14px; }
  .step-num { width: 30px; font-size: 18px; }
  .step-meta { display: none; }
  .page-art, .hero-art.mini { display: none; }
  .code-block pre { padding: 14px 16px; }
  .callout { padding: 14px; gap: 11px; }
  .md-table th, .md-table td { padding: 10px 12px; }
  .foot-cols { gap: 28px; flex-wrap: wrap; }
}

@media print {
  .topbar, .sidebar, .outline, .pager, .search-modal, .site-footer { display: none; }
  .shell { grid-template-columns: 1fr; }
  body { background: #fff; color: #000; }
}

.hero-label.n1{left:21.9%;top:10.3%}
.hero-label.n2{left:2.2%;top:35.3%}
.hero-label.n3{left:13.5%;top:62.5%}
.hero-label.n4{left:86.9%;top:69.1%}
