/* The static pages (tools/seo/: course, commands, interview, glossary, blog). No scripts, system fonts only.
   Documentation and long-form reading: the app's zones, so the site feels like the product.
     page   = the panel surface (calm, low chroma)        --bg
     chrome = the header and footer, the deepest surface   --chrome
     raised = a card or a box one step above the page      --card / --well (recessed)
     the terminal's aubergine = code blocks, in both modes (the one saturated surface)
   Palettes = OnCallReady Light / OnCallReady Aubergine (src/ui/themes.ts); every text pair checked for WCAG AA (4.5:1).
   Type + space tokens use the landing page's names (src/ui/style.css, `.landing`): sizes xs / sm / md / lg + h3 / h2 / h1,
   a 4-based space scale. Accent: the one filled primary (.btn), and "you are here" (the current nav item). Nothing else. */
:root {
  color-scheme: light dark;
  --bg: #f5eff2; --chrome: #e9e0e5; --card: #fdf9fb; --well: #eee8ec; --hi: #ece4e9; --line: #e0d7dc; --line2: #d0c6cc;
  --fg: #2a1824; --strong: #1a0c15; --dim: #6f5b68;
  --link: #8a2b6e; --here: #b54119; --fill: #b54119; --on-fill: #ffffff;
  --code-bg: #ece4e9; --code-fg: #2a1824;
  --shadow: 0 1px 2px rgba(60, 20, 45, .06), 0 8px 24px rgba(60, 20, 45, .07);
  --t-bg: #300a24; --t-bar: #24071b; --t-fg: #ffffff; --t-out: #d3d7cf; --t-ps: #8ae234; --t-cm: #a9959f;
  --mono: "SF Mono", SFMono-Regular, Menlo, Monaco, "Ubuntu Mono", "DejaVu Sans Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --w-xs: .8125rem; --w-sm: .9375rem; --w-md: 1.0625rem; --w-lg: 1.3125rem;
  --w-h3: 1.1875rem; --w-h2: 1.5rem; --w-h1: clamp(1.875rem, 1.45rem + 1.7vw, 2.625rem);
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem;
  --r-1: 6px; --r-2: 10px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 37em;   /* em: the line length follows the text's own size (about 75 characters in this stack) */
  --head-h: 3.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1419; --chrome: #10080e; --card: #241e22; --well: #140e12; --hi: #2f272c; --line: #30282d; --line2: #41383e;
    --fg: #ede3e7; --dim: #a9959f; --strong: #fbf6f8;
    --link: #d0a3c4; --here: #f08a5d; --fill: #cc4a1c; --on-fill: #ffffff;
    --code-bg: #2f272c; --code-fg: #ede3e7;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--w-md)/1.65 var(--sans); font-kerning: normal; overflow-wrap: break-word; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--strong); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--here); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { color: var(--strong); text-wrap: balance; }
h1 { font-size: var(--w-h1); line-height: 1.15; letter-spacing: -.022em; font-weight: 700; margin: var(--sp-2) 0 var(--sp-4); }
h2 { font-size: var(--w-h2); line-height: 1.25; letter-spacing: -.015em; font-weight: 650; margin: var(--sp-7) 0 var(--sp-3); }
h3 { font-size: var(--w-h3); line-height: 1.3; font-weight: 650; margin: var(--sp-5) 0 var(--sp-2); }
p { margin: 0 0 var(--sp-4); }
p, li, dd { text-wrap: pretty; }
code, pre { font-family: var(--mono); }
code { background: var(--code-bg); color: var(--code-fg); padding: .08em .36em; border-radius: 4px; font-size: .875em; overflow-wrap: anywhere; }
a code { color: inherit; }
h1 code, h2 code, h3 code { background: none; padding: 0; color: inherit; font-size: .9em; }
pre { background: var(--t-bg); color: var(--t-out); padding: var(--sp-4) var(--sp-4); border-radius: var(--r-2); overflow-x: auto; font-size: var(--w-sm); line-height: 1.55; tab-size: 8; margin: var(--sp-4) 0; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
pre .ps { color: var(--t-ps); font-weight: 700; }
pre .cmd { color: var(--t-fg); }
pre .cm { color: var(--t-cm); }
img { max-width: 100%; height: auto; }

/* ---- the frame: the header and the footer are the chrome */
.top { background: var(--chrome); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-5); max-width: 1120px; margin: 0 auto; padding: var(--sp-3) var(--gutter); min-height: var(--head-h); }
.top .brand { font: 700 var(--w-md) var(--mono); letter-spacing: .02em; color: var(--strong); text-decoration: none; white-space: nowrap; }
.top .brand::before { content: "$_"; color: var(--here); margin-right: var(--sp-2); }
.top nav { display: flex; align-items: center; gap: 0 var(--sp-5); font-size: var(--w-sm); margin-right: auto; }
.top nav a { color: var(--dim); text-decoration: none; padding: var(--sp-2) 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.top nav a:hover { color: var(--strong); }
.top nav a[aria-current] { color: var(--strong); font-weight: 600; border-bottom-color: var(--here); }
.top .go { color: var(--strong); border: 1px solid var(--line2); background: var(--card); padding: 6px 14px; border-radius: var(--r-1); text-decoration: none; font-size: var(--w-sm); font-weight: 600; white-space: nowrap; }
.top .go:hover { background: var(--hi); color: var(--strong); }
main { max-width: 780px; margin: 0 auto; padding: var(--sp-4) var(--gutter) var(--sp-8); }
main.wide-index, main.wide-post, main.wide-doc { max-width: 1120px; }
footer { background: var(--chrome); margin-top: var(--sp-7); color: var(--dim); font-size: var(--w-sm); }
.foot-in { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-6); max-width: 1120px; margin: 0 auto; padding: var(--sp-6) var(--gutter) var(--sp-7); }
.foot-in p { margin: 0; max-width: 34ch; }
.foot-in p strong { color: var(--strong); }
.foot-in h2 { margin: 0 0 var(--sp-2); font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.foot-in ul { list-style: none; margin: 0; padding: 0; }
.foot-in a { display: inline-block; padding: 3px 0; color: var(--fg); text-decoration: none; }
.foot-in a:hover { text-decoration: underline; }

/* ---- shared bits */
.crumbs { color: var(--dim); font-size: var(--w-xs); margin: var(--sp-3) 0 0; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--strong); }
.kicker { color: var(--dim); font-size: var(--w-sm); margin: var(--sp-3) 0 0; }
.kicker a { color: var(--dim); }
.lead { font-size: var(--w-lg); line-height: 1.5; color: var(--dim); margin: 0 0 var(--sp-5); max-width: 46ch; }
.n { color: var(--dim); font-family: var(--mono); font-size: .88em; font-variant-numeric: tabular-nums; margin-right: .35em; }
.meta, .cmds span { color: var(--dim); font-size: var(--w-sm); }
.btn { display: inline-block; background: var(--fill); color: var(--on-fill); padding: 10px 20px; border-radius: var(--r-1); text-decoration: none; font-weight: 600; line-height: 1.4; }
.btn:hover { color: var(--on-fill); filter: brightness(1.1); }
.cta { margin: var(--sp-6) 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); align-items: center; }
.cta span { color: var(--dim); font-size: var(--w-sm); max-width: 44ch; }

/* ---- chapter navigation: the lesson list (a side outline) and the Lessons / Interview / Glossary tabs */
.chbar { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-5); margin: var(--sp-3) 0 var(--sp-4); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); font-size: var(--w-sm); }
.chbar b { color: var(--strong); font-weight: 650; margin-right: auto; }
.chbar a { color: var(--dim); text-decoration: none; padding: var(--sp-1) 0; border-bottom: 2px solid transparent; }
.chbar a:hover { color: var(--strong); }
.chbar a[aria-current] { color: var(--strong); font-weight: 600; border-bottom-color: var(--here); }
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-6) var(--sp-7); }
.doc-main { min-width: 0; max-width: 40rem; }
.side { font-size: var(--w-sm); min-width: 0; }
.side-h { margin: 0 0 var(--sp-2); font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.side-ch { display: block; margin: 0 0 var(--sp-3); color: var(--strong); font-weight: 650; text-decoration: none; line-height: 1.35; }
.side ol { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.side li a { display: grid; grid-template-columns: 3rem minmax(0, 1fr); padding: 4px 0; color: var(--dim); text-decoration: none; line-height: 1.4; }
.side li a:hover { color: var(--strong); }
.side li a[aria-current] { color: var(--strong); font-weight: 600; }
.side-x { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.side-x a { color: var(--link); }
@media (min-width: 1000px) {
  .doc { grid-template-columns: 17rem minmax(0, 1fr); }
  .doc-main { grid-column: 2; grid-row: 1; }
  .side { grid-column: 1; grid-row: 1; position: sticky; top: calc(var(--head-h) + var(--sp-4)); align-self: start; max-height: calc(100vh - var(--head-h) - var(--sp-6)); overflow-y: auto; padding-top: var(--sp-3); }
}

/* ---- indexes: the course (phases), commands, interview, glossary */
.phase { break-inside: avoid; margin: 0 0 var(--sp-5); }
.phase h2 { margin: 0 0 var(--sp-2); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.chs, .ls, .cmds { padding-left: 0; list-style: none; margin: 0; }
.chs li { padding: 5px 0; }
.chs li > a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); color: var(--fg); text-decoration: none; }
.chs li > a:hover { color: var(--strong); text-decoration: underline; text-underline-offset: .18em; }
.chs li > a .n { margin-right: 0; line-height: 1.75; }
.chs li > .meta { display: block; padding-left: 2.4rem; font-size: var(--w-xs); line-height: 1.3; }
.index-cols { display: block; }
.ls li { padding: 4px 0; margin: 0; }
.ls a { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); color: var(--fg); text-decoration: none; }
.ls a:hover { color: var(--strong); text-decoration: underline; text-underline-offset: .18em; }
.ls .n { line-height: 1.7; }
.cmds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 0 var(--sp-6); }
.cmds li { display: grid; gap: 0; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cmds li > a { text-decoration: none; }
.cmds li > a code { background: none; padding: 0; font-size: var(--w-sm); color: var(--strong); font-weight: 600; }
.cmds li > a:hover code { text-decoration: underline; }
.az { display: flex; flex-wrap: wrap; gap: 0 var(--sp-2); margin: var(--sp-4) 0 var(--sp-5); padding: var(--sp-2) 0; border-block: 1px solid var(--line); font: 600 var(--w-sm) var(--mono); }
.az a { padding: var(--sp-1) var(--sp-2); color: var(--link); text-decoration: none; }
.az a:hover { color: var(--strong); text-decoration: underline; }
.cmds-sec h2 { margin: var(--sp-6) 0 var(--sp-2); font: 650 var(--w-h3) var(--mono); }
@media (min-width: 900px) { .index-cols { columns: 2; column-gap: var(--sp-7); } }

/* ---- reading: lessons, commands, interview, glossary */
.eli5 { background: var(--well); border-radius: var(--r-2); padding: var(--sp-1) var(--sp-5) var(--sp-2); margin: var(--sp-5) 0; }
.eli5 h2 { font-size: var(--w-h3); margin: var(--sp-4) 0 var(--sp-2); }
.lesson > p, .lesson > ul, .lesson > ol, .doc-main > section > p, .doc-main > section > ul, .doc-main > section > ol, main > section > p, main > section > ul:not([class]), main > section > ol:not([class]) { max-width: var(--measure); }
.lesson { line-height: 1.7; }
.lesson li, main li { margin: .25em 0; }
.lesson strong { color: var(--strong); }
blockquote { margin: var(--sp-5) 0; padding: var(--sp-3) var(--sp-4); background: var(--well); border: 1px solid var(--line); border-radius: var(--r-2); max-width: var(--measure); }
blockquote > :first-child { margin-top: 0; }
blockquote > :last-child { margin-bottom: 0; }
.tbl { overflow-x: auto; margin: var(--sp-4) 0; }
table { border-collapse: collapse; width: 100%; font-size: var(--w-sm); }
th, td { border-bottom: 1px solid var(--line); padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: top; }
th { background: var(--well); color: var(--strong); font-weight: 600; }
details { border-top: 1px solid var(--line); padding: var(--sp-3) 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; color: var(--strong); max-width: var(--measure); }
details > :not(summary) { max-width: var(--measure); }
.check { background: var(--well); border-radius: var(--r-2); padding: var(--sp-1) var(--sp-4) var(--sp-2); margin: var(--sp-5) 0; max-width: var(--measure); }
.check details { border: 0; padding: 0; }
.check-h { font-weight: 650; color: var(--strong); margin: var(--sp-3) 0 0; }
.iv { border-top: 1px solid var(--line); }
.iv .q { font-weight: 600; font-size: var(--w-lg); line-height: 1.4; color: var(--strong); }
.iv h2 { font-size: var(--w-h3); margin: var(--sp-4) 0 var(--sp-3); }
.lvl { font-size: var(--w-xs); font-weight: 500; color: var(--dim); margin-left: var(--sp-2); white-space: nowrap; }
.lvl::before { content: "("; } .lvl::after { content: ")"; }
.also, .src, .exd { color: var(--dim); font-size: var(--w-sm); }
.pn { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--w-sm); }
.pn a { text-decoration: none; }
.pn a:hover { text-decoration: underline; }
.opts { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.opts dt { margin-top: var(--sp-3); }
.opts dd { margin: 0; color: var(--fg); }
.opts dt code { background: none; padding: 0; font-weight: 600; color: var(--strong); }
@media (min-width: 720px) {
  .opts { grid-template-columns: minmax(10rem, 17rem) minmax(0, 1fr); gap: 0 var(--sp-5); }
  .opts dt, .opts dd { margin: 0; padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
}
.syn { margin-top: var(--sp-2); }
.gl { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; }
.gl dt { margin-top: var(--sp-4); font-weight: 650; color: var(--strong); }
.gl dd { margin: 0; }
.gl .al { font-weight: 400; color: var(--dim); }
@media (min-width: 820px) {
  .gl { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: 0 var(--sp-5); }
  .gl dt, .gl dd { margin: 0; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
}
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); }
.tags a { text-decoration: none; }
.tags code { background: var(--hi); color: var(--strong); }
.reads ul { padding-left: 1.2em; }

/* ---- the blog: plain topic links, rows instead of cards */
.chips { display: inline-flex; flex-wrap: wrap; gap: 0 var(--sp-3); }
.chip { font-size: var(--w-xs); line-height: 1.6; font-weight: 600; color: var(--dim); text-decoration: none; white-space: nowrap; }
.chip:hover { color: var(--strong); text-decoration: underline; }
.chip.on { color: var(--strong); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; text-decoration-color: var(--here); }
.hero { padding: var(--sp-6) 0 var(--sp-2); max-width: 46rem; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); line-height: 1.08; letter-spacing: -.028em; margin: 0 0 var(--sp-3); }
.hero .lead { margin: 0 0 var(--sp-4); }
.hero-links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); align-items: center; margin: 0; color: var(--dim); font-size: var(--w-sm); }
.rss { font-weight: 600; }
.topics { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); align-items: baseline; margin: var(--sp-5) 0 var(--sp-6); padding: var(--sp-3) 0; border-block: 1px solid var(--line); }
.topics-h { font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin-right: var(--sp-2); }
.topics .chip { font-size: var(--w-sm); padding: 2px 0; }
.sec-h { font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin: var(--sp-7) 0 var(--sp-3); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--sp-7); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { position: relative; display: flex; padding: var(--sp-4) 0; border-top: 1px solid var(--line); }
.card-text { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; flex: 1; }
.card .chips { position: relative; z-index: 1; }
.card-t { font-size: var(--w-md); line-height: 1.35; font-weight: 650; margin: 0; }
.card-t a { color: var(--strong); text-decoration: none; }
.card-t a::after { content: ""; position: absolute; inset: 0; }
.card-t a:hover { text-decoration: underline; text-underline-offset: .18em; }
.card-t a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid var(--here); outline-offset: 2px; border-radius: 3px; }
.card-d { margin: 0; color: var(--dim); font-size: var(--w-sm); line-height: 1.55; }
.card .meta { margin: var(--sp-1) 0 0; font-size: var(--w-xs); }
.featured .card { padding: var(--sp-5); gap: var(--sp-6); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-2); }
.featured .card:focus-within { outline-offset: 3px; border-radius: var(--r-2); }
.card.big .card-t { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); line-height: 1.2; letter-spacing: -.018em; }
.card.big .card-d { font-size: var(--w-md); }
.card-art { min-width: 0; flex: 1; align-self: center; }
.card-art .term { margin: 0; }
.card-art pre { font-size: var(--w-xs); }

/* ---- terminal code blocks (the blog): the aubergine, a small title bar */
.term { margin: var(--sp-5) 0; border-radius: var(--r-2); overflow: hidden; background: var(--t-bg); }
.term-bar { padding: 7px var(--sp-4); background: var(--t-bar); }
.term-t { font: var(--w-xs)/1.4 var(--mono); color: var(--t-cm); }
.term pre { margin: 0; border-radius: 0; background: none; }

/* ---- the blog: a post */
.post-wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
.post-head { padding-top: var(--sp-4); }
.post-k { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); }
.post-head h1 { font-size: clamp(2rem, 1.35rem + 2.4vw, 2.875rem); line-height: 1.12; letter-spacing: -.025em; margin: var(--sp-3) 0 var(--sp-3); max-width: 28ch; }
.post-head .lead { margin: 0 0 var(--sp-5); max-width: 54ch; }
.toc { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-2); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-5); font-size: var(--w-sm); }
.toc-h { margin: 0 0 var(--sp-2); font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 3px 0; }
.toc li::marker { color: var(--dim); }
.toc a { color: var(--fg); text-decoration: none; }
.toc a:hover { color: var(--strong); text-decoration: underline; }
.post { font-size: 1.125rem; line-height: 1.72; }
.post > p, .post > ul, .post > ol { max-width: var(--measure); }
.post h2 { font-size: var(--w-h2); margin: var(--sp-7) 0 var(--sp-3); scroll-margin-top: 5rem; }
.post h3 { scroll-margin-top: 5rem; }
.post li { margin: .3em 0; }
.post strong { color: var(--strong); }
.lab { margin: var(--sp-7) 0 var(--sp-5); padding: var(--sp-5); border-radius: var(--r-2); background: var(--well); border: 1px solid var(--line); max-width: 41rem; }
.lab h2 { margin: 0 0 var(--sp-2); font-size: var(--w-h2); }
.lab p { margin: var(--sp-2) 0; }
.lab-sub { font-weight: 600; color: var(--strong); margin-top: var(--sp-4); }
.lab-ls { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.lab-ls li { border-top: 1px solid var(--line2); margin: 0; }
.lab-ls li:last-child { border-bottom: 1px solid var(--line2); }
.lab-ls a { display: block; padding: var(--sp-2) 0; text-decoration: none; color: var(--fg); }
.lab-ls a:hover { color: var(--strong); text-decoration: underline; }
.lab-go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); }
.lab-go span { color: var(--dim); font-size: var(--w-sm); }
.share { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-4); margin: var(--sp-5) 0; font-size: var(--w-sm); }
.share span { color: var(--dim); font-weight: 600; }
.share a { color: var(--link); }
.related h2 { font-size: var(--w-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); }
.related .grid { grid-template-columns: minmax(0, 1fr); max-width: 41rem; }
.related .card-d { display: none; }
.post-pn { gap: var(--sp-3); }
.post-pn a { display: flex; flex-direction: column; max-width: 48%; color: var(--fg); line-height: 1.35; }
.post-pn a:last-child { text-align: right; margin-left: auto; }
.post-pn small { color: var(--dim); font-size: var(--w-xs); margin-bottom: 3px; }
.free { color: var(--dim); font-size: var(--w-sm); margin: var(--sp-6) 0 0; }

@media (min-width: 1080px) {
  .post-wrap { grid-template-columns: minmax(0, 1fr) 15rem; column-gap: var(--sp-8); grid-template-areas: "head ." "body toc" "foot ."; }
  .post-head { grid-area: head; }
  .post { grid-area: body; }
  .toc { grid-area: toc; position: sticky; top: calc(var(--head-h) + var(--sp-4)); align-self: start; margin: 4px 0 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; padding: 2px 0 2px var(--sp-4); }
  .toc ol { list-style: none; padding: 0; }
  .toc a { color: var(--dim); }
  .toc a:hover { color: var(--strong); }
  .post-foot { grid-area: foot; min-width: 0; }
}
@media (min-width: 900px) {
  .top { position: sticky; top: 0; z-index: 5; }
  .card.big { align-items: center; }
}
@media (max-width: 899px) {
  .card.big { flex-direction: column; }
  .card.big .card-art { align-self: stretch; }
}
@media (max-width: 700px) {
  .top-in { gap: var(--sp-1) var(--sp-4); padding-block: var(--sp-2); }
  .top nav { order: 3; flex: 1 0 100%; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; gap: 0 var(--sp-4); }
  .top nav::-webkit-scrollbar { display: none; }
  .top .go { margin-left: auto; }
  .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in > :first-child { grid-column: 1 / -1; }
  .topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .topics::-webkit-scrollbar { display: none; }
  .topics .chip { padding: var(--sp-2) 0; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .lead { font-size: var(--w-md); }
  .post { font-size: 1.0625rem; }
  pre { font-size: var(--w-xs); }
  .featured .card, .lab { padding: var(--sp-4); }
  .post-pn { flex-direction: column; }
  .post-pn a { max-width: none; }
  .post-pn a:last-child { text-align: left; margin-left: 0; }
}

/* =====================================================================================================
   Depth (22 Oct 2026): the same language as the app (DESIGN.md "Elevation"). Surfaces that hold something have body: a light top
   edge and a soft, tinted shadow offset downwards (never a halo); the header casts onto the page; the primary is a lit key; a
   chapter wears its family's colour (body[data-dom], from src/ui/domains.ts: a dot, the lesson numbers, a wash at the top of the page,
   never a stripe). Hex values like the rest of this file: OnCallReady Light / Aubergine; every text colour is AA on the page, the card
   and the well. Lifts only where a pointer is and motion is welcome.
   ===================================================================================================== */
:root {
  --edge: rgba(255, 255, 255, .9);
  --elev-1: 0 1px 2px rgba(42, 24, 36, .1), 0 3px 10px rgba(42, 24, 36, .08);
  --elev-2: 0 2px 4px rgba(42, 24, 36, .1), 0 12px 28px rgba(42, 24, 36, .13);
  --cast: 0 8px 16px -10px rgba(42, 24, 36, .35);
  --fill-deep: #8d3314;
  --key: linear-gradient(180deg, var(--fill), var(--fill-deep));
  --key-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(42, 24, 36, .3), 0 4px 10px -4px rgba(42, 24, 36, .45);
  --dom: var(--here);
  --paper: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 80%, var(--hi)));
}
@media (prefers-color-scheme: dark) {
  :root {
    --edge: rgba(255, 255, 255, .07);
    --elev-1: 0 1px 2px rgba(0, 0, 0, .4), 0 3px 10px rgba(0, 0, 0, .24);
    --elev-2: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 28px rgba(0, 0, 0, .34);
    --cast: 0 8px 16px -10px rgba(0, 0, 0, .55);
    --fill-deep: #9f3a16;
    --key-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .35), 0 4px 10px -4px rgba(0, 0, 0, .5);
    --paper: linear-gradient(180deg, color-mix(in srgb, var(--card) 93%, var(--strong)), var(--card) 70%);
  }
}
/* a chapter family's colour (the app's domains): light = the Light theme's text tokens, dark = Aubergine's */
[data-dom="sre"] { --dom: #8a6a00; } [data-dom="linux"] { --dom: #b54119; } [data-dom="net"] { --dom: #047a7c; } [data-dom="containers"] { --dom: #2a5595; }
[data-dom="k8s"] { --dom: #2f5f95; } [data-dom="iac"] { --dom: #6b4371; } [data-dom="sec"] { --dom: #b03030; } [data-dom="data"] { --dom: #3b7a05; }
[data-dom="azure"] { --dom: #2a5595; } [data-dom="aws"] { --dom: #9a5a1e; } [data-dom="delivery"] { --dom: #047a7c; } [data-dom="obs"] { --dom: #6b4371; }
@media (prefers-color-scheme: dark) {
  [data-dom="sre"] { --dom: #fce94f; } [data-dom="linux"] { --dom: #f08a5d; } [data-dom="net"] { --dom: #34e2e2; } [data-dom="containers"] { --dom: #729fcf; }
  [data-dom="k8s"] { --dom: #9fc3ea; } [data-dom="iac"] { --dom: #ad7fa8; } [data-dom="sec"] { --dom: #ef9a9a; } [data-dom="data"] { --dom: #8ae234; }
  [data-dom="azure"] { --dom: #729fcf; } [data-dom="aws"] { --dom: #e0a36a; } [data-dom="delivery"] { --dom: #34e2e2; } [data-dom="obs"] { --dom: #ad7fa8; }
}

/* the page: a soft wash at the top in the chapter's colour (the orange on pages without one) */
body { background: linear-gradient(180deg, color-mix(in oklab, var(--dom) 8%, transparent) 0, transparent 30rem) no-repeat, var(--bg); }

/* the chrome casts onto the page */
.top { position: relative; z-index: 5; box-shadow: 0 1px 0 var(--line), var(--cast); }
@media (min-width: 900px) { .top { position: sticky; } }
.top .go { box-shadow: inset 0 1px 0 var(--edge), var(--elev-1); }
.top .go:active { transform: translateY(1px); box-shadow: none; }
footer { box-shadow: inset 0 1px 0 var(--line), inset 0 10px 14px -12px rgba(0, 0, 0, .35); }

/* the primary: a lit key */
.btn { background-image: var(--key); box-shadow: var(--key-shadow); border: 1px solid var(--fill); transition: transform .12s ease-out, box-shadow .12s ease-out; }
.btn:hover { filter: none; background-image: linear-gradient(180deg, color-mix(in srgb, var(--fill) 88%, var(--on-fill)), var(--fill)); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3); }

/* surfaces that hold things */
.eli5, .check, blockquote, .toc, .lab { background: var(--paper); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--edge), var(--elev-1); }
.eli5 { padding: var(--sp-2) var(--sp-5) var(--sp-3); border-radius: var(--r-2); }
.eli5 h2::before, .check-h::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--sp-2); border-radius: 50%; background: var(--dom); vertical-align: .06em; }
.check { padding-block: var(--sp-2) var(--sp-3); }
.featured .card { background: var(--paper); box-shadow: inset 0 1px 0 var(--edge), var(--elev-2); }
.tbl { border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: inset 0 1px 0 var(--edge), var(--elev-1); background: var(--card); }
.tbl table { margin: 0; }
.tbl tr:last-child :is(td, th) { border-bottom: 0; }
pre { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -1px 0 rgba(0, 0, 0, .25), var(--elev-1); }
.term { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), var(--elev-2); }
.term pre { box-shadow: none; }
.term-bar { display: flex; align-items: center; gap: var(--sp-3); }
.term-bar::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--t-cm); box-shadow: 14px 0 0 var(--t-cm), 28px 0 0 var(--t-cm); margin-right: 32px; opacity: .55; }

/* blog cards: raised paper */
.grid { gap: var(--sp-4) var(--sp-5); }
.grid > .card { padding: var(--sp-4) var(--sp-5); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: inset 0 1px 0 var(--edge), var(--elev-1); }
.grid > .card:focus-within { border-radius: var(--r-2); outline-offset: 3px; }
.related .grid > .card { padding: var(--sp-3) var(--sp-4); }
.lab { box-shadow: inset 0 1px 0 var(--edge), var(--elev-2); }
.toc { box-shadow: none; }
@media (min-width: 1080px) { .toc { background: none; border: 0; border-left: 1px solid var(--line); } }

/* a chapter: its family colour on the dot, the numbers and the page you are on */
.dom { display: inline-flex; align-items: center; gap: 6px; margin-right: var(--sp-2); font-size: var(--w-xs); font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--dom); }
.dom i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dom); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.chbar b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: var(--sp-2); border-radius: 50%; background: var(--dom); vertical-align: .04em; }
.side-h { color: var(--dom); }
.side li a[aria-current] .n { color: var(--dom); font-weight: 700; }
.chs li[data-dom] > a .n { justify-self: start; align-self: start; min-width: 1.9rem; margin-top: .2rem; padding: 0 .35em; border-radius: 5px; line-height: 1.6; text-align: center; font-weight: 650; color: var(--dom); background: color-mix(in oklab, var(--dom) 13%, transparent); }
.doc-main h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3rem); line-height: 1.1; letter-spacing: -.028em; }
.kicker .dom { vertical-align: middle; }

/* a lift on hover, only where a pointer is and motion is welcome */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .grid > .card, .featured .card { transition: transform .16s ease-out, box-shadow .16s ease-out; }
  .grid > .card:hover, .featured .card:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 var(--edge), var(--elev-2); }
  .btn:hover { transform: translateY(-1px); }
}
