/*
 * GoByte Blog: the one stylesheet for every server rendered blog page (Qute templates in apps/blog, served by lnk-backend).
 * Plain CSS, no Tailwind, no build step. The Storybook stories under apps/blog/spec render the same HTML
 * with these classes and are the visual spec. Served as /blog/assets/blog.{hash}.css with the three
 * fonts next to it in ./fonts/ (self hosted, OFL; font-src 'self').
 *
 * Rules this file keeps (technical design 10.1 and 14.2):
 *  - CLS 0: every reserved block (inline CTA, end card, sponsor slot) has a fixed block size per breakpoint,
 *    media carries width and height, fonts use font-display: optional with metric matched fallbacks.
 *  - Body text 19px desktop, 18px phone, line height 1.65, measure about 68 characters.
 *  - Body and disclosure text at least 7:1 in both themes; muted text never carries a disclosure.
 *  - Dark mode follows the system; [data-theme] on <html> forces one (used by the review Storybook).
 *  - Readable with no JavaScript. blog.js only adds copy buttons and the TOC "you are here" state.
 */

/* ── Fonts ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Bricolage Grotesque Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 200 800;
  src: url("./fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("./fonts/geist-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Geist Mono Variable";
  font-style: normal;
  font-display: optional;
  font-weight: 100 900;
  src: url("./fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations");
}
/* Metric matched fallbacks, so a late font never reflows text. */
@font-face { font-family: "Geist Fallback"; src: local("Arial"); size-adjust: 103%; ascent-override: 94%; descent-override: 22%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage Fallback"; src: local("Arial"); size-adjust: 101%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }
@font-face { font-family: "Geist Mono Fallback"; src: local("Menlo"), local("Courier New"); size-adjust: 98%; ascent-override: 96%; descent-override: 24%; line-gap-override: 0%; }

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  /* Brand (brand.go): cyan, deep cyan, ink, paper, Bix orange. */
  --cyan: #00d4ff;
  --cyan-deep: #00b8e6;
  --ink: #0b0b0c;
  --paper: #ffffff;
  --bix: #ff7c17;

  /* Light theme */
  --bg: #ffffff;
  --bg-soft: #f3f6f8;          /* code, notes, panels */
  --bg-sunk: #e9eef2;          /* output blocks, rail tracks */
  --text: #14181c;             /* 17.6:1 on --bg */
  --text-2: #39424b;           /* 10.2:1, secondary prose and disclosures' links */
  --muted: #56606a;            /* 6.4:1, dates and counts only, never disclosures */
  --line: #dde3e8;
  --line-strong: #b9c3cb;
  --link: #006a85;             /* 6.2:1 on white, deep cyan darkened for text */
  --link-hover: #004f63;
  --accent: var(--cyan);       /* the series rail and highlights, never text on light */
  --accent-ink: #00566c;       /* cyan family text that must pass on --bg-soft */
  --focus: #006a85;
  --cta-bg: var(--bix);
  --cta-text: var(--ink);      /* 8.6:1 on Bix orange */
  --held-bg: #fff4e8;
  --held-line: #f2c49a;
  --danger: #a12a1f;
  --add-bg: #e4f5ea;           /* diff additions and right answers */
  --add-ink: #146c36;          /* 5.9:1 on --add-bg */
  --del-bg: #fcebe8;
  --del-ink: #a12a1f;

  /* Code (server side tok-* spans), matched to the theme */
  --code-bg: #f3f6f8;
  --code-text: #1c232a;
  --tok-kw: #00607a;
  --tok-typ: #6a3fb5;
  --tok-fn: #1d55a8;
  --tok-str: #9a4300;
  --tok-num: #9a4300;
  --tok-com: #5d6873;
  --tok-op: #39424b;
  --out-bg: #e9eef2;

  /* Type */
  --font-body: "Geist Variable", "Geist Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Bricolage Grotesque Variable", "Bricolage Fallback", "Geist Variable", system-ui, sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body-size: 1.125rem;       /* 18px phone, 19px from 720px */
  --body-leading: 1.65;
  --measure: 42rem;            /* about 68 characters of Geist at 19px */

  /* Space and shape */
  --gutter: 1rem;
  --page: 72rem;
  --radius: 10px;
  --radius-lg: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  background: var(--bg);
}
/* Theme changes ease the page color. Custom properties themselves do not interpolate. */
body.blog {
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  body.blog { transition: none; }
}

/* Dark theme: system, unless forced light; or forced dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0c;
    --bg-soft: #141619;
    --bg-sunk: #1b1e22;
    --text: #e9edf0;           /* 16.4:1 on ink */
    --text-2: #bcc4cb;         /* 10.9:1 */
    --muted: #949ea8;          /* 7.0:1 */
    --line: #23272c;
    --line-strong: #3a4148;
    --link: #3fdcff;
    --link-hover: #8ae9ff;
    --accent-ink: #3fdcff;
    --focus: #00d4ff;
    --held-bg: #2a1d10;
    --held-line: #6b4520;
    --danger: #ff8a7a;
    --add-bg: #10271a;
    --add-ink: #7fdc9f;
    --del-bg: #2b1513;
    --del-ink: #ff9d8f;
    --code-bg: #121417;
    --code-text: #dfe5ea;
    --tok-kw: #4fe0ff;
    --tok-typ: #c3b1ff;
    --tok-fn: #8fc4ff;
    --tok-str: #ffb072;
    --tok-num: #ffb072;
    --tok-com: #8d98a3;
    --tok-op: #bcc4cb;
    --out-bg: #17191d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-soft: #141619;
  --bg-sunk: #1b1e22;
  --text: #e9edf0;
  --text-2: #bcc4cb;
  --muted: #949ea8;
  --line: #23272c;
  --line-strong: #3a4148;
  --link: #3fdcff;
  --link-hover: #8ae9ff;
  --accent-ink: #3fdcff;
  --focus: #00d4ff;
  --held-bg: #2a1d10;
  --held-line: #6b4520;
  --danger: #ff8a7a;
  --add-bg: #10271a;
  --add-ink: #7fdc9f;
  --del-bg: #2b1513;
  --del-ink: #ff9d8f;
  --code-bg: #121417;
  --code-text: #dfe5ea;
  --tok-kw: #4fe0ff;
  --tok-typ: #c3b1ff;
  --tok-fn: #8fc4ff;
  --tok-str: #ffb072;
  --tok-num: #ffb072;
  --tok-com: #8d98a3;
  --tok-op: #bcc4cb;
  --out-bg: #17191d;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --body-size: 1.1875rem; --gutter: 2rem; }
}

/* ── Base ──────────────────────────────────────────────────────────────── */
.blog, .blog *, .blog *::before, .blog *::after { box-sizing: border-box; }
.blog {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01" 0;
  overflow-wrap: break-word;
}
:where(.blog) img, :where(.blog) video { display: block; max-width: 100%; height: auto; }
:where(.blog) a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:where(.blog) a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
.blog :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.blog ::selection { background: color-mix(in srgb, var(--cyan) 30%, transparent); }
:where(.blog) :is(h1, h2, h3) { font-family: var(--font-head); color: var(--text); text-wrap: balance; margin: 0; }
:where(.blog) p { margin: 0; }
:where(.blog) :is(ul, ol) { margin: 0; padding: 0; }
:where(.blog) button { font: inherit; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }

/* Skip link */
.skip {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 10;
  background: var(--text); color: var(--bg) !important; padding: 0.5rem 0.875rem; border-radius: 6px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

/* ── Site header: compact and sticky, with the Topics menu, search and the reading progress line ── */
:root { scroll-padding-top: 4.75rem; }
.site {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-bar { display: flex; align-items: center; gap: 1.25rem; height: 3.5rem; }
.site-logo { display: inline-flex; align-items: center; gap: 0.625rem; text-decoration: none; color: var(--text) !important; flex: none; }
.site-logo img { height: 1.25rem; width: auto; }
.site-logo .logo-on-dark { display: none; }
:root[data-theme="dark"] .site-logo .logo-on-dark, :root[data-theme="dark"] .foot-logo .logo-on-dark { display: block; }
:root[data-theme="dark"] .site-logo .logo-on-light, :root[data-theme="dark"] .foot-logo .logo-on-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-logo .logo-on-dark, :root:not([data-theme="light"]) .foot-logo .logo-on-dark { display: block; }
  :root:not([data-theme="light"]) .site-logo .logo-on-light, :root:not([data-theme="light"]) .foot-logo .logo-on-light { display: none; }
}
.site-name {
  font-family: var(--font-head); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em;
  padding-left: 0.625rem; border-left: 1px solid var(--line-strong); line-height: 1;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.site-links { display: flex; gap: 0.25rem; list-style: none; }
.site-nav a, .menu-btn {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; padding: 0 0.625rem; border-radius: 8px;
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 550; white-space: nowrap;
}
.site-nav a:hover, .menu-btn:hover { color: var(--text); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .nav-app { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); margin-left: 0.25rem; }
.site-nav .nav-app:hover { box-shadow: inset 0 0 0 1px var(--text-2); }

/* Search: a link to the search page without JS, the command palette with it. The hint shows only with JS. */
.site-nav .search-btn {
  gap: 0.5rem; padding: 0 0.375rem 0 0.625rem; color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line); background: var(--bg-soft);
}
.search-btn svg, .menu-btn svg { width: 1rem; height: 1rem; flex: none; }
.search-kbd {
  visibility: hidden; display: inline-block; inline-size: 3.25rem; text-align: center;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; line-height: 1.375rem;
  border-radius: 5px; color: var(--text-2); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.js .search-kbd { visibility: visible; }

/* Theme: Auto follows the system, Light and Dark force one. The sun is filled so it
   reads at 16px. Moon and auto stay strokes and match Search.
   theme.js sets data-theme before CSS, so the right icon is there on first paint. */
.theme-btn {
  display: inline-flex; align-items: center; gap: 0.375rem; height: 2.25rem; padding: 0 0.625rem;
  border: 0; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.9375rem; font-weight: 550;
  color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); background: var(--bg-soft);
}
.theme-btn:hover { color: var(--text); background: var(--bg); }
.theme-ico { width: 1rem; height: 1rem; display: grid; flex: none; }
.theme-ico svg { grid-area: 1 / 1; width: 1rem; height: 1rem; }
.theme-ico .theme-sun, .theme-ico .theme-moon { display: none; }
:root[data-theme="light"] .theme-ico .theme-sun { display: block; }
:root[data-theme="light"] .theme-ico .theme-auto { display: none; }
:root[data-theme="dark"] .theme-ico .theme-moon { display: block; }
:root[data-theme="dark"] .theme-ico .theme-auto { display: none; }

/* The menu: one native <details>. Topics on wide screens (a panel of six shelves), Menu on phones (a sheet). */
.menu { position: static; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-btn svg { transition: transform 200ms var(--ease); }
.menu[open] > .menu-btn { color: var(--text); background: var(--bg-soft); }
.menu[open] > .menu-btn .chev { transform: rotate(180deg); }
.menu-label-narrow, .menu-btn .bars { display: none; }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--ink) 30%, transparent);
}
.menu-inner { padding-block: 1.75rem 2rem; }
.menu-links { display: none; }
.menu-topics { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 2.5rem; }
.menu-topic > summary { cursor: pointer; font-family: var(--font-head); font-size: 1.0625rem; font-weight: 650; color: var(--text); }
.site-nav .menu-hub { display: block; height: auto; padding: 0; text-decoration: none; color: var(--text) !important; }
.site-nav .menu-hub:hover { background: none; }
.menu-hub-name { font-family: var(--font-head); font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; }
.menu-hub:hover .menu-hub-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.menu-hub-all { display: none; }
.menu-desc { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }
.menu-subs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.125rem 0.875rem; margin-top: 0.625rem; }
.menu-subs a { font-size: 0.9375rem; color: var(--link); text-decoration: none; height: auto; padding: 0.125rem 0; border-radius: 4px; }
.menu-subs a:hover { background: none; color: var(--link-hover); text-decoration: underline; }
.menu-foot { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.menu-foot a { height: auto; padding: 0; color: var(--text-2); font-weight: 600; }
.menu-foot a:hover { background: none; color: var(--text); text-decoration: underline; }
/* Wide screens show every shelf open; a topic's <summary> only matters on phones. */
@supports selector(::details-content) {
  @media (min-width: 900px) {
    .menu-topic > summary { display: none; }
    .menu-topic::details-content { content-visibility: visible; }
  }
}

.support { border-bottom: 1px solid var(--line); }
.support-line { font-size: 0.875rem; color: var(--text-2); padding-block: 0.4375rem; }
.support-line a { color: var(--text-2); font-weight: 600; }

/* Reading progress: a cyan hairline on the header, driven by scrolling the article (CSS where supported). */
.read-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--cyan);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
@supports (animation-timeline: view()) {
  .blog:has(.read-progress) { timeline-scope: --article; }
  .post .prose { view-timeline: --article block; }
  .read-progress { animation: read-grow linear both; animation-timeline: --article; animation-range: contain 0% contain 100%; }
}
@keyframes read-grow { to { transform: scaleX(1); } }

@media (max-width: 899px) {
  .site-bar { gap: 0.5rem; }
  .site-links, .search-label, .search-kbd, .menu-label-wide, .menu-btn .chev { display: none; }
  .menu-label-narrow, .menu-btn .bars { display: inline; }
  .site-nav { gap: 0.375rem; }
  .site-nav .search-btn, .site-nav .theme-btn { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
  .theme-label { display: none; }
  .menu-btn { height: 2.5rem; box-shadow: inset 0 0 0 1px var(--line); }
  .menu-panel { max-height: calc(100dvh - 3.5rem); overflow-y: auto; overscroll-behavior: contain; }
  .menu-inner { padding-block: 0.5rem 1.5rem; }
  .menu-links { display: grid; list-style: none; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
  .menu-links a { height: 3rem; padding: 0; font-size: 1.0625rem; font-weight: 600; color: var(--text); }
  .menu-links a:hover { background: none; }
  .menu-topics { grid-template-columns: 1fr; gap: 0; }
  .menu-topic { border-bottom: 1px solid var(--line); }
  .menu-topic > summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 3rem; cursor: pointer; list-style: none;
    font-family: var(--font-head); font-size: 1.0625rem; font-weight: 650; color: var(--text);
  }
  .menu-topic > summary::-webkit-details-marker { display: none; }
  .menu-topic > summary::after { content: ""; width: 0.5rem; height: 0.5rem; margin-right: 0.25rem; border: solid var(--text-2); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease); }
  .menu-topic[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
  .menu-hub-name, .menu-desc { display: none; }
  .menu-hub-all { display: block; font-weight: 600; color: var(--link); padding-block: 0.5rem; }
  .menu-subs { display: grid; gap: 0; margin: 0 0 0.75rem; }
  .menu-subs a { display: flex; align-items: center; min-height: 2.75rem; font-size: 1rem; color: var(--text-2); }
  .menu-foot { margin-top: 1rem; padding-top: 0; border-top: 0; flex-direction: column; gap: 0; }
  .menu-foot a { display: flex; align-items: center; min-height: 2.75rem; }
  .support-line { font-size: 0.8125rem; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); margin-top: 5rem; padding-block: 2.5rem 3rem; color: var(--text-2); font-size: 0.9375rem; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.foot-logo img { height: 1.25rem; width: auto; }
.foot-logo .logo-on-dark { display: none; }
.foot-grid h2 { font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 0.625rem; }
.foot-grid ul { list-style: none; display: grid; gap: 0.375rem; }
.foot-grid a { color: var(--text-2); text-decoration: none; }
.foot-grid a:hover { color: var(--text); text-decoration: underline; }
.foot-note { margin-top: 0.75rem; max-width: 26rem; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ── Breadcrumb ────────────────────────────────────────────────────────── */
.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; font-size: 0.875rem; color: var(--text-2); }
.crumbs li + li::before { content: "/"; margin-inline: 0.5rem; color: var(--line-strong); }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ── The series rail: the blog's one signature element ─────────────────
 * 27 episodes as 27 segments in nine groups of three (one group per track). Done segments are solid,
 * the current one is lit cyan, coming ones are hollow. It is decorative (aria-hidden); the sentence
 * next to it says the same thing in words. */
.rail { display: flex; gap: 0.375rem; list-style: none; align-items: center; }
.rail-track { display: flex; gap: 2px; }
.rail-ep { display: block; width: 0.875rem; height: 0.375rem; border-radius: 2px; background: var(--bg-sunk); box-shadow: inset 0 0 0 1px var(--line-strong); }
.rail-ep[data-state="done"] { background: var(--text); box-shadow: none; }
.rail-ep[data-state="current"] { background: var(--cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 30%, transparent); }
.rail-lg { gap: 0.5rem; width: 100%; }
.rail-lg .rail-track { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 0.5rem; }
.rail-lg .rail-segs { display: flex; gap: 3px; }
.rail-lg .rail-ep { flex: 1; width: auto; height: 0.625rem; border-radius: 3px; }
.rail-lg .rail-name { font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 719px) {
  .rail { gap: 0.25rem; }
  .rail-ep { width: 0.5rem; }
  .rail-lg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.875rem 0.75rem; }
}

.series-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.9375rem; color: var(--text-2); }
.series-bar a { font-weight: 600; color: var(--text); text-decoration: none; }
.series-bar a:hover { text-decoration: underline; }

/* ── Post header ───────────────────────────────────────────────────────── */
.post { padding-top: 2.25rem; }
.post-head { max-width: 48rem; }
.post-head .series-bar { margin-top: 1.75rem; }
.post-title {
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 1.55rem + 2.9vw, 3.75rem);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
}
.post-dek { margin-top: 1.25rem; font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); line-height: 1.45; color: var(--text-2); max-width: 40rem; }

.byline { display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; align-items: center; margin-top: 1.75rem; }
.byline-portrait { width: 4rem; height: 4rem; border-radius: 12px; object-fit: cover; }
.byline-names { font-size: 1rem; color: var(--text-2); }
.byline-names a { color: var(--text); font-weight: 650; text-decoration: none; }
.byline-names a:hover { text-decoration: underline; }
.byline-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.9375rem; color: var(--muted); margin-top: 0.125rem; }
.byline-meta a { color: var(--muted); }
.ai-disclosure { margin-top: 1rem; font-size: 1rem; line-height: 1.55; color: var(--text-2); max-width: 40rem; }

.post-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* Vote button: one press to vote, again to remove. */
.vote {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 0.875rem 0 0.75rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.vote:hover { border-color: var(--text-2); }
.vote svg { width: 1rem; height: 1rem; }
.vote-count { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; padding-left: 0.5rem; border-left: 1px solid var(--line-strong); }
.vote[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.vote[aria-pressed="true"] .vote-count { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.vote[aria-pressed="true"] svg { fill: var(--cyan); stroke: var(--cyan); }
a.vote { color: var(--text) !important; }
.discuss-link { font-size: 0.9375rem; color: var(--text-2) !important; }

/* ── Post layout: the body column, and on wide screens a sticky rail beside it (TOC, sponsor, back to top) ── */
.post-main { margin-top: 2.5rem; }
.post-rail { display: contents; }
.post-rail .sponsor-rail, .post-rail .to-top { display: none; }
@media (min-width: 1080px) {
  .post-main { display: grid; grid-template-columns: minmax(0, var(--measure)) 17rem; gap: 4rem; align-items: start; }
  .post-main .prose { grid-column: 1; grid-row: 1; }
  .post-rail { display: grid; gap: 1.5rem; grid-column: 2; grid-row: 1; position: sticky; top: 5rem; }
  .post-rail .sponsor-rail { display: grid; }
  .post-rail .to-top { display: inline-flex; }
  .post-end .sponsor-after, .post-end .to-top { display: none; }
}

/* Table of contents: always open beside the text on wide screens, a collapsed accordion above it on phones. */
.toc { font-size: 0.9375rem; }
.toc summary { list-style: none; cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; position: relative; margin-top: 0.625rem; }
.toc a {
  display: block; padding: 0.3125rem 0 0.3125rem 0.875rem; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--text-2); text-decoration: none; line-height: 1.35;
}
.toc a:hover { color: var(--text); border-left-color: var(--line-strong); }
.toc a[aria-current="location"] { color: var(--text); font-weight: 600; border-left-color: var(--cyan); }
.toc-ind {
  position: absolute; left: -1px; top: 0; width: 2px; height: 1px; background: var(--cyan);
  transform-origin: 0 0; opacity: 0; pointer-events: none;
}
@media (min-width: 1080px) {
  .toc ol { border-left: 1px solid var(--line); }
  .js .toc a[aria-current="location"] { border-left-color: transparent; }
  @supports selector(::details-content) {
    .toc summary { pointer-events: none; }
    .toc details::details-content { content-visibility: visible; }
  }
}
@media (max-width: 1079px) {
  .toc { max-width: var(--measure); margin-bottom: 2rem; background: var(--bg-soft); border-radius: var(--radius); }
  .toc summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; padding: 0 1.25rem;
    font-size: 0.9375rem; color: var(--text);
  }
  .toc summary::after { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border: solid var(--text-2); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease); }
  .toc details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .toc ol { margin: 0; padding: 0 1.25rem 1rem; columns: 2; column-gap: 1.5rem; }
  .toc a { padding-left: 0; border-left: 0; margin-left: 0; }
  .toc a[aria-current="location"] { text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; }
  .toc-ind { display: none; }
}
@media (max-width: 519px) { .toc ol { columns: 1; } }

.to-top {
  align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; color: var(--text-2) !important; text-decoration: none;
}
.to-top::before { content: ""; width: 0.4375rem; height: 0.4375rem; border: solid currentColor; border-width: 2px 0 0 2px; transform: translateY(2px) rotate(45deg); }
.to-top:hover { color: var(--text) !important; text-decoration: underline; }
.post-end .to-top { display: inline-flex; justify-self: start; }

/* ── Prose: the article body (body_html from the server) ─────────────── */
.prose { max-width: var(--measure); font-size: var(--body-size); line-height: var(--body-leading); color: var(--text); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2;
  margin-top: 2.25em; position: relative;
}
.prose h3 { font-size: 1.1875rem; font-weight: 650; margin-top: 1.75em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.625em; }
.prose h2:target { text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
.prose .anchor { margin-left: 0.375rem; color: var(--muted); text-decoration: none; font-weight: 400; opacity: 0; }
.prose h2:hover .anchor, .prose .anchor:focus-visible { opacity: 1; }
.prose strong { font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.375em; }
.prose blockquote { margin-inline: 0; padding-left: 1.25rem; border-left: 3px solid var(--line-strong); color: var(--text-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5em; }
.prose :not(pre) > code {
  font-family: var(--font-mono); font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 5px;
  background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}

/* Code blocks: header strip with the language and (with JS) a copy button; the code scrolls, the page never does. */
.prose pre {
  position: relative; margin-inline: 0; overflow: hidden;
  background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.55;
  padding-top: 2.25rem;
}
@media (min-width: 720px) { .prose pre { font-size: 0.875rem; } }
.prose pre > code { display: block; overflow-x: auto; padding: 0.875rem 1.125rem 1rem; white-space: pre; tab-size: 4; font-family: inherit; }
.prose pre::before {
  position: absolute; left: 1.125rem; top: 0; line-height: 2.25rem;
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; color: var(--text-2);
  content: "Code";
}
.prose pre::after { content: ""; position: absolute; left: 0; right: 0; top: 2.25rem; border-top: 1px solid var(--line); }
.prose pre.language-go::before { content: "Go"; }
.prose pre.language-java::before { content: "Java"; }
.prose pre.language-python::before { content: "Python"; }
.prose pre.language-rust::before { content: "Rust"; }
.prose pre.language-ts::before, .prose pre.language-tsx::before { content: "TypeScript"; }
.prose pre.language-js::before, .prose pre.language-jsx::before { content: "JavaScript"; }
.prose pre.language-shell::before, .prose pre.language-bash::before { content: "Shell"; }
.prose pre.language-json::before { content: "JSON"; }
.prose pre.language-sql::before { content: "SQL"; }
.prose pre.language-css::before { content: "CSS"; }
.prose pre.language-vim::before { content: "Vim"; }
/* Program output: set apart from code, joined to the block above it. */
.prose pre.output { background: var(--out-bg); box-shadow: none; border-left: 3px solid var(--cyan); border-radius: 4px var(--radius) var(--radius) 4px; }
.prose pre.output::before { content: "Output"; color: var(--text-2); }
.prose pre.output::after { border-top-style: dashed; }
.prose pre:not(.output) + pre.output { margin-top: 0.5rem; }

/* Lesson pictures. The final state is in the HTML. Motion only reveals values, and reduced motion skips that. */
.prose figure.stage {
  margin-inline: 0; padding: 0.9rem 1rem 1rem;
  background: var(--bg-soft); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line);
}
.prose figure.stage figcaption {
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.01em;
  color: var(--text-2); margin: 0 0 0.75rem;
}
.prose ol.stage-rows, .prose figure.stage > ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.prose li.stage-row, .prose figure.stage > ol > li {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 0.4rem; align-items: center; margin: 0;
}
.prose ol.stage-2 .stage-row,
.prose figure.stage > ol.stage-2 > li,
.prose figure.stage > ol > li:not(:has(> :nth-child(3))) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.prose .stage-name, .prose .stage-type, .prose .stage-value, .prose .stage-note, .prose .stage-wall, .prose .stage-result {
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.35;
  padding: 0.4rem 0.55rem; border-radius: 7px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
  min-width: 0; overflow-wrap: anywhere;
}
.prose .stage-type { color: var(--accent-ink); }
.prose .stage-value { background: color-mix(in srgb, var(--cyan) 14%, var(--bg)); }
.prose .stage-result { font-weight: 650; }
.prose .stage-wall { color: var(--del-ink); background: var(--del-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--del-ink) 35%, transparent); }
.prose .stage-note { font-family: var(--font-body); color: var(--text-2); }
.prose .stage-on { box-shadow: inset 0 0 0 2px var(--cyan); }
.syllabus-stage { margin: 0.25rem 0 1.5rem; }
@media (max-width: 560px) {
  .prose li.stage-row, .prose ol.stage-2 .stage-row,
  .prose figure.stage > ol > li,
  .prose figure.stage > ol > li:not(:has(> :nth-child(3))) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .js figure.stage:not([data-stage-on]) .stage-value,
  .js figure.stage:not([data-stage-on]) .stage-result,
  .js figure.stage:not([data-stage-on]) .stage-note { opacity: 0; }
}
@media print {
  .js figure.stage .stage-value, .js figure.stage .stage-result, .js figure.stage .stage-note { opacity: 1 !important; }
}
.copy {
  position: absolute; right: 0.5rem; top: 0.375rem; height: 1.5rem; padding: 0 0.625rem;
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600;
  color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 6px;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.copy:hover { color: var(--text); border-color: var(--text-2); }
.copy[data-copied] { color: var(--accent-ink); border-color: currentColor; }

/* Server side highlighting spans. CodeHighlighter emits tok-kw, tok-str, tok-com, tok-num, tok-typ, tok-fn, plus
 * tok-key (JSON and YAML keys, object properties), tok-var (shell variables), tok-tag and tok-attr (HTML). tok-op is
 * kept for a later highlighter; the current one leaves operators plain. */
.tok-kw { color: var(--tok-kw); font-weight: 600; }
.tok-typ { color: var(--tok-typ); }
.tok-fn { color: var(--tok-fn); }
.tok-str { color: var(--tok-str); }
.tok-num { color: var(--tok-num); }
.tok-com { color: var(--tok-com); font-style: italic; }
.tok-op { color: var(--tok-op); }
.tok-key { color: var(--tok-fn); }
.tok-var { color: var(--tok-typ); }
.tok-tag { color: var(--tok-kw); }
.tok-attr { color: var(--tok-typ); }

/* Callouts (blockquotes that start with Note., Tip. or Warning.) */
.callout { padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--bg-soft); font-size: 0.9375em; }
.callout-warn { box-shadow: inset 3px 0 0 var(--bix); }
.callout-tip, .callout-note { box-shadow: inset 3px 0 0 var(--cyan); }

/* Video: native controls, poster first, transcript one tap away. */
.video { margin-inline: 0; }
.video video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); background: #0b0b0c; box-shadow: 0 0 0 1px var(--line); }
.video figcaption { margin-top: 0.625rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.video details { margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.video summary { cursor: pointer; font-weight: 600; color: var(--text); width: max-content; }
.video details p { margin-top: 0.5rem; padding-left: 1rem; border-left: 2px solid var(--line); }

/* ── Inline CTA: content by GoByte, two lines, one button, fixed height ── */
.cta-inline {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.5rem 1.5rem;
  block-size: 7.5rem; overflow: hidden; padding: 1rem 1.25rem;
  border-radius: var(--radius); background: var(--bg-soft); box-shadow: inset 3px 0 0 var(--cyan);
  font-size: 1rem; line-height: 1.5;
}
.prose .cta-inline { margin-block: 2em; }
.cta-inline p { margin: 0; color: var(--text-2); }
.cta-inline .cta-title { font-weight: 650; color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.125rem;
  border-radius: 999px; font-weight: 650; font-size: 0.9375rem; text-decoration: none !important; white-space: nowrap;
  border: 1px solid var(--text); color: var(--text) !important; background: transparent; cursor: pointer;
}
.btn:hover { background: var(--text); color: var(--bg) !important; }
.btn:disabled { opacity: 0.6; cursor: default; background: transparent; color: var(--text) !important; }
.btn-primary { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-text) !important; }
.btn-primary:hover { background: color-mix(in srgb, var(--cta-bg) 88%, var(--ink)); color: var(--cta-text) !important; border-color: transparent; }
@media (max-width: 599px) {
  .btn { white-space: normal; text-align: center; padding-block: 0.5rem; }
  .cta-inline { grid-template-columns: 1fr; block-size: 10.5rem; align-content: center; }
  .cta-inline .btn { justify-self: start; min-height: 2.5rem; }
}

/* Affiliate note: directly above the first paragraph with an affiliate link. */
.affiliate-note {
  font-size: 0.9375rem; line-height: 1.5; color: var(--text-2);
  padding: 0.75rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.affiliate-note strong { color: var(--text); }
.prose .affiliate-note + p { margin-top: 0.75rem; }

/* Tested with ... on date */
.tested { margin-top: 2.5rem; max-width: var(--measure); font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); display: flex; gap: 0.75rem; }
.tested::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-top: 0.5rem; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 22%, transparent); }
.tested code { font-family: var(--font-mono); font-size: 0.875em; }

/* ── After the article: end card, sponsor, series nav, discussion ────── */
.post-end { max-width: var(--measure); margin-top: 3rem; display: grid; gap: 1.5rem; }

/* End card: the page's one orange button. Fixed height (11rem; taller on phones). */
.cta-end {
  position: relative; block-size: 11rem; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.75rem 1.5rem;
  padding: 1.5rem 1.75rem; border-radius: var(--radius-lg);
  background: var(--ink); color: #e9edf0;
}
:root[data-theme="dark"] .cta-end { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-end { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); } }
.cta-end-text { align-self: center; }
.cta-end h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; color: #ffffff; }
.cta-end p { margin-top: 0.5rem; color: #c3cbd2; font-size: 1rem; line-height: 1.5; max-width: 30rem; }
.cta-end .btn:disabled { opacity: 0.6; cursor: default; background: transparent; color: var(--text) !important; }
.btn-primary { align-self: center; }
.cta-end .btn-primary:focus-visible { outline-color: var(--cyan); }
@media (max-width: 599px) {
  .cta-end { grid-template-columns: 1fr; block-size: 15.5rem; padding: 1.25rem; align-content: center; }
  .cta-end .btn:disabled { opacity: 0.6; cursor: default; background: transparent; color: var(--text) !important; }
.btn-primary { justify-self: start; }
}

/* Sponsor slot: disclosure first, in body size and body contrast, then the card. Fixed size. */
.sponsor {
  block-size: 12.5rem; overflow: hidden;
  padding: 1.125rem 1.25rem; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  display: grid; grid-template-rows: auto 1fr; gap: 0.875rem;
}
.sponsor-disclosure { font-size: 1rem; line-height: 1.5; color: var(--text); }
.sponsor-disclosure a { color: var(--text); font-weight: 600; }
.sponsor-card {
  display: grid; grid-template-columns: 6rem 1fr; grid-template-rows: auto 1fr; gap: 0.25rem 1rem; align-content: start;
  text-decoration: none !important; color: var(--text) !important; border-radius: var(--radius);
}
.sponsor-card img { grid-row: 1 / span 2; width: 6rem; height: 6rem; border-radius: var(--radius); object-fit: contain; background: var(--bg-soft); }
.sponsor-name { font-weight: 650; font-size: 1rem; align-self: end; padding-top: 0.75rem; }
.sponsor-copy { font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.sponsor-card:hover .sponsor-name { text-decoration: underline; }
.sponsor-card.no-logo { grid-template-columns: 1fr; grid-template-rows: auto auto; padding: 0.875rem 1rem; background: var(--bg-soft); }
.sponsor-card.no-logo .sponsor-name { padding-top: 0; }
@media (max-width: 599px) {
  .sponsor { block-size: 17rem; padding: 1rem; }
  .sponsor-card { grid-template-columns: 4.5rem 1fr; }
  .sponsor-card img { width: 4.5rem; height: 4.5rem; }
  .sponsor-name { padding-top: 0; }
}

/* Series navigation */
.series-nav { border-block: 1px solid var(--line); padding-block: 1.25rem; }
.series-nav-pos { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.9375rem; color: var(--text-2); }
.series-nav-pos strong { color: var(--text); font-weight: 650; }
.series-nav ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.series-nav li:last-child { text-align: right; }
.series-nav ul a, .series-nav .series-nav-none { display: block; padding: 0.875rem 1rem; border-radius: var(--radius); background: var(--bg-soft); text-decoration: none; color: var(--text); height: 100%; }
.series-nav ul a:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.series-nav-dir { display: block; font-size: 0.875rem; color: var(--text-2); margin-bottom: 0.25rem; }
.series-nav-title { font-family: var(--font-head); font-weight: 600; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.01em; }
.series-nav .series-nav-none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.series-nav-track { margin-top: 0.875rem; font-size: 0.9375rem; color: var(--text-2); }
.series-nav .rail-lg { margin-top: 1.25rem; }
@media (max-width: 519px) { .series-nav ul { grid-template-columns: 1fr; } .series-nav li:last-child { text-align: left; } }

/* ── Discussion ────────────────────────────────────────────────────────── */
.discuss { max-width: var(--measure); margin-top: 3.5rem; }
.discuss-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.discuss-head h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; }
.discuss-guidelines { font-size: 0.9375rem; color: var(--text-2); margin-top: 0.375rem; }
.discuss-guidelines a { color: var(--text-2); }
.comments { list-style: none; margin-top: 1.5rem; }
.comments > li + li { border-top: 1px solid var(--line); }
.comment { padding-block: 1.25rem; }
.comment-head { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; font-size: 0.9375rem; }
.avatar {
  flex: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px;
  font-weight: 650; font-size: 0.875rem; color: var(--ink); background: #b9eefa;
}
/* Tint picked by the server from the user id, so no inline style is needed (CSP style-src 'self'). */
.avatar[data-tint="2"] { background: #ffd5b0; }
.avatar[data-tint="3"] { background: #d9dde1; }
.avatar[data-tint="4"] { background: #d7cffd; }
.avatar[data-tint="5"] { background: #c9f2d8; }
.avatar[data-tint="6"] { background: #ffe08a; }
.comment-name { font-weight: 650; color: var(--text); }
.badge {
  font-size: 0.75rem; font-weight: 600; line-height: 1; padding: 0.3125rem 0.5rem; border-radius: 999px;
  color: var(--accent-ink); box-shadow: inset 0 0 0 1px currentColor;
}
.comment-time { color: var(--muted); }
.comment-body { margin-top: 0.5rem; font-size: 1rem; line-height: 1.6; padding-left: 2.625rem; }
.comment-body p + p { margin-top: 0.75em; }
.comment-body code { white-space: nowrap; font-family: var(--font-mono); font-size: 0.875em; background: var(--bg-soft); padding: 0.1em 0.3em; border-radius: 4px; }
.comment-actions { display: flex; gap: 0.25rem; margin-top: 0.5rem; padding-left: 2.125rem; }
.link-btn {
  background: none; border: 0; padding: 0.375rem 0.5rem; border-radius: 6px; cursor: pointer;
  color: var(--text-2); font-size: 0.875rem; font-weight: 600;
}
.link-btn:hover { color: var(--text); background: var(--bg-soft); }
.replies { list-style: none; margin-left: 2.625rem; padding-left: 1rem; border-left: 2px solid var(--line); }
.replies .comment { padding-block: 0.875rem; }
.comment-held { background: var(--held-bg); box-shadow: inset 0 0 0 1px var(--held-line); border-radius: var(--radius); padding: 1rem; margin-block: 0.75rem; }
.held-note { margin-top: 0.75rem; padding-left: 2.625rem; font-size: 0.9375rem; font-weight: 600; color: var(--text); }
.comment-reported { padding-block: 1.25rem; font-size: 0.9375rem; color: var(--text-2); }
.comment-reported strong { color: var(--text); }

.discuss-panel { margin-top: 1.5rem; padding: 1.25rem; border-radius: var(--radius-lg); background: var(--bg-soft); }
.discuss-panel p { font-size: 1rem; line-height: 1.55; color: var(--text-2); }
.discuss-panel p strong { color: var(--text); }
.discuss-panel .panel-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.discuss-panel .status { font-size: 0.9375rem; color: var(--text); font-weight: 600; }
.comment-form label { display: block; font-weight: 650; font-size: 1rem; margin-bottom: 0.5rem; }
.comment-form textarea {
  width: 100%; min-height: 7rem; resize: vertical; padding: 0.75rem 0.875rem; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font: inherit; font-size: 1rem; line-height: 1.55;
}
.comment-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.comment-form .hint { font-size: 0.875rem; color: var(--text-2); margin-top: 0.5rem; }
.comment-form .panel-actions { justify-content: space-between; }

/* ── Listings, boards and hubs ─────────────────────────────────────────── */
.page { padding-top: 2.5rem; }
.crumbs + .page-title { margin-top: 1rem; }
.page-title + .prose { margin-top: 1.5rem; }
.page-title { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.page-intro { margin-top: 1rem; font-size: 1.1875rem; line-height: 1.6; color: var(--text-2); max-width: 44rem; }
.section { margin-top: 3.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--text); }
.section-head h2 { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em; }
.section-head a { font-size: 0.9375rem; font-weight: 600; }

.post-list { list-style: none; }
.post-item { display: grid; gap: 0.375rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.post-item h3 { font-size: 1.3125rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post-item p { color: var(--text-2); font-size: 1rem; line-height: 1.55; max-width: 40rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.875rem; color: var(--muted); }
.post-meta a { color: var(--text-2); text-decoration: none; font-weight: 600; }
.post-meta a:hover { text-decoration: underline; }

.home-grid { display: grid; gap: 3rem; margin-top: 3.5rem; }
@media (min-width: 1000px) { .home-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4rem; } }
.home-grid .section { margin-top: 0; }
.home-grid aside > * + * { margin-top: 3rem; }

/* Featured series: the rail at full width */
.feature {
  margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: var(--radius-lg);
  background: var(--bg-soft); display: grid; gap: 1.75rem;
}
@media (min-width: 900px) { .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 2.5rem; } }
.feature-media { position: relative; overflow: hidden; border-radius: var(--radius); }
.feature-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .feature-media img { transition: transform 0.6s var(--ease); }
  .feature:hover .feature-media img, .feature:focus-within .feature-media img { transform: scale(1.035); }
}
.feature-kicker { font-size: 0.9375rem; color: var(--text-2); }
.feature-kicker a { color: var(--text); font-weight: 650; text-decoration: none; }
.feature h2 { margin-top: 0.5rem; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
.feature h2 a { color: var(--text); text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.feature p.feature-claim { margin-top: 0.75rem; color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; }
.feature .rail { margin-top: 1.25rem; }
.feature-progress { margin-top: 0.625rem; font-size: 0.9375rem; color: var(--text-2); }
.feature-actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

.topics { list-style: none; display: grid; grid-template-columns: 1fr; }
@media (min-width: 600px) { .topics { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.topics.topics-narrow { grid-template-columns: 1fr; }
.topics li { border-bottom: 1px solid var(--line); }
.topics a { display: block; padding-block: 0.875rem; text-decoration: none; color: var(--text); }
.topics a:hover .topic-name { text-decoration: underline; }
.topic-name { font-family: var(--font-head); font-weight: 650; font-size: 1.125rem; letter-spacing: -0.01em; }
.topic-desc { display: block; font-size: 0.9375rem; color: var(--text-2); margin-top: 0.125rem; line-height: 1.45; }

/* Board: numbered because it is a ranking. */
.board ol { list-style: none; counter-reset: rank; }
.board li { counter-increment: rank; display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.125rem 0.5rem; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.board li::before { content: counter(rank); grid-row: 1 / span 2; font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; color: var(--text-2); font-variant-numeric: tabular-nums; line-height: 1.35; }
.board li a { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.35; }
.board li a:hover { text-decoration: underline; }
.board .votes { font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.board-foot { margin-top: 0.875rem; font-size: 0.9375rem; font-weight: 600; }
.board-lg li { grid-template-columns: 2.5rem 1fr auto; padding-block: 1rem; align-items: baseline; }
.board-lg li::before { font-size: 1.5rem; }
.board-lg li a { font-family: var(--font-head); font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.01em; }
.board-lg .votes { grid-row: 1; grid-column: 3; font-size: 0.9375rem; }
.board-lg .board-sub { grid-column: 2; font-size: 0.875rem; color: var(--muted); }

/* Tabs: plain links to ?period=, so they work without JS; the island swaps them in place. */
.tabs { display: flex; gap: 0.25rem; list-style: none; margin-top: 1.75rem; border-bottom: 1px solid var(--line); }
.tabs a { display: block; padding: 0.625rem 0.875rem; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--cyan); }

.contributors { list-style: none; }
.contributors li { display: grid; grid-template-columns: 2rem 2.25rem 1fr auto; gap: 0 0.75rem; align-items: center; padding-block: 0.875rem; border-bottom: 1px solid var(--line); }
.contributors .rank { font-family: var(--font-head); font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.contributors .avatar { width: 2.25rem; height: 2.25rem; }
.contributors .who { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; font-weight: 650; }
.contributors .score { font-variant-numeric: tabular-nums; font-weight: 650; }
.contributors .score small { font-weight: 400; color: var(--muted); font-size: 0.875rem; margin-left: 0.25rem; }
.score-table { width: 100%; max-width: 36rem; border-collapse: collapse; font-size: 0.9375rem; margin-top: 1rem; }
.score-table th, .score-table td { text-align: left; padding: 0.625rem 0; border-bottom: 1px solid var(--line); }
.score-table th { font-weight: 600; color: var(--text-2); }
.score-table td:last-child, .score-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.opt-out { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--text-2); }

/* Hubs: chips, series tracks, author header */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin-top: 1.5rem; }
.chips a { display: block; padding: 0.4375rem 0.875rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); text-decoration: none; font-size: 0.9375rem; font-weight: 500; }
.chips a:hover { box-shadow: inset 0 0 0 1px var(--text); }
.chips a[aria-current="page"] { background: var(--text); color: var(--bg); box-shadow: none; }

/* Courses section: the language bar stays on the catalog, a course, and a lesson. */
.course-section { border-bottom: 1px solid var(--line); background: var(--bg); }
.course-section-bar { display: flex; align-items: center; gap: 0.75rem 1rem; padding-block: 0.625rem; }
.course-section-k {
  flex: none; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-ink); text-decoration: none;
}
.course-section-k:hover { color: var(--text); }
.course-section-k[aria-current="page"] { color: var(--text); }
.course-section .chips { flex: 1; flex-wrap: nowrap; margin-top: 0; overflow-x: auto; scrollbar-width: thin; }
.course-section .chips a { white-space: nowrap; }

/* A course is a syllabus: one reading column, a meeting, then the program from that lesson. */
.syllabus-open, .syllabus, .syllabus-read, .syllabus-fallback { max-width: var(--measure); }
.crumbs + .syllabus-open { margin-top: 1.25rem; }
.syllabus { margin-top: 3rem; }
.syllabus > h2, .syllabus-read > h2 {
  font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2;
}
.syllabus-level { margin-top: 2.5rem; }
.syllabus-level > h3 {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-ink);
}
.syllabus-level > p { margin-top: 0.35rem; color: var(--text-2); }
.syllabus-level .syllabus-list { margin-top: 0.75rem; }
.catalog-topics { margin-top: 3rem; }
.syllabus-list, .readings { list-style: none; margin: 0; padding: 0; }
.syllabus-list > li { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.syllabus-head { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.syllabus-n { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text-2); }
.syllabus-head h3 { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; }
.syllabus-head h3 a { color: inherit; text-decoration: none; }
.syllabus-head h3 a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
.syllabus-min { margin-top: 0.25rem; font-size: 0.875rem; color: var(--text-2); }
.syllabus-concept { margin: 0.875rem 0 0 3rem; }
.syllabus-on { margin: 0.375rem 0 0 3rem; font-size: 0.9375rem; color: var(--text-2); }
.syllabus-sample { margin: 1rem 0 0 3rem; max-width: none; }
.syllabus-read { margin-top: 1rem; }
.syllabus-read > p { margin-top: 0.5rem; color: var(--text-2); }
.readings { margin-top: 1.25rem; }
.readings li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.readings a { font-weight: 650; color: var(--text); text-decoration: none; }
.readings a:hover { text-decoration: underline; text-underline-offset: 0.14em; }
.readings span { margin-left: 0.75rem; font-size: 0.875rem; color: var(--text-2); }
.readings p { margin-top: 0.35rem; color: var(--text-2); }
@media (max-width: 599px) {
  .syllabus-concept, .syllabus-on, .syllabus-sample { margin-left: 0; }
}
.band { margin-top: 2.5rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-lg); background: var(--bg-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; justify-content: space-between; }
.learn-lead { max-width: 42rem; margin-top: 0.875rem; font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); }
.learn .path { margin-top: 0.25rem; }
.band p { font-size: 1rem; color: var(--text-2); }
.band strong { color: var(--text); }
.hub-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; align-items: center; }
.hub-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin-top: 1.25rem; font-size: 0.9375rem; color: var(--text-2); }
.hub-facts strong { color: var(--text); }
.series-progress { margin-top: 2rem; }
.tracks { display: grid; gap: 0; margin-top: 3rem; }
@media (min-width: 900px) { .tracks { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }
.track { border-top: 1px solid var(--line); }
/* Each track is an accordion (native <details>); tracks with an episode out start open. */
.track summary { display: flex; align-items: center; gap: 1rem; padding-block: 1.25rem; cursor: pointer; list-style: none; }
.track summary::-webkit-details-marker { display: none; }
.track summary::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-right: 0.25rem; border: solid var(--text-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease);
}
.track details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.track summary:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.track h2 { flex: 1; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.track h2 small { font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.episodes { list-style: none; padding-bottom: 1.25rem; }
.ep { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0 0.5rem; padding-block: 0.5rem; align-items: baseline; }
.ep-n { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.ep a { color: var(--text); font-weight: 600; text-decoration: none; }
.ep a:hover { text-decoration: underline; }
.ep-coming { color: var(--text-2); }
.ep-coming small { font-size: 0.8125rem; color: var(--muted); margin-left: 0.375rem; white-space: nowrap; }
.ep[data-state="current"] .ep-n { color: var(--accent-ink); font-weight: 700; }

.author-head { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.author-portrait { width: 8rem; height: 8rem; border-radius: 18px; object-fit: cover; }
.author-role { margin-top: 0.375rem; font-size: 1.0625rem; color: var(--text-2); }
.author-disclosure { margin-top: 1.5rem; max-width: 40rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--bg-soft); font-size: 1rem; line-height: 1.55; color: var(--text); }
@media (max-width: 599px) { .author-head { grid-template-columns: 1fr; } .author-portrait { width: 6rem; height: 6rem; } }

.notice-strip { margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }

/* ── Series rail hover (blog.js): the track lifts and, on the small rail, names itself ── */
.rail-track { position: relative; }
.rail-ep { transform-origin: 50% 100%; }
.rail:not(.rail-lg) .rail-track > .rail-name {
  position: absolute; left: 50%; bottom: calc(100% + 0.5rem); transform: translateX(-50%); opacity: 0; pointer-events: none;
  padding: 0.25rem 0.5rem; border-radius: 6px; background: var(--text); color: var(--bg);
  font-size: 0.75rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.rail:not(.rail-lg) .rail-track:not(.is-hover) > .rail-name { visibility: hidden; }

.vote-count { display: inline-block; }

/* ── Go deeper: a boundary note folded into a native <details> ─────────── */
.prose .deeper {
  padding: 0 1.25rem; border-radius: var(--radius); background: var(--bg-soft);
  box-shadow: inset 3px 0 0 var(--accent-ink); font-size: 0.9375em; line-height: 1.6;
}
.deeper > summary {
  display: flex; align-items: baseline; gap: 0.75rem; padding-block: 0.875rem; cursor: pointer; list-style: none;
  font-weight: 650; color: var(--text);
}
.deeper > summary::-webkit-details-marker { display: none; }
.deeper > summary::after {
  content: ""; flex: none; align-self: center; margin-left: auto; width: 0.5rem; height: 0.5rem; border: solid var(--text-2);
  border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease);
}
.deeper[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.deeper-kicker { flex: none; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.deeper > :not(summary) { margin: 0; }
.deeper > :not(summary) + :not(summary) { margin-top: 0.75em; }
.deeper > :last-child { padding-bottom: 1rem; }

/* ── Sponsor in the rail: disclosure first at body size, fixed size, sticky with the TOC ── */
.sponsor-rail {
  block-size: 21rem; overflow: hidden; padding: 1rem 1.125rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  grid-template-rows: auto 1fr; gap: 0.875rem; align-content: start;
}
.sponsor-rail .sponsor-card {
  grid-template-columns: 3.5rem 1fr; grid-template-rows: auto auto; gap: 0.625rem 0.75rem; align-items: center; align-content: start;
  padding-top: 0.875rem; border-top: 1px solid var(--line); border-radius: 0;
}
.sponsor-rail .sponsor-card img { grid-row: 1; width: 3.5rem; height: 3.5rem; }
.sponsor-rail .sponsor-name { padding-top: 0; align-self: center; line-height: 1.3; }
.sponsor-rail .sponsor-copy { grid-column: 1 / -1; font-size: 0.875rem; }
.sponsor-rail .sponsor-card.no-logo { grid-template-columns: 1fr; padding: 0.875rem 0 0; background: none; }
.sponsor-rail:has(.no-logo) { block-size: 17rem; }

/* ── An empty sponsor slot: GoByte's own invitation (never labeled "Sponsored") ──
 * Wide screens: a card under the TOC with the no logo rail sponsor's fixed size (17rem), so the rail keeps its shape.
 * Below 1080px: one line after the end card, only when no sponsor shows there. The end slot itself stays empty. */
.invite-rail {
  display: none; block-size: 17rem; overflow: hidden; padding: 1.125rem 1.125rem 1rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  grid-template-rows: auto auto 1fr auto auto; gap: 0.375rem; align-content: start; justify-items: start;
}
.post-rail .invite-rail { display: none; }
@media (min-width: 1080px) { .post-rail .invite-rail { display: grid; } }
.invite-k { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.invite-title { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.invite-copy { font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.invite-btn { align-self: end; margin-top: 0.5rem; }
.invite-mail { font-size: 0.875rem; color: var(--text-2) !important; }
.invite-line {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; padding: 0.75rem 1rem;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 0.9375rem; color: var(--text-2);
}
.invite-line a { font-weight: 650; }
@media (min-width: 1080px) { .post-end .invite-line { display: none; } }

/* ── Dialogs: the command palette and the shortcuts sheet (blog.js) ────── */
.palette, .sheet {
  padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none;
  width: 100%; height: 100%; margin: 0; overflow: hidden;
}
.palette::backdrop, .sheet::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.pal-box, .sheet-box {
  position: absolute; left: 50%; top: min(12vh, 7rem); translate: -50% 0; width: min(40rem, calc(100% - 2rem));
  display: flex; flex-direction: column; max-height: min(34rem, calc(100dvh - 2 * min(12vh, 7rem)));
  background: var(--bg); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line-strong), 0 32px 64px -24px color-mix(in srgb, var(--ink) 55%, transparent);
  font-family: var(--font-body);
}
.pal-head { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.75rem 0 1.125rem; border-bottom: 1px solid var(--line); }
.pal-head > svg { width: 1.125rem; height: 1.125rem; color: var(--text-2); flex: none; }
.pal-input {
  flex: 1; min-width: 0; height: 3.5rem; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.0625rem;
}
.pal-input::placeholder { color: var(--muted); }
.blog .pal-input:focus-visible { outline: 0; }
.pal-head:focus-within { box-shadow: inset 0 -2px 0 var(--cyan); }
.pal-esc {
  flex: none; height: 1.75rem; padding: 0 0.5rem; border-radius: 6px; border: 0; cursor: pointer;
  font: 600 0.75rem var(--font-body); color: var(--text-2); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.pal-esc:hover { color: var(--text); }
.pal-list { overflow-y: auto; overscroll-behavior: contain; padding: 0.375rem 0.5rem 0.5rem; }
.pal-group { padding: 0.75rem 0.625rem 0.375rem; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.pal-opt {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.5625rem 0.625rem; border-radius: 8px; cursor: pointer;
}
.pal-opt > svg { width: 1rem; height: 1rem; flex: none; color: var(--muted); }
.pal-opt[aria-selected="true"] { background: var(--bg-soft); box-shadow: inset 2px 0 0 var(--cyan); }
.pal-opt[aria-selected="true"] > svg { color: var(--accent-ink); }
.pal-text { display: grid; min-width: 0; flex: 1; }
.pal-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-title mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--cyan); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.pal-sub { font-size: 0.8125rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-hint { flex: none; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.pal-foot {
  display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.125rem; border-top: 1px solid var(--line);
  font-size: 0.75rem; color: var(--muted); background: var(--bg-soft);
}
.pal-status { margin-right: auto; color: var(--text-2); font-weight: 600; }
.pal-foot kbd, .keys kbd {
  display: inline-block; min-width: 1.25rem; padding: 0 0.3125rem; margin-right: 0.25rem; border-radius: 4px; text-align: center;
  font: 600 0.75rem/1.25rem var(--font-body); color: var(--text-2); background: var(--bg); box-shadow: inset 0 -1px 0 var(--line-strong), inset 0 0 0 1px var(--line-strong);
}
.sheet-box { padding: 1.25rem 1.5rem 1.5rem; width: min(30rem, calc(100% - 2rem)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem 1.5rem; margin: 1.25rem 0 0; align-items: center; }
.keys dt { white-space: nowrap; font-size: 0.8125rem; color: var(--text-2); }
.keys dt kbd { font-size: 0.8125rem; padding: 0 0.4375rem; }
.keys dd { margin: 0; font-size: 0.9375rem; }
.sheet-note { margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-2); }
@media (max-width: 599px) {
  .pal-box { top: 0.75rem; max-height: calc(100dvh - 1.5rem); }
  .pal-foot span:not(.pal-status) { display: none; }
  .pal-foot { justify-content: flex-start; }
}

/* ── Scene player: poster and play button first; the GSAP scene loads only on press ── */
.video .scene-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; background: #0b0b0c; box-shadow: 0 0 0 1px var(--line); }
.scene-frame video { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.scene-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.scene-start {
  position: absolute; inset: 0; width: 100%; display: flex; align-items: flex-end; justify-content: flex-start; gap: 0.875rem;
  padding: clamp(0.875rem, 3vw, 1.5rem); border: 0; cursor: pointer; text-align: left; color: #ffffff;
  background: linear-gradient(to top, rgb(11 11 12 / 0.92), rgb(11 11 12 / 0.55) 40%, rgb(11 11 12 / 0.05) 75%);
  font: inherit;
}
.scene-start-icon {
  flex: none; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--cyan); color: var(--ink); box-shadow: 0 0 0 6px rgb(0 212 255 / 0.22);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.scene-start-icon svg { width: 1.375rem; height: 1.375rem; margin-left: 3px; }
.scene-start:hover .scene-start-icon, .scene-start:focus-visible .scene-start-icon { transform: scale(1.06); box-shadow: 0 0 0 9px rgb(0 212 255 / 0.25); }
.scene-start:focus-visible { outline-offset: -4px; outline-color: var(--cyan); }
.scene-start-text { display: grid; gap: 0.125rem; line-height: 1.3; text-shadow: 0 1px 2px rgb(0 0 0 / 0.5); }
.scene-start-text strong { font-family: var(--font-head); font-size: 1.125rem; font-weight: 650; }
.scene-start-text span { font-size: 0.875rem; color: #d7dde2; }
.scene-start.is-loading .scene-start-icon { animation: scene-pulse 1s var(--ease) infinite alternate; }
@keyframes scene-pulse { to { box-shadow: 0 0 0 12px rgb(0 212 255 / 0.08); } }

.scene-controls {
  display: flex; align-items: center; gap: 0.75rem; margin-top: 0.625rem; padding: 0.5rem 0.625rem;
  border-radius: var(--radius); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.875rem;
}
.scene-controls button {
  display: inline-grid; place-items: center; height: 2.25rem; min-width: 2.25rem; padding: 0 0.625rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer; font: 600 0.875rem var(--font-body);
}
.scene-controls button:hover { background: var(--bg-sunk); }
.scene-controls button:disabled { opacity: 0.45; cursor: default; }
.scene-controls svg { width: 1rem; height: 1rem; }
.sc-play { background: var(--text) !important; color: var(--bg) !important; border-radius: 50% !important; width: 2.25rem; padding: 0 !important; }
.sc-play svg { margin-left: 1px; }
.sc-next { display: inline-flex !important; gap: 0.375rem; }
.sc-track { position: relative; flex: 1; min-width: 4rem; height: 2.25rem; display: flex; align-items: center; }
.sc-scrub {
  --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 2.25rem; margin: 0; background: transparent; cursor: pointer;
}
.sc-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cyan) var(--p), var(--line-strong) var(--p)); }
.sc-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--cyan) var(--p), var(--line-strong) var(--p)); }
.sc-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); }
.sc-scrub::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 2px solid var(--bg); }
.sc-scrub:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sc-marks { position: absolute; left: 7px; right: 7px; top: 50%; height: 0; pointer-events: none; }
.sc-mark { position: absolute; top: -6px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: var(--text-2); }
.sc-mark[data-on] { background: var(--accent-ink); }
.sc-time { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.sc-speed { display: inline-flex; padding: 2px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-strong); }
.sc-speed button { height: 2rem; min-width: 2.75rem; border-radius: 7px; color: var(--text-2); }
.sc-speed button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 18%, transparent); }
.sc-moment { min-height: 1.5rem; margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.video .scene-controls + .sc-moment + figcaption { margin-top: 0.25rem; }
@media (max-width: 599px) {
  .scene-controls { flex-wrap: wrap; gap: 0.25rem 0.5rem; }
  .sc-track { order: 5; flex-basis: 100%; }
  .sc-time { margin-right: auto; }
  .sc-next span { display: none; }
  .sc-next { min-width: 2.25rem; }
  .scene-start-text span { display: none; }
}

/* ── Search page (/blog/search, noindex): the form and full text results ─ */
.search-form { display: flex; gap: 0.75rem; margin-top: 1.5rem; max-width: 40rem; }
.search-form input {
  flex: 1; min-width: 0; height: 3rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1.0625rem;
}
.search-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.search-form .btn { min-height: 3rem; gap: 0.25rem; }
.search-form .btn svg { width: 1rem; height: 1rem; }
.search-summary { margin-top: 1.25rem; font-size: 0.9375rem; color: var(--text-2); }
.search-results mark { background: color-mix(in srgb, var(--cyan) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 0.125rem; }

/* Reduced motion: nothing moves that a person did not start. */
@media (prefers-reduced-motion: reduce) {
  .blog *, .blog *::before, .blog *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  /* The progress line moves only as the reader scrolls, so it stays. */
  @supports (animation-timeline: view()) {
    .blog .read-progress { animation: read-grow linear both !important; animation-timeline: --article !important; animation-range: contain 0% contain 100% !important; }
  }
}
@media (prefers-reduced-motion: no-preference) {
  .copy, .vote, .btn, .toc a, .tabs a { transition: color 120ms var(--ease), background-color 120ms var(--ease), border-color 120ms var(--ease); }
}

/* ── Phone refinements ─────────────────────────────────────────────────── */
@media (max-width: 599px) {
  .byline { align-items: start; }
  .byline-portrait { width: 3.5rem; height: 3.5rem; }
  .toc summary { padding-inline: 1rem; }
  .toc ol { padding-inline: 1rem; font-size: 0.875rem; }
  .toc a { padding-block: 0.25rem; }
  .replies { margin-left: 0.75rem; padding-left: 0.875rem; }
  .comment-body, .held-note { padding-left: 0; }
  .comment-actions { padding-left: 0; margin-left: -0.5rem; }
}
@media (max-width: 599px) {
  .board-lg li { grid-template-columns: 2rem 1fr; }
  .board-lg .votes { grid-row: auto; grid-column: 2; }
}
.prose pre > code:focus-visible { outline-offset: -2px; border-radius: 0 0 var(--radius) var(--radius); }

/* ── Courses: index, course hub, the DevOps path and lessons ──────────────
 * Course pages carry data-course-js; blog.js then imports course.js (the path tracing and draw in, the rail
 * fill, the quiz, copy buttons). Everything here also reads without it. */
.kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.section-note { font-size: 0.9375rem; color: var(--text-2); }
.side-title { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.015em; }
.btn-sm { min-height: 2.25rem; padding: 0 0.875rem; font-size: 0.875rem; gap: 0.375rem; }
.btn-sm svg { width: 1rem; height: 1rem; }
.btn-quiet { border-color: var(--line-strong); }
.lang-mark {
  display: inline-block; flex: none; padding: 0.1875rem 0.5rem; border-radius: 6px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line);
  font: 600 0.75rem/1.4 var(--font-mono); color: var(--text); letter-spacing: 0; text-transform: none;
}
.course-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 0.625rem; font-size: 0.875rem; font-weight: 550; color: var(--text-2); }
.crumbs + .course-kicker, .crumbs + .hub-hero { margin-top: 1.25rem; }
.course-kicker + .page-title { margin-top: 0.75rem; }
.keep-place { margin-top: 1.5rem; max-width: 44rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--bg-soft); font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.keep-place strong { color: var(--text); }

/* The course rail: the series rail, one segment per lesson, grouped by module. Fluid inside cards and the hub. */
.crail { display: flex; align-items: center; gap: 0.375rem; list-style: none; }
.crail-mod { display: flex; gap: 2px; }
.crail-seg { display: block; width: 0.75rem; height: 0.375rem; border-radius: 2px; background: var(--bg-sunk); box-shadow: inset 0 0 0 1px var(--line-strong); transform-origin: 0 50%; }
.crail-seg[data-state="done"] { background: var(--text); box-shadow: none; }
.crail-seg[data-state="before"] { background: var(--line-strong); box-shadow: none; }
.crail-seg[data-state="current"] { background: var(--cyan); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan) 30%, transparent); }
.course-card .crail, .hub-progress .crail { gap: 2px; }
.course-card .crail-mod, .hub-progress .crail-mod { display: contents; }
.course-card .crail-seg, .hub-progress .crail-seg { flex: 1; width: auto; height: 0.4375rem; }
.course-card .crail-mod + .crail-mod > .crail-seg:first-child, .hub-progress .crail-mod + .crail-mod > .crail-seg:first-child { margin-left: 0.3125rem; }
@media (max-width: 599px) { .course-bar .crail { gap: 0.25rem; } .course-bar .crail-seg { width: 0.5rem; } }

/* Index: seven apps, one path to production. Six app tiles, then the one path they all ship through. */
.seven { margin-top: 2.5rem; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--bg-soft); }
.seven h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.seven-intro > p { margin-top: 0.5rem; max-width: 40rem; font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); }
.seven-apps { list-style: none; display: grid; gap: 0.625rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .seven-apps { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .seven-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.seven-apps a {
  display: grid; gap: 0.375rem; height: 100%; padding: 0.875rem 1rem; border-radius: var(--radius);
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--text) !important; text-decoration: none;
}
.seven-apps a:hover { box-shadow: inset 0 0 0 1px var(--text-2); }
.seven-apps a:hover .seven-app { text-decoration: underline; }
.seven-lang { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.seven-app { font-family: var(--font-head); font-size: 1.125rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.seven-glimpse {
  display: block; padding: 0.375rem 0.625rem; border-radius: 6px; background: #0b0b0c; color: #c9d1d8; box-shadow: 0 0 0 1px var(--line);
  font: 0.75rem/1.5 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seven-ship { position: relative; display: grid; gap: 0.75rem; margin-top: 1.75rem; padding: 1rem 1.125rem; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seven-funnel { position: absolute; left: 50%; bottom: 100%; width: 2px; height: 1.75rem; background: linear-gradient(var(--line-strong), var(--cyan)); }
.seven-funnel::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 0.4375rem; height: 0.4375rem; border: solid var(--cyan); border-width: 0 2px 2px 0; transform: translate(-50%, -1px) rotate(45deg); }
.seven-ship-name { display: inline-flex; align-items: center; gap: 0.625rem; width: max-content; font-family: var(--font-head); font-size: 1.125rem; font-weight: 650; color: var(--text) !important; text-decoration: none; }
.seven-ship-name:hover { text-decoration: underline; }
.seven-stops { list-style: none; display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; font-size: 0.875rem; color: var(--text-2); }
.seven-stops li { position: relative; }
.seven-stops li + li::before {
  content: ""; position: absolute; left: -0.75rem; top: 50%; width: 0.3125rem; height: 0.3125rem;
  border: solid var(--text-2); border-width: 1.5px 1.5px 0 0; transform: translate(-50%, -50%) rotate(45deg);
}
.seven-prod { font-weight: 700; color: var(--text); padding: 0 0.5rem; border-radius: 999px; background: var(--cyan); color: var(--ink) !important; }
@media (max-width: 599px) { .seven-glimpse { white-space: normal; overflow-wrap: anywhere; } }

/* Index: course cards */
.course-grid { list-style: none; display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .course-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .course-grid { grid-template-columns: 1fr 1fr 1fr; } }
.course-card {
  position: relative; display: grid; gap: 0.625rem; align-content: start; padding: 1.25rem;
  border-radius: var(--radius-lg); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line);
}
.course-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), 0 16px 32px -24px color-mix(in srgb, var(--ink) 40%, transparent); }
.course-card h3 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.course-card h3 a { color: var(--text); text-decoration: none; }
.course-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.course-card h3 a:focus-visible { outline: 0; }
.course-card:has(h3 a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.course-card:hover h3 a { text-decoration: underline; text-decoration-thickness: 2px; }
.course-project { font-size: 1rem; line-height: 1.5; color: var(--text-2); }
.course-project strong { color: var(--text); font-weight: 650; }
.course-stack { font-size: 0.875rem; color: var(--muted); }
.course-card .crail { margin-top: 0.375rem; }
.course-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.875rem; color: var(--muted); }
.course-host { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--text-2); }
.course-host img { width: 1.75rem; height: 1.75rem; border-radius: 6px; object-fit: cover; }
.course-progress { font-size: 0.875rem; color: var(--text-2); padding-top: 0.625rem; border-top: 1px solid var(--line); }
.course-progress strong { color: var(--text); }

/* Index: path card */
.path-card {
  margin-top: 1.5rem; display: grid; gap: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 960px) { .path-card { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 3rem; } }
.path-card-text { display: grid; gap: 0.75rem; align-content: start; }
.path-card h3 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.path-card h3 a { color: var(--text); text-decoration: none; }
.path-card h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.path-stops, .bridge-steps { list-style: none; display: grid; }
.path-stops li { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0 0.75rem; padding-block: 0.625rem; border-top: 1px solid var(--line); }
.path-stops li:first-child { border-top: 0; padding-top: 0; }
.path-stop-n {
  grid-row: span 2; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  font: 600 0.8125rem var(--font-mono); color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
[data-k8s] > .path-stop-n { background: var(--cyan); color: var(--ink); box-shadow: none; }
.path-stops a { font-weight: 650; color: var(--text); text-decoration: none; }
.path-stops a:hover { text-decoration: underline; }
.path-stop-does { font-size: 0.875rem; line-height: 1.45; color: var(--text-2); }

/* Hub hero and the finished project preview */
.hub-hero { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) { .hub-hero { grid-template-columns: minmax(0, 1fr) 25rem; gap: 4rem; align-items: start; } }
.hub-start { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.hub-jump { font-weight: 600; }
.hub-progress { flex: 1 1 15rem; display: grid; gap: 0.5rem; font-size: 0.9375rem; color: var(--text-2); }
.hub-progress strong { color: var(--text); }
.build { padding: 1.25rem; border-radius: var(--radius-lg); background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.build-title { font-family: var(--font-body); font-size: 0.875rem; font-weight: 650; color: var(--text-2); }
.term { margin: 0.75rem 0 0; border-radius: var(--radius); background: #0b0b0c; color: #c9d1d8; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.term code { display: block; overflow-x: auto; padding: 0.875rem 1rem; font: 0.75rem/1.65 var(--font-mono); white-space: pre; }
.term-in { color: #ffffff; }
.term-in::before { content: "$ "; color: #00d4ff; }
.term-sys { color: #8d98a3; }
.term-who { color: #00d4ff; }
.tree { list-style: none; display: grid; gap: 0.4375rem; margin-top: 1rem; font-size: 0.875rem; }
.tree li { display: grid; grid-template-columns: 8.25rem 1fr; gap: 0.75rem; color: var(--text-2); line-height: 1.4; }
.tree code { font: 600 0.8125rem var(--font-mono); color: var(--text); }
.build-foot { margin-top: 1rem; padding-top: 0.875rem; border-top: 1px solid var(--line); font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }
@media (max-width: 599px) { .tree li { grid-template-columns: 1fr; gap: 0; } }

/* The path: one spine, a node per lesson, modules beside it on wide screens */
.path { list-style: none; margin-top: 0.5rem; }
.path-mod { display: grid; }
@media (min-width: 900px) {
  .path-mod { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 3rem; }
  .path-mod-head { position: sticky; top: 5.5rem; align-self: start; padding-block: 1.25rem; }
  .path-mod + .path-mod > .path-mod-head { border-top: 1px solid var(--line); }
}
.path-mod-n { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.path-mod-head h3 { margin-top: 0.25rem; font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; }
.path-mod-head h3 a { color: var(--text); text-decoration: none; }
.path-mod-head h3 a:hover { text-decoration: underline; }
.path-mod-goal { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.path-mod-meta { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.path-nodes { list-style: none; }
.path-node { position: relative; padding: 1.125rem 0 1.125rem 2.75rem; }
.path-seg { position: absolute; left: calc(0.75rem - 1px); top: 0; bottom: 0; width: 2px; background: var(--line-strong); transform-origin: 50% 0; }
.path-mod:first-child .path-node:first-child .path-seg { top: 2.0625rem; }
.path-mod:last-child .path-node:last-child .path-seg { bottom: auto; height: 2.0625rem; }
.path-dot {
  position: absolute; left: 0; top: 1.3125rem; z-index: 1; display: grid; place-items: center; width: 1.5rem; height: 1.5rem;
  border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--bg);
}
.path-dot svg { width: 0.875rem; height: 0.875rem; }
.path-node[data-state="done"] .path-dot { background: var(--text); box-shadow: none; }
.path-node[data-state="done"] .path-seg { background: var(--text); }
.path-node[data-state="current"] .path-seg { background: linear-gradient(var(--text) 2.0625rem, var(--line-strong) 2.0625rem); }
.path-node[data-state="current"] .path-dot { background: var(--cyan); box-shadow: 0 0 0 5px color-mix(in srgb, var(--cyan) 25%, transparent); }
.path-link { display: inline-flex; align-items: baseline; gap: 0.625rem; color: var(--text); text-decoration: none; }
.path-num { min-width: 1.25rem; font: 600 0.8125rem var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.path-title { font-family: var(--font-head); font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.path-link:hover .path-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.path-here { display: inline-block; margin-left: 0.625rem; padding: 0.1875rem 0.5rem; border-radius: 999px; background: var(--cyan); color: var(--ink); font-size: 0.75rem; font-weight: 700; vertical-align: 0.15em; }
.path-concept { margin-top: 0.125rem; font-size: 0.9375rem; color: var(--text-2); }
.path-num ~ * { min-width: 0; }
.path-link + .path-concept, .path-here + .path-concept { padding-left: 1.875rem; }
.path-adds, .path-meta { padding-left: 1.875rem; }
.path-node:not([data-n]) :is(.path-adds, .path-meta) { padding-left: 0; }
.path-adds { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text); }
.path-adds-k { margin-right: 0.375rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.path-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-top: 0.375rem; font-size: 0.8125rem; color: var(--muted); }
.path-meta a { color: var(--text-2); font-weight: 600; }
/* Tracing (course.js): the lesson under the pointer and what it builds on stay; the rest steps back. */
.path[data-tracing] .path-node:not([data-lit]) > :not(.path-seg) { opacity: 0.38; }
.path-node[data-lit="need"] .path-dot { box-shadow: inset 0 0 0 2px var(--accent-ink), 0 0 0 5px color-mix(in srgb, var(--cyan) 22%, transparent); }
.path-node[data-lit="need"] .path-title::after {
  content: "needed"; display: inline-block; margin-left: 0.5rem; padding: 0.125rem 0.4375rem; border-radius: 999px; vertical-align: 0.2em;
  font: 700 0.6875rem var(--font-body); letter-spacing: 0.02em; color: var(--accent-ink); box-shadow: inset 0 0 0 1px currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .path-node > :not(.path-seg) { transition: opacity 180ms var(--ease); }
  .path-node[data-state="current"] .path-dot { animation: path-here 2.2s ease-in-out infinite; }
}
@keyframes path-here {
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--cyan) 0%, transparent); }
}
@media (max-width: 899px) {
  .path-mod-head { position: relative; padding: 1.5rem 0 0.25rem 2.75rem; }
  .path-mod-head::before { content: ""; position: absolute; left: calc(0.75rem - 1px); top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
  .path-mod:first-child .path-mod-head { padding-top: 0.75rem; }
  .path-mod:first-child .path-mod-head::before { display: none; }
  .path-mod:has(.path-node:first-child[data-state="done"]) .path-mod-head::before { background: var(--text); }
}
@media (max-width: 599px) {
  .path-adds, .path-meta, .path-link + .path-concept, .path-here + .path-concept { padding-left: 0; }
  .path-here { margin-left: 0; margin-top: 0.25rem; }
}

/* Hub: prerequisites, host, after the course */
.hub-grid { display: grid; gap: 2.5rem; margin-top: 3.5rem; }
@media (min-width: 900px) { .hub-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.hub-grid .side-title, .bridge-in .side-title { padding-bottom: 0.75rem; border-bottom: 1px solid var(--text); }
.pre-list { list-style: none; display: grid; gap: 0.75rem; margin-top: 1rem; }
.pre-list li { position: relative; padding-left: 1.25rem; font-size: 1rem; line-height: 1.55; color: var(--text-2); }
.pre-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--cyan); }
.pre-list strong { color: var(--text); }
.host-row { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; margin-top: 1rem; align-items: start; }
.host-row img { width: 4rem; height: 4rem; border-radius: 12px; object-fit: cover; }
.host-name { color: var(--text-2); }
.host-name a { color: var(--text); font-weight: 650; text-decoration: none; }
.host-name a:hover { text-decoration: underline; }
.host-voice { margin-top: 0.25rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.host-disclosure { margin-top: 1rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.after {
  margin-top: 3.5rem; display: grid; gap: 0.5rem; justify-items: start; padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg); background: var(--ink); color: #e9edf0;
}
:root[data-theme="dark"] .after { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .after { background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); } }
.after .kicker { color: var(--cyan); }
.after h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; color: #ffffff; }
.after p { max-width: 40rem; color: #c3cbd2; line-height: 1.55; }
.after .btn { margin-top: 0.5rem; border-color: #e9edf0; color: #ffffff !important; }
.after .btn:hover { background: #ffffff; color: var(--ink) !important; }
.after .btn:focus-visible { outline-color: var(--cyan); }

/* Path page: where it starts */
.bridge-in { margin-top: 2.5rem; }
.bridge-in > p { margin-top: 0.875rem; max-width: 44rem; font-size: 1rem; line-height: 1.55; color: var(--text-2); }
.bridge-langs { list-style: none; display: grid; gap: 0.5rem; margin-top: 1rem; }
@media (min-width: 720px) { .bridge-langs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .bridge-langs { grid-template-columns: 1fr 1fr 1fr; } }
.bridge-langs a {
  display: flex; align-items: center; gap: 0.75rem; height: 100%; padding: 0.625rem 0.875rem; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none; font-size: 0.9375rem; line-height: 1.35;
}
.bridge-langs a:hover { box-shadow: inset 0 0 0 1px var(--text-2); }

/* Lesson: course bar, what you need, last time */
.post-head .course-bar { margin-top: 1.75rem; }
.course-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; font-size: 0.9375rem; color: var(--text-2); }
.course-bar a { font-weight: 600; color: var(--text); text-decoration: none; }
.course-bar a:hover { text-decoration: underline; }
.needs {
  display: grid; gap: 0.75rem 1rem; margin-top: 1.75rem; max-width: 44rem; padding: 1rem 1.125rem;
  border-radius: var(--radius); background: var(--bg-soft);
}
@media (min-width: 600px) { .needs { grid-template-columns: auto 1fr; align-items: center; } .last-time { grid-column: 1 / -1; } }
.needs-k { font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.needs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.needs-chips li { position: relative; }
.need {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.75rem 0.25rem 0.25rem; border-radius: 999px;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text) !important; text-decoration: none; font-size: 0.9375rem; font-weight: 550;
}
.need:hover { box-shadow: inset 0 0 0 1px var(--text); }
.need-n { display: grid; place-items: center; min-width: 1.625rem; height: 1.625rem; padding: 0 0.25rem; border-radius: 999px; background: var(--bg-sunk); font: 600 0.75rem var(--font-mono); color: var(--text-2); }
.need-done { display: inline-flex; color: var(--accent-ink); }
.need-done svg { width: 0.875rem; height: 0.875rem; }
.need-tip {
  display: none; position: absolute; left: 0; bottom: calc(100% + 0.5rem); z-index: 5; width: max-content; max-width: min(17rem, calc(100vw - 2.5rem));
  padding: 0.5rem 0.625rem; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 0.8125rem; line-height: 1.4;
}
.need-tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 0.5rem; }
.needs-chips li:is(:hover, :has(.need:focus-visible)):not(:has(.need[data-quiet])) .need-tip { display: block; }
@media (hover: none) { .needs-chips li:hover:not(:has(.need:focus-visible)) .need-tip { display: none; } }
.last-time { font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.last-time strong { color: var(--text); }

/* Lesson: the module beside the TOC on wide screens */
.mod-nav { display: none; }
@media (min-width: 1080px) {
  .post-rail .mod-nav { display: block; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }
}
.mod-nav-title { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.mod-nav ol { list-style: none; display: grid; gap: 0.125rem; margin-top: 0.5rem; }
.mod-nav ol a { display: flex; align-items: baseline; gap: 0.625rem; padding-block: 0.3125rem; color: var(--text-2); text-decoration: none; line-height: 1.35; }
.mod-nav ol a:hover { color: var(--text); }
.mod-nav ol a[aria-current="page"] { color: var(--text); font-weight: 650; }
.mod-nav-n { min-width: 1.375rem; font: 600 0.75rem var(--font-mono); color: var(--muted); }
.mod-nav li[data-state="done"] .mod-nav-n { color: var(--accent-ink); }
.mod-nav li[data-state="current"] .mod-nav-n { color: var(--text); box-shadow: inset 0 -2px 0 var(--cyan); }
.mod-nav-all { display: inline-block; margin-top: 0.5rem; font-size: 0.875rem; font-weight: 600; }

/* Lesson: after the body */
.lesson-end { gap: 2.75rem; }
.lesson-end > *, .hub-hero > *, .project-files, .file { min-width: 0; }
.lesson-end > .to-top { margin-top: -1rem; }
.project-head h2, .quiz h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; }
.project-head p { margin-top: 0.375rem; font-size: 0.9375rem; color: var(--text-2); }
.project-files { margin-top: 1rem; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.file + .file { border-top: 1px solid var(--line); }
.file > summary {
  display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.5rem 1rem; cursor: pointer; list-style: none;
  background: var(--bg-soft); font-size: 0.9375rem;
}
.file > summary::-webkit-details-marker { display: none; }
.file > summary::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-left: 0.25rem; border: solid var(--text-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease);
}
.file[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.file > summary:focus-visible { outline-offset: -2px; }
.file-status {
  flex: none; padding: 0.1875rem 0.4375rem; border-radius: 5px; box-shadow: inset 0 0 0 1px currentColor;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2);
}
.file-status[data-status="added"] { color: var(--add-ink); }
.file-status[data-status="deleted"] { color: var(--del-ink); }
.file-path { font: 600 0.875rem var(--font-mono); color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.file-stat { margin-left: auto; font: 600 0.8125rem var(--font-mono); white-space: nowrap; }
.stat-add { color: var(--add-ink); }
.stat-del { color: var(--del-ink); }
.diff { margin: 0; background: var(--code-bg); color: var(--code-text); font: 0.8125rem/1.65 var(--font-mono); border-top: 1px solid var(--line); }
@media (min-width: 720px) { .diff { font-size: 0.875rem; } }
.diff code { display: grid; grid-template-columns: minmax(100%, max-content); overflow-x: auto; padding-block: 0.5rem; font-family: inherit; tab-size: 4; }
.diff code:focus-visible { outline-offset: -2px; }
.dl { display: block; padding-right: 1rem; white-space: pre; }
.dl-sign { display: inline-block; width: 2.25rem; text-align: center; color: var(--muted); user-select: none; -webkit-user-select: none; }
.dl-add { background: var(--add-bg); box-shadow: inset 3px 0 0 var(--add-ink); }
.dl-add .dl-sign { color: var(--add-ink); font-weight: 700; }
.dl-del { background: var(--del-bg); box-shadow: inset 3px 0 0 var(--del-ink); }
.dl-del .dl-sign { color: var(--del-ink); font-weight: 700; }
.project-foot { margin-top: 0.875rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.project-foot code { font-family: var(--font-mono); font-size: 0.875em; padding: 0.1em 0.35em; border-radius: 5px; background: var(--bg-soft); color: var(--text); }

.built { display: grid; gap: 0.5rem 1.25rem; padding-block: 1rem; border-block: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
@media (min-width: 600px) { .built { grid-template-columns: auto 1fr; align-items: start; } }
.built-body { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 600px) { .built-body { grid-template-columns: 1fr auto; } }
.built code { font-family: var(--font-mono); font-size: 0.875em; color: var(--text); }
.built-qr { margin: 0; display: grid; gap: 0.25rem; justify-items: center; }
.built-qr img { width: 6rem; height: 6rem; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.built-qr figcaption { font-size: 0.75rem; }
.built-k {
  display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; padding-top: 0.0625rem;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text);
}
.built-k::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--cyan); }
.built a { color: var(--text-2); font-weight: 600; }

/* Exercise: hints, then a solution that asks first */
.exercise { padding: clamp(1.125rem, 3vw, 1.5rem); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.exercise-task { margin-top: 0.5rem; font-size: 1.125rem; line-height: 1.55; color: var(--text); }
.exercise-hints { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.hint, .solution { border-radius: var(--radius); background: var(--bg-soft); }
.hint > summary, .solution > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.875rem; padding: 0 1rem;
  cursor: pointer; list-style: none; font-weight: 600; color: var(--text);
}
:is(.hint, .solution, .solution-reveal) > summary::-webkit-details-marker { display: none; }
:is(.hint, .solution) > summary::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin-right: 0.25rem; border: solid var(--text-2); border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease);
}
:is(.hint, .solution)[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.hint > p { padding: 0 1rem 1rem; line-height: 1.55; color: var(--text-2); }
.solution { box-shadow: inset 3px 0 0 var(--bix); }
.solution-warn { padding: 0 1rem 1rem; }
.solution-warn > p { font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.solution-warn strong { color: var(--text); }
.solution-reveal { margin-top: 0.875rem; }
.solution-reveal > summary {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--text);
  cursor: pointer; list-style: none; font-size: 0.9375rem; font-weight: 650; color: var(--text);
}
.solution-reveal > summary:hover { background: var(--text); color: var(--bg); }
.solution-reveal[open] > summary { border-color: var(--line-strong); color: var(--text-2); }
.solution-reveal .prose { margin-top: 0.875rem; font-size: 1rem; }
.solution-note { margin-top: 0.75rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }

/* Module checkpoint */
.quiz { padding: clamp(1.125rem, 3vw, 1.5rem); border-radius: var(--radius-lg); background: var(--bg-soft); font-variant-ligatures: no-contextual; }
.quiz h2 { margin-top: 0.25rem; }
.quiz-intro { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.quiz-qs { list-style: none; display: grid; gap: 0.875rem; margin-top: 1.25rem; }
.q fieldset { margin: 0; padding: 1rem 1.125rem; border: 0; border-radius: var(--radius); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.q legend { float: left; width: 100%; padding: 0; display: flex; gap: 0.625rem; font-size: 1.0625rem; font-weight: 650; line-height: 1.4; color: var(--text); }
.q-n { flex: none; font: 600 0.8125rem/1.85 var(--font-mono); color: var(--muted); }
.q-opts { clear: both; display: grid; gap: 0.375rem; padding-top: 0.75rem; }
.q-opt { position: relative; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 1rem; line-height: 1.4; }
.q-opt:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.q-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.q-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.q-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--text); }
.q-opt:has(input:disabled) { cursor: default; }
.q-letter { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 0.8125rem; font-weight: 650; color: var(--text-2); }
.q-opt:has(input:checked) .q-letter { background: var(--text); color: var(--bg); box-shadow: none; }
.q-opt[data-mark="right"] { background: var(--add-bg); box-shadow: inset 0 0 0 2px var(--add-ink); }
.q-opt[data-mark="right"] .q-letter { background: var(--add-ink); color: var(--bg); box-shadow: none; }
.q-opt[data-mark="wrong"] { background: var(--del-bg); box-shadow: inset 0 0 0 2px var(--del-ink); }
.q-opt[data-mark="wrong"] .q-letter { background: var(--del-ink); color: var(--bg); box-shadow: none; }
.q-opt[data-mark]::after { margin-left: auto; padding-left: 0.5rem; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.q-opt[data-mark="right"]::after { content: "Correct"; color: var(--add-ink); }
.q-opt[data-mark="wrong"]::after { content: "Your answer"; color: var(--del-ink); }
.q-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 0.875rem; }
.q-fb { font-size: 0.9375rem; font-weight: 650; }
.q[data-result="right"] .q-fb { color: var(--add-ink); }
.q[data-result="wrong"] .q-fb { color: var(--del-ink); }
.q-answer { margin-top: 0.75rem; }
.q-answer > summary { width: max-content; cursor: pointer; font-size: 0.9375rem; font-weight: 600; color: var(--link); }
.q-answer p { margin-top: 0.5rem; padding-left: 0.875rem; border-left: 2px solid var(--line-strong); font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.q-answer strong { color: var(--text); }
.js .q:not([data-result]) .q-answer, .q[data-result] .q-answer > summary { display: none; }
.q[data-result] .q-answer { margin-top: 0.25rem; }
.quiz-score { margin-top: 1rem; font-size: 1.0625rem; font-weight: 650; }
.quiz-score:empty { display: none; }

/* GoByte Skills, the next lesson, the bridge */
.deepen { display: grid; gap: 1rem 1.25rem; align-items: center; padding: 1rem; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 600px) { .deepen:has(img) { grid-template-columns: 11rem 1fr; } }
.deepen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.deepen h2 { margin-top: 0.25rem; font-size: 1.1875rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
.deepen h2 a { color: var(--text); text-decoration: none; }
.deepen h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.deepen p:last-child { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
.lesson-nav { display: grid; gap: 1rem; }
.next-card {
  display: grid; gap: 0.25rem; padding: 1.125rem 1.25rem; border-radius: var(--radius-lg); background: var(--bg-soft);
  box-shadow: inset 3px 0 0 var(--cyan); color: var(--text) !important; text-decoration: none;
}
.next-card:hover { box-shadow: inset 3px 0 0 var(--cyan), inset 0 0 0 1px var(--line-strong); }
.next-dir { font-size: 0.875rem; color: var(--text-2); }
.next-title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.next-title svg { width: 1.25rem; height: 1.25rem; flex: none; }
.next-adds { font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); }
@media (prefers-reduced-motion: no-preference) {
  .next-title svg { transition: transform 200ms var(--ease); }
  .next-card:hover .next-title svg { transform: translateX(4px); }
}
.lesson-nav-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; font-size: 0.9375rem; }
.lesson-nav-row a[rel="prev"] { color: var(--text-2); font-weight: 600; }
.mark[data-done] { background: var(--text); color: var(--bg) !important; }
.mark[data-done] svg { color: var(--cyan); }
.lesson-nav .keep-place { margin-top: 0; }
.bridge { padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--radius-lg); background: var(--bg-soft); box-shadow: inset 0 3px 0 var(--cyan); }
.bridge h2 { margin-top: 0.375rem; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.bridge > p:not(.kicker) { margin-top: 0.5rem; font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); }
.bridge-steps { gap: 0.625rem; margin-top: 1.25rem; }
.bridge-steps li { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; align-items: center; font-size: 0.9375rem; line-height: 1.45; color: var(--text-2); }
.bridge-steps .path-stop-n { grid-row: auto; }
.bridge-steps strong { color: var(--text); }
.bridge .hub-actions { margin-top: 1.5rem; }

/* Same idea elsewhere, and the posts the lesson becomes */
.same-list { list-style: none; display: grid; gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 600px) { .same-list { grid-template-columns: 1fr 1fr; } }
.same-list a {
  display: grid; gap: 0.375rem; align-content: start; height: 100%; padding: 1rem; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--line); color: var(--text) !important; text-decoration: none;
}
.same-list a:hover { box-shadow: inset 0 0 0 1px var(--text-2); }
.same-list a:hover .same-title { text-decoration: underline; }
.same-top { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-2); }
.same-title { font-weight: 650; font-size: 1rem; line-height: 1.35; }
.same-how { font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }
.share-intro { margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.55; color: var(--text-2); }
.share-grid { display: grid; gap: 1rem; margin-top: 1rem; }
@media (min-width: 600px) { .share-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.share-post { margin: 0; display: grid; gap: 0.625rem; }
.share-where { font-size: 0.8125rem; font-weight: 650; color: var(--text-2); }
.share-card { margin: 0; display: grid; gap: 0.625rem; padding: 1rem; border-radius: var(--radius-lg); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 0.9375rem; line-height: 1.5; }
.share-ig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.share-link { font: 600 0.8125rem var(--font-mono); color: var(--text-2); }
.share-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Topics menu: the courses row */
.menu-courses { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.25rem; padding-bottom: 1.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.site-nav .menu-courses a { height: auto; padding: 0.125rem 0; border-radius: 4px; }
.site-nav .menu-courses a:hover { background: none; text-decoration: underline; }
.site-nav .menu-courses-k { font-family: var(--font-head); font-size: 1.125rem; font-weight: 650; color: var(--text); }
.menu-courses ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.125rem 0.875rem; }
.site-nav .menu-courses ul a { color: var(--link); font-size: 0.9375rem; }
.menu-courses-note { margin-left: auto; font-size: 0.875rem; color: var(--text-2); }
@media (max-width: 899px) { .menu-courses { display: none; } }
@media (max-width: 599px) {
  .section-head:has(.section-note) { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}
