/* Eido site. One stylesheet, no build step, no boxes.
   Content sits on the medium (the weft canvas drawn by loom.js) and is shaped
   by space and type, not by containers. One live hue (--eco-hue) is carried
   from page to page. Lengths are relative, there are no breakpoints, and
   nothing here is positioned out of flow: the medium is the only fixed layer,
   and loom.js owns it. */

@view-transition { navigation: auto; }

/* The tide palette. Colour is set in OKLCH so equal steps look equal, and
   everything turns with one number, --eco-hue (the crest). The trough sits
   190° round the circle and the node at −112°; ink and ground lean toward
   +58°. loom-core.js computes the same colours for every canvas. */
:root {
  --eco-hue: 196;
  --h-crest: var(--eco-hue);
  --h-trough: calc(var(--eco-hue) + 190);
  --h-node: calc(var(--eco-hue) - 112);
  --h-ink: calc(var(--eco-hue) + 58);
  --bg: oklch(0.165 0.026 var(--h-ink));
  --bg-2: oklch(0.2 0.028 var(--h-ink));
  --surface: oklch(0.22 0.03 var(--h-ink));
  --surface-2: oklch(0.26 0.032 var(--h-ink));
  --ink: oklch(0.965 0.012 var(--h-ink));
  --ink-2: oklch(0.86 0.02 var(--h-ink));
  --muted: oklch(0.68 0.028 var(--h-ink));
  --line: oklch(0.965 0.012 var(--h-ink) / 0.13);
  --line-2: oklch(0.965 0.012 var(--h-ink) / 0.26);
  --accent: oklch(0.84 0.125 var(--h-crest));
  --accent-strong: oklch(0.92 0.085 var(--h-crest));
  --accent-2: oklch(0.77 0.145 var(--h-trough));
  --accent-3: oklch(0.88 0.105 var(--h-node));
  --wash: oklch(0.84 0.125 var(--h-crest) / 0.14);
  --link: oklch(0.87 0.1 var(--h-crest));
  --code-bg: oklch(0.21 0.03 var(--h-ink) / 0.72);
  --code-line: oklch(0.965 0.012 var(--h-ink) / 0.12);
  --code-ink: oklch(0.88 0.045 var(--h-crest));
  --ok: oklch(0.86 0.11 calc(var(--eco-hue) - 48));
  --alert: oklch(0.8 0.13 var(--h-trough));
  --alert-soft: oklch(0.77 0.145 var(--h-trough) / 0.12);
  --alert-line: oklch(0.77 0.145 var(--h-trough) / 0.5);
  --gold-flat: oklch(0.86 0.11 var(--h-node));
  color-scheme: dark;

  --font-display: "Avenir Next", Avenir, Futura, "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Avenir Next", Avenir, "Trebuchet MS", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 1.25rem;
  --radius-sm: 0.75rem;
  --hair: 0.0625rem;
  --gutter: max(1rem, min(5vw, 3rem));
  --max: 74rem;
  --measure: 66ch;
  --breath: clamp(3.5rem, 2rem + 7vh, 7rem);
}

/* Light: ink on warm paper. The ground takes the node's hue. */
:root[data-theme="light"] {
  --bg: oklch(0.972 0.014 var(--h-node));
  --bg-2: oklch(0.945 0.016 var(--h-node));
  --surface: oklch(0.99 0.008 var(--h-node));
  --surface-2: oklch(0.955 0.014 var(--h-node));
  --ink: oklch(0.245 0.045 var(--h-ink));
  --ink-2: oklch(0.36 0.04 var(--h-ink));
  --muted: oklch(0.5 0.03 var(--h-ink));
  --line: oklch(0.245 0.045 var(--h-ink) / 0.13);
  --line-2: oklch(0.245 0.045 var(--h-ink) / 0.28);
  --accent: oklch(0.54 0.12 var(--h-crest));
  --accent-strong: oklch(0.42 0.1 var(--h-crest));
  --accent-2: oklch(0.58 0.145 var(--h-trough));
  --accent-3: oklch(0.52 0.1 var(--h-node));
  --wash: oklch(0.54 0.12 var(--h-crest) / 0.1);
  --link: oklch(0.47 0.11 var(--h-crest));
  --code-bg: oklch(0.94 0.016 var(--h-node) / 0.85);
  --code-line: oklch(0.245 0.045 var(--h-ink) / 0.12);
  --code-ink: oklch(0.36 0.07 var(--h-crest));
  --ok: oklch(0.48 0.1 calc(var(--eco-hue) - 48));
  --alert: oklch(0.5 0.14 var(--h-trough));
  --alert-soft: oklch(0.58 0.145 var(--h-trough) / 0.08);
  --alert-line: oklch(0.58 0.145 var(--h-trough) / 0.45);
  --gold-flat: oklch(0.52 0.1 var(--h-node));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 2rem; }
html.reduced-motion { scroll-behavior: auto; }
body {
  margin: 0;
  color: var(--ink-2);
  background:
    radial-gradient(70% 50% at 8% -8%, oklch(0.7 0.12 var(--h-crest) / 0.11), transparent 72%),
    radial-gradient(60% 50% at 100% 108%, oklch(0.7 0.13 var(--h-trough) / 0.07), transparent 72%),
    var(--bg);
  background-attachment: fixed;
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-block-size: 100vh;
}
img, svg, canvas, video { display: block; max-inline-size: 100%; }
a { color: var(--link); text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 0.22em; text-decoration-thickness: var(--hair); }
a:hover { color: var(--ink); text-decoration-style: wavy; text-decoration-color: var(--accent); }
strong, b { color: var(--ink); font-weight: 650; }
:focus-visible { outline: 0.125rem solid var(--accent); outline-offset: 0.2rem; border-radius: 0.25rem; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.88em; }
:not(pre) > code { color: var(--code-ink); background: var(--code-bg); padding: 0.06em 0.34em; border-radius: 0.3rem; overflow-wrap: anywhere; }
a code { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(2.6rem, 1.5rem + 5.4vw, 5.6rem); letter-spacing: -0.03em; line-height: 0.98; color: var(--accent-strong); }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.9vw, 2.45rem); }
h3 { font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem); }
h4 { font-size: 1.04rem; }
p { margin: 0; }
ul, ol { margin: 0; padding-inline-start: 1.3em; }
li + li { margin-block-start: 0.35em; }
hr { border: 0; block-size: var(--hair); background: var(--line); margin: 0; }
.visually-hidden { clip-path: inset(50%); block-size: var(--hair); inline-size: var(--hair); overflow: hidden; white-space: nowrap; }
.skip { clip-path: inset(50%); block-size: var(--hair); overflow: hidden; display: block; }
.skip:focus { clip-path: none; block-size: auto; padding: 0.5rem 0.75rem; background: var(--ink); color: var(--bg); }

/* ---------- The thread: one line of navigation ---------- */
.weft-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.15rem;
  inline-size: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  padding-block: clamp(0.9rem, 2.4vh, 1.5rem) 0;
  font: 500 0.88rem/1.4 var(--font-body); letter-spacing: 0.02em;
}
.weft-nav a { color: var(--muted); text-decoration: none; padding-block: 0.35rem; }
.weft-nav a:hover { color: var(--ink); text-decoration: underline wavy var(--accent) var(--hair); text-underline-offset: 0.4em; }
.weft-nav a[aria-current] { color: var(--ink); text-decoration: underline var(--accent) 0.1rem; text-underline-offset: 0.5em; }
.weft-nav .mark { margin-inline-end: auto; display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); font: 700 1.08rem var(--font-display); letter-spacing: 0; }
.weft-nav .mark svg { inline-size: 1.45rem; block-size: 1.45rem; color: var(--accent); }
.weft-nav .theme { font: 500 0.82rem var(--font-mono); color: var(--muted); background: none; border: 0; padding: 0.35rem 0; cursor: pointer; }
.weft-nav .theme::before { content: "◐ "; color: var(--accent); }
.weft-nav .theme:hover { color: var(--ink); }

/* ---------- Flow ---------- */
main#main {
  flex: 1;
  inline-size: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 2rem + 7vh, 6.5rem) var(--breath);
  display: flex; flex-direction: column; gap: 1.15rem;
  overflow-wrap: break-word;
}
main#main > section, main#main > article { display: flex; flex-direction: column; gap: 1.1rem; }
main#main > :is(section, article, .movement) + :is(section, article, .movement) { margin-block-start: var(--breath); }
main p, main li { max-inline-size: var(--measure); }
.lede { font-size: clamp(1.12rem, 1rem + 0.6vw, 1.42rem); line-height: 1.5; color: var(--ink-2); max-inline-size: 44ch; }
.quiet { color: var(--muted); font-size: 0.94rem; }
.eyebrow { font: 600 0.74rem var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.math, .eq { font-family: var(--font-mono); font-size: 0.92em; color: var(--code-ink); }
.math i, .eq i { font-family: var(--font-body); font-style: italic; font-size: 1.06em; }
.eq { display: block; overflow-x: auto; padding-block: 0.2rem; white-space: nowrap; }
.crumbs { font-size: 0.86rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

.opening { display: flex; flex-direction: column; gap: 0.9rem; margin-block-end: clamp(1rem, 4vh, 2.5rem); }
.opening .lede { margin-block-start: 0.4rem; }

/* A movement: a figure and the few words that belong to it. */
.movement { display: flex; flex-direction: column; gap: 1rem; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.stage { inline-size: 100%; block-size: clamp(16rem, 46vh, 30rem); touch-action: pan-y; }
.stage.tall { block-size: clamp(20rem, 64vh, 40rem); }
.stage.short { block-size: clamp(9rem, 22vh, 14rem); }
.stage.square { block-size: auto; aspect-ratio: 1; max-block-size: 72vh; }
.stage[data-press] { cursor: crosshair; }
.numbers { max-inline-size: 100%; overflow-x: auto; font: clamp(0.72rem, 0.62rem + 0.45vw, 0.84rem)/1.7 var(--font-mono); color: var(--code-ink); white-space: pre; font-variant-numeric: tabular-nums; margin: 0; padding-block-end: 0.2rem; }
#eco-field-readout, #eco-state { white-space: pre-wrap; overflow-wrap: anywhere; }
.numbers b { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font: 0.8rem var(--font-mono); color: var(--muted); }

/* ---------- Controls: text first, edges only where a hand needs one ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; align-items: center; }
.btn, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-block-size: 2.5rem; padding-inline: 1rem;
  font: 600 0.9rem var(--font-body); color: var(--ink-2); text-decoration: none; cursor: pointer;
  background: transparent; border: 0; border-radius: 99rem;
  box-shadow: inset 0 0 0 var(--hair) var(--line-2);
  transition: box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.btn:hover, .chip:hover { color: var(--ink); box-shadow: inset 0 0 0 var(--hair) var(--accent); }
.btn[aria-pressed="true"], .chip[aria-pressed="true"], .btn-primary { color: var(--ink); background: var(--wash); box-shadow: inset 0 0 0 var(--hair) var(--accent); }
.btn.small, .chip { min-block-size: 2.1rem; padding-inline: 0.8rem; font-size: 0.84rem; }
.chip { font-family: var(--font-mono); font-weight: 500; }
html.reduced-motion :is(.btn, .chip) { transition: none; }
.field { display: grid; grid-template-columns: minmax(7rem, auto) minmax(0, 1fr) auto; gap: 0.8rem; align-items: center; font-size: 0.88rem; color: var(--muted); max-inline-size: 40rem; }
.field.text { grid-template-columns: minmax(0, 1fr); }
input[type="range"] { inline-size: 100%; min-block-size: 1.75rem; accent-color: var(--accent); background: transparent; }
.field output, output.val { font: 600 0.86rem var(--font-mono); color: var(--ink); min-inline-size: 5ch; text-align: end; font-variant-numeric: tabular-nums; }
input[type="text"], textarea { inline-size: 100%; min-block-size: 2.6rem; padding: 0.5rem 0.75rem; font: 0.95rem var(--font-mono); color: var(--code-ink); background: var(--code-bg); border: 0; border-block-end: var(--hair) solid var(--line-2); border-radius: 0; }
.readout { font: 0.8rem/1.6 var(--font-mono); color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }
meter { block-size: 0.75rem; accent-color: var(--accent); }

/* ---------- Code: the one place a surface earns its keep ---------- */
.codeblock { margin: 0; min-inline-size: 0; background: var(--code-bg); border-radius: var(--radius-sm); overflow: hidden; }
.codeblock figcaption { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.5rem 0.35rem 0.9rem; font: 0.78rem var(--font-mono); color: var(--muted); box-shadow: inset 0 calc(-1 * var(--hair)) var(--code-line); }
.codeblock figcaption span { overflow-wrap: anywhere; }
.codeblock pre { margin: 0; padding: 0.85rem 0.9rem; overflow: auto; max-inline-size: 100%; color: var(--code-ink); line-height: 1.5; tab-size: 2; }
.codeblock pre:focus-visible { outline-offset: -0.125rem; }
.codeblock.tall pre { max-block-size: 26rem; }
.copy { flex: none; min-block-size: 1.9rem; padding-inline: 0.7rem; border: 0; border-radius: 99rem; background: transparent; box-shadow: inset 0 0 0 var(--hair) var(--line-2); color: var(--ink-2); font: 600 0.76rem var(--font-body); cursor: pointer; }
.copy:hover { color: var(--ink); box-shadow: inset 0 0 0 var(--hair) var(--accent); }
.copy[data-state="copied"] { color: var(--ok); box-shadow: inset 0 0 0 var(--hair) var(--ok); }
.filelist { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.filelist li { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 0; }
.filelist a { font: 0.9rem var(--font-mono); overflow-wrap: anywhere; }

/* ---------- Tables: hairlines, no cells drawn ---------- */
table { border-collapse: collapse; inline-size: 100%; font-size: 0.92rem; }
table.api, .article table, table.wide { display: block; overflow-x: auto; }
th, td { text-align: start; vertical-align: top; padding: 0.55rem 0.9rem 0.55rem 0; box-shadow: inset 0 calc(-1 * var(--hair)) var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
table.api td:first-child { white-space: nowrap; }
.badge { font: 600 0.72rem var(--font-mono); padding: 0.12rem 0.5rem; border-radius: 99rem; color: var(--code-ink); box-shadow: inset 0 0 0 var(--hair) var(--line-2); white-space: nowrap; }
.badge.here { color: var(--ok); }
.badge.weft, .badge.design { color: var(--alert); box-shadow: inset 0 0 0 var(--hair) var(--alert-line); }
.note { color: var(--ink-2); font-size: 0.92rem; padding-inline-start: 0.9rem; box-shadow: inset 0.15rem 0 0 var(--alert-line); }

/* ---------- Index lines: a list of places, each with a live glyph ---------- */
.lines { list-style: none; padding: 0; display: grid; gap: 0; }
.lines li { margin: 0; max-inline-size: none; }
.lines a {
  display: grid; grid-template-columns: clamp(4.5rem, 12vw, 8rem) minmax(0, 1fr); gap: 0.2rem clamp(1rem, 3vw, 2.2rem); align-items: center;
  padding-block: 1rem; color: var(--ink-2); text-decoration: none; box-shadow: inset 0 calc(-1 * var(--hair)) var(--line);
}
.lines a:hover { color: var(--ink); box-shadow: inset 0 calc(-1 * var(--hair)) var(--accent); }
.lines canvas { grid-row: span 2; inline-size: 100%; block-size: clamp(3rem, 8vw, 4.6rem); }
.lines strong { font: 600 clamp(1.08rem, 1rem + 0.4vw, 1.3rem) var(--font-display); color: var(--ink); }
.lines a:hover strong { color: var(--accent-strong); }
.lines small { color: var(--muted); font-size: 0.9rem; }
.lines code { font-size: 0.78rem; }

/* ---------- Article (philosophy, paper) ---------- */
.article { display: flex; flex-direction: column; gap: 1.05rem; font-size: 1.08rem; line-height: 1.75; max-inline-size: 46rem; }
.article h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); line-height: 1.05; }
.article h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.05rem); margin-block-start: 2.2rem; }
.article h3 { font-size: 1.25rem; margin-block-start: 1.4rem; }
.article section { display: flex; flex-direction: column; gap: 1.05rem; }
.article p, .article li { color: var(--ink-2); }
.article li { margin-block-end: 0.4em; }
.article :is(p.src, em.src) { font-size: 0.95rem; color: var(--muted); }
.principle-glyph { inline-size: 7rem; block-size: 3.6rem; margin-block: -0.4rem -0.2rem; }
.toc { font-size: 0.92rem; padding-inline-start: 1rem; box-shadow: inset var(--hair) 0 0 var(--line-2); }
.toc ol { margin-block-start: 0.4rem; }

/* ---------- Demos shared with the component pages ---------- */
.demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.mixer { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.4rem; align-items: center; justify-items: center; }
.mixer > * { min-inline-size: 0; inline-size: 100%; }
.simplex-pad { inline-size: min(52vmin, 100%); block-size: auto; aspect-ratio: 1; touch-action: none; cursor: crosshair; margin-inline: auto; }
.simplex-guide { stroke: var(--line-2); stroke-width: 0.6; }
.simplex-edge { fill: var(--wash); stroke: var(--ink-2); stroke-width: 1.1; }
.simplex-vertex { fill: var(--accent); stroke: var(--bg); stroke-width: 1; }
.simplex-label { fill: var(--muted); font: 0.6875rem var(--font-mono); }
.simplex-spoke { stroke: var(--accent); stroke-width: 1.2; }
.simplex-knob { fill: var(--bg); stroke: var(--gold-flat); stroke-width: 3; }
.preview { inline-size: 100%; border: var(--hair) solid; border-radius: 0.6rem; padding: 1.1rem; transition: border-radius 0.2s ease, padding 0.2s ease, background 0.2s ease; }
html.reduced-motion .preview { transition: none; }
.preview h4 { margin-block-end: 0.4rem; }
.preview p { font-size: 0.92rem; margin-block-end: 0.6rem; }
.preview .chip { color: var(--bg); background: var(--accent); box-shadow: none; min-block-size: 1.8rem; }
.cells-svg { inline-size: 100%; block-size: auto; touch-action: none; }
.cells-svg rect.cell { stroke-width: 1.5; }
.cells-svg text { font: 0.625rem var(--font-mono); fill: var(--muted); }
.cells-svg line.thread { stroke-width: 1.4; opacity: 0.7; }
.cells-svg .hit rect.cell { stroke: var(--gold-flat); stroke-width: 3; }
.glyph-canvas { inline-size: 100%; block-size: auto; image-rendering: pixelated; }
.glyph-words { font: 0.82rem/1.6 var(--font-mono); color: var(--code-ink); overflow-wrap: anywhere; }
.scrollbox { block-size: min(58vh, 34rem); overflow: auto; position: relative; padding: 1rem 1rem 1rem 1.4rem; scrollbar-gutter: stable; box-shadow: inset var(--hair) 0 0 var(--line-2); }
.scrollbox:focus-visible { outline-offset: -0.125rem; }
.scrollbox-wrap { position: relative; }
.demo-panel-host { margin-block-start: 0.6rem; position: relative; }

/* Research explainer (components/research-explainer.html) */
.research-demo { display: grid; gap: 0.9rem; }
.research-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.segmented { display: inline-flex; gap: 0.15rem; padding: 0.2rem; border-radius: 99rem; box-shadow: inset 0 0 0 var(--hair) var(--line-2); }
.segmented button { border: 0; border-radius: 99rem; padding: 0.45rem 0.8rem; color: var(--muted); background: transparent; font: 600 0.82rem var(--font-body); cursor: pointer; }
.segmented button.is-active { background: var(--wash); color: var(--ink); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: 0.4rem 1.6rem; }
.kpi { min-inline-size: 0; padding-block: 0.4rem; box-shadow: inset 0 calc(-1 * var(--hair)) var(--line); }
.kpi-label { display: block; color: var(--muted); font-size: 0.78rem; }
.kpi-value { display: block; color: var(--ink); font: 600 0.96rem/1.35 var(--font-mono); font-variant-numeric: tabular-nums; }
.stage-canvas { inline-size: 100%; block-size: clamp(15rem, 40vh, 22rem); }
.stage-caption { display: flex; justify-content: space-between; gap: 0.5rem; margin-block-start: 0.5rem; color: var(--muted); font-size: 0.78rem; flex-wrap: wrap; }
.range-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.3rem 0.8rem; align-items: center; color: var(--muted); font-size: 0.88rem; }
.range-row output { min-inline-size: 4ch; color: var(--ink); font: 600 0.85rem var(--font-mono); }
.provenance { padding-inline-start: 0.9rem; box-shadow: inset 0.15rem 0 0 var(--gold-flat); color: var(--ink-2); font-size: 0.9rem; }

/* Players (soundtrack): a press to start, a thread for where you are. */
.player { display: flex; flex-direction: column; gap: 0.8rem; min-inline-size: 0; }
.player .controls { flex-wrap: nowrap; }
.player [data-seek] { flex: 1; min-inline-size: 4rem; }
.player [data-time] { white-space: nowrap; }
.player:not(.is-live) :is([data-play], [data-seek], [data-time], canvas) { display: none; }
.player.is-live audio { display: none; }
.cover { inline-size: min(100%, 24rem); block-size: auto; border-radius: var(--radius-sm); }
.lyrics { padding-inline-start: 0; list-style: none; display: grid; gap: 0.15rem; }
.lyrics li { color: var(--muted); max-inline-size: 60ch; padding-inline-start: 0.9rem; transition: color 0.3s ease, box-shadow 0.3s ease; }
.lyrics li span { font: 0.74rem var(--font-mono); color: var(--muted); margin-inline-end: 0.6rem; }
.lyrics li[data-now] { color: var(--ink); box-shadow: inset 0.15rem 0 0 var(--accent); }
html.reduced-motion .lyrics li { transition: none; }

/* ---------- Coda: one line at the end of every page ---------- */
.coda {
  inline-size: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto;
  padding-block: 1.5rem 2.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; justify-content: space-between;
  font-size: 0.84rem; color: var(--muted); box-shadow: inset 0 var(--hair) var(--line);
}
.coda a { color: var(--ink-2); }

/* ---------- Unfolding (loom.js) ----------
   theme.js holds <main> back until the loom is ready. Each pending block is
   then masked to the disc of the wavefront that reaches it. */
html.loom-pending main#main { opacity: 0; }
html.loom-unfold [data-u] {
  -webkit-mask-image: radial-gradient(circle at var(--ux, 0) var(--uy, 0), #000 calc(var(--ur, 0rem) - var(--uw, 4rem)), transparent var(--ur, 0rem));
  mask-image: radial-gradient(circle at var(--ux, 0) var(--uy, 0), #000 calc(var(--ur, 0rem) - var(--uw, 4rem)), transparent var(--ur, 0rem));
}

/* Shared properties the module CSS (reading-weave.css, condense.css) reads.
   html:root[data-theme] outranks the modules' own light and dark defaults. */
html:root[data-theme] {
  --eido-ink: var(--ink-2);
  --eido-muted: var(--muted);
  --eido-paper: var(--surface);
  --eido-line: var(--line-2);
  --eido-accent: var(--accent);
  --eido-strike: var(--accent-2);
  --eido-font-ui: var(--font-body);
  --eido-radius: var(--radius);
}

/* Condensing state hooks (src/condense.js). */
.cx-editing { user-select: none; }
html.cx-wandering { pointer-events: auto; }
