/* Topic pages: /dynamic-memory, /delegation, /projects, /your-control and /compare.
 * Redesigned 29 Oct 2026 after Oliver: "This looks like every other startup website". The rows of same-size
 * cards are gone. Each page is carried by an HTML copy of the Atlas Mind window, ported from the HTML prototype (app-frame/) with
 * numbered pins that say what a person gets; everything outside the window is prose, hairline rows and a
 * drawn timeline. The pins' entrance and highlight are run by assets/js/shared/pins.js. Questions keep the
 * home page's fold (home.css .faq-item). Copy says what a person gets, never how it works. */

:root { --pin: var(--yellow); --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1); }

/* ---------- Page head: the heading, one sentence and the way to download ----------
 * Oliver's sketch, 29 Oct 2026: the window sits dimmed behind the heading and comes forward to the centre
 * as the page scrolls (hero-stage.js sets --move, --veil and --copy on the section and data-staged when
 * it runs). Unstaged, on a phone, with reduced motion or without script, the heading and window stack. */
.hero-stage { display: flex; flex-direction: column; }
.hero-front { order: -1; display: grid; gap: 28px; padding-top: 16px; }
/* The trail sits at the very top of the page, under the header, apart from the heading. */
.topic-hero-copy .crumbs { margin-bottom: clamp(32px, 7vw, 88px); }
.topic-hero-copy { display: grid; gap: 22px; max-width: 760px; }
.topic-title { max-width: 16ch; font-size: clamp(36px, 4.4vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.04; text-wrap: balance; }
.topic-hero .lede { max-width: 48ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: var(--text-body); }
.topic-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
/* Square controls on these pages, as drawn. */
.topic-page .button { border-radius: 0; }
.topic-link { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); font-size: 16px; text-decoration: none; text-underline-offset: 5px; }
.topic-link:hover { text-decoration: underline; }
.topic-link:focus-visible, .topic-page .button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.hero-stage > .shot { width: min(var(--page-width), 100% - 2 * var(--gutter)); margin: clamp(40px, 6vw, 72px) auto 0; }
.hero-key { order: 1; width: min(var(--page-width), 100% - 2 * var(--gutter)); margin: 0 auto; }

.topic-hero[data-staged] .hero-track { height: 240vh; }
.topic-hero[data-staged] .hero-stage { position: sticky; top: 0; display: block; height: 100vh; overflow: clip; }
/* Settled, the window sits smaller on the left and the key stands beside it (Oliver, 29 Oct). */
.topic-hero[data-staged] { --edge: max(var(--gutter), (100vw - var(--page-width)) / 2); --key-w: 300px;
  --shot-w: calc(100vw - 2 * var(--edge) - var(--key-w) - 56px); --shot-top: max(88px, (100vh - var(--shot-w) * 0.625) / 2); }
.topic-hero[data-staged] .hero-stage > .shot { position: absolute; top: var(--shot-top); left: var(--edge); z-index: 1; margin: 0;
  width: var(--shot-w);
  transform: translate(calc((1 - var(--move, 1)) * 30vw), calc((1 - var(--move, 1)) * 8vh)); }
.topic-hero[data-staged] .hero-key { position: absolute; right: var(--edge); z-index: 2; width: var(--key-w); margin: 0;
  opacity: 0; transform: translateX(16px); pointer-events: none;
  transition: opacity 420ms var(--ease-out-expo), transform 620ms var(--ease-out-expo); }
.topic-hero[data-landed] .hero-key { opacity: 1; transform: none; pointer-events: auto; }
.topic-hero[data-staged] .hero-key { display: flex; flex-direction: column; justify-content: center; height: calc(var(--shot-w) * 0.625); top: var(--shot-top); }
.topic-hero[data-staged] .pins-key { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; padding: 0; border-top: 0; }
.topic-hero[data-staged] .pins-key li { padding: 22px 0; border-top: 1px solid var(--border); }
.topic-hero[data-staged] .pins-key li:last-child { border-bottom: 1px solid var(--border); }
.topic-hero[data-staged] .shot::after { content: ""; position: absolute; inset: -2px; z-index: 4; border-radius: 16px; pointer-events: none;
  background: linear-gradient(90deg, rgb(11 11 11 / 0.94), rgb(11 11 11 / 0.72) 45%, rgb(11 11 11 / 0.55)); opacity: var(--veil, 0); }
.topic-hero[data-staged] .hero-front { position: relative; z-index: 5; display: block; height: 100%; padding: 0;
  opacity: var(--copy, 1); transform: translateY(calc((1 - var(--copy, 1)) * -48px)); }
/* Once the copy has faded, its links leave the tab order; the heading and lede stay in the accessibility tree, so
 * the page keeps its h1 for anyone moving by headings (axe page-has-heading-one, 29 Oct 2026 review). */
.topic-hero[data-copy-gone] .hero-front { pointer-events: none; }
.topic-hero[data-copy-gone] .hero-front :is(.crumbs, .topic-actions) { visibility: hidden; }
.topic-hero[data-staged] .topic-hero-copy { padding-top: 22vh; }
.topic-hero[data-staged] .topic-hero-copy .crumbs { margin: 0; }
.topic-hero[data-staged] .crumbs { position: absolute; top: 16px; left: 0; }
.topic-hero[data-staged] .topic-actions { position: absolute; right: 0; bottom: 18vh; }

/* ---------- The window and its pins ---------- */
.shot { position: relative; }
.has-pin { position: relative; }
.pin { position: absolute; top: -3px; left: -36px; z-index: 3; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--pin); color: #111; font: 700 11px/1 var(--font); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #0b0b0b, 0 3px 10px rgb(0 0 0 / 0.55);
  transition: transform 260ms var(--ease-out-expo), box-shadow 260ms var(--ease-out-expo); }
.pin[data-at="right"] { left: auto; right: -36px; }
.pin[data-at="edge"] { top: 50%; left: -16px; margin-top: -12px; }
/* Inside a list or a scrolling page the pin sits on the corner, where the list cannot cut it off. */
.pin[data-at="corner"] { top: -11px; left: -11px; }
.pin[data-at="inset"] { top: 50%; left: 2px; margin-top: -12px; }
.pin[data-at="end"] { top: 50%; right: 6px; left: auto; margin-top: -12px; }
.pin { cursor: help; }
/* A pin keeps its size however far the window is scaled down. */
.app-frame[data-board] .pin { scale: calc(1 / var(--s, 1)); }
@media (max-width: 760px) { .app-frame[data-board] .pin { scale: calc(0.75 / var(--s, 1)); } }
.pin-tip { position: absolute; z-index: 6; display: grid; gap: 4px; width: min(280px, 80vw); padding: 12px 14px 13px; border-radius: 10px;
  background: #1a1a1a; color: var(--text-body); font-size: 13px; line-height: 1.5;
  box-shadow: 0 0 0 1px #2e2e2e, 0 18px 40px -12px rgb(0 0 0 / 0.85);
  transform: translate(-50%, calc(-100% - 14px)); pointer-events: none; }
.pin-tip[data-below] { transform: translate(-50%, 38px); }
.pin-tip[hidden] { display: none; }
.pin-tip strong { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; font-weight: 500; }
.pin-tip strong::before { content: attr(data-n); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--pin); color: #111; font-size: 10px; font-weight: 700; }
.pins-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin: 40px 0 0; padding: 26px 0 0; list-style: none; border-top: 1px solid var(--border); }
.pins-key li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px 16px; align-content: start; cursor: default; }
.pins-key b { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--pin); color: #111;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; transition: transform 260ms var(--ease-out-expo), box-shadow 260ms var(--ease-out-expo); }
.pins-key strong { font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--text); }
.pins-key p { grid-column: 2; font-size: 15px; line-height: 1.55; color: var(--text-dim); transition: color 200ms ease-out; }
.pins-key li[data-hot] b { transform: scale(1.12); box-shadow: 0 0 0 5px rgb(255 184 0 / 0.22); }
.pins-key li[data-hot] p { color: var(--text-body); }
.shot-caption { margin-top: 18px; font-size: 12px; color: var(--text-dim); }

/* The entrance: pins land one after another once the window is in view. pins.js arms the figure first, so
 * without the script every pin is simply there. */
.shot[data-armed]:not([data-live]) .pin { opacity: 0; transform: scale(0.3); }
.shot[data-armed] .pin { transition: opacity 420ms var(--ease-out-expo) calc(var(--i, 0) * 160ms + 200ms),
  transform 620ms var(--ease-out-expo) calc(var(--i, 0) * 160ms + 200ms), box-shadow 260ms var(--ease-out-expo); }
/* Pointing at a line of the key lifts its pin and outlines what it points at. */
.shot[data-focus="1"] .pin[data-pin="1"], .shot[data-focus="2"] .pin[data-pin="2"], .shot[data-focus="3"] .pin[data-pin="3"] { transform: scale(1.18); box-shadow: 0 0 0 2px #0b0b0b, 0 0 0 7px rgb(255 184 0 / 0.28), 0 3px 10px rgb(0 0 0 / 0.55); }
.shot[data-focus="1"] [data-pin-target="1"], .shot[data-focus="2"] [data-pin-target="2"], .shot[data-focus="3"] [data-pin-target="3"] { outline: 1.5px solid rgb(255 184 0 / 0.85); outline-offset: 4px; border-radius: 8px; }
.shot[data-focus] [data-pin-target] { transition: outline-color 200ms ease-out; }
.pins-key li { transition: opacity 200ms ease-out; }
.pins-key[data-focus] li:not([data-hot]) { opacity: 0.45; }

/* ---------- Heading beside prose ---------- */
.prose-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.prose-split h2, .topic-head h2, .scene h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.prose { display: grid; gap: 18px; }
.prose p { max-width: 62ch; font-size: 17px; line-height: 1.65; color: var(--text-body); }
.prose strong { color: var(--text); font-weight: 500; }
.topic-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.topic-head p { max-width: 60ch; font-size: 17px; line-height: 1.6; color: var(--text-body); }
.topic-note { margin-top: 20px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.topic-note a, .prose a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--border-strong); }

/* ---------- Hairline rows: a term and what it gives you ---------- */
.rows { margin: 0; border-bottom: 1px solid var(--border); }
.rows > div { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(0, 2.2fr); gap: 8px 32px; padding: 20px 0; border-top: 1px solid var(--border); }
.rows dt { font-size: 17px; font-weight: 500; color: var(--text); }
.rows dd { margin: 0; max-width: 60ch; font-size: 16px; line-height: 1.6; color: var(--text-body); }
.rows-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(28px, 5vw, 72px); }
/* A pair stretches to its taller neighbour; its words stay at the top rather than spreading (29 Oct 2026 review). */
.rows-pair > div { grid-template-columns: minmax(0, 1fr); align-content: start; }

/* ---------- Two sides of one idea, split by a hairline ---------- */
.contrast { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contrast > * { display: grid; gap: 12px; align-content: start; padding: 6px clamp(20px, 4vw, 56px) 6px 0; }
.contrast > * + * { padding: 6px 0 6px clamp(20px, 4vw, 56px); border-left: 1px solid var(--border-strong); }
.contrast h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.contrast p { max-width: 46ch; font-size: 16px; line-height: 1.6; color: var(--text-body); }
.contrast [data-tone="past"] h3 { color: var(--text-dim); }
.contrast blockquote { margin: 0; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.4; color: var(--text); }

/* ---------- The three delegation routes: pick one, and the map redraws who hands work to whom ----------
 * Oliver, 29 Oct 2026: the three columns needed a redesign. A list of the routes beside a small map
 * (delegation-routes.js switches it; without script the first route's map shows and every route reads). */
/* The map stands beside the three routes and spans exactly their height (Oliver, 29 Oct 2026). */
.routes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(32px, 6vw, 96px); align-items: start; }
.routes-copy { display: contents; }
.routes-copy > h2, .routes-copy > p { grid-column: 1; }
.routes-copy > h2 { margin-bottom: 16px; }
.routes-copy > p { max-width: 46ch; font-size: 17px; line-height: 1.6; color: var(--text-body); }
.routes-copy h2 { font-size: clamp(28px, 3.2vw, 44px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
.route-list { grid-column: 1; grid-row: 3; display: grid; grid-auto-rows: 1fr; margin-top: 28px; border-top: 1px solid var(--border); }
.route { align-content: center; }
.route { display: grid; gap: 4px; padding: 18px 0 18px 22px; font-size: 18px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; position: relative; }
.route-name { position: relative; }
.route-name::before { content: ""; position: absolute; left: -22px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-dim); transition: background 200ms ease-out, box-shadow 200ms ease-out; }
.route[aria-selected="true"] .route-name::before { background: var(--text); box-shadow: none; }
.route-name { font-size: 18px; font-weight: 500; line-height: 1.3; color: var(--text-dim); transition: color 200ms ease-out; }
.route-line { font-size: 15px; line-height: 1.55; color: var(--text-dim); max-width: 52ch; }
.route:hover .route-name, .route[aria-selected="true"] .route-name { color: var(--text); }
.route[aria-selected="true"] .route-line { color: var(--text-body); }
.route-map { grid-column: 2; grid-row: 3; align-self: stretch; position: relative; min-height: 280px; margin: 28px 0 0; }
.route-map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route-lines { fill: none; stroke: var(--border-strong); stroke-width: 1.5; opacity: 0; transition: opacity 240ms ease-out; }
.route-lines path, .route-team { vector-effect: non-scaling-stroke; }
.route-lines path { stroke: var(--text-body); stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 900ms var(--ease-out-expo); }
.route-team { stroke-dasharray: 4 6; }
.route-map[data-route="you"] [data-for="you"], .route-map[data-route="agents"] [data-for="agents"], .route-map[data-route="atlas"] [data-for="atlas"] { opacity: 1; }
.route-map[data-route="you"] [data-for="you"] path, .route-map[data-route="agents"] [data-for="agents"] path, .route-map[data-route="atlas"] [data-for="atlas"] path { stroke-dashoffset: 0; }
.route-node { position: absolute; left: calc(var(--x) / 560 * 100%); top: calc(var(--y) / 340 * 100%); display: grid; justify-items: center; gap: 8px; transform: translate(-50%, -26px); transition: opacity 240ms ease-out; }
.route-node[data-node="you"] { --x: 70; --y: 170; }
.route-node[data-node="atlas"] { --x: 280; --y: 170; }
/* One agent level with each route: the map's height is the list's, cut in sixths. */
.route-node[data-slot="1"] { --x: 490; --y: 57; } .route-node[data-slot="2"] { --x: 490; --y: 170; } .route-node[data-slot="3"] { --x: 490; --y: 283; }
.route-map:not([data-route="atlas"]) [data-node="atlas"] { opacity: 0; }
.route-disc { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #161616; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text); font-size: 15px; font-weight: 600; }
.route-node[data-node="you"] .route-disc { background: var(--chip); color: var(--chip-text); box-shadow: none; }
.route-mark { width: 22px; height: 22px; background: var(--text); -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.route-mark[data-mark="claude"] { -webkit-mask-image: url('/assets/img/app/marks/claude.svg'); mask-image: url('/assets/img/app/marks/claude.svg'); }
.route-mark[data-mark="grok"] { -webkit-mask-image: url('/assets/img/app/marks/grok.svg'); mask-image: url('/assets/img/app/marks/grok.svg'); }
.route-mark[data-mark="codex"] { -webkit-mask-image: url('/assets/img/app/marks/codex.svg'); mask-image: url('/assets/img/app/marks/codex.svg'); }
.route-label { font-size: 13px; color: var(--text-body); }
.route-caption { position: absolute; left: 0; right: 0; bottom: -44px; font-size: 13px; color: var(--text-dim); text-align: center; }
@media (max-width: 960px) { .routes { grid-template-columns: minmax(0, 1fr); } .route-map { grid-column: 1; grid-row: 4; align-self: auto; aspect-ratio: 560 / 340; min-height: 0; margin: 40px 0 44px; } }
@media (max-width: 520px) { .route-disc { width: 40px; height: 40px; } .route-label { font-size: 12px; } .route-node { transform: translate(-50%, -20px); } }
@media (prefers-reduced-motion: reduce) { .route-lines, .route-lines path, .route-node { transition: none; } }

/* ---------- A sequence on a drawn line (the order carries meaning, so the steps are numbered) ---------- */
.timeline { --dot: 11px; counter-reset: step; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 24px; margin: 0; padding: 30px 0 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 5px; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--border-strong), var(--border-strong) 85%, transparent); }
.timeline > li { counter-increment: step; position: relative; display: grid; gap: 8px; align-content: start; }
.timeline > li::before { content: ""; position: absolute; top: -30px; left: 0; width: var(--dot); height: var(--dot); border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--text-dim); }
.timeline > li:last-child::before { background: var(--pin); box-shadow: none; }
.timeline > li > span { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.timeline > li > span::before { content: counter(step, decimal-leading-zero); }
.timeline h3 { font-size: 17px; font-weight: 500; }
.timeline p { font-size: 15px; line-height: 1.55; color: var(--text-body); }

/* The vertical form, beside its heading. */
.timeline[data-vertical] { grid-auto-flow: row; grid-auto-columns: auto; gap: 26px; padding: 0 0 0 30px; }
.timeline[data-vertical]::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; background: var(--border-strong); }
.timeline[data-vertical] > li::before { top: 4px; left: -30px; }
.timeline a { color: var(--text); text-underline-offset: 3px; }

/* ---------- A panel cut from the app beside its copy ---------- */
.scene { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.scene[data-flip] > :first-child { order: 2; }
.scene figure { margin: 0; }
.scene figcaption { margin-top: 14px; font-size: 12px; color: var(--text-dim); }
.scene-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }

/* ---------- A plain list with a mark, for limits and promises ---------- */
.marks { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.marks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; font-size: 16px; line-height: 1.55; color: var(--text-body); }
.marks li::before { content: ""; width: 10px; height: 1px; margin-top: 0.8em; background: var(--text-dim); }
.marks strong { color: var(--text); font-weight: 500; }

/* ---------- The closing line and the way on ---------- */
/* Right-aligned, the line in two (Oliver, 29 Oct 2026). */
.topic-close { text-align: right; }
.topic-close-line { margin: 0 0 0 auto; max-width: 30ch; font-size: clamp(30px, 4vw, 56px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
.topic-close-sub { margin: 20px 0 0 auto; max-width: 52ch; font-size: 17px; line-height: 1.6; color: var(--text-body); }
.topic-next { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 36px; }

/* Browser surfaces carry the palette too. */
.topic-page ::selection { background: rgb(255 184 0 / 0.35); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .shot[data-armed] .pin, .pin, .pins-key li { transition: none; }
  .shot[data-armed]:not([data-live]) .pin { opacity: 1; transform: none; }
}
@media (max-width: 960px) {
  .prose-split, .scene, .contrast { grid-template-columns: minmax(0, 1fr); }
  .scene[data-flip] > :first-child { order: 0; }
  .contrast > * + * { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--border-strong); }
  .contrast > * { padding-right: 0; }
  .timeline { grid-auto-flow: row; grid-auto-columns: auto; gap: 26px; padding: 0 0 0 30px; }
  .timeline::before { top: 0; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; background: var(--border-strong); }
  .timeline > li::before { top: 4px; left: -30px; }
}
@media (max-width: 760px) {
  .pins-key, .rows-pair, .scene-pair { grid-template-columns: minmax(0, 1fr); }
  .rows > div { grid-template-columns: minmax(0, 1fr); }
  .topic-hero { padding-top: 36px; }
}

/* ---------- /compare: other companies' agents, each line resting on that company's own page ---------- */
.compare-hero .hero-front { padding-bottom: clamp(24px, 4vw, 48px); }
.rows-maker { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--text-dim); }
.rows-source { display: inline-block; margin-left: 4px; font-size: 14px; color: var(--text-dim); text-underline-offset: 4px; }
.rows-source:hover { color: var(--text); }
.prose .reviewed { margin-top: 20px; max-width: 60ch; font-size: 14px; line-height: 1.6; color: var(--text-dim); }

/* ---------- Carousel (assets/js/shared/carousel.js): a ruled row of slides that scrolls sideways ----------
 * Oliver, 29 Oct 2026, of "One home for the whole job": "make this into a carousel". Columns ruled like the plans,
 * square buttons beside the heading, a thin bar for where you are; the far edge fades while more remains. */
.carousel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); }
.carousel-head .topic-head { margin-bottom: 0; }
.carousel-controls { display: flex; flex: none; gap: 8px; }
.carousel-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border-strong); border-radius: 0;
  background: none; color: var(--text); cursor: pointer; transition: background var(--motion), border-color var(--motion), opacity var(--motion); }
.carousel-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel-button:hover { background: var(--panel-active); border-color: var(--text-dim); }
.carousel-button[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.carousel-button[aria-disabled="true"]:hover { background: none; border-color: var(--border-strong); }
/* --shown slides fit the row, --whole of them complete, the next one peeking under the fade. */
.carousel-track { --gap: 32px; --shown: 3.4; --whole: 3; --fade: 120px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - var(--whole) * var(--gap)) / var(--shown)); column-gap: var(--gap); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; border-top: 1px solid var(--border-strong);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - var(--fade)), transparent); }
/* At the far end the row stops part-way into a slide on the left, so that edge fades instead, as the right edge did. */
.carousel[data-at-end] .carousel-track { -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade)); mask-image: linear-gradient(90deg, transparent, #000 var(--fade)); }
.carousel[data-at-end][data-at-start] .carousel-track { -webkit-mask-image: none; mask-image: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline-offset: 6px; }
/* The divider is on each slide's right, so whichever slide the row stops at, its words line up with the heading. */
.carousel-slide { display: grid; gap: 12px; align-content: start; padding: 28px var(--gap) 40px 0; border-right: 1px solid var(--border); scroll-snap-align: start; }
.carousel-slide:last-child { border-right: 0; }
.carousel-slide h3 { font-size: clamp(20px, 1.7vw, 24px); font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; color: var(--text); }
.carousel-slide p { max-width: 34ch; font-size: 16px; line-height: 1.6; color: var(--text-body); }
.carousel-progress { position: relative; height: 1px; background: var(--border); }
.carousel-progress > span { position: absolute; top: -0.5px; left: 0; width: 30%; height: 2px; background: var(--text); }
@media (max-width: 960px) { .carousel-track { --shown: 2.3; --whole: 2; } }
@media (max-width: 760px) {
  .carousel-head { display: block; }
  .carousel-controls { display: none; }
  .carousel-track { --gap: 22px; --shown: 1.25; --whole: 1; --fade: 56px; -webkit-mask-image: none; mask-image: none; }
  .carousel-slide { padding: 22px var(--gap) 30px 0; }
}
