@import url("./colors.css");
@import url("./layout.css");
@import url("./media-placeholder.css");
@import url("./pill.css");
@import url("./article-header.css");

/* ABC Diatype, the vernerobotics.com text face, from apps/landing-page-2 (prepare-research.mjs, preview.py). */

:root {
  --orange: #FF5204;
  --bg: var(--surface-page);
  --fg: var(--text-primary);
  --fg2: var(--text-secondary);
  --line: var(--border-subtle);
  --panel: var(--surface-subtle);
  --hi: var(--text-primary);
  --ink: #FF5204;
  --chip: var(--surface-control);
  --track: var(--neutral-800);
  --note: var(--neutral-300);
  --box: var(--surface-subtle);
  --box-line: var(--border-subtle);
  --box-hi: #1F140D;
  --line-hi: var(--border-strong);
  --mute: var(--neutral-600);
  --grid: var(--neutral-950);
  --tick: var(--text-secondary);
  --hover: color-mix(in srgb, var(--neutral-50) 8%, transparent);
  --mark: rgba(255, 82, 4, 0.5);
  --top-bg: color-mix(in srgb, var(--neutral-1000) 85%, transparent);
  color-scheme: dark;
  /* Live numbers (clocks, readouts) use --sys: Diatype's tabular figures also widen the space. */
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: var(--font-diatype), var(--sys);
  --pad: var(--page-gutter);
  /* Body text size: 17px up to a 1440px viewport, then up to 21px at 2880px. The column,
     the page and the side columns scale with it, so a line keeps about 80 characters. */
  --fs: clamp(17px, calc(13px + 0.2778vw), 21px);
  --measure: calc(var(--fs) * 41.2);
  --page: var(--page-width);
  --toc: calc(var(--fs) * 10.6);
}

/* light theme, paper and ink: follows the OS unless the header toggle set data-theme */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #C73A00;
    --track: var(--neutral-300); --note: var(--neutral-800); --box-hi: #FBE3D3;
    --mute: var(--neutral-400); --grid: var(--neutral-200); --hover: color-mix(in srgb, var(--neutral-1000) 5%, transparent);
    --mark: rgba(255, 82, 4, 0.22); --top-bg: color-mix(in srgb, var(--neutral-50) 85%, transparent); color-scheme: light;
  }
  :root:not([data-theme="dark"]) .prose .coda img { filter: invert(1); }
}
:root[data-theme="light"] {
  --ink: #C73A00;
  --track: var(--neutral-300); --note: var(--neutral-800); --box-hi: #FBE3D3;
  --mute: var(--neutral-400); --grid: var(--neutral-200); --hover: color-mix(in srgb, var(--neutral-1000) 5%, transparent);
  --mark: rgba(255, 82, 4, 0.22); --top-bg: color-mix(in srgb, var(--neutral-50) 85%, transparent); color-scheme: light;
}
:root[data-theme="light"] .prose .coda img { filter: invert(1); }

/* overlays on video keep the dark palette in both themes */
.film-frame, .vwrap { --fg: var(--neutral-100); --fg2: var(--neutral-400); --line: var(--neutral-900); --line-hi: var(--neutral-700); --bg: #000; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible, video:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
::selection { background: var(--orange); color: #000; }

/* index */

/* article head */
.hero, .film, .layout, .foot { max-width: var(--page); margin-inline: auto; }
.hero-subhead-accessible { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; user-select: none; }
.hero-subhead-character {
  animation: hero-character-enter 0s step-end both;
  /* Begin just after the heading settles; each character appears instantly. */
  animation-delay: calc(var(--hero-enter-duration, 1800ms) + var(--hero-heading-delay, 50ms) + 50ms + var(--character-index) * 8ms);
}
@keyframes hero-character-enter { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero-subhead-character { animation: none; }
}
.get { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.film { padding: 20px var(--pad) clamp(28px, 5vh, 48px); }
/* The frame has the film's shape at every width, so no part of the picture is cut off. */
.vwrap.film-frame { aspect-ratio: 16 / 9; border-radius: 10px; }
.vwrap.film-frame video { object-fit: contain; transition: opacity 0.25s linear; }
.vwrap.film-frame video.seam { opacity: 0; }
/* Sound button of a [data-sound] clip, always shown, top right: the control bar is at the bottom. */
.pl-snd { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--neutral-1000) 55%, transparent); backdrop-filter: blur(8px); color: #fff; cursor: pointer; }
.pl-snd:hover { background: color-mix(in srgb, var(--neutral-1000) 80%, transparent); }
.pl-snd svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pl-snd .spk { fill: currentColor; }
.pl-snd .on, .pl-snd[aria-pressed="true"] .off { display: none; }
.pl-snd[aria-pressed="true"] .on { display: inline; }
.film-sub { margin: 16px 0 0; max-width: 30em; font-size: clamp(19px, 1.6vw, 23px); font-weight: 500; line-height: 1.35; letter-spacing: -0.014em; color: var(--hi); }

/* article body */
.layout { display: grid; grid-template-columns: var(--toc) minmax(0, 1fr); gap: 48px; padding: 0 var(--pad); }

.toc { position: sticky; top: 49px; align-self: start; max-height: calc(100svh - 49px); overflow-y: auto; padding: 28px 0 20px; }
.toc-h { display: block; margin-bottom: 12px; font-size: calc(var(--fs) * 0.765); font-weight: 600; color: var(--fg); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { position: relative; margin: 0; padding: 0; }
.toc li::before, .toc .fill { content: ""; position: absolute; left: 0; top: 0; width: 2px; }
.toc li::before { bottom: 0; background: var(--track); }
.toc .fill { z-index: 1; height: calc(100% * var(--p, 0)); background: var(--orange); }
.toc a { display: block; padding: 6px 0 6px 14px; font-size: calc(var(--fs) * 0.765); line-height: 1.4; color: var(--fg2); text-decoration: none; }
.toc a.sub { padding-left: 26px; }
.toc a:hover { color: var(--fg); }
.toc li.on a { color: var(--hi); }

.prose { position: relative; min-width: 0; padding: 28px 0 96px; font-size: var(--fs); line-height: 1.6; }
.prose > section > * { max-width: var(--measure); }
.prose p { margin: 0 0 0.95em; }
.prose b, .prose strong { font-weight: inherit; color: var(--hi); }
.prose section > :is(p, ul, ol) b { font-weight: 600; }
.prose strong { font-weight: 500; }
.prose h2 { margin: 2.6em 0 0.45em; font-weight: 500; font-size: calc(var(--fs) * 1.65); line-height: 1.15; letter-spacing: -0.022em; }
.prose h3 { margin: 2.4em 0 0.4em; font-weight: 500; font-size: calc(var(--fs) * 1.18); line-height: 1.25; letter-spacing: -0.012em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin: 0 0 0.4em; }
.prose li::marker { color: var(--fg2); }
.prose a:not(.note):not(.get a) { color: #ff5202; font-weight: 500; text-decoration: none; border-bottom: 1px solid rgb(255 82 2 / 25%); transition: border-color 160ms ease; }
.prose a:not(.note):not(.get a):is(:hover, :focus-visible) { border-bottom-color: #ff5202; }
.prose section > p > a[target="_blank"]::after { content: "\2009\2197"; font-size: 0.85em; color: inherit; }
.prose sup { line-height: 0; }
.prose .hlink { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 6px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--fg2); vertical-align: middle; cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.prose :is(h2, h3):hover .hlink, .prose .hlink:focus-visible, .prose .hlink.done { opacity: 1; }
.prose .hlink:hover { color: var(--fg); background: var(--hover); }
.prose .hlink.done { color: var(--ink); }
.prose .hlink svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) { .prose .hlink { opacity: 0.55; } }
.prose sup a { padding: 0 1px; font-size: 11px; }

.prose .layers { counter-reset: layer; list-style: none; padding: 0; border-top: 1px solid var(--line); }
.prose .layers li { counter-increment: layer; display: grid; grid-template-columns: 28px 1fr; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prose .layers li::before { content: counter(layer); font-weight: 600; color: var(--fg2); }

figure { margin: 1.6em 0; }
figure img, figure video { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--panel); }
figcaption { max-width: var(--measure); margin-top: 10px; font-size: calc(var(--fs) * 0.82); line-height: 1.45; color: var(--fg2); }
figcaption .fn { margin-right: 6px; font-weight: 600; color: var(--fg); }



/* citation: the plain-text form, and the BibTeX with a copy button */
.prose .cite { padding-left: 14px; border-left: 2px solid var(--line); color: var(--fg); }
.prose .bib { position: relative; margin: 0 0 0.95em; }
.prose .bib pre { margin: 0; padding: 16px 84px 16px 18px; border: 1px solid var(--box-line); border-radius: 8px; background: var(--box); white-space: pre-wrap; overflow-wrap: anywhere; font: calc(var(--fs) * 0.74)/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--fg); }
.prose .bib button { position: absolute; top: 10px; right: 10px; }

/* sidenotes: built from the references when the column has room */
.notes { display: none; }
.prose.has-notes .notes { display: block; position: absolute; top: 0; left: calc(var(--measure) + 40px); width: min(calc(var(--fs) * 16.5), calc(100% - var(--measure) - 40px)); }
.prose .note { position: absolute; left: 0; right: 0; display: grid; grid-template-columns: 18px 1fr; font-size: calc(var(--fs) * 0.735); line-height: 1.4; color: var(--fg2); text-decoration: none; transition: color 0.15s; }
.note .note-n { font-weight: 600; color: var(--orange); }
.note b { display: block; font-weight: 500; color: var(--note); }
.prose .note:hover, .prose .note.hot { color: var(--fg); }
.note.hot b { color: var(--hi); }

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 640px) {
  :root { --pad: 16px; --fs: 16px; }
    .prose { padding-top: 24px; }
  .prose h2 { font-size: 24px; }
}


/* clips */
.vwrap { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 8px; background: var(--panel); }
.vwrap video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.vwrap .badge, .vwrap .clock { position: absolute; pointer-events: none; }
.vwrap .badge { left: 10px; top: 10px; }
.vwrap .badge.ph { left: auto; right: 10px; }
.vwrap .clock { right: 10px; bottom: 10px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* demo playground */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.prose .pg-h { margin: 10px 0 2px; font-size: calc(var(--fs) * 0.94); line-height: 1.3; }


@media (max-width: 640px) {
  .film { padding-left: 0; padding-right: 0; }
  .vwrap.film-frame { border-radius: 0; }
  .film-sub { padding: 0 var(--pad); }
  .pl-snd { right: 12px; top: 12px; }
  .grid2 { grid-template-columns: 1fr; }
}

.zoom-ctl { display: flex; align-items: center; gap: 10px; flex: 1; }
.zoom-ctl input { flex: 1; max-width: 320px; min-width: 140px; accent-color: var(--orange); }
.zoom-read { font-family: var(--sys); font-variant-numeric: tabular-nums; color: var(--fg); }

.vbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.vbar .vplay { min-width: 64px; }
.rail { position: relative; flex: 1; height: 28px; margin-left: 4px; cursor: pointer; touch-action: none; }
.rail::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px; background: var(--line); }
.rail-fill { position: absolute; left: 0; top: 13px; height: 2px; width: 0; background: var(--orange); }
.rail:focus-visible { outline: 1px solid var(--orange); outline-offset: 4px; }
.vwrap .badge.auto img { display: block; width: var(--pill-icon-size, 14px); height: auto; border-radius: 0; background: none; }

.chart svg { display: block; width: 100%; height: auto; overflow: visible; font: 12px var(--sans); }
.chart svg:focus-visible { outline: 1px solid var(--orange); }
.chart .tip rect { fill: var(--chip); stroke: var(--box-line); }
.chart .tip text { fill: var(--fg); font-family: var(--sys); font-variant-numeric: tabular-nums; }
.chart-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-xlab { margin: 2px 0 0; font-size: 12px; text-align: center; color: var(--tick); }
.chart-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 6px; font-size: 13px; color: var(--fg2); }
.chart-key i { display: inline-block; width: 18px; height: 2px; margin-right: 8px; vertical-align: 4px; background: var(--fg2); }
.chart-key i.ours { height: 2.25px; background: var(--orange); }
@media (max-width: 640px) { .chart-pair { grid-template-columns: 1fr; gap: 12px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vwrap.film-frame video { transition: none; }
}
@media (max-width: 640px) {
}

/* flow diagrams: a row of steps that stacks on phones */
.prose .flow-row { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.flow-row li { position: relative; flex: 1 1 0; min-width: 0; margin: 0; padding: 12px 13px 13px; border: 1px solid var(--box-line); border-radius: 8px; background: var(--box); font-size: 14px; line-height: 1.4; color: var(--fg2); }
.flow-row li b { display: block; margin-bottom: 4px; font-size: 15px; font-weight: 600; color: var(--fg); }
.flow-row li span { display: block; }
.flow-row li.hi { border-color: var(--orange); background: var(--box-hi); }
.flow-row li + li::before { content: ""; position: absolute; left: -24px; top: 50%; width: 20px; height: 12px; margin-top: -6px; background: var(--fg2); mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23A3A39E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h17M13 1.5L18 6l-5 4.5'/%3E%3C/svg%3E"); }
.flow-row li.cycle::before { height: 16px; margin-top: -8px; mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 16' fill='none' stroke='%23A3A39E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 4h17M14 1l4 3-4 3M19 12H2M6 9l-4 3 4 3'/%3E%3C/svg%3E"); }
@media (max-width: 640px) {
  .prose .flow-row { flex-direction: column; gap: 30px; }
  .flow-row li + li::before { left: 50%; top: -25px; margin: 0 0 0 -10px; transform: rotate(90deg); }
}

/* model architecture: inputs, the model, outputs */
.arch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1.15fr) 20px minmax(0, 1fr); gap: 14px; align-items: center; }
.prose .arch-in, .prose .arch-out { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; }
.arch-in li { margin: 0; padding: 8px 12px; border: 1px solid var(--box-line); border-radius: 8px; background: var(--box); font-size: 14px; color: var(--fg); }
.arch .arr { height: 12px; background: var(--fg2); mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23A3A39E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h17M13 1.5L18 6l-5 4.5'/%3E%3C/svg%3E"); }
.arch-model { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px; border: 1px dashed var(--line-hi); border-radius: 10px; }
.arch-name { font-size: 13px; font-weight: 600; color: var(--fg2); }
.arch-box { padding: 16px 14px; border: 1px solid var(--box-line); border-radius: 8px; background: var(--box); font-size: 15px; font-weight: 600; color: var(--fg); }
.arch-via { position: relative; padding: 2px 0 2px 26px; font-size: 13px; color: var(--fg2); }
.arch-via::before { content: ""; position: absolute; left: 6px; top: 50%; width: 20px; height: 12px; margin-top: -6px; transform: rotate(90deg); background: var(--fg2); mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12' fill='none' stroke='%23A3A39E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h17M13 1.5L18 6l-5 4.5'/%3E%3C/svg%3E"); }
.arch-box.hi, .arch-out .hi { border-color: var(--orange); background: var(--box-hi); }
.prose .arch-out { gap: 54px; }
.arch-out li { margin: 0; padding: 12px 14px; border: 1px solid var(--box-line); border-radius: 8px; background: var(--box); font-size: 13px; color: var(--fg2); }
.arch-out li b { display: block; font-size: 15px; font-weight: 600; color: var(--fg); }
.arch-out li.train { border-style: dashed; background: none; }
@media (max-width: 640px) {
  .arch-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .prose .arch-in { display: grid; grid-template-columns: 1fr 1fr; }
  .arch .arr { transform: rotate(90deg); }
  .prose .arch-out { flex-direction: row; gap: 8px; }
  .arch-out li { flex: 1 1 0; }
}

/* real-time chunking (#chunks): controls, one svg for the two chunks and the path, a key */
.chunks-bar { display: flex; align-items: flex-start; gap: 6px; }
.chunks-bar > .chips:first-child { flex: 1; min-width: 0; }
.chunks-run { flex: none; }
.chunks-play { min-width: 62px; }
.chunks-ctl { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; font-size: 13px; color: var(--fg2); }
.chunks-ctl input { flex: 1; min-width: 0; margin: 0; accent-color: var(--ink); }
.chunks-ctl output { min-width: 4.2em; text-align: right; font-family: var(--sys); font-variant-numeric: tabular-nums; color: var(--fg); }
.chunks-svg { display: block; width: 100%; height: auto; font: 11px var(--sans); user-select: none; -webkit-user-select: none; }
.chunks-svg text { fill: var(--tick); }
.chunks-svg .ttl { fill: var(--fg); font-size: 12px; font-weight: 600; }
.chunks-svg .halo { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.chunks-svg .bl { fill: var(--fg2); }
.chunks-svg .cl { fill: var(--fg2); }
.chunks-svg .cl.c { fill: var(--ink); }
.chunks-svg .cl.x { fill-opacity: 0.4; stroke: var(--fg2); }
.chunks-svg .cl.o { fill: none; stroke: var(--fg2); stroke-dasharray: 2 2; }
.chunks-svg .band { fill: var(--fg); fill-opacity: 0.07; }
.chunks-svg .cam { fill: var(--fg); }
.chunks-svg .brk { fill: none; stroke: var(--fg); stroke-width: 1.25; }
.chunks-svg .brk.run { stroke-dasharray: 2 2.5; }
.chunks-svg .old { opacity: 0.4; }
.chunks-svg .ph { stroke: var(--fg); stroke-opacity: 0.5; }
.chunks-svg .grid { stroke: var(--grid); }
.chunks-svg .axis { stroke: var(--box-line); }
.chunks-svg .gs { stop-color: var(--fg2); }
.chunks-svg .ex { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chunks-svg .pl { fill: none; stroke: var(--fg2); stroke-width: 1.5; stroke-dasharray: 4 3; }
.chunks-svg .pg { fill: none; stroke-width: 1.5; stroke-dasharray: 4 3; }
.chunks-svg .dp { fill: none; stroke: var(--fg2); stroke-opacity: 0.6; stroke-width: 1.25; stroke-dasharray: 0.5 3; stroke-linecap: round; }
.chunks-svg .gh { fill: none; stroke: var(--fg2); stroke-opacity: 0.7; stroke-width: 1.25; stroke-dasharray: 4 3; }
.chunks-svg .pz { fill: none; stroke: var(--fg); stroke-width: 2; }
.chunks-svg .dot { fill: var(--fg); stroke: var(--bg); stroke-width: 2; }
.chunks-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 10px 0 0; font-size: 13px; color: var(--fg2); }
.chunks-key span[hidden] { display: none; }
.chunks-key i { display: inline-block; width: 7px; height: 13px; margin-right: 7px; border-radius: 1.5px; vertical-align: -2px; }
.chunks-key .c { background: var(--ink); }
.chunks-key .n { background: var(--fg2); }
.chunks-key .b { width: 16px; background: linear-gradient(to right, var(--fg2), transparent); }
.chunks-key .x { background: color-mix(in srgb, var(--fg2) 40%, transparent); border: 1px solid var(--fg2); }
.chunks-key .o { border: 1px dashed var(--fg2); }
.chunks-key .pz { width: 6px; height: 10px; border: solid var(--fg); border-width: 0 2px; border-radius: 0; vertical-align: -1px; }
.chunks-key .cam { width: 0; height: 0; border: 4px solid transparent; border-top: 6px solid var(--fg); border-bottom: 0; border-radius: 0; vertical-align: 1px; }
.chunks-key .inf { width: 16px; height: 9px; border: solid var(--fg); border-width: 0 1.25px; border-radius: 0; background: linear-gradient(var(--fg), var(--fg)) center / 100% 1.25px no-repeat; vertical-align: 0; }
@media (max-width: 640px) {
  .chunks-key { gap: 4px 14px; }
}

/* streamed clips (player.js) */
.pl { cursor: pointer; }
.pl:focus { outline: none; }
.pl:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.pl .clock { transition: opacity 0.2s; }
.pl.ui .clock, .pl.is-paused .clock { opacity: 0; }
.pl-big { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: color-mix(in srgb, var(--neutral-1000) 55%, transparent); backdrop-filter: blur(8px); color: #fff; opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s; pointer-events: none; }
.pl-big svg { width: 26px; height: 26px; fill: currentColor; }
.pl.is-paused .pl-big { opacity: 1; transform: none; }
.pl-big.flash { animation: pl-flash 0.45s ease-out; }
@keyframes pl-flash { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(1.3); } }
.pl-spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid color-mix(in srgb, var(--neutral-50) 25%, transparent); border-top-color: #fff; border-radius: 50%; opacity: 0; pointer-events: none; }
.pl.is-wait .pl-spin { opacity: 1; animation: pl-spin 0.8s linear infinite; }
.pl.is-wait .pl-big { opacity: 0; }
/* [data-sync]: one bar for both clips; a clip that waits for the other shows the spinner */
[data-sync] .pl-bar, [data-sync] .pl-menu, [data-sync] .pl-big { display: none; }
[data-sync] .vwrap.pl .clock { opacity: 1; }
.pl.is-sync .pl-spin { opacity: 1; animation: pl-spin 0.8s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
.pl-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--orange); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; transition: opacity 0.2s; }
.pl.ui .pl-line, .pl.is-paused .pl-line { opacity: 0; }
.pl-err { position: absolute; inset: 0; display: none; place-items: center; background: color-mix(in srgb, var(--neutral-1000) 75%, transparent); font-size: 13px; color: var(--fg); }
.pl.is-err .pl-err { display: grid; }

.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 4px; background: linear-gradient(transparent, color-mix(in srgb, var(--neutral-1000) 70%, transparent)); opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; pointer-events: none; cursor: default; }
.pl.ui .pl-bar, .pl.is-paused .pl-bar, .pl:focus-visible .pl-bar, .pl-bar:has(:focus-visible) { opacity: 1; transform: none; pointer-events: auto; }
.pl-rail { position: relative; height: 16px; margin: 0 4px; cursor: pointer; touch-action: none; }
.pl-rail::before, .pl-buf, .pl-fill { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 3px; border-radius: 2px; transform-origin: 0 50%; transition: top 0.1s, height 0.1s; }
.pl-rail::before { background: color-mix(in srgb, var(--neutral-50) 25%, transparent); }
.pl-buf { background: color-mix(in srgb, var(--neutral-50) 40%, transparent); transform: scaleX(0); }
.pl-fill { background: var(--orange); transform: scaleX(0); }
.pl-rail:hover::before, .pl-rail:hover .pl-buf, .pl-rail:hover .pl-fill, .pl.drag .pl-rail::before, .pl.drag .pl-buf, .pl.drag .pl-fill { top: 6px; height: 5px; }
.pl-knob { position: absolute; top: 3px; left: 0; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: var(--orange); transform: scale(0); transition: transform 0.12s; }
.pl-rail:hover .pl-knob, .pl.drag .pl-knob { transform: none; }
.pl-peek { position: absolute; bottom: 20px; left: 0; display: none; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.pl-rail:hover .pl-peek, .pl.drag .pl-peek { display: flex; }
.pl-peek i { display: block; width: 128px; height: 72px; border: 1px solid color-mix(in srgb, var(--neutral-50) 70%, transparent); border-radius: 4px; background: var(--neutral-1000) no-repeat; }
.pl-peek span { padding: 2px 6px; border-radius: 4px; background: color-mix(in srgb, var(--neutral-1000) 75%, transparent); font: 500 12px/1.3 var(--sys); color: #fff; font-variant-numeric: tabular-nums; }
.pl-row { display: flex; align-items: center; gap: 2px; }
.pl-row button { display: grid; place-items: center; height: 30px; min-width: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: none; font: 600 12px/1 var(--sans); color: #fff; cursor: pointer; }
.pl-row button:hover { background: color-mix(in srgb, var(--neutral-50) 14%, transparent); }
.pl-row button[hidden] { display: none; }
.pl-row svg { width: 20px; height: 20px; fill: currentColor; }
.pl-row svg.ln { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pl-time { margin-left: 4px; font: 500 12px/1 var(--sys); color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-sp { flex: 1; }
/* Captions, above the bar while it shows. */
.pl-cc-text { position: absolute; left: 50%; bottom: max(var(--cc-line, 6%), var(--cc-clear, 0px)); z-index: 1; display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 90%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.pl-cc-text[hidden] { display: none; }
/* One block per line, so each line's padding counts in the box's width (Firefox wraps otherwise). */
.pl-cc-text span { max-width: 100%; padding: 0.12em 0.45em; border-radius: 4px; background: color-mix(in srgb, var(--neutral-1000) 72%, transparent); color: #fff; font: 500 clamp(13px, 1.45vw, 24px)/1.5 var(--sans); }
.pl.ui .pl-cc-text, .pl.is-paused .pl-cc-text { --cc-clear: 64px; }
.pl.is-full .pl-cc-text span { font-size: clamp(18px, 2vw, 40px); }
.pl.is-full.ui .pl-cc-text, .pl.is-full.is-paused .pl-cc-text { --cc-clear: 84px; }
.pl-cc[aria-pressed="false"] svg { opacity: 0.5; }
.pl-menu { position: absolute; right: 8px; bottom: 58px; z-index: 1; max-width: calc(100% - 16px); max-height: calc(100% - 66px); overflow: auto; padding: 10px 12px 12px; border-radius: 8px; background: color-mix(in srgb, var(--neutral-1000) 94%, transparent); backdrop-filter: blur(10px); cursor: default; }
.pl-menu[hidden] { display: none; }
.pl-menu .label { display: block; margin-bottom: 8px; font-size: 12px; }

.pl.is-full { border-radius: 0; background: #000; }
.pl.is-full video { object-fit: contain; }
.pl.is-full.idle { cursor: none; }
.pl.is-full .pl-bar { padding: 48px 20px 12px; }
.pl.is-full .pl-row button { height: 40px; min-width: 40px; font-size: 14px; }
.pl.is-full .pl-row svg { width: 24px; height: 24px; }
.pl.is-full .pl-time { font-size: 14px; }
.pl.is-full .pl-peek i { width: 192px; height: 108px; }
.pl.is-full .pl-menu { bottom: 76px; right: 20px; }
@media (hover: none) { .pl-knob { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .pl-bar, .pl-big, .pl-line, .pl .clock { transition: none; }
  .pl-big.flash { animation: none; }
}
/* carousels (Figure 1, demos): one slide per clip, and only the slide in view plays */
.reel { margin: 1.6em 0; }
.reel-track { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reel-track::-webkit-scrollbar { display: none; }
.prose .reel-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.reel-nav { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.reel-nav > button { flex: none; }
.reel-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reel-thumbs { position: relative; display: flex; flex: 1; gap: 6px; min-width: 0; padding: 3px; overflow-x: auto; scrollbar-width: none; }
.reel-thumbs::-webkit-scrollbar { display: none; }
.reel-thumbs button { position: relative; flex: 0 0 120px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; border: 0; border-radius: 4px; background: var(--panel); cursor: pointer; opacity: 0.55; transition: opacity 0.15s; }
.reel-thumbs button:hover { opacity: 0.85; }
.reel-thumbs button.on { opacity: 1; outline: 2px solid var(--orange); outline-offset: 1px; }
.reel-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; background: none; }
.reel-thumbs i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.reel-thumbs button:not(.on) i { display: none; }
.reel-slide .hrs { float: right; margin: 0 0 4px 12px; }
.reel:fullscreen .hrs { float: none; margin: 0 4px 0 8px; }
.reel:fullscreen { display: flex; flex-direction: column; max-width: none; padding: 0 0 16px; background: #000; --fg: var(--neutral-100); --fg2: var(--neutral-400); --line: var(--neutral-900); --line-hi: var(--neutral-700); }
.reel:fullscreen .reel-track { flex: 1; min-height: 0; }
.reel:fullscreen .reel-slide { display: flex; flex-direction: column; }
.reel:fullscreen .vwrap { flex: 1; min-height: 0; aspect-ratio: auto; }
.reel:fullscreen figcaption { max-width: none; margin: 10px 24px 0; text-align: center; }
.reel:fullscreen .reel-nav { width: min(100% - 48px, 1100px); margin: 12px auto 0; }
.reel-nav > .reel-full { margin-left: auto; }
.reel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; margin-top: 16px; }
.reel-grid button { display: flex; flex-direction: column; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: var(--fg); text-align: left; cursor: pointer; opacity: 0.6; transition: opacity 0.15s; }
.reel-grid button:hover { opacity: 0.85; }
.reel-grid button.on { opacity: 1; }
.reel-grid .pic { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--panel); }
.reel-grid button.on .pic { outline: 2px solid var(--orange); outline-offset: 1px; }
.reel-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel-grid i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.reel-grid button:not(.on) i { display: none; }
.reel-grid .name { font-size: calc(var(--fs) * 0.76); font-weight: 500; line-height: 1.3; }
.reel-grid small { margin-top: -4px; font-size: calc(var(--fs) * 0.68); color: var(--fg2); }
.reel:fullscreen .reel-grid { display: flex; gap: 8px; width: min(100% - 48px, 1100px); margin: 12px auto 0; overflow-x: auto; scrollbar-width: none; }
.reel:fullscreen .reel-grid small { display: none; }
.reel:fullscreen .reel-grid button { flex: 0 0 130px; }
@media (max-width: 640px) {
  .reel-full span { display: none; }
  .reel-thumbs button { flex-basis: 88px; }
}

/* calls to action: a card with a short pitch and pill links */
.prose .cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin: 1.8em 0; padding: 20px 24px; border: 1px solid var(--box-line); border-radius: 10px; background: var(--box); }
.prose .cta p { margin: 0; max-width: 30em; }
.prose .cta b { font-weight: 600; }
.prose .cta .get { margin: 0; }

/* closing quote beside a line portrait of Jules Verne */
.prose .coda { display: flex; align-items: center; gap: 18px; max-width: var(--measure); margin: 64px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.prose .coda img { flex: none; width: 64px; height: 64px; border-radius: 0; background: none; opacity: 0.92; }
.prose .coda blockquote { margin: 0; }
.prose .coda p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--fg); }
.prose .coda cite { display: block; margin-top: 4px; font-size: 13px; font-style: normal; color: var(--fg2); }
