/* minmaxrnc.org: poster palette (amber bands, cream sections), light and dark. */
/* Math: Latin Modern Math (LaTeX's font), served with the site so formulas look the same on every device */
@font-face { font-family: "Latin Modern Math Web"; src: url("fonts/latinmodern-math.woff2") format("woff2"); font-display: swap; }
:root {
  --band: #ffc13b;
  --page: #fff8e6;
  --card: #ffffff;
  --card-head: #ffe9b0;
  --line: #efdfb4;
  --ink: #1a1609;
  --muted: #5a4714;
  --chip-bg: #1a1609;
  --chip-ink: #fff6dc;
  --chip-hover: #4d3c0c;
  --yes: #2f7a2a;
  --no: #b3261e;
  --track: #f3e8c8;
  --code-bg: #fdf1cf;
  --rule: #dddddd;
  --row-hover: #fff8e6;
  --ours-bar: #ffc13b;
  --recess: rgba(60, 40, 0, 0.22); /* inner shadow of expanded table panels */
  --classic-op: #5b7fa6; /* chips of the usual operators + and × */
  --data-c: #c0567a; /* tags for datasets (OpenWebText) */
  --nn-c: #7a9a2e; /* tags for the feedforward networks */
  --ability-c: #5a63c8; /* results cards: the tested-ability badges (group-free tasks) */
  --ability-g: #a24a93; /* … and for group-based tasks (S₃, S₄) */
  --link-accent: #8f5c00; /* dark amber for small link arrows: readable on cream and white */
  --concept-props: #a65300; /* storyline concept colours: a warm amber-orange, 5.1:1 on cream; slate-blue 7.9:1 */
  --concept-linrec: #2c4f78;
  --concept-ours: #66309a; /* (unused) violet */
  --prop-c: #14a39a; /* the four properties: teal (underlines, bars) */
  --prop-t: #0d6b64; /* teal text, about 6:1 on cream */
  --minmax-t: #8f5c00; /* MinMax text: dark amber */
  --ours-mark: #f5ab00; /* bright amber, a touch deeper than #ffc13b so it holds up on white */
}
@media (prefers-color-scheme: dark) {
  :root {
    --band: #221d0e;
    --page: #15120a;
    --card: #1f1b10;
    --card-head: #2b2513;
    --line: #3a3218;
    --ink: #fff6dc;
    --muted: #d9c48c;
    --chip-bg: #ffc13b;
    --chip-ink: #1a1609;
    --chip-hover: #ffd877;
    --yes: #7fcf73;
    --no: #ff8a80;
    --track: #2e2814;
    --code-bg: #2b2513;
    --rule: #3d3d3d;
    --row-hover: #28220f;
    --ours-bar: #d9a031;
    --recess: rgba(0, 0, 0, 0.6);
    --classic-op: #8fb3dc;
    --data-c: #f08fb0;
    --nn-c: #b5d36a;
    --ability-c: #a3a9f2;
    --ability-g: #e39bd6;
    --link-accent: #ffc13b;
    --concept-props: #ffc13b;
    --concept-linrec: #b5d0ee;
    --concept-ours: #c9a7f0;
    --prop-c: #2dd4bf;
    --prop-t: #5eead4;
    --minmax-t: #ffc13b;
    --ours-mark: #ffc13b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- hero ---------- */
.hero {
  background: var(--band);
  padding: 4.5rem 1rem 4rem;
  text-align: center;
}
.hero-inner { max-width: 68rem; margin: 0 auto; }
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.tagline { margin: 1rem 0 0; font-size: clamp(1.15rem, 3vw, 1.6rem); }
.keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
/* the six keywords never fit one row: "Guaranteed Stability" always starts the second (an empty full-width item) */
.keywords { row-gap: 0; } /* rows spaced by the items' own padding, so the empty break adds no gap (Safari) */
.keywords > li { padding-block: 0.25rem; }
.keywords .kw-break { flex-basis: 100%; height: 0; padding: 0; }
.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 2rem;
}
.links a { /* secondary to the title and tagline: compact chips */
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s;
}
.links a:hover { background: var(--chip-hover); }

/* ---------- sections ---------- */
main section { padding: 4rem 1rem; }
/* section numbers, matching the storyline steps */
/* number hanging in the heading's left indent: wrapped lines align with the text, whatever the markup */
h2:has(> .sec-n) { position: relative; padding-left: 1.48em; text-wrap: balance; } /* balanced breaks when a heading wraps */
@media (min-width: 52rem) { /* wide screens: the number hangs in the left margin, so headings keep their full width and align with the text */
  h2:has(> .sec-n) { padding-left: 0; }
  h2 > .sec-n { left: -2.7em; } /* in the number's own (smaller) em: its width plus a gap */
}
.sec-n { position: absolute; left: 0; top: 0.2em; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--ours-bar); color: #1a1609; font-size: 0.55em; font-weight: 800; line-height: 1; letter-spacing: 0; }
/* "Explore MinMax RNCs": the page's storyline under the hero, numbered steps joined by a line */
.storyline { padding: 2.2rem 1rem 2.4rem; background: var(--page); border-bottom: 1px solid var(--line); }
.storyline .wrap.wide { max-width: 76rem; } /* the storyline may use more width than the reading column */
.storyline h2 { margin: 0 0 1.2rem; font-size: 1.3rem; font-weight: 800; color: var(--ink); } /* normal case: keeps the casing of "MinMax RNCs" */
.storyline ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 0.4rem; position: relative; } /* the middle step is as wide as its lines need */
.storyline ol::before { content: ""; position: absolute; top: 1.05rem; left: calc((100% - 21.5rem - 1.6rem) / 8); right: calc((100% - 21.5rem - 1.6rem) / 8); height: 2px; background: var(--ours-bar); } /* the line joining the steps */
.storyline a { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.3rem; color: inherit; text-decoration: none; padding: 0 0.2rem; }
.storyline .step-n { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--ours-bar); color: #1a1609; font-weight: 800; font-size: 0.95rem; box-shadow: 0 0 0 4px var(--page); transition: transform 0.15s; }
.storyline .step-t { font-weight: 800; color: var(--ink); line-height: 1.25; margin-top: 0.2rem; }
.storyline .step-d .ph { display: inline-block; } /* phrases kept together: lines break between phrases */
.storyline .step-d { font-size: 0.8rem; line-height: 1.35; color: var(--muted); }
.storyline a:hover .step-n { transform: scale(1.1); }
.storyline a:hover .step-t { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.storyline a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
/* vertical timeline: when the five steps do not fit side by side (main.js measures it and sets .is-vertical);
   without JS, below 73rem */
.storyline.is-vertical ol { grid-template-columns: 1fr; gap: 0.9rem; }
.storyline.is-vertical ol::before { top: 0.5rem; bottom: 0.5rem; left: 1.0rem; right: auto; width: 2px; height: auto; }
.storyline.is-vertical a { display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 0.85rem; align-items: start; text-align: left; }
.storyline.is-vertical .step-n { grid-row: 1 / span 2; }
.storyline.is-vertical .step-t { margin-top: 0.15rem; }
@media (max-width: 73rem) {
  html:not(.js) .storyline ol { grid-template-columns: 1fr; gap: 0.9rem; }
  html:not(.js) .storyline ol::before { top: 0.5rem; bottom: 0.5rem; left: 1.0rem; right: auto; width: 2px; height: auto; }
  html:not(.js) .storyline a { display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 0.85rem; align-items: start; text-align: left; }
  html:not(.js) .storyline .step-n { grid-row: 1 / span 2; }
  html:not(.js) .storyline .step-t { margin-top: 0.15rem; }
}
/* chevron under the steps: the page goes on below */
.storyline-more { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin: 1.4rem auto 0; border-radius: 50%; color: var(--ink); animation: nudge 2.2s ease-in-out infinite; }
.storyline-more:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.storyline-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@keyframes nudge { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(5px); } }
.storyline { padding-bottom: 1.2rem; }
@media (prefers-reduced-motion: reduce) { .storyline .step-n { transition: none; } .storyline-more { animation: none; } }
main section:nth-of-type(even) { background: var(--card-head); }
/* one column width for every section, set for reading: about 85 characters per line */
.wrap, .wrap.wide { max-width: 46rem; margin: 0 auto; }
h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 .ph { display: inline-block; } /* heading phrases: lines break between them, and inside one only if it alone is too long */
h3 { margin: 0 0 0.35rem; font-size: 1.1rem; line-height: 1.3; }
h3.subsection { margin: 2.25rem 0 0.75rem; font-size: 1.3rem; }
.lead + h3.subsection { margin-top: 1.75rem; }
.lead { margin: 0 0 2rem; font-size: 1.15rem; color: var(--muted); }
p { margin: 0 0 1rem; }
.note { font-size: 0.9rem; color: var(--muted); }
.todo {
  background: #ffe066;
  color: #1a1609;
  padding: 0 0.3em;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 600;
}

/* property cards */
main section { container-type: inline-size; } /* lets the cards' title react to the section width */
/* the cards keep to the reading column; two columns where each card gets at least 22rem
   (the efficiency subtitle then breaks before "&" when needed) */
.cards {
  display: grid;
  grid-template-columns: 1fr; /* one card per row */
  gap: 1rem;
}
/* centred over the cards, with a bracket below spanning the whole grid: ┌──┐ */
h3.cards-title { position: relative; text-align: center; margin-bottom: 1rem; padding-bottom: 1.05rem; }
h3.cards-title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.55rem; border: 2px solid color-mix(in srgb, var(--ours-bar) 75%, transparent); border-bottom: 0; border-radius: 8px 8px 0 0; }
@container (max-width: 44.99rem) { /* one column: a plain, left-aligned title, no bracket (two columns need 2 × 22rem + 1rem) */
  h3.cards-title { text-align: left; padding-bottom: 0; margin-bottom: 0.75rem; }
  h3.cards-title::after { content: none; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
}
.card p { margin: 0; }
.card h3 { margin-bottom: 0.1rem; }
.card-head { display: flex; align-items: flex-start; gap: 0.85rem; margin-bottom: 0.6rem; } /* icon level with the first line of the title */
.card-head .card-sub { margin-bottom: 0; }
.property-icon { flex: none; width: 2.75rem; height: 2.75rem; }
.card-head h3 { margin: 0; }
.compare thead .th-icon { display: block; width: 1.75rem; height: 1.75rem; margin: 0 auto 0.3rem; }
@media (max-width: 44rem) { /* rotated headers: icons pinned to a common top line */
  table.compare thead th:not(:first-child) { position: relative; padding-top: 2.6rem; } /* table.: outranks the rotated-header padding rule */
  .compare thead .th-icon { position: absolute; top: 0.55rem; left: 50%; transform: translateX(-50%); width: 1.5rem; height: 1.5rem; margin: 0; }
}
.card p.card-sub { margin: 0 0 0.6rem; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.card-sub b { font-weight: 700; }

/* comparison table */
.table-scroll { position: relative; overflow-x: auto; margin: 0 -1rem; padding: 0 1rem; } /* relative: keeps the .sr labels inside the scroll box */
table.compare {
  width: 100%;
  min-width: 34rem;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.95rem;
}
.compare th, .compare td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  vertical-align: middle;
}
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare thead th:first-child, .compare tbody tr:not(.detail) > :first-child { background: color-mix(in srgb, var(--card-head) 40%, var(--card)); } /* the row-name column: a soft amber tint */
.compare thead > tr { background: var(--card); } /* light header, so the property icons need no badge */
.compare thead th { padding-top: 0.7rem; padding-bottom: 0.5rem; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); border-bottom: 3px solid var(--ours-bar); vertical-align: bottom; } /* bottom: header labels share a line under the icons */
.compare thead th:first-child { font-size: 0.95rem; vertical-align: middle; } /* the row-name column: larger, centred */
.compare thead th:not(:first-child) { font-size: 0.74rem; letter-spacing: 0.05em; } /* property headers: compact, so each sits clear of its column edges */
/* Headers never break inside a word: the type shrinks with the viewport, down to
   0.7rem, so the longest (EXPRESSIVITY) fits its column; below that the table scrolls sideways. */
.compare thead th:not(:first-child) { padding-left: 0.3rem; padding-right: 0.3rem; overflow-wrap: normal; hyphens: none; }
@media (max-width: 62rem) {
  .compare thead th { font-size: clamp(0.7rem, calc(1.7vw - 2px), 0.8rem); letter-spacing: 0.04em; }
  .compare thead th:not(:first-child) { font-size: clamp(0.66rem, calc(1.55vw - 2px), 0.74rem); }
  .compare thead th:first-child { font-size: clamp(0.8rem, calc(1.9vw - 2px), 0.95rem); }
}
.compare tbody th { font-weight: 700; white-space: nowrap; } /* names and their examples never wrap; the column sizes below leave room */
.compare .eg { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }
/* comparison table: fixed columns */
/* Wide screens: names get 15rem. Narrower: the property columns get just what their
   headers need and the names take the rest, down to 8.75rem; below that the table scrolls. */
table.compare { table-layout: fixed; }
.compare col.c-arch { width: 15rem; } /* each line of a row name fits on one line */
@media (max-width: 62rem) {
  .compare col.c-arch { width: auto; }
  .compare col:not(.c-arch) { width: 6.6rem; }
  table.compare { min-width: calc(4 * 6.6rem + 8.75rem); }
}
@media (max-width: 48.5rem) { /* header type at its 0.7rem floor */
  .compare col:not(.c-arch) { width: 5.9rem; }
  table.compare { min-width: calc(4 * 5.9rem + 8.75rem); }
}
/* Phones: property headers turn sideways (read bottom to top), so their columns only
   need to fit a mark and the whole table fits common phone widths without scrolling. */
@media (max-width: 44rem) {
  table.compare { min-width: calc(4 * 2.4rem + 7.5rem); }
  /* names get about their one-line width; the mark columns share what is left */
  .compare col.c-arch { width: 17.5rem; }
  .compare col:not(.c-arch) { width: auto; }
}
@media (min-width: 44.01rem) { /* above phones: names get the 15rem they need on one line, the four property columns share the rest equally */
  .compare col.c-arch { width: 15rem; }
  .compare col:not(.c-arch) { width: auto; }
  table.compare { min-width: 0; }
}
@media (max-width: 30rem) { .compare col.c-arch { width: 15rem; } } /* smaller type below 30rem */
@media (max-width: 26.6rem) { /* too narrow for that: marks get just their width, names the rest */
  .compare col.c-arch { width: auto; }
  .compare col:not(.c-arch) { width: 2.4rem; }
}
@media (max-width: 24.3rem) { /* smallest phones: slimmer mark columns, and row names scaled so each line still fits */
  .compare col:not(.c-arch) { width: 2rem; }
  .compare tbody th { font-size: min(0.85rem, calc((100vw - 2rem - 8rem - 0.9rem) / 13.9)); }
  .compare tbody th .eg { font-size: 0.88em; }
}
@media (max-width: 44rem) {
  .compare thead th { vertical-align: bottom; }
  .compare thead th:first-child { font-size: 0.8rem; vertical-align: middle; }
  .compare thead th { font-size: 0.7rem; letter-spacing: 0.04em; } /* all headers alike */
  .compare thead th:not(:first-child) { padding: 0.6rem 0 0.5rem; }
  .compare thead th:not(:first-child) > span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
  .compare td { padding-left: 0; padding-right: 0; }
}
/* the lead, then an arrow, then the statement: bold, in full ink */
.verdict-lead .sep { margin: 0 0.4em 0 0.15em; color: var(--link-accent); font-weight: 800; }
.verdict-lead .punch { color: var(--ink); font-weight: 800; }
@media (min-width: 30.01rem) { .verdict-lead .punch-wrap { white-space: nowrap; } } /* the arrow and its statement move to the next line together */
/* on a line of its own (main.js sets .wrapped): a little extra space above it, and where the
   page margin has room, the arrow hangs in it, so "MinMax RNCs" lines up with the line above */
.verdict-lead.wrapped .punch-wrap { display: block; margin-top: 0.3em; }
@media (min-width: 49rem) { .verdict-lead.wrapped .sep { display: inline-block; width: 1.25em; margin: 0 0 0 -1.25em; } }
@media (min-width: 30.01rem) { .compare tbody tr:not(.detail) { height: 4.45rem; } } /* fallback; main.js equalises */
.compare tbody tr:last-child > *,
.compare tbody tr:nth-last-child(2):has(+ tr.detail[hidden]) > * { border-bottom: 0; }
/* expandable rows: main.js wraps each row name in a toggle button */
.compare tr.expandable { cursor: pointer; }
/* MinMax RNCs: an amber sparkle after the name */
.nowrap { white-space: nowrap; }
.ours-mark { width: 0.95em; height: 0.95em; margin-left: 0.3em; vertical-align: -0.08em; fill: var(--ours-mark); }
.compare .row-toggle {
  display: block; width: 100%; padding: 0; margin: 0;
  background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.compare .row-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.compare .why-cue {
  display: flex; width: fit-content; align-items: center; gap: 0.25rem; margin-top: 0.1rem;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px;
}
.compare tr.expandable:hover .why-cue, .compare tr.open .why-cue { color: var(--ink); text-decoration-color: currentColor; }
.compare .why-cue .chev { transition: transform 0.15s ease; }
.compare tr.open .why-cue .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .compare .why-cue .chev { transition: none; } }
@media (max-width: 30rem) { .compare .why-cue { font-size: 0.75rem; } }
.compare tr.detail > td { padding: 0.9rem 1rem 1rem; background: var(--row-hover); text-align: left; box-shadow: inset 0 7px 8px -7px var(--recess), inset 0 -7px 8px -7px var(--recess); } /* recessed: an expanded panel, under its row */
/* smooth opening (main.js): the padding moves into the animated box, so it can shrink to 0 */
.compare tr.detail > td.animated { padding: 0; }
.detail-clip { overflow: hidden; transition: height 0.3s ease, opacity 0.3s ease; }
.detail-clip.shut { opacity: 0; }
.detail-body { padding: 0.9rem 1rem 1rem; }
@media (prefers-reduced-motion: reduce) { .detail-clip { transition: none; } }
.why-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.5rem;
  font-size: 0.9rem; line-height: 1.45; color: var(--muted);
}
.why-list b { color: var(--ink); margin-right: 0.2rem; }
.why-list b::after { content: ":"; } /* separator between label and text */
.why-list .why-icon { width: 1.35em; height: 1.35em; margin-right: 0; vertical-align: -0.35em; } /* the property icon when satisfied, its broken variant when not */
/* the drawings reach different distances from the right edge of their 64-unit box
   (expressivity and efficiency leave 10 units, stability and sensitivity 4 to 6):
   pad the last two so every icon sits the same visual distance from its label */
.why-list .why-icon[src*="stability"] { margin-right: calc(1.35em * 4 / 64); }
.why-list .why-icon[src*="sensitivity"] { margin-right: calc(1.35em * 6 / 64); }
.why-list { max-width: calc(100vw - 4rem); } /* stay within view when the table scrolls */
@media (max-width: 30rem) { .why-list { grid-template-columns: 1fr; } }
.yes, .no { font-size: 1.15rem; font-weight: 700; }
.yes { color: var(--yes); }
.no { color: var(--no); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* references: styled like the News list on ronca.me (whole item is the link, arrow on hover);
   they sit as footnotes at the bottom of each Why panel */
.refs.why-refs { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 0.15rem 2rem; align-items: start; margin: 0.75rem 0 0; padding-top: 0.45rem; border-top: 1px solid var(--rule); font-size: 0.75rem; }
.refs.why-refs li { padding: 0.1rem 0; border-radius: 0; }
.refs.why-refs li:hover { background: none; }
@media (max-width: 34rem) { .refs.why-refs { grid-template-columns: 1fr; } } /* columns sized to their entries; one column on phones */
.refs { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; color: var(--muted); }
.refs li { position: relative; margin: 0; padding: 0.4rem 0.6rem; border-radius: 8px; transition: background 0.15s; }
.refs li b { color: var(--ink); }
.refs a { color: inherit; text-decoration: none; }
.refs a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* the whole item is clickable */
.refs .arrow { display: inline-block; width: 0.95em; height: 0.95em; margin-left: 0.35em; vertical-align: -0.1em; color: var(--link-accent); transition: transform 0.15s; }
.refs .arrow path { stroke-width: 1.9; }
.refs li:hover { background: color-mix(in srgb, var(--card) 70%, transparent); }
.refs li:hover a > span { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.refs li:hover .arrow { transform: translate(2px, -2px); }
.refs li:hover a[href^="#"] .arrow { transform: translateY(2px); } /* in-page link: the down arrow nudges down */
.refs a:focus-visible { outline: none; }
.refs li:has(a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .refs li, .refs .arrow { transition: none; } }

/* the idea */
.formula {
  margin: 1.5rem 0;
  padding: 1.1rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  font-size: clamp(1.2rem, 4.2vw, 1.65rem);
}
.formula [data-notation-panel], .formula math { overflow: visible; } /* no scrolling: the equations are sized to fit (see the phone rules below) */
.formula math[display="block"] + math[display="block"] { margin-top: 0.6rem; }
.formula math.narrow-only { display: none; }
@media (max-width: 30rem) {
  .formula { padding-inline: 0.6rem; } /* phones: more room for the equations, which never scroll */
  .formula math.wide-only { display: none; }
  .formula math.narrow-only { display: block; display: block math; }
}
/* "See more" at the end of a paragraph (main.js): a link-style button that shows the panel below */
.see-more { display: inline-flex; align-items: center; gap: 0.2em; margin-left: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; white-space: nowrap; }
.see-more[hidden] { display: none; }
.see-more:hover { text-decoration-color: currentColor; }
.see-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
/* both labels share one grid cell, so "See more" and "See less" take the same width and never reflow the line */
.see-more .sm-labels { display: inline-grid; justify-items: start; }
.see-more .sm-labels > span { grid-area: 1 / 1; }
.see-more .when-open, .see-more[aria-expanded="true"] .when-closed { visibility: hidden; }
.see-more[aria-expanded="true"] .when-open { visibility: visible; }
.see-more .chev { flex: none; width: 0.8em; height: 0.8em; transition: transform 0.2s ease; }
.see-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* the panel it opens: set off by a thin amber rule on its left */
.more-body { margin: 0 0 1.5rem 0.36rem; padding: 0.35rem 0 0.1rem 1.1rem; border-left: 2px solid color-mix(in srgb, var(--ours-bar) 70%, transparent); }
.more-body[hidden] { display: none; }
.more-body > :first-child { margin-top: 0; }
.more-body > :last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .see-more .chev { transition: none; } }
.formula-flow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0.3rem 1.5rem; margin: -0.75rem 0 1.5rem; } /* linear recurrence -> MinMax recurrence: titles above two cards */
.formula-flow .formula { margin: 0; padding: 0.6rem 0.75rem; display: flex; align-items: center; justify-content: center; font-size: clamp(1rem, 3.4vw, 1.3rem); } /* smaller than the neuron equations below */
.formula-flow .card-t { font-size: 0.8rem; font-weight: 600; color: var(--muted); line-height: 1.2; text-align: center; } /* card title, right above its card */
.formula-flow .ft1 { grid-area: 1 / 1; } .formula-flow .ft2 { grid-area: 1 / 3; }
.formula-flow .fc1 { grid-area: 2 / 1; } .formula-flow .fc2 { grid-area: 2 / 3; }
.formula-flow .to { grid-area: 2 / 2; align-self: center; font-size: 1.6rem; line-height: 1; color: var(--muted); }
@media (max-width: 44rem) { /* stacked: title, card, arrow, title, card */
  .formula-flow { grid-template-columns: 1fr; gap: 0.3rem; }
  .formula-flow .ft1 { grid-area: 1 / 1; } .formula-flow .fc1 { grid-area: 2 / 1; }
  .formula-flow .to { grid-area: 3 / 1; justify-self: center; transform: rotate(90deg); margin: 0.2rem 0; }
  .formula-flow .ft2 { grid-area: 4 / 1; } .formula-flow .fc2 { grid-area: 5 / 1; }
}
.formula-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(0.5rem, 2vw, 1rem); margin: 1.5rem 0; } /* two equation cards, always in one row */
.formula-pair .formula { margin: 0; min-width: 0; padding: 0.7rem 0.75rem; display: flex; align-items: center; justify-content: center; container-type: inline-size; }
.formula-pair .formula math { font-size: min(1.65rem, 10.6cqi); } /* as large as the card allows, up to the other equations' size */
.formula.formula-sm { font-size: clamp(1rem, 3.6vw, 1.35rem); }
.formula.formula-sm math[display="block"] + math[display="block"] { margin-top: 0.9rem; }
@media (max-width: 22rem) { .formula.formula-sm { font-size: 0.94rem; } }
.formula-note { max-width: 34rem; margin: 0.8rem auto 0; font-size: 0.85rem; line-height: 1.55; color: var(--muted); }
/* notation toggle: file-folder tabs on the card's top edge. The selected tab is joined to the
   card (same face, no border between them), as if pulled to the front; the other sits behind. */
.formula:has(.notation-tabs:not([hidden])) { position: relative; margin-top: 3.1rem; border-top-left-radius: 0; }
.formula .notation-tabs {
  position: absolute; bottom: calc(100% - 1px); left: -1px; margin: 0; z-index: 1;
  display: flex; align-items: flex-end; gap: 0.2rem; padding: 0;
  background: none; border: 0; border-radius: 0; font-size: 0.75rem; line-height: 1.3;
}
.formula .notation-tabs button {
  position: relative; margin: 0 0 1px; padding: 0.2rem 0.85rem 0.34rem; white-space: nowrap;
  font-weight: 600; color: var(--muted);
  background: color-mix(in srgb, var(--line) 45%, var(--page));
  border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.formula .notation-tabs button:hover { color: var(--ink); }
.formula .notation-tabs button[aria-pressed="true"] {
  margin-bottom: 0; padding-top: calc(0.34rem + 1px); padding-bottom: calc(0.34rem + 1px); /* even padding; grows upward only (labels stay put) and covers the card's border */
  color: var(--ink); background: var(--card); z-index: 1;
}
.notation-tabs math { font-size: 1.1em; }
.formula .notation-tabs .tabs-label { align-self: center; margin: 0 0 1px 0.5rem; font-size: 0.95em; font-weight: 500; font-style: italic; color: var(--muted); white-space: nowrap; } /* says what the tabs choose */
.formula .notation-tabs .tabs-label::before { content: "\2190\00a0"; font-style: normal; } /* ← pointing at the tabs */
@media (max-width: 30rem) { .neurons-general .formula math[display="block"] { font-size: 0.76em; } }
math { font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", "Latin Modern Math", math; }
p math, h2 math { font-size: 1.08em; } /* maths fonts run small next to the sans-serif text */
h2 math { font-weight: 400; }
/* operator chips: + × ⊕ ⊗ max min, shown as objects worth attention, in text and in equations.
   Each is an <mpadded class="op" height="0.88em" depth="0.32em">: a fixed box on the baseline, so every chip has the
   same height and alignment whatever its glyph. */
mpadded.op { padding: 0.07em 0.34em; margin-inline: 0.1em; border-radius: 0.38em; background: color-mix(in srgb, var(--ours-bar) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ours-bar) 75%, transparent); color: var(--ink); }
mpadded.op.classic { background: color-mix(in srgb, var(--classic-op) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--classic-op) 55%, transparent); } /* the usual + and ×: cool slate, vs amber for MinMax's max and min */
.formula mpadded.op, .stepper mpadded.op { margin-inline: 0.06em; } /* inside equations: a little tighter */
h2 mpadded.op { padding-inline: 0.24em; margin-inline: 0.06em; } /* compact in headings, so they stay on one line */
h2 math:has(mpadded.op) { font-size: 0.88em; vertical-align: 0.02em; }
h2 .sec-sub { display: block; margin: 0.4rem 0 0.5rem; font-size: max(0.66em, 1.3rem); font-weight: 600; line-height: 1.35; color: var(--muted); } /* a heading's second line, in the storyline's words */
/* title and subheader share a line when there is room (main.js marks that with .sub-inline), split by a thin amber rule */
h2 .sec-t:has(> .sec-sub) { display: flex; flex-wrap: wrap; align-items: baseline; }
h2.sub-inline .sec-sub { margin: 0; }
h2.sub-inline .sec-sub::before { content: ""; display: inline-block; width: 2px; height: 1.05em; margin: 0 0.6em 0 0.65em; vertical-align: -0.15em; border-radius: 1px; background: var(--ours-bar); }

.stepper {
  margin: 1.5rem 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem;
}
.stepper h4 { margin: 0 0 0.25rem; font-size: 1.1rem; line-height: 1.3; }
.stepper table { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-variant-numeric: tabular-nums; }
.stepper th, .stepper td { padding: 0.45rem 0.4rem; border-bottom: 1px solid var(--line); text-align: center; }
.stepper thead th { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stepper td.calc { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; text-align: left; }
.stepper td.state { font-weight: 800; font-size: 1.1rem; }
.stepper input {
  width: 3.2em;
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.stepper input[readonly] { border-color: transparent; background: transparent; }
.stepper tr.pending td.calc, .stepper tr.pending td.state { opacity: 0.25; }
.stepper tr.current { background: var(--card-head); }
/* scalar "Try it": three views (timeline, gauge, memory) */
[hidden] { display: none !important; } /* hidden always wins over layout rules */
.tl-start { cursor: ns-resize; outline: none; }
.tl-start .hit { fill: transparent; }
.tl-start:hover .tl-dot, .tl-start.dragging .tl-dot { stroke-width: 4; }
.tl-start:focus-visible .hit { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tl-start.current .tl-dot { fill: var(--ink); }
.tryit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.tryit-head h4 { margin: 0; }
.stepper .tryit-tabs { margin: 0; padding: 0.15rem; gap: 0.15rem; font-size: 0.8rem; line-height: 1.3; }
.stepper .tryit-tabs button { padding: 0.1rem 0.75rem; }
.tryit-hint { margin: 0.5rem 0 0.25rem; }
.tryit-view svg { display: block; width: 100%; height: auto; margin-top: 0.5rem; touch-action: none; }
.tryit-say { min-height: 3em; margin: 0.4rem 0 0.8rem; font-size: 0.95rem; }
.tryit-view .grid { stroke: var(--line); stroke-width: 1; }
.tryit-view .axis { fill: var(--muted); font-size: 12px; }
@media (max-width: 30rem) { .tryit-view .axis { font-size: 15px; } .memory .cell text { font-size: 15px; } }
/* timeline */
.tl-path { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tl-path.draw { stroke-dasharray: 1; animation: tl-draw 1s ease-in-out both; }
@keyframes tl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.tl-dot { fill: var(--card); stroke: var(--ink); stroke-width: 2.5; }
.tl-dot.current { fill: var(--ink); }
.tl-dot.pop { animation: tl-pop 0.25s 0.95s ease-out both; }
@keyframes tl-pop { from { r: 0; } to { r: 6; } }
.tl-marker { cursor: ns-resize; outline: none; }
.tl-marker .hit { fill: transparent; }
.tl-marker .bar { stroke-width: 3; stroke-linecap: round; }
.tl-marker.cap .bar, .tl-marker.cap .tri { stroke: var(--no); fill: var(--no); }
.tl-marker.floor .bar, .tl-marker.floor .tri { stroke: var(--yes); fill: var(--yes); }
.tl-marker.future { opacity: 0.4; }
.tl-marker:hover .bar, .tl-marker.dragging .bar { stroke-width: 5; }
.tl-marker .sym { font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", "Latin Modern Math", math; font-style: normal; font-size: 17px; }
.tl-marker.cap .sym { fill: var(--no); }
.tl-marker.floor .sym { fill: var(--yes); }
@media (max-width: 30rem) { .tl-marker .sym { font-size: 19px; } }
.tl-marker:focus-visible .hit { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; rx: 6; }
/* gauge */
.tryit-view.gauge svg { max-width: 24rem; margin-left: auto; margin-right: auto; }
.gauge .tube-bg { fill: var(--page); }
.gauge .tube { fill: none; stroke: var(--line); stroke-width: 2; }
.gauge .level { fill: var(--ours-bar); transition: transform 0.7s ease-in-out; }
.gauge .level-val { font-size: 18px; font-weight: 800; fill: var(--ink); transition: transform 0.7s ease-in-out; }
.gauge .tick { stroke: var(--muted); }
.gauge .g-marker { transition: transform 0.7s ease-in-out; }
.gauge .g-marker text { font-size: 14px; font-weight: 700; }
.gauge .g-marker.cap .bar, .gauge .g-marker.cap .tri { fill: var(--no); }
.gauge .g-marker.cap text { fill: var(--no); }
.gauge .g-marker.floor .bar, .gauge .g-marker.floor .tri { fill: var(--yes); }
.gauge .g-marker.floor text { fill: var(--yes); }
.gauge.idle .g-marker { opacity: 0.35; }
.gauge .ghost line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.gauge .ghost text { fill: var(--muted); font-size: 12px; }
.gauge.instant .level, .gauge.instant .level-val, .gauge.instant .g-marker { transition: none; }
.gauge-hist { text-align: center; margin: 0.4rem 0 0; font-size: 0.95rem; color: var(--muted); }
.gauge-hist b { color: var(--muted); font-weight: 600; }
.gauge-hist b.cur { color: var(--ink); font-weight: 800; }
/* memory */
.memory .cell { cursor: pointer; outline: none; }
.memory .cell rect { fill: var(--page); stroke: var(--line); }
.memory .cell text { font-size: 13px; font-weight: 700; fill: var(--muted); pointer-events: none; }
.memory .cell.w rect { fill: var(--yes); stroke: var(--yes); }
.memory .cell.w text { fill: var(--card); }
.memory .cell.r rect { fill: var(--no); stroke: var(--no); }
.memory .cell.r text { fill: var(--card); }
.memory .cell:hover rect, .memory .cell:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.memory .trace { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.memory .trace.minmax { stroke: var(--ink); }
.memory .trace.linear { stroke: var(--muted); stroke-dasharray: 6 4; }
.mem-legend { margin: 0.3rem 0 0; font-size: 0.85rem; color: var(--muted); }
.mem-legend .key { display: inline-block; width: 1.6rem; height: 0; vertical-align: middle; border-top: 2.5px solid var(--ink); }
.mem-legend .key.linear { border-top: 2.5px dashed var(--muted); }
@media (prefers-reduced-motion: reduce) { .gauge .level, .gauge .level-val, .gauge .g-marker { transition: none; } }

/* two-entry "Try it": timeline and wiring */
.tl2 svg, .wiring svg { display: block; width: 100%; height: auto; margin-top: 0.5rem; }
.wiring svg { max-width: 26rem; margin-left: auto; margin-right: auto; }
.tl2 .grid, .wiring .grid { stroke: var(--line); }
.tl2 .axis, .wiring .axis { fill: var(--muted); font-size: 12px; }
.tl2-line { fill: none; stroke-width: 3; stroke-linejoin: round; }
.tl2-line.e1 { stroke: var(--ink); }
.tl2-line.e2 { stroke: #EF8633; stroke-dasharray: 7 5; }
.tl2-dot { stroke-width: 2.5; fill: var(--card); }
.tl2-dot.e1 { stroke: var(--ink); }
.tl2-dot.e2 { stroke: #EF8633; }
.tl2-dot.current.e1 { fill: var(--ink); }
.tl2-dot.current.e2 { fill: #EF8633; }
.tl2 .cell { cursor: pointer; outline: none; }
.tl2 .cell rect { fill: var(--page); stroke: var(--line); }
.tl2 .cell text { font-size: 15px; font-weight: 700; fill: var(--muted); pointer-events: none; }
.tl2 .cell.swap rect { fill: var(--ours-bar); stroke: var(--ours-bar); }
.tl2 .cell.swap text { fill: #1a1609; }
.tl2 .cell.future { opacity: 0.55; }
.tl2 .cell:hover rect, .tl2 .cell:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.wiring .wire path { fill: none; stroke: var(--muted); stroke-width: calc(var(--w, 2) * 1px); stroke-linecap: round; transition: opacity 0.3s; }
.wiring .wire.win path { stroke: var(--yes); }
.wiring .wire text { font-size: 13px; font-weight: 700; fill: var(--muted); }
.wiring .wire-title { font-size: 14px; font-weight: 700; fill: var(--ink); }
.wiring .node circle { fill: var(--card); stroke-width: 3; }
.wiring .node.e1 circle { stroke: var(--ink); }
.wiring .node.e2 circle { stroke: #EF8633; }
.wiring .node text { font-size: 18px; font-weight: 800; fill: var(--ink); }
.tl2 .mem-legend .key.e1 { border-top: 3px solid var(--ink); }
.tl2 .mem-legend .key.e2 { border-top: 3px dashed #EF8633; }
@media (max-width: 30rem) { .tl2 .axis { font-size: 14px; } }

/* two-entry stepper: updates and states are small matrices */
.stepper-2d td.calc { font-family: inherit; font-size: 1.3rem; text-align: center; }
.stepper-2d td.state { font-weight: 400; font-size: 1.3rem; }
#idea mtable { math-style: normal; font-size: 1em; } /* inline matrices: full-size entries */
.stepper-2d mtd, #idea p mtd { padding: 0.05em 0.25em; }
.stepper-2d p.note { margin-bottom: 0.4rem; }

.controls { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.9rem; }
button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
button.primary { background: var(--chip-bg); color: var(--chip-ink); border-color: var(--chip-bg); }
button:disabled { opacity: 0.4; cursor: default; }

/* results */
.headline {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 3.2vw, 1.6rem); /* a step below the section heading (h2: up to 2.2rem) */
  font-weight: 800;
  line-height: 1.2;
}
.headline em { font-style: normal; color: var(--yes); }
.tabs { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); margin: 1rem 0 1.25rem; }
.tabs button { border: 0; padding: 0.4rem 1rem; }
.tabs button[aria-pressed="true"] { background: var(--chip-bg); color: var(--chip-ink); }
.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}
.panel h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.bar-row {
  display: grid;
  grid-template-columns: 6.6rem 1fr 3.4rem;
  align-items: center;
  gap: 0.5rem;
  margin: 0.3rem 0;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.bar-row .name { color: var(--ink); white-space: nowrap; }
.bar-row.ours .name, .bar-row.ours .val { font-weight: 700; }
.bar-row .val { text-align: right; color: var(--muted); white-space: nowrap; }
.track { position: relative; height: 14px; background: var(--track); border-radius: 0 4px 4px 0; }
.fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; min-width: 2px; }
.fill.est {
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.55) 0 3px, transparent 3px 7px);
}
.refline { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px dashed var(--ink); opacity: 0.55; }
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1.25rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat .num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.stat .num-block { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.stat .num-block .num { margin-top: -0.035em; } /* digits sit low in their line box: equal visible gaps to the captions */ /* small captions above and below the number, centred on it */
.stat .num-cap { font-size: 0.8rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.stat p { margin: 0; }

/* cite */
/* Cite: one card listing the entries; each opens to its BibTeX and has its own copy button */
.cite-list { margin-top: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.cite-item { position: relative; border-top: 1px solid var(--rule); }
.cite-item:first-child { border-top: 0; }
.cite-item summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; padding: 0.85rem 14rem 0.85rem 1.1rem; cursor: pointer; list-style: none; }
.cite-item summary::-webkit-details-marker { display: none; } /* no native marker: Safari (old) */
.cite-item summary::marker { content: ""; font-size: 0; } /* Safari 18+, Firefox */
.cite-item .chev { align-self: center; flex: none; color: var(--muted); transition: transform 0.2s ease; }
.cite-item details[open] .chev { transform: rotate(90deg); color: var(--ink); }
.cite-t { font-weight: 700; color: var(--ink); }
.cite-s { font-size: 0.88rem; color: var(--muted); }
.cite-item summary:hover .cite-t { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.cite-item summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 8px; }
.cite-body { transition: height 0.3s ease, opacity 0.3s ease; }
.cite-body pre.bib { margin: 0 1.1rem 1rem; }
.cite-actions { position: absolute; top: 0.6rem; right: 1rem; display: flex; align-items: center; gap: 0.9rem; }
.cite-item .copy-bib { font-size: 0.85rem; padding: 0.3rem 0.85rem; }
.cite-link { font-size: 0.88rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.cite-link .arrow { display: inline-block; width: 0.9em; height: 0.9em; margin-left: 0.25em; vertical-align: -0.08em; color: var(--link-accent); transition: transform 0.15s; }
.cite-link .arrow path { stroke-width: 1.9; }
.cite-link:hover { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.cite-link:hover .arrow { transform: translate(2px, -2px); }
@media (max-width: 30rem) { /* phones: the copy button goes under the title */
  .cite-item { display: flex; flex-direction: column; }
  .cite-item summary { padding-right: 1.1rem; padding-bottom: 0.4rem; }
  .cite-actions { position: static; order: 1; margin: 0 0 0.8rem 2.6rem; }
}
@media (prefers-reduced-motion: reduce) { .cite-item .chev, .cite-body { transition: none; } }
pre.bib {
  margin: 1rem 0 0.75rem;
  padding: 1rem 1.1rem;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------- footer ---------- */
.byline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem 0.6em;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
footer.byline { padding: 2rem 1rem; background: var(--band); }
.hero-byline { margin: 2.2rem 0 0; }
.byline .item { display: inline-flex; align-items: baseline; gap: 0.6em; }
.byline .sep { margin: 0 0.2em; }
.byline .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; }
.byline .name { color: var(--ink); font-weight: 700; }
.byline a.name { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 0.2em; }
.byline a.name:hover { text-decoration-color: currentColor; }
.byline a { white-space: nowrap; }
@media (max-width: 28rem) {
  .byline { display: grid; grid-template-columns: auto auto; justify-content: center; text-align: left; }
  .byline .item { display: contents; }
  .byline .label { text-align: right; }
  .byline .sep { display: none; }
}
@media (max-width: 30rem) {
  .bar-row { grid-template-columns: 5.6rem 1fr 3.2rem; }

  /* stepper: each step's update moves onto its own line under the inputs */
  .stepper table, .stepper thead, .stepper tbody { display: block; }
  .stepper tr {
    display: grid;
    grid-template-columns: 2.2rem 1fr 1fr 3rem;
    align-items: center;
    border-bottom: 1px solid var(--line);
  }
  .stepper th, .stepper td { border-bottom: 0; }
  .stepper thead th:nth-child(4) { display: none; }
  .stepper td.calc { grid-column: 1 / -1; grid-row: 2; padding-top: 0; text-align: center; }
  .stepper-2d tr { grid-template-columns: 2.2rem 1fr 4rem; }
  .stepper-2d thead th:nth-child(4) { display: block; }
  .stepper-2d thead th:nth-child(3) { display: none; }
  .stepper-2d td.calc { font-size: 1.05rem; }
  .stepper-2d td.state { font-size: 1.1rem; }

  /* comparison table: compact enough to fit at phone widths */
  table.compare { font-size: 0.85rem; }
  .compare th, .compare td { padding: 0.55rem 0.3rem; }
  .compare th:first-child, .compare td:first-child { padding-left: 0.6rem; }
  .compare .eg { font-size: 0.75rem; }
}

/* Marker-style highlight in running text */
u.em { text-decoration: none; background: linear-gradient(var(--ours-bar), var(--ours-bar)) no-repeat left bottom / 100% 0.2em; padding: 0 0.08em 0.14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Sticky storyline (built by main.js): a slim bar that slides in once the storyline has scrolled away */
.stickybar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--page) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px -6px rgba(0, 0, 0, 0.25);
  transform: translateY(-105%); visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.stickybar.show { transform: none; visibility: visible; transition: transform 0.25s ease, visibility 0s; }
.stickybar ol { list-style: none; margin: 0 auto; padding: 0 1rem; max-width: 76rem; display: flex; justify-content: center; gap: 0.25rem; }
.stickybar a { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.7rem; color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 700; white-space: nowrap; border-bottom: 2px solid transparent; }
.stickybar .sb-n { display: grid; place-items: center; flex: none; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: color-mix(in srgb, var(--ours-bar) 45%, transparent); color: #1a1609; font-size: 0.75rem; font-weight: 800; }
.stickybar a:hover { color: var(--ink); }
.stickybar a.current { color: var(--ink); border-bottom-color: var(--ours-bar); }
.stickybar a.current .sb-n, .stickybar a:hover .sb-n { background: var(--ours-bar); }
.stickybar a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 4px; }
/* narrow screens: numbers only, plus the title of the current step */
@media (max-width: 52rem) {
  .stickybar ol { justify-content: space-between; max-width: 32rem; }
  .stickybar a { padding: 0.5rem 0.35rem; }
  .stickybar a:not(.current) .sb-t { display: none; }
}
@media (prefers-reduced-motion: reduce) { .stickybar, .stickybar.show { transition: none; } }
/* in-page jumps land below the bar */
main section { scroll-margin-top: 3rem; }

/* an inline formula set off in a small box, like a mini equation card */
math.boxed { padding: 0.15em 0.45em; margin: 0 0.05em; border: 1px solid var(--line); border-radius: 6px; background: var(--card); white-space: nowrap; }
/* two-line equations on phones: right-aligned left sides, so the "=" signs line up
   (Chrome ignores MathML's columnalign) */
.formula math.narrow-only mtd:first-child { text-align: right; }
.formula math.narrow-only mtd:last-child { text-align: left; }
.formula mpadded.op.big { padding: 0.08em 0.3em 0.12em; } /* the large ⨁: room around the bigger glyph */

/* the reset and set functions r, R and s: upright roman (like \mathrm), set apart from the italic variables */
mi.fn-reset, mi.fn-set { text-transform: none; font-style: normal; }

/* a bold run-in header at the start of a paragraph: a little extra space before the text */
b.run-in { margin-right: 0.2em; }

/* Temporarily hidden: the "Try it" demos and the paragraph after each. To show them again,
   remove data-hide-tryit from <html> in index.html (nothing is deleted). */
[data-hide-tryit] .tryit-part { display: none !important; }

/* "MinMax Recurrent Neurons" with its Scalar / General toggle (main.js) beside the title */
.subsection-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin: 2.25rem 0 1rem; }
.subsection-head h3.subsection { margin: 0; }
.subsection-head .dim-tabs { flex: none; margin: 0; padding: 0.15rem; gap: 0.15rem; font-size: 0.8rem; line-height: 1.3; } /* about the height of the title line */
.subsection-head .dim-tabs button { padding: 0.1rem 0.75rem; white-space: nowrap; }
.dim-tabs[hidden] { display: none; }
/* section 3's Scalar / General switch: on the heading's line, at the right; it sticks below the
   top bar while the section scrolls by, and leaves with the section */
.dim-switch { position: sticky; top: 3.15rem; z-index: 20; width: fit-content; margin: 0 0 1rem auto; }
.dim-switch .dim-tabs { margin: 0; font-size: 0.9rem; align-items: center; border: 1.5px solid var(--ours-bar); background: var(--card); box-shadow: 0 3px 14px -6px rgba(0, 0, 0, 0.35); }
.dim-switch .dim-switch-label { padding: 0 0.6rem 0 0.75rem; margin-right: 0.15rem; border-right: 1px solid var(--line); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; } /* says what the switch is for */
.dim-switch .dim-tabs button { padding: 0.3rem 0.95rem; white-space: nowrap; }
/* the heading now has a subheader: the switch sits under it, on the right */
@media (max-width: 30rem) { .dim-switch { margin-left: 0; } } /* phones: under the heading, on the left */
#idea [data-dim-panel][hidden] { display: none !important; } /* also for the <math> variants */
.nowrap .wrap { white-space: normal; } /* a stretch that may wrap inside a no-wrap group */
.see-gap { word-spacing: 0.35em; } /* the space before "See more": wider, and gone when the button starts a line */
@media (max-width: 24rem) { /* small phones: a more compact switch, so it fits the width */
  .dim-switch .dim-tabs { font-size: 0.85rem; }
  .dim-switch .dim-tabs button { padding: 0.3rem 0.7rem; }
  .dim-switch .dim-switch-label { padding: 0 0.45rem 0 0.55rem; font-size: 0.66rem; letter-spacing: 0.04em; }
}
#algebra mpadded.op { padding: 0.02em 0.2em; margin-inline: 0.06em; } /* the inline definitions: lighter chips */

/* Temporarily hidden: the "Linear recurrence -> MinMax recurrence" cards in section 3. To show them
   again, remove data-hide-flow from <html> in index.html (nothing is deleted). */
[data-hide-flow] .formula-flow { display: none !important; }
.dim-switch + h3.subsection { margin-top: 0.4rem; } /* the first subsection, right under the section heading */
.dim-switch .dim-switch-label { display: inline-flex; flex-direction: column; align-items: center; gap: 0.12rem; line-height: 1.15; } /* two lines: "Choose" over "State dimension" */
.dim-switch .dsl-1 { font-weight: 600; letter-spacing: 0.04em; text-transform: none; font-style: italic; }
.see-more-line { margin: -0.15rem 0 1.5rem; } /* "See more on the MinMax algebra", under the recurrence cards */
.see-more-line + .more-body { margin-top: -0.9rem; }
.storyline mpadded.op { padding-inline: 0.2em; margin-inline: 0.03em; } /* compact chips in the storyline blurbs */
.storyline .step-d math { font-size: 0.95em; }
html.js .storyline:not(.is-vertical) h2 { text-align: center; font-size: 1.35rem; margin-bottom: 1.5rem; } /* horizontal storyline: a centred, larger title */
@media (max-width: 73rem) { html:not(.js) .storyline h2 { text-align: left; font-size: 1.3rem; margin-bottom: 1.2rem; } }
/* horizontal storyline: each step draws its own piece of the joining line (to the middle of the gaps
   on either side), so the line follows the circles whatever the column widths */
html.js .storyline:not(.is-vertical) ol { grid-template-columns: repeat(5, minmax(max-content, 1fr)); } /* every column at least as wide as its unbroken lines */
html.js .storyline:not(.is-vertical) ol::before { content: none; }
html.js .storyline:not(.is-vertical) li { position: relative; }
html.js .storyline:not(.is-vertical) li::before { content: ""; position: absolute; top: 1.05rem; left: -0.2rem; right: -0.2rem; height: 2px; background: var(--ours-bar); }
html.js .storyline:not(.is-vertical) li:first-child::before { left: 50%; }
html.js .storyline:not(.is-vertical) li:last-child::before { right: 50%; }
html.js .storyline:not(.is-vertical) .step-d .ph, html.js .storyline:not(.is-vertical) .step-t { display: block; white-space: nowrap; } /* each phrase on a line of its own, never wrapped */
.good { color: var(--yes); font-weight: 700; } /* the 100% result, in the results' green */
/* storyline concepts, colour-coded the same way wherever they appear: the four properties (amber, the goal)
   and linear recurrence (slate, like the standard +, x chips) */
.concept { font-weight: 700; white-space: nowrap; }
.concept.c-props { color: var(--concept-props); }
.concept.c-linrec { color: var(--concept-linrec); }
.concept.c-ours { color: var(--concept-ours); }
h2 .sec-sub .ph { display: inline-block; } /* subheader phrases (from the storyline) break between phrases */
.unit { display: inline-block; } /* a phrase kept on one line when it fits: lines break between units */
/* an example temporal pattern in running text: italic, with its events as maths-style letters */
.pattern { font-style: italic; color: var(--ink); white-space: nowrap; }
.pattern i { font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", "Latin Modern Math", serif; font-size: 1.15em; line-height: 0; padding-inline: 0.03em; }
/* a short list inside a property card */
.card p.list-intro { margin-top: 0.6rem; }
.card-list { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.card-list li { margin: 0.15rem 0; }
.card-list li::marker { color: var(--prop-c); }
.card-list li > b:first-child { color: var(--muted); font-weight: 700; } /* item headers styled like the card's subtitle */
/* "See more" inside a property card */
.card .card-more-line { margin: 0.7rem 0 0; font-size: 0.92rem; }
.card .more-body.card-more { margin: 0.6rem 0 0 0.1rem; font-size: 0.92rem; }
.card .more-body.card-more p { margin: 0 0 0.6rem; }
.card .more-body.card-more p:last-child { margin-bottom: 0; }
.card .more-body.card-more .card-list { margin: 0 0 0.7rem; }
.display-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6em 0.9em; margin: 1em 0; font-size: 1.1rem; } /* same size as the card titles */ /* the four properties on their own centred line, like a displayed equation */
.display-list .dl-item { display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap; padding: 0.4em 0.85em 0.4em 0.6em; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 6px -2px rgba(0, 0, 0, 0.08); } /* soft white tiles, like the cards */
.display-list .dl-icon { width: 1.35em; height: 1.35em; flex: none; }
.display-list .dl-name { font-weight: 600; color: var(--ink); } /* semibold: on cream inside an outline, bold reads heavier than the card titles on white */
a.dl-item { color: inherit; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; } /* each chip jumps to its card */
a.dl-item:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--prop-c) 60%, var(--line)); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 6px 14px -6px rgba(0, 0, 0, 0.18); }
a.dl-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.card[id] { scroll-margin-top: 7rem; } /* lands below the top bar and the property bar */
@media (prefers-reduced-motion: reduce) { a.dl-item { transition: none; } }

/* section 1: the four-property chips as a sticky bar under the top bar while the cards scroll by */
#why .lead:has(+ .prop-scope) { margin-bottom: 0; }
.prop-nav { position: sticky; top: 2.75rem; z-index: 30; margin: 0.6rem -1rem 0.6rem; padding: 0.5rem 1rem; }
.prop-nav.stuck { background: var(--page); box-shadow: 0 0 0 100vmax var(--page), 0 7px 10px -9px rgba(0, 0, 0, 0.35); clip-path: inset(0 -100vmax -12px); } /* a full-width band (the shadow paints the page colour out to the edges) */
.prop-nav.stuck::after { content: ""; position: absolute; left: -100vmax; right: -100vmax; bottom: 0; height: 1px; background: var(--line); }
#why .lead-after { margin-top: 0.2rem; }
.prop-nav a.dl-item.current { border-color: var(--prop-c); box-shadow: 0 0 0 2px color-mix(in srgb, var(--prop-c) 40%, transparent), 0 2px 6px -2px rgba(0, 0, 0, 0.08); }
/* phones, once stuck: icons only, plus the name of the current card, so the bar stays one row */
@media (max-width: 40rem) {
  .prop-nav.stuck { flex-wrap: nowrap; gap: 0.4em; }
  .prop-nav.stuck a.dl-item { padding: 0.3em 0.45em; }
  .prop-nav.stuck a.dl-item:not(.current) .dl-name { display: none; }
}
/* defined terms: a fine dotted underline, light enough to repeat; only the colour differs
   (four properties: amber; linear recurrence: slate-blue, like the standard +, x chips; MinMax RNCs: violet) */
.term[data-def] { cursor: help; } /* hover, focus or tap shows a short definition */
.term { color: color-mix(in srgb, var(--term-t, currentColor) 45%, currentColor); text-decoration: underline dotted; text-decoration-color: var(--term-c, var(--ours-mark)); text-decoration-thickness: 2px; text-underline-offset: 0.22em; text-decoration-skip-ink: none; }
:is(h1, h2, h3, b, strong) .term { color: color-mix(in srgb, var(--term-t, currentColor) 22%, currentColor); } /* bold text: an even lighter tint */

/* the definition bubble for defined terms (main.js) */
.term-tip { position: fixed; z-index: 100; max-width: min(18rem, calc(100vw - 1rem)); padding: 0.45rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 0.85rem; font-weight: 500; font-style: normal; line-height: 1.4; text-align: left; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.3); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity 0.12s, transform 0.12s; }
.term-tip.below { transform: translateY(-3px); }
.term-tip.on { opacity: 1; transform: none; }
.term:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .term-tip { transition: none; } }
.term-tip.interactive { pointer-events: auto; } /* touch, with a target: the "Go there" link can be tapped */
.term-tip-go { display: inline-block; margin-top: 0.2rem; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ours-bar); text-underline-offset: 0.18em; white-space: nowrap; }
.term-tip-go::after { content: " \2192"; }
.term.has-target { cursor: pointer; } /* a mouse click goes to its target */
.card .lead-in { font-weight: 500; color: var(--ink); } /* a card's opening phrase, up to the colon: the gist at a glance */
.card-list li > b .term { font-weight: 500; } /* list items' term headers: lighter than bold */
/* Tags: each names a concept (data-concept), so different phrasings of one concept look the same.
   Colour groups below; definitions and link targets live in the concept registry in main.js. */
.term[data-concept="four-properties"], .term[data-concept="bounded-any-length"], .term[data-concept="non-vanishing-gradients"], .term[data-concept="long-term-memory"], .term[data-concept="state-tracking"], .term[data-concept="parallel-processing"], .term[data-concept="sequential-processing"], .term[data-concept="subquadratic-parallel"], .term[data-concept="constant-per-token"] { --term-c: var(--prop-c); --term-t: var(--prop-t); } /* the four properties and their parts: teal */
.term[data-concept="linear-recurrence"], .term[data-concept="nonlinear-rnns"], .term[data-concept="transformers"], .term[data-concept="linear-rnns"] { --term-c: var(--classic-op); --term-t: var(--concept-linrec); } /* slate: the standard approaches */
.term[data-concept="minmax-algebra"], .term[data-concept="minmax-rncs"], .term[data-concept="feedforward-nets"], .term[data-concept="scalar-neurons"], .term[data-concept="general-neurons"] { --term-c: var(--ours-mark); --term-t: var(--minmax-t); } /* MinMax: amber */
.aside { font-style: italic; } /* parenthetical examples, e.g. "(say during training)": one class to restyle them all */
.lead.lead-intro { margin-bottom: 0.7rem; } /* a short context sentence before a section's main lead */
/* a "statement" environment: a key claim set apart, like a theorem in a paper */
.statement { margin: 1.2rem 0 1.4rem; padding: 0.7rem 1.1rem; border-left: 3px solid var(--ours-bar); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--ours-bar) 14%, var(--card)); font-size: 1.15rem; font-weight: 600; line-height: 1.45; color: var(--ink); }
.statement-ours { border-left-color: var(--ours-mark); background: color-mix(in srgb, var(--ours-mark) 14%, var(--card)); }
.statement-props { border-left-color: var(--prop-c); background: color-mix(in srgb, var(--prop-c) 8%, var(--card)); } /* about the four properties: teal */ /* about MinMax RNCs: their violet */
.statement + .lead { margin-top: -0.3rem; }
.more-body [id] { scroll-margin-top: 4rem; } /* jump targets inside a "See more" land below the top bar */
/* a small "References" header above a reference list in a "See more" panel */
.refs-title { margin: 1rem 0 0.35rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.refs-title + .refs.why-refs { margin-top: 0; padding-top: 0; border-top: 0; }

#idea .lead:has(+ .lead) { margin-bottom: 0.8rem; } /* consecutive lead paragraphs: a normal paragraph gap, not a section gap */
#idea .lead:has(+ .see-more-line) { margin-bottom: 0.5rem; } /* "See more" sits close under its paragraph */
#idea .lead + .see-more-line { margin-top: 0; }
/* a list in lead type (section 3 opening) */
.lead-list { margin: 0 0 0.5rem; padding-left: 1.3rem; font-size: 1.15rem; color: var(--muted); }
.lead-list li { margin: 0.35rem 0; }
.lead-list li::marker { color: var(--ours-bar); }
#idea .lead:has(+ .lead-list) { margin-bottom: 0.6rem; }
.lead-list + .see-more-line { margin-top: 0; }
.lead-list .li-head { font-weight: 600; color: var(--ink); } /* item headers in a lead list */
.lead .lead-head { color: var(--ink); font-weight: 700; } /* a run-in paragraph header inside lead text */
.lead.lead-spaced { margin-top: 2.2rem; } /* a new topic within the section: extra space above */
/* a "technical aside": material some readers may want to skip, set apart like a statement but quieter
   (slate, smaller type, a small label) */
.technical { position: relative; margin: 0.4rem 0 1.6rem; padding: 0.8rem 1.1rem 0.9rem; border-left: 3px solid var(--ours-mark); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--ours-mark) 18%, var(--card)); font-size: 1rem; color: var(--ink); }
.technical > p { margin: 0 0 0.4rem; }
.technical-label { display: block; margin-bottom: 0.45rem; font-size: 1rem; font-weight: 500; color: var(--link-accent); } /* as large as the text below */
.technical .see-more-line { margin: 0.2rem 0 0; }
.technical .more-body { margin-bottom: 0.2rem; }
.technical-label .technical-topic { font-weight: 700; } /* the topic in normal case */
.technical .more-body { margin-left: 0; padding-left: 0; border-left: 0; } /* inside a technical box: the expanded text continues the box, not a nested panel */
.technical-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; flex-wrap: wrap; margin-bottom: 0.45rem; } /* label on the left, the full-version toggle on the right */
.technical-head .technical-label { margin-bottom: 0; }
.technical-head .see-more { font-size: 0.9rem; color: var(--link-accent); }
.technical-head .see-more .sm-labels { justify-items: end; } /* right-aligned in the header: the chevron hugs the text */
/* the technical box's Short / Full switch (main.js); it drives a hidden "See more" toggle */
.see-more.see-more-driver { display: none !important; }
.version-tabs { margin: 0; padding: 0.15rem; gap: 0.15rem; font-size: 0.82rem; line-height: 1.3; }
.version-tabs[hidden] { display: none; }
.version-tabs button { padding: 0.1rem 0.7rem; }
/* the Short / Full switch in the box's amber */
.version-tabs { border-color: color-mix(in srgb, var(--ours-mark) 55%, transparent); background: var(--card); }
.version-tabs button { color: var(--link-accent); }
.version-tabs button[aria-pressed="true"] { background: var(--ours-mark); color: #1a1609; }
.version-tabs button:focus-visible { outline: 2px solid var(--link-accent); outline-offset: 1px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .version-tabs button[aria-pressed="true"] { color: #1a1609; } }
/* subsections nested under a paragraph (the two kinds of neurons): a vertical line on their left */
.nested-group { margin: 0.4rem 0 0 0.36rem; padding-left: 1.2rem; border-left: 2px solid color-mix(in srgb, var(--ours-mark) 55%, transparent); }
.nested-group > h3.subsection:first-child { margin-top: 0.2rem; }
/* the recurrence card at the top of section 3: switches on top, linear and MinMax recurrence below */
.recur-card { margin: 0.2rem 0 1.6rem; padding: 0.8rem 1rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-align: left; font-size: clamp(1rem, 3.4vw, 1.3rem); }
/* the switches as pill toggles inside the card, centred over both recurrences (same look as Short / Full) */
.recur-card { position: relative; margin-top: 0.4rem; }
.recur-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.8rem; margin: 0 0 0.9rem; }
.recur-controls .tabs { margin: 0; padding: 0.15rem; gap: 0.15rem; font-size: 0.82rem; line-height: 1.3; border-color: color-mix(in srgb, var(--ours-mark) 55%, transparent); background: var(--card); }
.recur-controls .tabs button { padding: 0.15rem 0.75rem; color: var(--link-accent); white-space: nowrap; }
.recur-controls .tabs button[aria-pressed="true"] { background: var(--ours-mark); color: #1a1609; }
.recur-controls .tabs button:focus-visible { outline: 2px solid var(--link-accent); outline-offset: 1px; }
.recur-rows { display: grid; grid-template-columns: auto auto auto; justify-content: space-evenly; grid-template-areas: "l1 . l2" "e1 arr e2"; align-items: center; gap: 0.3rem 1rem; } /* side by side, with an arrow */
.recur-rows > .recur-label:first-child { grid-area: l1; }
.recur-rows > .recur-lin { grid-area: e1; }
.recur-rows > .recur-arrow { grid-area: arr; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.recur-rows > .recur-label-mm { grid-area: l2; }
.recur-rows > .recur-mm { grid-area: e2; }
.recur-label, .recur-eq { text-align: center; }
.recur-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.recur-label-mm { color: var(--minmax-t); }
.recur-eq { min-width: 0; overflow-x: auto; }
.recur-eq math { display: block; display: block math; }
.recur-card [data-dim-panel][hidden], .recur-card [data-notation-panel][hidden] { display: none; }
/* stacked (arrow pointing down) when the two equations do not fit side by side: main.js measures and sets .stacked */
.recur-card.stacked .recur-rows { grid-template-columns: 1fr; grid-template-areas: "l1" "e1" "arr" "l2" "e2"; }
.recur-card.stacked .recur-rows > .recur-arrow { justify-self: center; transform: rotate(90deg); margin: 0.2rem 0; }
@media (max-width: 44rem) { html:not(.js) .recur-rows { grid-template-columns: 1fr; grid-template-areas: "l1" "e1" "arr" "l2" "e2"; } html:not(.js) .recur-rows > .recur-arrow { justify-self: center; transform: rotate(90deg); margin: 0.2rem 0; } }


/* recurrence card: layout and spacing */
.recur-card { padding: 0.9rem 1.25rem 1.25rem; }
.recur-controls { margin: 0 -1.25rem 1.1rem; padding: 0 1.25rem 0.9rem; border-bottom: 1px solid var(--line); } /* switches set off from the equations by a hairline */
.recur-rows { row-gap: 0.5rem; column-gap: 0.9rem; }
.recur-label { letter-spacing: 0.02em; }
.recur-eq { padding: 0.15rem 0; }
@media (max-width: 44rem) { .recur-card { padding: 0.8rem 0.9rem 1rem; } .recur-controls { margin: 0 -0.9rem 0.9rem; padding: 0 0.9rem 0.8rem; } .recur-rows { row-gap: 0.35rem; } }
/* each equation wrapped in its own colour: slate for the standard recurrence, amber for MinMax */
.recur-eq { justify-self: center; max-width: 100%; padding: 0.35rem 0.8rem; border-radius: 8px; }
.recur-lin { background: color-mix(in srgb, var(--classic-op) 10%, var(--card)); }
.recur-mm { background: color-mix(in srgb, var(--ours-mark) 16%, var(--card)); }
/* toggles: the selected option's fill and text ease in */
.tabs button { transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
@media (prefers-reduced-motion: reduce) { .tabs button { transition: none; } }
/* phones: tighter equation boxes, and the explicit forms (wider) scaled down so they fit */
@media (max-width: 30rem) {
  .recur-eq { padding: 0.3rem 0.45rem; }
  .recur-card:has([data-notation-panel="minmax"]:not([hidden])) .recur-eq { font-size: 0.9em; }
  .recur-card:has([data-notation-panel="minmax"]:not([hidden]) [data-dim-panel="general"]:not([hidden])) .recur-mm { font-size: 0.74em; }
}
@media (max-width: 22rem) {
  .recur-card:has([data-notation-panel="minmax"]:not([hidden]) [data-dim-panel="general"]:not([hidden])) .recur-mm { font-size: 0.66em; }
}
.recur-card mpadded.op { padding: 0.03em 0.2em; margin-inline: 0.05em; } /* recurrence card: slimmer operator chips */
@media (min-width: 30.01rem) { .recur-card:has([data-notation-panel="minmax"]:not([hidden]) [data-dim-panel="general"]:not([hidden])) .recur-eq { font-size: 0.82em; } } /* explicit vector form: a little smaller, so it can share a line on wide screens */
/* small on/off switch (e.g. "Compare with linear" in the recurrence card) */
.mini-switch { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0.1rem; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--link-accent); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.mini-switch[hidden] { display: none; }
.mini-switch-track { position: relative; flex: none; width: 1.9rem; height: 1.05rem; border-radius: 999px; background: color-mix(in srgb, var(--line) 80%, var(--page)); border: 1px solid color-mix(in srgb, var(--ours-mark) 55%, transparent); transition: background-color 0.2s ease; }
.mini-switch-track::after { content: ""; position: absolute; top: 50%; left: 0.12rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--card); box-shadow: 0 1px 2px rgb(0 0 0 / 0.25); transform: translateY(-50%); transition: left 0.2s ease; }
.mini-switch[aria-checked="true"] .mini-switch-track { background: var(--ours-mark); }
.mini-switch[aria-checked="true"] .mini-switch-track::after { left: calc(100% - 0.87rem); }
.mini-switch:focus-visible { outline: 2px solid var(--link-accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .mini-switch-track, .mini-switch-track::after { transition: none; } }
.recur-controls { align-items: center; }
/* comparison off: only the MinMax recurrence */
.recur-card.no-compare .recur-rows > :is(.recur-label:first-child, .recur-lin, .recur-arrow) { display: none; }
.recur-card.no-compare .recur-rows { grid-template-columns: auto; grid-template-areas: "l2" "e2"; justify-content: center; }
/* recurrence card: a description under each equation, and a shared note on the symbols */
.recur-rows { grid-template-areas: "l1 . l2" "e1 arr e2" "d1 . d2"; }
.recur-rows > .recur-desc-lin { grid-area: d1; }
.recur-rows > .recur-desc-mm { grid-area: d2; }
.recur-desc { width: 0; min-width: 100%; margin: 0.15rem 0 0; font-size: 0.95rem; line-height: 1.5; text-align: center; color: var(--ink); align-self: start; } /* wraps to the equation's width */
.recur-desc [data-dim-panel][hidden], .recur-note [data-dim-panel][hidden] { display: none; }
.recur-note { margin: 1.1rem -1.25rem 0; padding: 0.9rem 1.25rem 0; border-top: 1px solid var(--line); font-size: 0.95rem; line-height: 1.55; color: var(--muted); }
.recur-card.stacked .recur-rows { grid-template-areas: "l1" "e1" "d1" "arr" "l2" "e2" "d2"; }
.recur-card.no-compare .recur-rows { grid-template-areas: "l2" "e2" "d2"; }
.recur-card.no-compare .recur-rows > .recur-desc-lin { display: none; }
@media (max-width: 44rem) { .recur-note { margin-left: -0.9rem; margin-right: -0.9rem; padding-left: 0.9rem; padding-right: 0.9rem; } html:not(.js) .recur-rows { grid-template-areas: "l1" "e1" "d1" "arr" "l2" "e2" "d2"; } }
/* one column (MinMax only, or stacked): descriptions use a comfortable reading width */
.recur-card.no-compare .recur-rows { grid-template-columns: 1fr; }
.recur-card:is(.no-compare, .stacked) .recur-desc { width: auto; min-width: 0; max-width: 34rem; justify-self: center; }
@media (max-width: 44rem) { html:not(.js) .recur-desc { width: auto; min-width: 0; } }
/* descriptions inside the coloured equation boxes */
.recur-rows { grid-template-areas: "l1 . l2" "e1 arr e2"; }
.recur-card.stacked .recur-rows { grid-template-areas: "l1" "e1" "arr" "l2" "e2"; }
.recur-card.no-compare .recur-rows { grid-template-areas: "l2" "e2"; }
.recur-eq { align-self: stretch; }
.recur-eq .recur-desc { margin: 0.35rem 0 0.15rem; }
.recur-card:is(.no-compare, .stacked) .recur-eq { width: 100%; max-width: 36rem; }
.recur-card:is(.no-compare, .stacked) .recur-desc { max-width: none; }
.recur-eq .recur-desc math { display: inline; display: inline math; } /* inline symbols in the descriptions */
.recur-eq > [data-notation-panel] { font-size: 1.22em; } /* equations clearly larger than the description text */
/* recurrence card: each switch with a small label */
.recur-controls .ctl { display: inline-flex; align-items: center; gap: 0.45rem; }
.recur-controls .ctl:has(> .tabs[hidden]) { display: none; }
.ctl-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.recur-controls { align-items: flex-end; }
.recur-controls .ctl { flex-direction: column; align-items: center; gap: 0.2rem; } /* label above its switch */
.recur-controls .mini-switch { margin-bottom: 0.2rem; }
/* recurrence card, final layout: one column; the linear recurrence is a collapsible comparison above MinMax */
.recur-card .recur-rows { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.recur-card .recur-eq { width: 100%; max-width: 36rem; }
.recur-card .recur-label { text-align: center; }
.compare-toggle { display: inline-flex; align-items: center; gap: 0.3em; margin: 0 0 0.2rem; padding: 0; border: 0; background: none; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.compare-toggle[hidden] { display: none; }
.compare-toggle:hover { color: var(--ink); text-decoration-color: currentColor; }
.compare-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.compare-toggle .sm-labels { display: inline-grid; justify-items: center; }
.compare-toggle .sm-labels > span { grid-area: 1 / 1; }
.compare-toggle .when-open, .compare-toggle[aria-expanded="true"] .when-closed { visibility: hidden; }
.compare-toggle[aria-expanded="true"] .when-open { visibility: visible; }
.compare-toggle .chev { flex: none; width: 0.8em; height: 0.8em; transition: transform 0.25s ease; }
.compare-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.recur-collapse { display: grid; grid-template-rows: 0fr; width: 100%; opacity: 0; transition: grid-template-rows 0.35s ease, opacity 0.3s ease; }
.recur-collapse.open { grid-template-rows: 1fr; opacity: 1; }
html:not(.js) .recur-collapse { grid-template-rows: 1fr; opacity: 1; }
.recur-collapse-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.recur-collapse-inner > .recur-label { margin-top: 0.3rem; }
.recur-collapse .recur-arrow { display: block; font-size: 1.4rem; line-height: 1; color: var(--muted); margin: 0.2rem 0 0.1rem; transform: none; }
@media (prefers-reduced-motion: reduce) { .recur-collapse, .compare-toggle .chev { transition: none; } }
.compare-toggle .sm-labels { display: inline; } /* one label at a time, so the chevron sits right after it */
.compare-toggle .when-open, .compare-toggle[aria-expanded="true"] .when-closed { display: none; }
.compare-toggle[aria-expanded="true"] .when-open { display: inline; }
/* the comparison toggle as the card's footer, below a hairline */
.recur-foot { margin: 1.1rem -1.25rem 0; padding: 0.75rem 1.25rem 0; border-top: 1px solid var(--line); }
.recur-foot:has(> .compare-toggle[hidden]) { display: none; }
.recur-foot .compare-toggle { margin: 0; font-size: 0.9rem; }
@media (max-width: 44rem) { .recur-foot { margin-left: -0.9rem; margin-right: -0.9rem; padding-left: 0.9rem; padding-right: 0.9rem; } }
.recur-card:has(> .recur-foot) { padding-bottom: 0.75rem; } /* footer: same space above and below its link */
/* footer toggle as a full-width accordion row: label on the left, chevron at the far right, whole row clickable */
.recur-foot { padding: 0; }
.recur-foot .compare-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; text-decoration: none; border-radius: 0 0 10px 10px; transition: background-color 0.15s ease, color 0.15s ease; }
.recur-foot .compare-toggle:hover { background: color-mix(in srgb, var(--line) 35%, var(--card)); }
.recur-foot .compare-toggle:focus-visible { outline-offset: -2px; border-radius: 0 0 10px 10px; }
.recur-foot .compare-toggle .chev { width: 1.05em; height: 1.05em; }
.recur-card:has(> .recur-foot) { padding-bottom: 0; }
@media (max-width: 44rem) { .recur-foot .compare-toggle { padding-left: 0.9rem; padding-right: 0.9rem; } }
/* the footer expands to show the linear recurrence */
.recur-foot .recur-collapse-inner { padding: 0 1.25rem; }
.recur-foot .recur-collapse.open .recur-collapse-inner { padding-bottom: 1.1rem; }
.recur-foot .recur-collapse-inner > .recur-label { margin-top: 0; }
.recur-foot .recur-collapse-inner { transition: padding-bottom 0.35s ease; }
.recur-foot .compare-toggle[aria-expanded="true"] { border-radius: 0; }
@media (max-width: 44rem) { .recur-foot .recur-collapse-inner { padding-left: 0.9rem; padding-right: 0.9rem; } }
.recur-card .recur-lin, .recur-card .recur-mm { background: none; } /* no coloured box behind the equations */
.recur-card .recur-eq { align-self: center; } /* centred in the card (was stretched to the left) */
/* "linear recurrence" in the footer toggle: the slate tag colour (not a link: the whole row is the button) */
.compare-toggle .concept-look { color: color-mix(in srgb, var(--concept-linrec) 45%, var(--ink)); text-decoration: underline dotted; text-decoration-color: var(--classic-op); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.recur-controls { column-gap: 2.2rem; } /* State and Notation switches clearly apart */
/* recurrence card switches: quiet segmented controls (grey track, white sliding thumb), label inline on the left */
.recur-controls { align-items: center; column-gap: 2rem; }
.recur-controls .ctl { flex-direction: row; align-items: center; gap: 0.5rem; }
.recur-controls .tabs { position: relative; display: inline-flex; gap: 0; padding: 3px; border: 0; border-radius: 9px; background: color-mix(in srgb, var(--line) 70%, var(--page)); font-size: 0.85rem; line-height: 1.3; }
.recur-controls .tabs button, .recur-controls .tabs button[aria-pressed="true"] { position: relative; z-index: 1; padding: 0.28rem 0.85rem; border: 0; border-radius: 7px; background: none; font-weight: 600; color: var(--muted); transition: color 0.2s ease; }
.recur-controls .tabs button[aria-pressed="true"] { color: var(--ink); }
.recur-controls .tabs button:hover { color: var(--ink); }
.recur-controls .tabs button:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.recur-controls .tabs .thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 0; border-radius: 7px; background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15), 0 0 0 0.5px rgb(0 0 0 / 0.06); transition: left 0.25s ease, width 0.25s ease; }
.recur-controls .tabs:not(:has(.thumb)) button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); } /* before the thumb is placed */
@media (prefers-reduced-motion: reduce) { .recur-controls .tabs .thumb { transition: none; } }
.recur-controls .ctl-label { font-size: 0.95rem; } /* labels larger than the options (0.85rem) */
.recur-controls .tabs { font-size: 0.82rem; }
/* MinMax RNC diagram (redrawn from the paper's TikZ figure) */
.rnc-diagram { margin: 1.2rem auto 1.8rem; max-width: 42rem; }
.rnc-diagram .dg { display: block; width: 100%; height: auto; overflow: visible; }
.dg-wire { fill: none; stroke: color-mix(in srgb, var(--ink) 70%, transparent); stroke-width: 1.5; stroke-linejoin: miter; }
.dg-head, .dg-dot { fill: color-mix(in srgb, var(--ink) 70%, transparent); }
.dg-mlp { fill: var(--card); stroke: color-mix(in srgb, var(--ink) 60%, transparent); stroke-width: 1.6; }
.dg-block { fill: color-mix(in srgb, var(--ours-mark) 18%, var(--card)); stroke: color-mix(in srgb, var(--ink) 60%, transparent); stroke-width: 1.6; }
.dg-group { fill: none; stroke: color-mix(in srgb, var(--ink) 40%, transparent); stroke-width: 1.3; stroke-dasharray: 9 6; }
.dg-l { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 22px; line-height: 1; color: var(--ink); }
.dg-l.dg-e { justify-content: flex-end; } .dg-l.dg-w { justify-content: flex-start; }
.dg-l math { font-size: 1em; }
.rnc-diagram figcaption { margin-top: 0.7rem; font-size: 0.92rem; line-height: 1.5; color: var(--muted); text-align: center; }
.dg-l { font-size: 21px; }
@media (max-width: 36rem) { .dg-l { font-size: 24px; } } /* phones: the diagram scales to fit the width; labels drawn a bit larger to stay legible */
/* tags containing maths: text-decoration does not reach MathML, so the dotted line is drawn as a background */
.term:has(math) { text-decoration: none; background-image: radial-gradient(circle, var(--term-c, var(--ours-mark)) 1px, transparent 1.4px); background-size: 5px 2px; background-repeat: repeat-x; background-position: 0 100%; padding-bottom: 0.12em; }
.dg-l.dg-tag { font-size: 0.8em; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); white-space: nowrap; } /* "Layer 1" / "Layer 2" */
/* diagram variants: layers 1 | 2, neurons per layer 2 | 3 | 4 (switches shown by main.js; without JS only the default shows) */
.rnc-diagram .recur-controls.dg-controls { margin: 0 0 0.9rem; padding: 0; border-bottom: 0; }
.rnc-diagram .dg-view[hidden] { display: none; }
.rnc-diagram foreignObject { overflow: visible; } /* labels never clipped by their box */
.rnc-diagram mpadded.op { padding: 0 0.1em; margin-inline: 0.14em; border-radius: 0.22em; } /* diagram: slimmer chips, tighter symbols */
.rnc-diagram .dg-caption { margin-top: 0.6rem; font-size: 0.95rem; text-align: left; }
.rnc-diagram .dg-caption .see-more-line { margin: 0; text-align: center; }
.rnc-diagram .dg-caption .more-body { margin-top: 0.5rem; margin-bottom: 0; }
.rnc-diagram .dg-caption .more-body p { margin: 0; }
.rnc-diagram .see-more .sm-labels { display: inline; } /* one label at a time: the chevron sits right after it */
.rnc-diagram .see-more .when-open, .rnc-diagram .see-more[aria-expanded="true"] .when-closed { display: none; }
.rnc-diagram .see-more[aria-expanded="true"] .when-open { display: inline; }
.rnc-diagram .dg-caption .see-more-line { font-size: 0.95rem; color: var(--muted); }
.rnc-diagram .dg-caption .see-more { color: var(--ink); }
.recur-foot .compare-toggle:hover { background: none; } /* no hover shading on the footer row */
.recur-eq .recur-desc { margin-top: 0.7rem; } /* a bit more room between each equation and its description */
/* S₃ and S₄ in one panel: per model, two thin labelled bars */
.bar-row.bar-pair { row-gap: 0.2rem; margin: 0.5rem 0; }
.bar-row.bar-pair .name { grid-row: span 2; }
.bar-row .sub { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.bar-row .sub .track { flex: 1; height: 9px; }
.bar-row .part { flex: none; width: 1.3rem; font-size: 0.78rem; color: var(--muted); }
.bar-row .part { width: 1.7rem; font-size: 0.9rem; font-weight: 600; color: var(--ink); } /* S₃ / S₄ labels: legible */
/* a curly brace groups each model's S₃ and S₄ bars */
.bar-row.bar-pair .name { display: flex; align-items: center; justify-content: space-between; gap: 0.3rem; align-self: stretch; }
.bar-row .brace { flex: none; width: 7px; height: 100%; fill: none; stroke: var(--muted); stroke-width: 1.3; }
.bar-row .brace { width: 10px; height: 100%; fill: color-mix(in srgb, var(--ink) 55%, transparent); stroke: none; } /* tapered, calligraphic brace (the two rows keep its proportions nearly constant) */
/* grouping by spacing alone: each model's two bars close together, clear space between models */
.bar-row.bar-pair { row-gap: 0.12rem; margin: 0.9rem 0; }
.bar-row.bar-pair:first-of-type { margin-top: 0.4rem; }
.bar-row.bar-pair .name { display: block; align-self: center; }
.bar-row.bar-pair { row-gap: 0; margin: 1rem 0; }
.bar-row.bar-pair .sub, .bar-row.bar-pair .val { line-height: 1.15; }
.panel h3 .paper { margin-left: 0.3rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); white-space: nowrap; } /* benchmark name in the paper */
/* State tracking panel: the three model groups spread over the panel's full height (it is as tall as its neighbour) */
.panel:has(.bar-pair) { display: flex; flex-direction: column; }
.panel .bar-row.bar-pair { flex: 1; align-content: center; margin: 0; row-gap: 0.25rem; }
.panel .bar-row.bar-pair .sub .track { height: 11px; }
.panel:has(.bar-pair) { row-gap: 0.9rem; } /* minimum space between model groups (phones, where the panel stands alone) */
.panel:has(.bar-pair) h3 { margin-bottom: 0; }
/* cite rows: always title over subtitle (no mixed inline/wrapped rows), chevron on the title's line, actions centred on the row */
.cite-item summary { display: grid; grid-template-columns: auto 1fr; column-gap: 0.7rem; row-gap: 0.15rem; align-items: center; }
.cite-item summary .chev { grid-row: 1; grid-column: 1; }
.cite-item summary .cite-t { grid-row: 1; grid-column: 2; }
.cite-item summary .cite-s { grid-row: 2; grid-column: 2; }
.cite-actions { top: 0; height: calc(0.85rem * 2 + 2.95rem); }
@media (max-width: 30rem) { .cite-actions { height: auto; } }
/* second footer row: the MinMax algebra, as text */
.recur-foot + .recur-foot { margin-top: 0; }
.recur-collapse-inner.recur-text { display: block; text-align: left; font-size: 1rem; line-height: 1.6; }
.recur-collapse-inner.recur-text > p { margin: 0 0 0.6rem; }
.recur-collapse-inner.recur-text .see-more-line { margin: 0; }
.recur-collapse-inner.recur-text .more-body { margin-top: 0.6rem; margin-bottom: 0; }
.compare-toggle .concept-look.concept-mm { color: color-mix(in srgb, var(--minmax-t) 60%, var(--ink)); text-decoration-color: var(--ours-mark); }
.recur-foot .compare-toggle math { font-size: 1.05em; }
.recur-text .more-body { margin-left: 0; padding-left: 0; border-left: 0; } /* the full version continues the text: no nested rule on the left */
/* MinMax algebra footer: Short / Full switch at the top right of the panel */
.recur-text .version-row { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; }
.recur-text .version-row:has(.version-tabs[hidden]) { display: none; }
.recur-text .version-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.recur-text .version-tabs { display: inline-flex; }
/* "Read more": an inline link-like button that disappears once clicked */
.read-more { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; white-space: nowrap; }
.read-more[hidden] { display: none; }
.read-more:hover { text-decoration-color: currentColor; }
.read-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
/* "Read more" preview: the first lines of the hidden text, fading out, with a centred button over the fade */
.rm-collapsed { max-height: 5.2rem; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 15%, transparent 100%); mask-image: linear-gradient(to bottom, #000 15%, transparent 100%); }
.rm-collapsed.rm-opening { transition: max-height 0.36s cubic-bezier(0.2, 0, 0, 1); -webkit-mask-image: none; mask-image: none; }
.read-more-line { position: relative; margin: -1.4rem 0 0 !important; text-align: center; }
.read-more-line[hidden] { display: none; }
.read-more { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.3rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 0.9rem; text-decoration: none; box-shadow: 0 1px 3px rgb(0 0 0 / 0.08); }
.read-more:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.read-more .chev { width: 0.8em; height: 0.8em; }
.prop-intro { margin-bottom: 0.4rem; } /* names the chip bar below it */
/* section 1: a hairline separates the chips (the four properties) from the cards' intro */
#why .lead-after { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
/* section 2: a hairline between the statement and the comparison table, as in section 1 */
hr.sep { margin: 1.4rem 0; border: 0; border-top: 1px solid var(--line); } /* a hairline between parts of a section */
/* section 2: more room around the "Yet each…" line and the statement that follows it */
#tradeoffs .lead-intro:has(+ .statement-ours) { margin-top: 2.2rem; }
#tradeoffs .statement-ours + hr.sep { margin-top: 2.2rem; }
/* section 2 statement: a centred claim in larger type, no box (the box looked like the table's first column) */
#tradeoffs .statement-ours { padding: 0; border: 0; border-radius: 0; background: none; text-align: center; font-size: clamp(1.2rem, 3.6vw, 1.45rem); font-weight: 700; }
#tradeoffs .statement-ours { margin-bottom: 2.2rem; } /* space before the table, now without a divider */
#tradeoffs .lead-intro:has(+ .statement-ours) { text-align: center; margin-bottom: 0.35rem; } /* centred preamble of the claim below */
#tradeoffs .lead-intro + .statement-ours { margin-top: 0; }
/* stuck chip bar: clip the full-width band exactly at the bar's bottom (it used to spill 12px of page colour over the content); the hairline marks the edge, a soft shadow sits below via ::before */
.prop-nav.stuck { box-shadow: 0 0 0 100vmax var(--page); clip-path: inset(0 -100vmax -14px); }
.prop-nav.stuck::before { content: ""; position: absolute; left: -100vmax; right: -100vmax; top: 100%; height: 14px; background: linear-gradient(rgba(0, 0, 0, 0.07), transparent); pointer-events: none; }
#why .lead-after { font-size: 0.92rem; color: var(--muted); } /* a reading hint, not content: smaller and quieter */
#why .lead-after { text-align: center; font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; } /* a signpost, centred, with an arrow pointing to the cards */
#why .lead-after .hint-arrow { display: inline-block; margin-left: 0.25em; color: var(--prop-c); }
#tradeoffs .lead-intro:has(+ .statement-ours) { margin-top: calc(2.2rem - 3px); } /* text-to-text gap above = gap below to the table */
/* inline "Read more" at the end of a paragraph: looks like a link, same as the See more toggles */
.read-more.read-more-inline { display: inline; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: inherit; font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.read-more.read-more-inline:hover { text-decoration-color: currentColor; }
.read-less-line { margin: 0.6rem 0 0 !important; }
.read-more-inline .chev { width: 0.8em; height: 0.8em; margin-left: 0.2em; vertical-align: -0.05em; }
.read-less .chev { transform: rotate(180deg); }
.compare-toggle .concept-look { text-decoration: none; } /* card footer labels: colour only, no dots */
/* the stuck chip bar takes its section's background (section 4 is on the alternate, darker band) */
main section:nth-of-type(even) .prop-nav.stuck { background: var(--card-head); box-shadow: 0 0 0 100vmax var(--card-head); }
/* operator chips inside running text: snug, so they do not push lines apart */
mpadded.op.op-inline { padding: 0 0.16em; }
/* operators in running text: a highlighter stroke (lower part of the glyph) instead of a boxed chip */
mpadded.op.op-inline { padding: 0 0.12em; margin-inline: 0.04em; border-radius: 0.12em; box-shadow: none; background: linear-gradient(transparent 38%, color-mix(in srgb, var(--ours-bar) 45%, transparent) 38%, color-mix(in srgb, var(--ours-bar) 45%, transparent) 92%, transparent 92%); }
mpadded.op.classic.op-inline { background: linear-gradient(transparent 38%, color-mix(in srgb, var(--classic-op) 30%, transparent) 38%, color-mix(in srgb, var(--classic-op) 30%, transparent) 92%, transparent 92%); }
/* highlighter band covers the whole glyph height */
mpadded.op.op-inline { background: color-mix(in srgb, var(--ours-bar) 40%, transparent); padding: 0.02em 0.12em; border-radius: 0.14em; }
mpadded.op.classic.op-inline { background: color-mix(in srgb, var(--classic-op) 26%, transparent); }
.formula.formula-sm mpadded.op-inline { padding: 0.04em 0.16em; } /* chips in the small formula: same flat style */
mpadded.op.wheel { margin-inline: 0.2em; } /* the composition operator: ⊕ and ⊗ drawn on top of each other, as in the site's wheel icon */
mpadded.op.wheel mpadded > mo { clip-path: circle(0.27em at 50% 52%); } /* only the + spokes of ⊕: the ring is drawn once, by ⊗ */
/* the composition operator, drawn as the site's wheel (circle with + and × spokes), in the text colour */
.wheel-glyph { background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23000' stroke-width='7.5' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M50 6V94M6 50H94M18.9 18.9 81.1 81.1M81.1 18.9 18.9 81.1'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23000' stroke-width='7.5' stroke-linecap='round'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M50 6V94M6 50H94M18.9 18.9 81.1 81.1M81.1 18.9 18.9 81.1'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
/* card "See more": the extra text continues the card itself (no indented panel with a side rule) */
.more-body.card-more { margin-left: 0; padding-left: 0; border-left: 0; }
/* card "See more / See less": centred at the bottom of the card, below the extra text when open */
.card .card-more-line { text-align: center; margin: 0.9rem 0 0; }
.card .more-body.card-more + .card-more-line { margin-top: 0.9rem; }
/* card "See more / See less": the label, centred, with a big chevron below it (pointing up when open) */
.card .card-more-line .see-more { flex-direction: column; align-items: center; gap: 0; text-decoration: none; font-size: 0.85rem; color: var(--muted); }
.card .card-more-line .see-more .sm-labels { justify-items: center; }
.card .card-more-line .see-more .chev { width: 1.6em; height: 1.6em; margin-top: -0.15em; color: var(--ink); }
.card .card-more-line .see-more:hover { color: var(--ink); }
/* card "See more / See less": a full-width divider with a big chevron centred below it; the whole strip is the button,
   the label is kept for screen readers only */
.card .card-more-line { margin: 1rem -1.35rem -1.25rem; border-top: 1px solid var(--line); }
.card .more-body.card-more + .card-more-line { margin-top: 1rem; }
.card .card-more-line .see-more { display: flex; width: 100%; justify-content: center; padding: 0.35rem 0 0.4rem; border-radius: 0 0 10px 10px; color: var(--muted); }
.card .card-more-line .see-more:hover { color: var(--ink); background: color-mix(in srgb, var(--line) 25%, var(--card)); }
.card .card-more-line .see-more .sm-labels { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.card .card-more-line .see-more .chev { width: 1.7rem; height: 1.7rem; margin: 0; color: inherit; }
.card .card-more-line .see-more:focus-visible { outline-offset: -2px; }
/* the strip names what the card holds: a small label next to the big chevron */
.card .card-more-line .see-more { align-items: center; gap: 0.35rem; }
.card .card-more-line .see-more .sm-labels { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: inline-grid; justify-items: center; font-size: 0.85rem; font-weight: 600; }
.card .card-more-line .see-more .sm-labels > span { grid-area: 1 / 1; }
.card .card-more-line .see-more .chev { width: 1.35rem; height: 1.35rem; }
.card .card-more-line .see-more { gap: 0; padding-top: 0.3rem; }
.card .card-more-line .see-more .sm-labels { line-height: 1.1; }
.card .card-more-line .see-more .chev { margin-top: -0.2rem; } /* the label sits right on the chevron */
.card .card-more-line .see-more .chev { margin-top: 0; } /* a little air between "Details" and the chevron */
.card .card-more-line .see-more { padding: 0.55rem 0 0.5rem; } /* more room in the strip */
.card .card-more-line .see-more .chev { margin-top: 0.2rem; } /* and between the label and the chevron */
/* strip labels: centred line by line and balanced when they wrap, so label and chevron always form a symmetric stack */
.card .card-more-line .see-more { flex-direction: column; align-items: center; text-align: center; }
.card .card-more-line .see-more .sm-labels, .card .card-more-line .see-more .sm-labels > span { text-align: center; text-wrap: balance; max-width: 22rem; white-space: normal; }
.card .card-more-line .see-more .sm-labels { line-height: 1.25; } /* two-line labels: compact, centred stack */
/* card footers: one accordion row per part of the details (as in the recurrence card), label left, chevron right */
.card:has(> .card-foots) { padding-bottom: 0; }
.card-foots { margin: 1.1rem -1.35rem 0; }
.card-foot { border-top: 1px solid var(--line); }
.card-foot .card-foot-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; margin: 0; padding: 0.75rem 1.35rem; text-decoration: none; font-size: 0.92rem; color: var(--muted); border-radius: 0; }
.card-foot .card-foot-toggle[hidden] { display: none; }
.card-foot:last-child .card-foot-toggle[aria-expanded="false"] { border-radius: 0 0 10px 10px; }
.card-foot .card-foot-toggle:hover { color: var(--ink); }
.card-foot .card-foot-toggle .chev { width: 1.05em; height: 1.05em; }
.card-foot .recur-collapse-inner { padding: 0 1.35rem; font-size: 0.92rem; }
.card-foot .recur-collapse.open .recur-collapse-inner { padding-bottom: 1rem; }
.card-foot .recur-collapse-inner > :last-child { margin-bottom: 0; }
.card-foot .recur-collapse-inner .card-list { margin: 0 0 0.6rem; }
#properties .lead:has(+ .prop-scope) { margin-bottom: 0; }
#properties .lead:has(+ .prop-scope) { text-align: center; } /* the sentence introducing the chips, centred above them */
#properties .lead:has(+ .prop-scope) { margin-top: 1.6rem; } /* more room between the heading and the centred sentence */
#properties .lead:has(+ .prop-scope) { margin-bottom: 0.35rem; }
/* section 4 chips: the property is guaranteed by MinMax RNCs — a green check, as in the comparison table */
#properties .prop-nav a.dl-item::after { content: "\2713"; margin-left: 0.4em; font-weight: 800; color: var(--yes); }
#properties .prop-nav a.dl-item::after { margin-left: -0.05em; }
#properties .prop-nav { column-gap: 0.6em; }
#properties .prop-nav a.dl-item { padding-right: 0.7em; }
/* a thin vertical divider before the check */
#properties .prop-nav a.dl-item::after { margin-left: 0.1em; padding-left: 0.5em; border-left: 1px solid var(--line); line-height: 1.1; }
/* section 4 cards: the same green check, in the top right corner */
#properties .card { position: relative; }
#properties .card::after { content: "\2713"; position: absolute; top: 1.1rem; right: 1.2rem; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font-weight: 800; font-size: 1rem; color: var(--yes); background: color-mix(in srgb, var(--yes) 12%, var(--card)); }
#properties .card .card-head { padding-right: 2.2rem; } /* titles never run under the check */
/* phones, stuck bar: no checks (the bar must stay one row) */
@media (max-width: 40rem) { #properties .prop-nav.stuck a.dl-item::after { display: none; } }

/* ---------- "Try MinMax recurrence" widget (assets/recur-widget.js) ---------- */
.recur-widget { padding-top: 0.2rem; }
.rw-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.rw-btn { padding: 0.3rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.rw-btn:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--line)); }
.rw-btn.rw-primary { background: var(--ours-mark); border-color: var(--ours-mark); color: #1a1609; }
.rw-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rw-status { font-size: 0.85rem; color: var(--muted); }
.rw-v, .rw-fn, .rw-num, .rw-stage, .rw-table th { font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", "Cambria Math", serif; }
.rw-v { font-style: italic; }
.rw-fn { font-style: normal; }
/* stage */
.rw-stage { min-height: 3.4rem; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 0.7rem 0.9rem; margin-bottom: 0.9rem; border-radius: 8px; background: color-mix(in srgb, var(--ours-mark) 10%, var(--card)); font-size: 1.15rem; text-align: center; overflow-x: auto; }
.rw-msg { font-family: inherit; font-size: 0.95rem; color: var(--muted); }
.rw-row { display: flex; justify-content: center; align-items: baseline; gap: 0.35em; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity 0.35s ease, transform 0.35s ease; }
.rw-stage.p1 .rw-row { opacity: 1; transform: none; }
.rw-op { font-style: normal; }
.rw-arg { display: inline-block; padding: 0 0.12em; border-radius: 0.15em; transition: opacity 0.35s ease, background-color 0.35s ease, color 0.35s ease, transform 0.35s ease; }
.rw-stage.p2 .rw-min .rw-arg.win { background: color-mix(in srgb, var(--ours-bar) 45%, transparent); }
.rw-stage.p2 .rw-min:not(.collapsed) .rw-arg:not(.win) { opacity: 0.3; }
.rw-min.collapsed .rw-picked { background: color-mix(in srgb, var(--ours-bar) 30%, transparent); animation: rw-pop 0.35s ease; }
.rw-stage.p3 .rw-maxwin { background: color-mix(in srgb, var(--ours-bar) 60%, transparent); font-weight: 700; }
.rw-stage.p3 .rw-loser { opacity: 0.3; background: none; }
.rw-result { opacity: 0; transform: translateX(-6px); transition: opacity 0.35s ease, transform 0.35s ease; display: inline-flex; gap: 0.35em; }
.rw-stage.p4 .rw-result { opacity: 1; transform: none; }
.rw-result .rw-num { font-weight: 700; color: var(--ink); padding: 0 0.15em; border-radius: 0.15em; background: color-mix(in srgb, var(--ours-mark) 35%, transparent); }
@keyframes rw-pop { from { transform: scale(0.7); opacity: 0.3; } to { transform: none; opacity: 1; } }
/* table */
.rw-table-wrap { overflow-x: auto; }
.rw-table { border-collapse: collapse; margin: 0 auto; font-size: 0.95rem; }
.rw-table th, .rw-table td { padding: 0.3rem 0.35rem; text-align: center; }
.rw-table thead th { font-size: 0.8rem; font-weight: 600; color: var(--muted); font-family: inherit; }
.rw-table tbody th { font-weight: 400; padding-right: 0.6rem; }
.rw-table td { border-left: 1px solid var(--line); transition: background-color 0.3s ease; }
.rw-table td.rw-current { background: color-mix(in srgb, var(--ours-mark) 14%, transparent); }
.rw-table tr.rw-x td { border-top: 1px solid var(--line); }
.rw-table input { width: 2.1em; padding: 0.15rem 0; border: 1px solid var(--line); border-radius: 5px; background: var(--card); font: inherit; font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", serif; text-align: center; color: var(--ink); -moz-appearance: textfield; }
.rw-table input::-webkit-outer-spin-button, .rw-table input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rw-mat { display: inline-grid; gap: 2px; }
.rw-mat.d1 { grid-template-columns: auto; }
.rw-mat.d2 { grid-template-columns: auto auto; }
.rw-vec { display: inline-flex; flex-direction: column; gap: 2px; align-items: center; }
.rw-state .rw-num { display: inline-block; min-width: 1.6em; opacity: 0; transform: translateY(-10px); transition: opacity 0.35s ease, transform 0.35s ease; font-weight: 700; }
.rw-state.shown .rw-num { opacity: 1; transform: none; }
.rw-note { margin: 0.6rem 0 0 !important; font-size: 0.82rem; color: var(--muted); text-align: center; }
@media (prefers-reduced-motion: reduce) { .rw-row, .rw-arg, .rw-result, .rw-state .rw-num, .rw-table td { transition: none; } .rw-min.collapsed .rw-picked { animation: none; } }
.rw-sym { font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", serif; padding: 0 0.05em; }
/* widget chart */
.rw-chart { margin: 0 0 0.6rem; overflow-x: auto; }
.rw-svg { display: block; width: 100%; max-width: 30rem; min-width: 18rem; height: auto; margin: 0 auto; overflow: visible; }
.rw-grid { stroke: var(--line); stroke-width: 1; }
.rw-axis { font-size: 10px; fill: var(--muted); font-family: inherit; }
.rw-col { opacity: 0.35; transition: opacity 0.3s ease; }
.rw-col.current, .rw-col.done { opacity: 1; }
.rw-cap { fill: color-mix(in srgb, var(--classic-op) 16%, transparent); }
.rw-capline { stroke: var(--classic-op); stroke-width: 2; }
.rw-floor { fill: color-mix(in srgb, var(--ours-mark) 22%, transparent); }
.rw-floorline { stroke: color-mix(in srgb, var(--ours-bar) 85%, var(--ink)); stroke-width: 2; }
.rw-floor.e1 { fill: color-mix(in srgb, var(--prop-c) 18%, transparent); }
.rw-floorline.e1 { stroke: var(--prop-c); }
.rw-lab { font-size: 10px; font-family: "Latin Modern Math Web", "STIX Two Math", serif; fill: var(--muted); }
.rw-trail { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; opacity: 0.55; }
.rw-trail.e1 { stroke: var(--prop-t); }
.rw-pt { fill: var(--ink); opacity: 0.6; }
.rw-pt.e1 { fill: var(--prop-t); }
.rw-dot { transition: transform 0.42s cubic-bezier(0.3, 0, 0.2, 1); }
.rw-dot circle { fill: var(--ours-mark); stroke: var(--ink); stroke-width: 1.5; }
.rw-dot.e1 circle { fill: color-mix(in srgb, var(--prop-c) 45%, var(--card)); stroke: var(--prop-t); }
.rw-dot text { font-size: 9px; font-weight: 700; fill: var(--ink); font-family: inherit; }
@media (prefers-reduced-motion: reduce) { .rw-dot, .rw-col { transition: none; } }
/* widget values: tappable buttons (no number spinners), a clean focus ring, and a 0–9 picker */
.recur-widget { position: relative; }
.rw-val { min-width: 2.1em; min-height: 2em; padding: 0.1rem 0.3rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font: inherit; font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", serif; font-size: 1rem; color: var(--ink); cursor: pointer; }
.rw-val:hover { border-color: color-mix(in srgb, var(--ours-bar) 70%, var(--line)); background: color-mix(in srgb, var(--ours-mark) 10%, var(--card)); }
.rw-val:focus { outline: none; }
.rw-val:focus-visible, .rw-val[aria-expanded="true"] { position: relative; z-index: 1; border-color: var(--ours-bar); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ours-mark) 55%, transparent); }
.rw-mat, .rw-vec { gap: 4px; }
.rw-pad { position: absolute; z-index: 20; width: 4.4rem; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.35); overflow: hidden; }
.rw-pad[hidden] { display: none; }
.rw-pad::before { content: ""; position: absolute; left: 4px; right: 4px; top: calc(50% - 17px); height: 34px; border-radius: 8px; background: color-mix(in srgb, var(--ours-mark) 30%, transparent); pointer-events: none; } /* the selection band */
.rw-pad::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--card), transparent 35%, transparent 65%, var(--card)); } /* rows fade out above and below */
.rw-wheel { position: relative; height: 170px; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.rw-wheel::-webkit-scrollbar { display: none; }
.rw-wheel-pad { height: 68px; }
.rw-wheel-item { height: 34px; display: grid; place-items: center; scroll-snap-align: center; font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", serif; font-size: 1.1rem; color: var(--muted); cursor: pointer; user-select: none; }
.rw-wheel-item.on { color: var(--ink); font-weight: 700; }
.rw-pad:focus-within { box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.35), 0 0 0 2px color-mix(in srgb, var(--ours-mark) 55%, transparent); }
@media (pointer: coarse) { .rw-val { min-width: 2.5em; min-height: 2.4em; } }
/* widget: colour-coded parts — R (cap) red, s (floor) yellow, x (state) blue — in the table and the chart */
.recur-widget { --rw-r: #d9534f; --rw-s: #e0a800; --rw-x: #3a7bd5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .recur-widget { --rw-r: #f07a76; --rw-s: #f5c542; --rw-x: #7aa7ee; } }
.rw-table { border-collapse: separate; border-spacing: 0 6px; }
.rw-table td { border-left: 0; }
.rw-table tr.rw-x td { border-top: 0; }
.rw-table tbody tr > * { background: var(--rw-bg); }
.rw-table tbody tr > :first-child { border-radius: 8px 0 0 8px; }
.rw-table tbody tr > :last-child { border-radius: 0 8px 8px 0; }
.rw-table tbody tr:nth-child(1) { --rw-bg: color-mix(in srgb, var(--rw-r) 11%, var(--card)); }
.rw-table tbody tr:nth-child(2) { --rw-bg: color-mix(in srgb, var(--rw-s) 16%, var(--card)); }
.rw-table tbody tr.rw-x { --rw-bg: color-mix(in srgb, var(--rw-x) 11%, var(--card)); }
.rw-table tbody th { font-weight: 600; }
.rw-table tbody tr:nth-child(1) th { color: color-mix(in srgb, var(--rw-r) 70%, var(--ink)); }
.rw-table tbody tr:nth-child(2) th { color: color-mix(in srgb, var(--rw-s) 55%, var(--ink)); }
.rw-table tbody tr.rw-x th { color: color-mix(in srgb, var(--rw-x) 70%, var(--ink)); }
/* the step being computed: a darker band across all three rows */
.rw-table td.rw-current { background: color-mix(in srgb, var(--ink) 7%, var(--rw-bg)); }
.rw-table thead th.rw-current { color: var(--ink); }
.rw-val { border-color: color-mix(in srgb, var(--ink) 14%, transparent); }
/* chart in the same colours */
.rw-cap { fill: color-mix(in srgb, var(--rw-r) 14%, transparent); }
.rw-capline { stroke: var(--rw-r); }
.rw-lab-cap { fill: var(--rw-r); }
.rw-floor, .rw-floor.e1 { fill: color-mix(in srgb, var(--rw-s) 22%, transparent); }
.rw-floorline, .rw-floorline.e1 { stroke: var(--rw-s); }
.rw-floorline.e1 { stroke-dasharray: 3 2; }
.rw-lab-floor { fill: color-mix(in srgb, var(--rw-s) 70%, var(--ink)); }
.rw-trail { stroke: var(--rw-x); opacity: 0.8; }
.rw-pt { fill: var(--rw-x); opacity: 0.85; }
.rw-dot circle { fill: color-mix(in srgb, var(--rw-x) 30%, var(--card)); stroke: var(--rw-x); }
.rw-trail.e1 { stroke: color-mix(in srgb, var(--rw-x) 60%, var(--ink)); stroke-dasharray: 4 3; }
.rw-pt.e1 { fill: color-mix(in srgb, var(--rw-x) 60%, var(--ink)); }
.rw-dot.e1 circle { fill: var(--card); stroke: color-mix(in srgb, var(--rw-x) 60%, var(--ink)); }
/* the step being computed: a clearly visible column */
.rw-table td.rw-current { background: color-mix(in srgb, var(--ink) 15%, var(--rw-bg)); box-shadow: inset 2px 0 0 color-mix(in srgb, var(--ink) 35%, transparent), inset -2px 0 0 color-mix(in srgb, var(--ink) 35%, transparent); }
.rw-table thead th.rw-current { color: #1a1609; }
.rw-table thead th.rw-current::before { content: ""; }
.rw-table thead th[data-col] { position: relative; }
.rw-table thead th.rw-current { background: var(--ours-mark); border-radius: 999px; }
/* current step: one band down the whole column (replaces the pill and the darker cells) */
.rw-table-wrap { position: relative; }
.rw-table td.rw-current { background: var(--rw-bg); box-shadow: none; }
.rw-table thead th.rw-current { background: none; border-radius: 0; color: var(--ink); }
.rw-steplabel { font-family: inherit !important; font-style: normal; text-align: right; padding-right: 0.6rem !important; }
.rw-band { position: absolute; z-index: 2; pointer-events: none; border-radius: 10px; border: 2px solid var(--ours-mark); background: color-mix(in srgb, var(--ours-mark) 14%, transparent); transition: left 0.35s cubic-bezier(0.3, 0, 0.2, 1), opacity 0.25s ease; }
.rw-band.off { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .rw-band { transition: none; } }
/* chart: named axes, and framed as its own figure, apart from the table */
.rw-axis-title { font-size: 11px; font-weight: 600; fill: var(--muted); font-family: inherit; }
.rw-chart { margin: 0 0 1.1rem; padding: 0.6rem 0.4rem 0.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.rw-table-wrap { padding-top: 0.2rem; }
/* widget figures: each in its own panel with a header saying what it shows */
.rw-chart { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.rw-fig { margin: 0 0 1rem; padding: 0.75rem 0.9rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.rw-fig-head { margin-bottom: 0.5rem; }
.rw-fig-head h4 { margin: 0 0 0.15rem; font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.rw-fig-head p { margin: 0 !important; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.rw-key { font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", serif; padding: 0 0.15em; border-radius: 0.2em; color: var(--ink); }
.rw-key sub { font-size: 0.75em; }
.rw-key-r { background: color-mix(in srgb, var(--rw-r) 18%, transparent); }
.rw-key-s { background: color-mix(in srgb, var(--rw-s) 26%, transparent); }
.rw-key-x { background: color-mix(in srgb, var(--rw-x) 18%, transparent); font-style: italic; }
.rw-axisline { stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 1.3; }
.rw-arrowhead { fill: color-mix(in srgb, var(--ink) 55%, transparent); }
/* chart axes: fine lines, open arrow tips, tick marks; light dashed grid */
.rw-axisline { stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1; shape-rendering: crispEdges; }
.rw-arrowhead { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.rw-tick { stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1; shape-rendering: crispEdges; }
.rw-grid { stroke: color-mix(in srgb, var(--line) 80%, transparent); stroke-dasharray: 2 4; }
.rw-axis { font-size: 9.5px; fill: color-mix(in srgb, var(--ink) 55%, transparent); font-variant-numeric: tabular-nums; }
.rw-axis-title { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; fill: color-mix(in srgb, var(--ink) 55%, transparent); }
.rw-axisline, .rw-tick { shape-rendering: auto; stroke-linecap: butt; } /* the line ends exactly at the arrow's point */
.rw-dot text.rw-dot-x { font-family: "Latin Modern Math Web", "STIX Two Math", "STIX Two Text", serif; font-style: italic; font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.rw-dot .rw-dot-sub { font-style: normal; font-size: 8px; }
.rw-dot text.rw-dot-x { font-size: 11px; font-weight: 600; font-style: normal; }
.rw-dot .rw-dot-main { font-style: italic; }
.rw-dot .rw-dot-sub { font-style: italic; font-size: 7px; font-weight: 600; }
.rw-lab-sub { font-size: 7px; font-style: italic; }
.rw-fig-head .rw-howto { margin-bottom: 0.25rem !important; color: var(--ink); font-weight: 500; }
.rw-btn { display: inline-flex; align-items: center; gap: 0.4em; }
.rw-btn svg { width: 0.95em; height: 0.95em; flex: none; }
/* stage message: text in the page font; symbols as the coloured keys; subscripts upright */
.rw-stage .rw-msg { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; }
.rw-key sub, .rw-v sub, .rw-table th sub { font-style: normal; }
.rw-key-x { font-style: italic; }
.rw-key-x sub { font-style: normal; }
/* stage: the message line on top, the equation always below it */
.rw-stage { justify-content: flex-start; gap: 0.5rem; }
.rw-stage .rw-msg { font-size: 0.92rem; color: var(--ink); line-height: 1.4; }
.rw-eqs { display: flex; flex-direction: column; gap: 0.35rem; }
/* phase message: a "Step k" tag, four progress dots, then the action */
.rw-stage .rw-msg { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.3rem 0.6rem; }
.rw-phase { padding: 0.08rem 0.55rem; border-radius: 999px; background: var(--ink); color: var(--card); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.rw-dots { display: inline-flex; gap: 4px; }
.rw-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.rw-dots i.on { background: var(--ours-bar); }
.rw-phase-text { font-weight: 500; }
.rw-opk { font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", serif; padding: 0 0.15em; border-radius: 0.15em; background: color-mix(in srgb, var(--ours-bar) 40%, transparent); }
/* sentence messages flow as normal text; only the phase message (tag, dots, action) is laid out as a row */
.rw-stage .rw-msg { display: block; text-align: center; }
.rw-stage .rw-msg:has(.rw-phase) { display: flex; }
/* every message: tag and dots at a fixed place on the left, the text after them, so updates do not shift things around */
.rw-stage .rw-msg:has(.rw-phase) { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start; text-align: left; min-height: 2.8em; max-width: 34rem; margin: 0 auto; width: 100%; }
.rw-phase, .rw-dots { flex: none; margin-top: 0.12em; }
.rw-dots { margin-top: 0.42em; }
.rw-phase-text { flex: 1; min-width: 0; }
.rw-eqres { font-style: normal; white-space: nowrap; }
.rw-eqres::first-letter { font-style: italic; }
/* message row: tag, dots and text centred on one line */
.rw-stage .rw-msg:has(.rw-phase) { align-items: center; }
.rw-phase, .rw-dots { margin-top: 0; }
.rw-phase { line-height: 1.5; }
.rw-dots { align-self: center; }
.rw-phase-text { line-height: 1.4; }
/* message: tag and dots centred on the first line, the text centred on the line below */
.rw-stage .rw-msg:has(.rw-phase) { flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 0.55rem; row-gap: 0.3rem; min-height: 0; max-width: none; text-align: center; }
.rw-phase-text { flex: 0 0 100%; text-align: center; min-height: 1.4em; }
/* equation centred in the panel, whatever the result beside it */
.rw-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; column-gap: 0.35em; }
.rw-row > .rw-core { white-space: nowrap; }
.rw-row > .rw-result { justify-self: start; }
.rw-dots i { transition: background-color 0.3s ease, transform 0.3s ease; }
.rw-dots i.on { transform: scale(1.1); }
@media (prefers-reduced-motion: reduce) { .rw-dots i { transition: none; } }
/* "becomes": the collapsing box keeps one line, clips what fades out */
/* collapsed boxes keep the same box type before, during and after the animation, so nothing jumps when it ends */
.rw-min.collapsed, .rw-max.collapsed { display: inline-block; position: relative; white-space: nowrap; vertical-align: baseline; }
/* no clipping while collapsing: the sliding value stays visible, the old parts just fade out */
.rw-ghost { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; }
.rw-row > .rw-result { display: none; } /* the expression itself becomes the result */
.rw-instant, .rw-instant * { transition: none !important; }
.rw-btn.rw-icon { padding: 0.3rem 0.6rem; }
.rw-btn:disabled { opacity: 0.4; cursor: default; }
/* joined back/forward controls */
.rw-pair { display: inline-flex; }
.rw-pair .rw-btn:first-child { border-radius: 999px 0 0 999px; padding-left: 0.7rem; padding-right: 0.5rem; }
.rw-pair .rw-btn:last-child { border-radius: 0 999px 999px 0; margin-left: -1px; }
.rw-pair .rw-btn:focus-visible { position: relative; z-index: 1; }
.rw-pair .rw-btn.rw-primary:last-child { box-shadow: inset 1px 0 0 color-mix(in srgb, #1a1609 18%, transparent); }
.rw-pair:has(.rw-primary) .rw-btn:first-child { border-color: var(--ours-mark); color: color-mix(in srgb, var(--ink) 80%, transparent); }
.rw-min.collapsed, .rw-max.collapsed { text-align: left; } /* the value starts at the box's left edge, so its slide lands exactly */
.rw-floorline.e1 { stroke-dasharray: none; } /* entries are told apart by their labels, not by dashes */
/* x_k^i in the widget formula: entry above, step below, both right after the x (like a math sub/superscript pair) */
.rw-ss { display: inline-block; position: relative; font-size: 0.62em; width: 0.75em; height: 1.75em; vertical-align: -0.5em; margin-left: 0.05em; }
.rw-ss .up, .rw-ss .dn { position: absolute; left: 0; font-size: 1em; font-style: normal; line-height: 1; }
.rw-ss .up { top: 0; }
.rw-ss .dn { bottom: 0; }
/* widget: consistent, tighter sub/superscripts (smaller, closer to the letter, no extra line height) */
.recur-widget sub, .recur-widget sup { font-size: 0.66em; line-height: 0; position: relative; vertical-align: baseline; font-style: normal; }
.recur-widget sub { top: 0.28em; margin-left: 0.02em; }
.recur-widget sup { top: -0.48em; }
.recur-widget .rw-v + sub, .recur-widget .rw-key-x sub { margin-left: -0.03em; } /* italic x: index tucked in */
/* stacked index pair x_k^i: tight, left-aligned, no gap before "=" */
.rw-ss { display: inline-grid; grid-template-rows: auto auto; width: auto; height: auto; font-size: 0.66em; line-height: 0.95; vertical-align: -0.42em; margin-left: 0; margin-right: 0.08em; position: static; }
.rw-ss .up, .rw-ss .dn { position: static; font-size: 1em; text-align: left; }
.rw-ss { line-height: 1.1; vertical-align: 0.68em; } /* grid baseline = the superscript row: raise it to superscript height; the subscript row then falls just below the line */
/* italic correction: the superscript clears the top-right of the slanted x, the subscript stays tucked in */
.rw-ss { margin-left: 0.04em; }
.rw-ss .up { padding-left: 0.22em; }
.rw-ss .dn { padding-left: 0; }
.rw-idx { font-style: normal; margin-left: 0.02em; } /* x_k[i] */
.rw-dot .rw-dot-idx { font-style: normal; font-size: 8px; font-weight: 600; }
.rw-dot circle { r: 13px; }
/* entry index [i]: smaller and lighter than the symbol it indexes */
math .mm-idx { font-size: 0.88em; opacity: 0.62; }
.rw-idx { font-size: 0.8em; opacity: 0.62; }
.rw-key .rw-idx { font-size: 0.8em; }
/* the dot labels x_k[i]: fit and centred inside the circle */
.rw-dot circle { r: 14px; }
.rw-dot text.rw-dot-x { font-size: 10px; }
.rw-dot .rw-dot-idx { font-size: 7px; font-weight: 500; opacity: 0.65; }
.rw-lab-idx { font-size: 7px; opacity: 0.7; }
.rw-idx { margin-left: 0.08em; } /* a little air between the subscript and [i] */
/* vector chart: dots show the entry number; a legend says which entry of the state each one is */
.rw-dot text.rw-dot-n { font-family: inherit; font-style: normal; font-size: 11px; font-weight: 700; }
.rw-legend { display: flex; justify-content: center; gap: 1.2rem; margin-top: 0.2rem; font-size: 0.85rem; }
.rw-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.rw-legend-dot { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; font-size: 0.72rem; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--rw-x) 30%, var(--card)); border: 1.5px solid var(--rw-x); }
.rw-legend-dot.e1 { background: var(--card); border-color: color-mix(in srgb, var(--rw-x) 60%, var(--ink)); }
.rw-vector .rw-dot circle { r: 10.5px; } /* one digit inside: a smaller dot */
/* legend: the same marks as in the chart */
.rw-legend { flex-wrap: wrap; gap: 0.4rem 1.1rem; color: var(--muted); }
.rw-legend-dot i { font-family: "Latin Modern Math Web", "STIX Two Math", serif; font-style: italic; font-weight: 600; font-size: 0.85rem; }
.rw-legend-bar { display: inline-grid; place-items: end center; width: 1.3rem; height: 1.1rem; font-family: "Latin Modern Math Web", "STIX Two Math", serif; font-size: 0.72rem; line-height: 1; }
.rw-legend-bar.cap { border-bottom: 2px solid var(--rw-r); color: var(--rw-r); background: linear-gradient(color-mix(in srgb, var(--rw-r) 14%, transparent), color-mix(in srgb, var(--rw-r) 14%, transparent)) top / 100% 55% no-repeat; place-items: start center; }
.rw-legend-bar.floor { border-top: 2px solid var(--rw-s); color: color-mix(in srgb, var(--rw-s) 70%, var(--ink)); background: linear-gradient(color-mix(in srgb, var(--rw-s) 22%, transparent), color-mix(in srgb, var(--rw-s) 22%, transparent)) bottom / 100% 55% no-repeat; place-items: end center; font-family: inherit; font-weight: 700; }
.rw-lab-n { font-family: inherit; font-weight: 700; font-size: 9px; }
.rw-dot text.rw-dot-x { font-size: 12px; }
/* vector chart: R_t matrices above the columns, and per-entry cap marks */
.rw-mcell { fill: color-mix(in srgb, var(--rw-r) 13%, var(--card)); stroke: color-mix(in srgb, var(--rw-r) 45%, transparent); stroke-width: 0.6; }
.rw-mtext { font-size: 7px; fill: color-mix(in srgb, var(--rw-r) 60%, var(--ink)); font-family: "Latin Modern Math Web", "STIX Two Math", serif; }
.rw-capline-v { stroke-width: 1.6; }
.rw-lab-capn { font-family: inherit; font-weight: 700; font-size: 7px; fill: var(--rw-r); }
.rw-legend-item i { font-family: "Latin Modern Math Web", "STIX Two Math", serif; }
.rw-legend-mat { display: inline-grid; grid-template-columns: 0.55rem 0.55rem; gap: 1px; }
.rw-legend-mat i { width: 0.55rem; height: 0.55rem; border-radius: 1.5px; background: color-mix(in srgb, var(--rw-r) 13%, var(--card)); border: 0.6px solid color-mix(in srgb, var(--rw-r) 45%, transparent); }
.rw-scell { fill: color-mix(in srgb, var(--rw-s) 20%, var(--card)); stroke: color-mix(in srgb, var(--rw-s) 60%, transparent); stroke-width: 0.6; }
.rw-stext { font-size: 7px; fill: color-mix(in srgb, var(--rw-s) 55%, var(--ink)); font-family: "Latin Modern Math Web", "STIX Two Math", serif; }
.rw-legend-svec i { background: color-mix(in srgb, var(--rw-s) 20%, var(--card)); border-color: color-mix(in srgb, var(--rw-s) 60%, transparent); }
.rw-legend-svec { grid-template-rows: 0.55rem; }
.rw-legend-svec { grid-template-columns: 0.55rem 0.55rem; }
/* the state as a block with its value (entry 1 filled, entry 2 outlined) */
.rw-xcell { fill: color-mix(in srgb, var(--rw-x) 22%, var(--card)); stroke: var(--rw-x); stroke-width: 1.4; }
.rw-dot.e1 .rw-xcell { fill: var(--card); stroke: color-mix(in srgb, var(--rw-x) 70%, var(--ink)); }
.rw-xtext { font-family: "Latin Modern Math Web", "STIX Two Math", serif; font-size: 11px; font-weight: 600; fill: var(--ink); }
.rw-legend-cell { display: inline-block; width: 1.15rem; height: 0.9rem; border-radius: 3px; background: color-mix(in srgb, var(--rw-x) 22%, var(--card)); border: 1.4px solid var(--rw-x); }
.rw-legend-cell.e1 { background: var(--card); border-color: color-mix(in srgb, var(--rw-x) 70%, var(--ink)); }
.rw-legend-pair { display: inline-flex; gap: 2px; }
.rw-legend-pair .rw-legend-cell { width: 0.85rem; height: 0.75rem; }
/* vector step: x_k = [ entry 1 ; entry 2 ] in one bracketed column */
.rw-vec-eq { display: flex; justify-content: center; align-items: center; gap: 0.4em; white-space: nowrap; }
.rw-vecbr { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 0.25em; padding: 0.15em 0.55em; }
.rw-vecbr::before, .rw-vecbr::after { content: ""; position: absolute; top: 0; bottom: 0; width: 0.32em; border: 1.5px solid var(--ink); }
.rw-vecbr::before { left: 0; border-right: 0; border-radius: 2px 0 0 2px; }
.rw-vecbr::after { right: 0; border-left: 0; border-radius: 0 2px 2px 0; }
.rw-row.rw-vrow { display: block; opacity: 0; transform: translateY(4px); }
.rw-stage.p1 .rw-row.rw-vrow { opacity: 1; transform: none; }
/* blocks: every value tinted by what it is (R red, x blue, s yellow); computed values amber */
.rw-arg[data-role="R"] { background: color-mix(in srgb, var(--rw-r) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-r) 35%, transparent); }
.rw-arg[data-role="x"] { background: color-mix(in srgb, var(--rw-x) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-x) 35%, transparent); }
.rw-arg[data-role="s"] { background: color-mix(in srgb, var(--rw-s) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-s) 50%, transparent); }
.rw-arg { padding: 0 0.22em; margin: 0 0.04em; border-radius: 0.2em; }
.rw-stage.p2 .rw-min .rw-arg.win { background-color: color-mix(in srgb, var(--ours-bar) 45%, transparent); box-shadow: inset 0 0 0 1.5px var(--ours-bar); }
.rw-picked { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ours-bar) 60%, transparent); }
.rw-stage.p3 .rw-maxwin { box-shadow: inset 0 0 0 1.5px var(--ours-bar); }
/* once the whole expression has become its value, that value is the new state: a blue block */
.rw-max.collapsed > .rw-picked { background: color-mix(in srgb, var(--rw-x) 16%, transparent); box-shadow: inset 0 0 0 1.2px var(--rw-x); font-weight: 600; }
.rw-stage-legend { margin-top: 0.35rem; padding-top: 0.45rem; border-top: 1px dashed color-mix(in srgb, var(--ours-bar) 40%, transparent); }
.rw-stage-legend .rw-legend { margin: 0; font-size: 0.8rem; }
.rw-legend-mat.rw-legend-rsc, .rw-legend-mat.rw-legend-one { grid-template-columns: 0.55rem; }
.rw-stage-legend { font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; }
/* equation legend: small blocks tinted like the values in the formula */
.rw-legend-blk { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 0.2rem; }
.rw-legend-blk.r { background: color-mix(in srgb, var(--rw-r) 13%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-r) 35%, transparent); }
.rw-legend-blk.x { background: color-mix(in srgb, var(--rw-x) 13%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-x) 35%, transparent); }
.rw-legend-blk.s { background: color-mix(in srgb, var(--rw-s) 20%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-s) 50%, transparent); }
.rw-legend-blk.k { background: color-mix(in srgb, var(--ours-bar) 45%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--ours-bar); }
/* chart legend: under the chart, same look */
.rw-chart-legend { margin-top: 0.3rem; font-size: 0.8rem; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; }
.rw-legend-bar.cap, .rw-legend-bar.floor { width: 1.2rem; height: 0.85rem; }
/* legend line marks: the shading touches its line, as in the chart (set: shading below the line; reset: above) */
.rw-legend-bar.floor { background: color-mix(in srgb, var(--rw-s) 22%, transparent); }
.rw-legend-bar.cap { background: color-mix(in srgb, var(--rw-r) 14%, transparent); }
/* intermediate values (what each ⊗/min and ⊕/max keeps): violet, distinct from the yellow set values */
.recur-widget { --rw-k: #7c5cc4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .recur-widget { --rw-k: #b9a3f0; } }
.rw-stage.p2 .rw-min .rw-arg.win { background-color: color-mix(in srgb, var(--rw-k) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--rw-k); }
.rw-min.collapsed .rw-picked, .rw-picked { background: color-mix(in srgb, var(--rw-k) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rw-k) 60%, transparent); }
.rw-stage.p3 .rw-maxwin { background: color-mix(in srgb, var(--rw-k) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--rw-k); }
.rw-legend-blk.k { background: color-mix(in srgb, var(--rw-k) 16%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--rw-k); }
/* the open footer row stops clipping once settled, so the widget's controls can stick */
.recur-collapse.open.settled .recur-collapse-inner { overflow: visible; }
/* widget controls: a sticky bar under the page's top bar while the widget is in view */
.rw-controls { position: sticky; top: 2.75rem; z-index: 15; margin: 0 -1.25rem 0.8rem; padding: 0.55rem 1.25rem; background: color-mix(in srgb, var(--card) 94%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
@media (max-width: 44rem) { .rw-controls { margin-left: -0.9rem; margin-right: -0.9rem; padding-left: 0.9rem; padding-right: 0.9rem; } }
/* phones: the sticky controls on one row — icons only, except Step */
@media (max-width: 30rem) {
  .rw-controls { flex-wrap: nowrap; gap: 0.35rem; }
  /* icon-only now handled one button at a time by the widget script */
  .rw-controls .rw-btn { padding: 0.3rem 0.6rem; }
}
/* the how-to hint, at the right end of the sticky controls */
.rw-hint { margin-left: auto; padding-left: 0.6rem; max-width: 15rem; font-size: 0.8rem; line-height: 1.3; color: var(--muted); text-align: right; }
@media (max-width: 44rem) { .rw-hint { display: none; } }
@media (min-width: 44.01rem) { .rw-controls { flex-wrap: nowrap; align-items: center; } .rw-hint { flex: 1 1 auto; min-width: 8rem; max-width: 16rem; } }
/* buttons never squeeze; the hint is one left-aligned line under them */
.rw-controls .rw-btn, .rw-pair { flex: none; white-space: nowrap; }
@media (min-width: 44.01rem) { .rw-controls { flex-wrap: wrap; } .rw-hint { flex: 0 0 100%; max-width: none; min-width: 0; margin-left: 0; padding-left: 0.1rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
/* breathing room: around the hint line, and on both sides of the bar's bottom rule */
@media (min-width: 44.01rem) { .rw-hint { margin-top: 0.3rem; } }
.rw-controls { row-gap: 0.35rem; padding-bottom: 0.85rem; margin-bottom: 1.15rem; }
.rw-totable { display: inline-flex; align-items: center; gap: 0.15em; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.18em; }
.rw-totable:hover { text-decoration-color: currentColor; }
.rw-totable svg { width: 0.95em; height: 0.95em; }
.rw-totable:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.rw-stage-head { margin: 0 0 0.1rem; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif; font-size: 0.92rem; font-weight: 700; color: var(--ink); text-align: left; }
/* clip (not hidden) while opening/closing: 'hidden' makes the panel the sticky bar's scroll container,
   pushing the bar down by its sticky offset until the panel settles, then it snapped up */
.recur-foot .recur-collapse-inner { overflow: clip; }
/* two-layer diagram: each layer wrapped in its own dashed box, wider-spaced than the neuron boxes */
.dg-layer { fill: color-mix(in srgb, var(--ink) 2.5%, transparent); stroke: color-mix(in srgb, var(--ink) 32%, transparent); stroke-width: 1.2; stroke-dasharray: 3 4; }
/* layers switch, inline at the start of the diagram caption */
.rnc-diagram .see-more-line .recur-controls.dg-controls { display: inline-flex; vertical-align: middle; margin: 0 0.6rem 0 0; padding: 0; border: 0; background: none; position: static; }
.rnc-diagram .dg-controls .tabs { display: inline-flex; }
.rnc-diagram .dg-controls .tabs[hidden] { display: none; }
@media (max-width: 30rem) { .rnc-diagram .see-more-line .recur-controls.dg-controls { display: flex; justify-content: center; margin: 0 0 0.4rem; } }
/* the layers switch sits inside the caption sentence: "A MinMax RNC of [1|2] layer(s) …" */
.rnc-diagram .see-more-line .recur-controls.dg-controls { display: inline-flex; vertical-align: middle; margin: -0.2rem 0.05rem 0 0.3rem; }
@media (max-width: 30rem) { .rnc-diagram .see-more-line .recur-controls.dg-controls { display: inline-flex; margin: -0.2rem 0.05rem 0 0.3rem; } }
.rnc-diagram .dg-controls .tabs button { padding-top: 0.1rem; padding-bottom: 0.1rem; }
.dg-nojs[hidden] { display: none; }
.rnc-diagram .dg-cap-text { display: inline-grid; text-align: left; }
.rnc-diagram .dg-cap-text > [data-cap] { grid-area: 1 / 1; }
.rnc-diagram .dg-cap-text > .dg-cap-off { visibility: hidden; }
html:not(.js) .rnc-diagram .dg-cap-text > [data-cap="2"] { display: none; }
/* caption with the layers switch: switch centred, lead text right-aligned to its left, the rest left-aligned to its right,
   so changing the number of layers only changes text to the right — the switch never moves */
.rnc-diagram .dg-cap-text { display: inline; }
.rnc-diagram .dg-cap-text > .dg-cap-off { display: none; }
@media (min-width: 30.01rem) {
  html.js .rnc-diagram .see-more-line { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 0; }
  html.js .rnc-diagram .dg-cap-lead { text-align: right; }
  html.js .rnc-diagram .dg-cap-tail { text-align: left; }
  html.js .rnc-diagram .see-more-line .recur-controls.dg-controls { margin: 0 0.35rem; }
}
/* "See more" on its own line under the caption sentence */
.rnc-diagram .dg-cap-more { display: block; margin-top: 0.15rem; text-align: center; }
@media (min-width: 30.01rem) {
  html.js .rnc-diagram .see-more-line { align-items: start; }
  html.js .rnc-diagram .dg-cap-more { grid-column: 1 / -1; }
}
/* phones: the sentence flows normally; both phrasings share one slot so the switch never moves */
@media (max-width: 30rem) {
  .rnc-diagram .dg-cap-text { display: inline-grid; text-align: left; }
  .rnc-diagram .dg-cap-text > [data-cap] { grid-area: 1 / 1; }
  .rnc-diagram .dg-cap-text > .dg-cap-off { display: inline; visibility: hidden; }
}
/* inline layers switch: text-sized, baseline-aligned, a slim pill that reads as part of the sentence */
.rnc-diagram .see-more-line .recur-controls.dg-controls { vertical-align: baseline; margin: 0 0.3rem; }
.rnc-diagram .dg-controls .tabs { padding: 2px; border-radius: 999px; font-size: inherit; line-height: 1.25; vertical-align: baseline; background: color-mix(in srgb, var(--ours-mark) 22%, var(--page)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ours-mark) 45%, transparent); }
.rnc-diagram .dg-controls .tabs button, .rnc-diagram .dg-controls .tabs button[aria-pressed="true"] { min-width: 1.55em; padding: 0 0.42em; border-radius: 999px; font: inherit; font-weight: 700; line-height: 1.35; }
.rnc-diagram .dg-controls .tabs .thumb { top: 2px; bottom: 2px; border-radius: 999px; background: var(--ours-mark); box-shadow: none; }
.rnc-diagram .dg-controls .tabs button[aria-pressed="true"] { color: #1a1609; }
.rnc-diagram .dg-controls .tabs button:focus-visible { outline-offset: 1px; border-radius: 999px; }
@media (min-width: 30.01rem) { html.js .rnc-diagram .see-more-line { align-items: baseline; } html.js .rnc-diagram .see-more-line .recur-controls.dg-controls { margin: 0 0.3rem; } }
/* caption sentence sized to match the inline switch (which keeps its own size) */
.rnc-diagram .see-more-line { font-size: 1.0625rem; line-height: 1.5; }
.rnc-diagram .dg-controls .tabs { font-size: 0.95rem; }
.rnc-diagram .dg-cap-more { font-size: 0.95rem; }
/* inline layers switch: roomier targets for tapping */
.rnc-diagram .dg-controls .tabs { gap: 0.35rem; padding: 3px; }
.rnc-diagram .dg-controls .tabs button, .rnc-diagram .dg-controls .tabs button[aria-pressed="true"] { min-width: 2em; padding: 0.05em 0.55em; }
.rnc-diagram .dg-controls .tabs .thumb { top: 3px; bottom: 3px; }
.rnc-diagram .dg-controls .tabs button::after { content: ""; position: absolute; inset: -8px -3px; } /* larger invisible tap area */
.rnc-diagram .dg-controls .tabs { gap: 0.2rem; }
.rnc-diagram .dg-controls .tabs button, .rnc-diagram .dg-controls .tabs button[aria-pressed="true"] { min-width: 1.8em; padding: 0.03em 0.5em; }
/* space around the inline switch matches the room inside it (between and around its options) */
.rnc-diagram .see-more-line .recur-controls.dg-controls { margin: 0 0.5rem; }
@media (min-width: 30.01rem) { html.js .rnc-diagram .see-more-line .recur-controls.dg-controls { margin: 0 0.5rem; } }
.rnc-diagram .dg-cap-label { font-weight: 700; color: var(--ink); }
/* caption: the sentence left-aligned, "See more" at the right end of the same line */
.rnc-diagram .see-more-line, html.js .rnc-diagram .see-more-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; text-align: left; }
.rnc-diagram .dg-cap-sent { flex: 1 1 auto; min-width: 0; }
.rnc-diagram .dg-cap-more, html.js .rnc-diagram .dg-cap-more { flex: none; margin: 0; grid-column: auto; }
html.js .rnc-diagram .dg-cap-lead, html.js .rnc-diagram .dg-cap-tail { text-align: left; }
.rnc-diagram .dg-cap-text, .rnc-diagram .dg-cap-text > [data-cap] { display: inline; }
.rnc-diagram .dg-cap-text > .dg-cap-off { display: none; }
@media (max-width: 30rem) { .rnc-diagram .dg-cap-text { display: inline; } .rnc-diagram .dg-cap-text > .dg-cap-off { display: none; visibility: visible; } }
.rnc-diagram .dg-cap-label { margin-right: 0.3em; }
/* the RNC diagram in a subtle card: faint panel, hairline border, caption as its footer */
.rnc-diagram { padding: 1.1rem 1.25rem 0.85rem; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--card) 55%, transparent); }
.rnc-diagram figcaption.dg-caption { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
@media (max-width: 30rem) { .rnc-diagram { padding: 0.8rem 0.8rem 0.7rem; } }
/* diagram card footer row, as in the recurrence card: full-bleed to the card's edges */
.rnc-diagram:has(.dg-foot > .compare-toggle:not([hidden])) { padding-bottom: 0; }
.rnc-diagram .dg-foot { margin: 0.85rem -1.25rem 0; }
@media (max-width: 30rem) { .rnc-diagram .dg-foot { margin-left: -0.8rem; margin-right: -0.8rem; } }
.rnc-diagram .dg-foot .compare-toggle { border-radius: 0 0 11px 11px; }
.rnc-diagram .dg-foot .recur-collapse-inner.recur-text { font-size: 0.95rem; color: var(--muted); }
.rnc-diagram .dg-foot .recur-collapse-inner.recur-text p { margin: 0.1rem 0 0; }
.rnc-diagram .see-more-line { display: block; }
/* diagram card: the caption sentence is the card's title, at the top */
.rnc-diagram figcaption.dg-head { margin: 0 0 1rem; padding: 0; border: 0; text-align: left; }
.rnc-diagram .dg-title { margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); }
.rnc-diagram .dg-title .dg-cap-lead, .rnc-diagram .dg-title .dg-cap-tail { font-weight: 600; }
.rnc-diagram .dg-foot { margin-top: 1rem; }
.rnc-diagram figcaption.dg-head .see-more-line.dg-title { font-size: 1.0625rem; color: var(--ink); text-align: left; }
/* the diagram's title sits just outside its card, centred above it */
.rnc-diagram, .rnc-diagram:has(.dg-foot > .compare-toggle:not([hidden])) { padding: 0; border: 0; border-radius: 0; background: none; }
.rnc-diagram .dg-card { padding: 1.1rem 1.25rem 0.85rem; border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--card) 55%, transparent); }
.rnc-diagram .dg-card:has(.dg-foot > .compare-toggle:not([hidden])) { padding-bottom: 0; }
@media (max-width: 30rem) { .rnc-diagram .dg-card { padding: 0.8rem 0.8rem 0.7rem; } }
.rnc-diagram figcaption.dg-head { margin: 0 0 0.6rem; text-align: center; }
.rnc-diagram figcaption.dg-head .see-more-line.dg-title { text-align: center; }
/* centred title, switch fixed: desktop — switch in the middle column; phones — both phrasings share one slot */
@media (min-width: 30.01rem) {
  html.js .rnc-diagram figcaption.dg-head .dg-title .dg-cap-sent { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; }
  html.js .rnc-diagram .dg-title .dg-cap-lead { text-align: right; }
  html.js .rnc-diagram .dg-title .dg-cap-tail { text-align: left; }
}
@media (max-width: 30rem) {
  .rnc-diagram .dg-title .dg-cap-text { display: inline-grid; text-align: left; }
  .rnc-diagram .dg-title .dg-cap-text > [data-cap] { display: inline; grid-area: 1 / 1; }
  .rnc-diagram .dg-title .dg-cap-text > .dg-cap-off { display: inline; visibility: hidden; }
}
html:not(.js) .rnc-diagram .dg-title .dg-cap-text > [data-cap="2"] { display: none; }
.rnc-diagram .dg-title .dg-cap-lead, .rnc-diagram .dg-title .dg-cap-tail { font-weight: 400; }
.rnc-diagram .dg-title .dg-cap-label { font-weight: 700; }
/* an open footer row is no longer the card's bottom edge: square hover band; and room before the panel's text */
.recur-foot .compare-toggle[aria-expanded="true"], .rnc-diagram .dg-foot .compare-toggle[aria-expanded="true"] { border-radius: 0; }
.rnc-diagram .dg-foot .recur-collapse-inner.recur-text { padding-top: 0.5rem; }
/* the panel's top padding only when open (a closed panel must have zero height) */
.rnc-diagram .dg-foot .recur-collapse-inner.recur-text { padding-top: 0; transition: padding 0.35s ease; }
.rnc-diagram .dg-foot .recur-collapse.open .recur-collapse-inner.recur-text { padding-top: 0.5rem; }
/* recurrence card footer rows: room between the open row and its content (zero while closed) */
.recur-card .recur-foot .recur-collapse-inner { padding-top: 0; transition: padding 0.35s ease; }
.recur-card .recur-foot .recur-collapse.open .recur-collapse-inner { padding-top: 0.5rem; }
.recur-card .recur-foot:last-child .compare-toggle[aria-expanded="false"] { border-radius: 0 0 10px 10px; }
.recur-card .recur-foot:not(:last-child) .compare-toggle { border-radius: 0; }
html { overflow-anchor: none; } /* panels open below their toggles; Safari's scroll anchoring otherwise scrolls the page by the opening panel's height */
/* MinMax algebra: a technical box under the section 3 lead, opened by the lead's inline "See more" */
.tech-algebra.more-body { margin: 0.4rem 0 1.6rem; padding: 0.8rem 1.1rem 0.9rem; border-left: 3px solid var(--ours-mark); }
.tech-algebra .technical-label { margin-bottom: 0.5rem; }
.tech-algebra p { margin: 0 0 0.8rem; }
.tech-algebra #algebra-more > p:last-child { margin-bottom: 0.1rem; }
/* "MinMax algebra" in the section 3 lead: the words open the box (dotted like a tag, with a chevron) */
.alg-toggle { display: inline; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-decoration-color: var(--ours-mark); text-decoration-thickness: 2px; text-underline-offset: 0.22em; white-space: nowrap; }
.alg-toggle:hover { text-decoration-style: solid; }
.alg-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.alg-toggle .chev { width: 0.75em; height: 0.75em; margin-left: 0.2em; vertical-align: 0.02em; transition: transform 0.2s ease; }
.alg-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .alg-toggle .chev { transition: none; } }
.tech-algebra .alg-less-line { display: flex; justify-content: flex-end; margin: 0.4rem 0 0; }
.alg-less { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.1rem 0; border: 0; background: none; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--link-accent); cursor: pointer; }
.alg-less[hidden] { display: none; }
.alg-less:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.alg-less:focus-visible { outline: 2px solid var(--link-accent); outline-offset: 2px; border-radius: 4px; }
.alg-less .chev { width: 0.8em; height: 0.8em; }
/* the dotted underline runs under the chevron too (a border, since text decoration skips the icon) */
.alg-toggle { text-decoration: none; border-bottom: 2px dotted var(--ours-mark); line-height: 1.15; }
.alg-toggle:hover { text-decoration: none; border-bottom-style: solid; }
.recur-foot .act { font-style: italic; font-weight: 700; margin-right: 0.05em; } /* the action verb of a footer row: Compare, Run */
.recur-foot .act { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
/* recurrence card: the switches' strip is tinted, up to the card's top edge */
.recur-card > .recur-controls { margin-top: -0.9rem; padding-top: 0.9rem; border-radius: 9px 9px 0 0; background: color-mix(in srgb, var(--ours-mark) 10%, var(--card)); }
@media (max-width: 44rem) { .recur-card > .recur-controls { margin-top: -0.8rem; padding-top: 0.8rem; } }
.recur-card > .recur-controls { background: color-mix(in srgb, var(--ours-mark) 22%, var(--page)); } /* a shade darker than the page */
.recur-card > .recur-controls .tabs { background: color-mix(in srgb, var(--ink) 11%, color-mix(in srgb, var(--ours-mark) 22%, var(--page))); } /* tracks a shade darker than the strip */
.recur-card > .recur-controls { --strip: color-mix(in srgb, var(--ours-mark) 13%, var(--page)); background: var(--strip); }
.recur-card > .recur-controls .tabs { background: color-mix(in srgb, var(--ink) 9%, var(--strip)); }
.rw-hint { color: color-mix(in srgb, var(--muted) 70%, var(--card)); } /* a quiet hint under the buttons */
.rw-hint .rw-totable { color: inherit; }
.alg-toggle, .alg-toggle:focus-visible { border-radius: 0; } /* a straight underline (rounded corners bend a bottom border at its ends) */
.lead.lead-big { font-size: 1.3rem; line-height: 1.5; } /* section 4: the one-line claim, a step up from the other leads */
@media (max-width: 30rem) { .lead.lead-big .unit { display: inline; } } /* phones: one flowing sentence */
/* "Arithmetic +,×  →  MinMax ⊕,⊗" (storyline and section 3 heading): each word and its operators in one chip,
   dotted-underlined like a tag, operators included */
.term[data-concept="arithmetic-ops"] { --term-c: var(--classic-op); }
.op-phrase { padding: 0.04em 0.28em; border-radius: 0.3em; white-space: nowrap; text-decoration: none; border-bottom: 2px dotted var(--term-c); background: color-mix(in srgb, var(--ours-bar) 24%, transparent); }
.op-phrase[data-concept="arithmetic-ops"] { background: color-mix(in srgb, var(--classic-op) 16%, transparent); }
.op-phrase mpadded.op, .op-phrase mpadded.op.op-inline { padding-inline: 0; margin-inline: 0.12em 0; background: none; box-shadow: none; }
.op-phrase { border-radius: 0.3em 0.3em 0 0; } /* square bottom: a straight dotted underline */
/* Tags: a tinted chip in the concept's colour, in place of the dotted underline */
.term { text-decoration: none; padding: 0 0.22em; border-radius: 0.3em; background: color-mix(in srgb, var(--term-c, var(--ours-mark)) 20%, transparent); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.op-phrase { border-bottom: 0; border-radius: 0.3em; padding: 0.04em 0.28em; }
.op-phrase[data-concept="minmax-algebra"] { background: color-mix(in srgb, var(--ours-bar) 24%, transparent); }
.op-phrase[data-concept="arithmetic-ops"] { background: color-mix(in srgb, var(--classic-op) 16%, transparent); }
.alg-toggle { border-bottom: 0; padding: 0 0.22em; border-radius: 0.3em; background: color-mix(in srgb, var(--ours-mark) 20%, transparent); }
h2:not(.sub-inline) .sec-t > .sec-sub { flex-basis: 100%; } /* not fitting beside the title (with its separator): always on a line of its own */
/* Tags as a marker stripe: the tint starts a little below the top of the letters (like min / max in the card) */
.term, .alg-toggle, .op-phrase { --hl: color-mix(in srgb, var(--term-c, var(--ours-mark)) 24%, transparent); background: linear-gradient(transparent 30%, var(--hl) 30%); border-radius: 0.15em; }
.alg-toggle { --term-c: var(--ours-mark); }
.op-phrase[data-concept="minmax-algebra"] { --hl: color-mix(in srgb, var(--ours-bar) 30%, transparent); background: linear-gradient(transparent 30%, var(--hl) 30%); }
.op-phrase[data-concept="arithmetic-ops"] { --hl: color-mix(in srgb, var(--classic-op) 20%, transparent); background: linear-gradient(transparent 30%, var(--hl) 30%); }
/* Tags: the stripe fits the word exactly: no side padding; from the top of the tallest letters (b, d, l,
   capitals) to the bottom of the descenders (p, g, y), as measured for the system font's content box */
.term, .alg-toggle, .op-phrase { padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; border-radius: 0.08em; background: linear-gradient(transparent 21%, var(--hl) 21%, var(--hl) 98%, transparent 98%); }
.op-phrase[data-concept="minmax-algebra"], .op-phrase[data-concept="arithmetic-ops"] { background: linear-gradient(transparent 21%, var(--hl) 21%, var(--hl) 98%, transparent 98%); }
/* tags holding maths: the same fitted stripe (no dotted background, no extra bottom padding) */
.term:has(math) { padding-bottom: 0; background: linear-gradient(transparent 21%, var(--hl) 21%, var(--hl) 98%, transparent 98%); }
/* "Arithmetic +,×" and "MinMax ⊕,⊗": the operator pair underlined with a solid line in the phrase's colour */
.op-phrase math { border-bottom: 2px solid var(--op-line); }
.op-phrase[data-concept="arithmetic-ops"] { --op-line: var(--classic-op); }
.op-phrase[data-concept="minmax-algebra"] { --op-line: var(--ours-bar); }
/* the stripe's top follows the weight: bold letters (and the dot of i) rise higher */
.term, .alg-toggle, .op-phrase, .term:has(math), .op-phrase[data-concept] { --hl-top: 21%; background: linear-gradient(transparent var(--hl-top), var(--hl) var(--hl-top), var(--hl) 98%, transparent 98%); }
:is(h1, h2, h3, h4, b, strong, .step-t) :is(.term, .op-phrase) { --hl-top: 16.5%; }
/* operator pair: a marker stroke hugging the symbols' bottom edge (in place of the line below) */
.op-phrase math { border-bottom: 0; border-radius: 0.12em; background: linear-gradient(transparent 66%, color-mix(in srgb, var(--op-line) 55%, transparent) 66%, color-mix(in srgb, var(--op-line) 55%, transparent) 86%, transparent 86%); }
.op-phrase[data-concept="minmax-algebra"] math { --op-line: color-mix(in srgb, var(--ours-bar) 85%, var(--ink)); } /* a touch deeper, to read on the amber stripe */
.term, .op-phrase, .alg-toggle { color: inherit; } /* full-strength letters: the stripe carries the colour, not the text */
.term, .op-phrase, .alg-toggle { color: inherit !important; } /* full-strength letters everywhere (beats the older tinted-text rules) */
/* operator marker: just under the symbols, close but not touching them */
.op-phrase math { background: linear-gradient(transparent 84%, color-mix(in srgb, var(--op-line) 55%, transparent) 84%, color-mix(in srgb, var(--op-line) 55%, transparent) 97%, transparent 97%); }
.op-phrase math { background: linear-gradient(transparent 88%, color-mix(in srgb, var(--op-line) 55%, transparent) 88%); } /* a hair below the symbols */
.prop-u { text-decoration: underline solid var(--prop-c); text-decoration-thickness: 2px; text-underline-offset: 0.2em; text-decoration-skip-ink: auto; } /* each of the four properties, underlined in the property colour */
/* tags: crisp letters on a lighter stripe (a darker ink than the text around, so the tint never dulls them) */
.term, .op-phrase, .alg-toggle { color: color-mix(in srgb, currentColor 40%, var(--ink)) !important; }
.term, .alg-toggle { --hl: color-mix(in srgb, var(--term-c, var(--ours-mark)) 17%, transparent); }
.op-phrase[data-concept="minmax-algebra"] { --hl: color-mix(in srgb, var(--ours-bar) 22%, transparent); }
.op-phrase[data-concept="arithmetic-ops"] { --hl: color-mix(in srgb, var(--classic-op) 15%, transparent); }
/* results: subsection headers in the style of the section's subtitle ("Only MinMax RNCs score 100% …") */
h3.results-sub { margin: 2.6rem 0 1rem; font-size: max(clamp(1.056rem, 2.64vw, 1.452rem), 1.3rem); font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--muted); text-wrap: balance; }
h3.results-sub .ph { display: inline-block; }
.term[data-concept="gpt2"] { --term-c: var(--classic-op); } /* a Transformer: the slate of existing architectures */
.term[data-concept="openwebtext"] { --term-c: var(--data-c); } /* a dataset: its own colour */
.stat .num-block .num-cap:last-child { margin-top: -0.1rem; } /* "on" is lowercase: pulled up a hair so the gaps around the number look equal */
.stat .num-block .num-cap:last-child { margin-top: -0.05rem; } /* a tiny bit lower than before */
:is(h1, h2, h3, h4, b, strong) :is(.term, .op-phrase) { margin-inline: 0.06em; } /* bold text: a little air between a tag's stripe and the words beside it */
.panel .task-desc { margin: -0.35rem 0 0.75rem; font-size: 0.86rem; line-height: 1.4; color: var(--muted); } /* what the task asks, under its title */
/* S₃ and S₄: two compact cards stacked in one grid cell, each half as tall as the others */
.panel-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.panel-stack > .panel { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; padding: 0.7rem 1.1rem 0.75rem; }
.panel.half h3 { margin-bottom: 0.15rem; }
.panel.half .task-desc { margin: 0 0 0.35rem; }
.panel.half .bar-row { margin: 0.15rem 0; }
.panel.half h3 { margin-bottom: 0.3rem; }
.panel.half .bar-row { margin: 0.05rem 0; }
.panel-stack > .panel { padding: 0.6rem 1.1rem 0.6rem; }
/* S₃ and S₄: one combined card, its two halves split by a hairline */
.panel-stack { gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel-stack > .panel { border: 0; border-radius: 0; background: none; }
.panel-stack > .panel + .panel { border-top: 1px solid var(--line); }
.panel-stack > .panel + .panel { border-top-color: color-mix(in srgb, var(--ink) 12%, var(--card)); } /* a neutral grey divider, unlike the amber outer border */
/* results cards: the tested ability as a badge beside the benchmark's name */
.panel h3 .paper { display: inline-block; margin-left: 0.45rem; padding: 0.12rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; color: var(--muted); background: color-mix(in srgb, var(--ours-mark) 20%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ours-mark) 40%, transparent); vertical-align: 0.12em; white-space: nowrap; }
.panel h3 .task-desc-inline { margin-left: 0.4rem; font-size: 0.86rem; font-weight: 400; color: var(--muted); } /* half cards: what the task asks, beside the badge */
.panel h3 .paper { color: color-mix(in srgb, var(--ability-c) 75%, var(--ink)); background: color-mix(in srgb, var(--ability-c) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ability-c) 38%, transparent); } /* one distinctive colour for all ability badges */
#results-chart [data-metric-note] { margin-top: 0.75rem; } /* the chart's caption, set off from the cards */
.panel h3 .paper { vertical-align: baseline; padding: 0.06rem 0.4rem 0.08rem; border-radius: 4px; line-height: 1.2; } /* a squarer label sitting on the title's baseline */
.panel h3 .paper { position: relative; top: -0.08em; } /* optically centred on the title's letters */
#results-chart [data-metric-note] { margin-top: 1.125rem; } /* a touch more than the 1rem gaps between the cards */
#results-chart [data-metric-note] { padding-inline: 10px; } /* inset by the cards' corner radius, so the text starts where their straight edge does */
.results-intro + .note { margin-top: -0.4rem; } /* the small print sits just under the intro */
.panel h3 .paper.group { color: color-mix(in srgb, var(--ability-g) 75%, var(--ink)); background: color-mix(in srgb, var(--ability-g) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ability-g) 38%, transparent); } /* group-based tasks */
/* the two badge colours, shown in the results note */
.ability-badge { display: inline-block; padding: 0.02rem 0.4rem 0.04rem; border-radius: 4px; font-size: 0.85em; font-weight: 600; line-height: 1.25; color: color-mix(in srgb, var(--ability-c) 75%, var(--ink)); background: color-mix(in srgb, var(--ability-c) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ability-c) 38%, transparent); white-space: nowrap; }
.ability-badge.group { color: color-mix(in srgb, var(--ability-g) 75%, var(--ink)); background: color-mix(in srgb, var(--ability-g) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ability-g) 38%, transparent); }
/* results intro: learned short, tested long; the two lengths set apart, the second one larger */
.results-intro .len { font-weight: 800; white-space: nowrap; }
.results-intro .len-short { font-size: 0.92em; }
.results-intro .len-long { font-size: 1.22em; letter-spacing: -0.01em; }
.results-intro .ri-line { display: block; } /* three lines: the abilities; learned short; tested long */
.results-intro .len-short, .results-intro .len-long { font-size: inherit; letter-spacing: normal; } /* same size as the text: emphasis by weight only */
.results-intro .len { font-weight: 650; }
.results-intro { font-size: 1.15rem; line-height: 1.55; }
.results-intro { font-size: 1.1rem; }
h3.results-sub { padding-top: 2.2rem; border-top: 1px solid var(--line); margin-top: 2.4rem; } /* a new part of the evidence: a hairline above its header */
/* the separator reaches a little past the text column on each side */
h3.results-sub { position: relative; border-top: 0; }
h3.results-sub::before { content: ""; position: absolute; top: 0; left: -1.5rem; right: -1.5rem; height: 1px; background: var(--line); }
@media (max-width: 44rem) { h3.results-sub::before { left: -0.5rem; right: -0.5rem; } }
h3.results-sub::before { left: -0.9rem; right: -0.9rem; } @media (max-width: 44rem) { h3.results-sub::before { left: -0.4rem; right: -0.4rem; } }
h3.results-sub::before { left: -0.5rem; right: -0.5rem; } @media (max-width: 44rem) { h3.results-sub::before { left: -0.25rem; right: -0.25rem; } }
h3.results-sub::before { left: -0.3rem; right: -0.3rem; } @media (max-width: 44rem) { h3.results-sub::before { left: -0.15rem; right: -0.15rem; } }
h3.results-sub::before { left: -0.18rem; right: -0.18rem; } @media (max-width: 44rem) { h3.results-sub::before { left: -0.1rem; right: -0.1rem; } }
h3.results-sub::before { left: -2px; right: -2px; } @media (max-width: 44rem) { h3.results-sub::before { left: -2px; right: -2px; } }
pre.bib { background: var(--card); border: 1px solid var(--line); } /* white like its card, set off by a hairline */
pre.bib { background: color-mix(in srgb, var(--ink) 4%, var(--card)); border-color: color-mix(in srgb, var(--ink) 8%, var(--card)); } /* a faint neutral grey */
pre.bib { background: color-mix(in srgb, var(--ours-mark) 7%, var(--card)); border-color: color-mix(in srgb, var(--ours-mark) 22%, var(--card)); } /* a faint yellow */
/* no hover effect on tags: the stripe stays as it is */
.term:hover, .term:focus-visible, .alg-toggle:hover { --hl: color-mix(in srgb, var(--term-c, var(--ours-mark)) 17%, transparent); }
.op-phrase[data-concept="minmax-algebra"]:is(:hover, :focus-visible) { --hl: color-mix(in srgb, var(--ours-bar) 22%, transparent); }
.op-phrase[data-concept="arithmetic-ops"]:is(:hover, :focus-visible) { --hl: color-mix(in srgb, var(--classic-op) 15%, transparent); }
#expressivity-more-2 em { font-style: normal; font-weight: 600; } /* key terms in semibold rather than italic */
/* group-free / group-based inside running text: a highlighter stripe in the badge colour (the results note keeps badges, as a legend) */
.card-foot .ability-badge { --hl: color-mix(in srgb, var(--ability-c) 18%, transparent); display: inline; padding: 0; border-radius: 0.08em; font-size: inherit; font-weight: inherit; line-height: inherit; box-shadow: none; color: color-mix(in srgb, currentColor 40%, var(--ink)); background: linear-gradient(transparent 21%, var(--hl) 21%, var(--hl) 98%, transparent 98%); white-space: nowrap; }
.card-foot .ability-badge.group { --hl: color-mix(in srgb, var(--ability-g) 18%, transparent); box-shadow: none; color: color-mix(in srgb, currentColor 40%, var(--ink)); background: linear-gradient(transparent 21%, var(--hl) 21%, var(--hl) 98%, transparent 98%); }
/* "Where it is critical": cases grouped under the requirement they need */
.card-foot .cf-group { margin: 0.7rem 0 0.1rem; font-weight: 700; }
.card-foot .recur-collapse-inner > .cf-group:first-child { margin-top: 0; }
/* Latin Modern is smaller than the sans text: inline maths in running text a touch larger */
:is(p, li) math:not([display="block"]) { font-size: 1.15em; }
/* Sensitivity: the sensitivity factor ∂y_T/∂z_t chipped in the property colour, wherever it appears */
math .chip-f { padding: 0.12em 0.18em; margin-inline: 0.06em; border-radius: 0.3em; background: color-mix(in srgb, var(--prop-c) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--prop-c) 40%, transparent); }
math .chip-f { padding-block: 0.2em; } /* a little more room above and below */
math .chip-f { padding-top: 0.3em; padding-bottom: 0.22em; } /* the ∂ reaches the top of its box: a bit more room above */
/* the defining statement of a property, set apart as a definition box */
.def-box { margin: 0.9rem 0; padding: 0.7rem 0.95rem; border-left: 3px solid var(--prop-c); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--prop-c) 8%, var(--card)); }
.def-box > b:first-child { color: color-mix(in srgb, var(--prop-c) 55%, var(--ink)); }
.def-box { padding: 0.55rem 0.8rem; border-left: 0; border-radius: 8px; background: color-mix(in srgb, var(--prop-c) 5%, var(--card)); } /* gentler: a faint tint only */
.def-box > b:first-child { color: inherit; }
.card .def-box { margin-inline: -21.6px; padding-inline: 21.6px; border-radius: 0; } /* tint runs to the card's edges; text stays aligned with the paragraphs around it */
.card .recur-collapse-inner p.def-box { margin-inline: -21.6px; padding-inline: 21.6px; border-radius: 0; }
#sensitivity-more-2 .formula { border: 0; box-shadow: none; } /* the precise notion: formulas without the yellow frame */
#sensitivity-more-2 .formula { padding-block: 0.2rem; margin-block: 0.5rem; background: none; } /* frameless: no box padding left to fill */
#sensitivity-more-2 .formula + p:has(> b:first-child) { margin-top: 0.9rem; } /* a new headed paragraph after an equation gets its own breathing room */
.formula math .chip-f:has(> mo) { padding: 0.36em 0.45em 0.3em; } /* the displayed definition chip: roomier than a single factor's */
.formula math .chip-f:has(> mo) { padding: 0.42em 0.45em 0.46em; } /* even space all round (the subscript t hangs lowest) */
.formula math .chip-f:has(> mo) { padding-top: 0.48em; }
.formula math .chip-f { margin-inline: 0; } /* inside displayed formulas the operator spacing alone sets the gaps, so every = is spaced alike */
math .chip-sym { transform: translateY(-0.14em); } /* a lone symbol with a subscript: centred on the = sign */
/* footnotes under a group of cards */
.fn-ref { font-size: 0.75em; line-height: 0; }
.fn-ref a { color: var(--link-accent); text-decoration: none; font-weight: 700; padding: 0 0.05em; }
.footnote { margin: 1rem 0 0; padding-inline: 10px; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
.footnote .fn-mark { font-weight: 700; color: var(--link-accent); margin-right: 0.15em; }
.footnote:target { background: color-mix(in srgb, var(--ours-mark) 18%, transparent); border-radius: 6px; }
/* the asterisk hangs to the left, so every line of the note starts at the same place */
.footnote { padding-left: calc(10px + 1em); text-indent: -1em; }
.footnote .fn-mark { display: inline-block; width: 1em; margin-right: 0; text-indent: 0; }
.semi { font-weight: 600; }
/* Recurrence card: a tinted title strip on top; the State / Notation switches below the equation, just above the footer rows */
.recur-titlebar { margin: -0.9rem -1.25rem 1rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); border-radius: 9px 9px 0 0; background: color-mix(in srgb, var(--ours-mark) 13%, var(--page)); text-align: center; }
.recur-titlebar .recur-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
@media (max-width: 44rem) { .recur-titlebar { margin: -0.8rem -0.9rem 0.9rem; padding: 0.65rem 0.9rem; } }
.recur-card > .recur-controls.recur-controls-bottom { --strip: transparent; margin: 1rem -1.25rem 0; padding: 0.8rem 1.25rem 0.85rem; border-top: 1px solid var(--line); border-bottom: 0; border-radius: 0; background: none; }
.recur-card > .recur-controls.recur-controls-bottom .tabs { background: color-mix(in srgb, var(--line) 70%, var(--page)); }
@media (max-width: 44rem) { .recur-card > .recur-controls.recur-controls-bottom { margin: 0.9rem -0.9rem 0; padding: 0.7rem 0.9rem 0.75rem; } }
.recur-card > .recur-controls-bottom + .recur-foot { margin-top: 0; } /* the switches sit right on the footer rows */
/* title strip: title on the left, State / Notation switches on the right (stacked on narrow screens) */
.recur-titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.5rem; text-align: left; padding-block: 0.7rem; }
.recur-titlebar > .recur-controls.recur-controls-head { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; justify-content: flex-end; column-gap: 1.4rem; }
.recur-titlebar > .recur-controls-head .tabs { background: color-mix(in srgb, var(--ink) 9%, color-mix(in srgb, var(--ours-mark) 13%, var(--page))); }
@media (max-width: 44rem) { .recur-titlebar { justify-content: center; text-align: center; } .recur-titlebar > .recur-controls.recur-controls-head { justify-content: center; } }
/* title strip switches: a size smaller, with tighter tracks and buttons to match */
.recur-titlebar .recur-controls-head .ctl-label { font-size: 0.85rem; }
.recur-titlebar .recur-controls-head .tabs { font-size: 0.76rem; padding: 2px; border-radius: 8px; }
.recur-titlebar .recur-controls-head .tabs button, .recur-titlebar .recur-controls-head .tabs button[aria-pressed="true"] { padding: 0.2rem 0.65rem; border-radius: 6px; }
.recur-titlebar .recur-controls-head .tabs .thumb { top: 2px; bottom: 2px; border-radius: 6px; }
.recur-titlebar .recur-controls-head .ctl { gap: 0.4rem; }
.prop-nav.two-by-two { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; } /* not one row: 2 x 2 */
/* storyline: a phrase ending with a colon always ends its line */
.storyline .ph.ph-colon { display: block; }
/* "arithmetic +,× → MinMax ⊕,⊗": only the operator pairs are highlighted; no marker underneath */
.op-phrase, .op-phrase[data-concept] { background: none; padding: 0; }
.op-phrase math { background: linear-gradient(transparent 12%, var(--hl) 12%, var(--hl) 96%, transparent 96%); border-radius: 0.12em; padding-inline: 0.08em; }
/* the four properties in the storyline: a thinner underline */
.prop-u { text-decoration-thickness: 1.25px; }
.prop-nav.two-by-two .dl-item { justify-content: center; } /* in the 2 x 2 grid, each chip's icon and name sit centred */
/* hero links, when they cannot share one row: a symmetric 2 x 2 grid of equal-width chips */
nav.links.two-by-two { display: grid; grid-template-columns: repeat(2, 1fr); width: fit-content; margin-inline: auto; }
nav.links.two-by-two > a { justify-content: center; text-align: center; }
nav.links.two-by-two { grid-template-columns: repeat(2, max-content); } /* each column as wide as its widest chip: aligned 2 x 2, labels on one line */
nav.links.two-by-two > a { white-space: nowrap; }
/* section 4's chips in 2 x 2: icon and name on the left, the check pinned to the right edge, so checks line up */
#properties .prop-nav.two-by-two a.dl-item { justify-content: flex-start; }
#properties .prop-nav.two-by-two a.dl-item::after { margin-left: auto; }
/* very narrow phones: the hero chips a touch smaller, so the 2 x 2 fits */
@media (max-width: 380px) { nav.links a { padding: 0.42rem 0.75rem; font-size: 0.82rem; } }
/* section 4 chips in 2 x 2: icon and name centred in the space left of the check */
#properties .prop-nav.two-by-two a.dl-item .dl-icon { margin-left: auto; }
/* very narrow phones: the property chips a touch smaller, so the 2 x 2 fits */
@media (max-width: 380px) { .prop-nav .dl-item { font-size: 0.95rem; } #properties .prop-nav a.dl-item { padding-right: 0.55em; } }
/* narrow screens, where the section number sits inline: a subtitle on its own line starts under the number,
   aligned with the text below */
@media (max-width: 52rem) {
  h2:has(> .sec-n):not(.sub-inline) .sec-t > .sec-sub { margin-left: calc(-1.48 * clamp(1.6rem, 4vw, 2.2rem)); }
}
.storyline .good, h2 .sec-sub .good { font-weight: 650; } /* "100%": a little lighter */
h3.results-sub .good { font-weight: 650; }
/* with Latin Modern the one-line algebra formulas are wider: switch to their stacked versions up to 42rem */
@media (max-width: 42rem) {
  .formula math.wide-only { display: none; }
  .formula math.narrow-only { display: block; display: block math; }
}
/* full-width decorations (the sticky bars' bands reach ±100vmax) must not widen the page: clip sideways overflow
   (clip, not hidden: sticky positioning keeps working) */
html, body { overflow-x: clip; } /* on both: html's own value goes to the viewport, so body keeps clipping its content */
.prop-scope { position: relative; } /* the property chips stay stuck only alongside their own cards */
#why .prop-intro { text-align: center; text-wrap: balance; } /* centred above the centred chips, as in section 4 */
/* "arithmetic" / "MinMax" beside their operator chips: the surrounding text colour, like "Reinterpret" */
.op-phrase { color: inherit !important; }
/* operator chips in formulas: the chip carries the spacing (about TeX's medium space per side), since the
   operator inside no longer adds its own */
mpadded.op:not(.op-inline) { padding-inline: 0.15em; margin-inline: 0.07em; }
.recur-card mpadded.op:not(.op-inline) { padding-inline: 0.14em; margin-inline: 0.07em; }
.formula mpadded.op:not(.op-inline) { margin-inline: 0.07em; }
/* operator pairs as tags: the chip is the highlight, so no tag stripe on top; hover/tap still explains */
.term.op-tag, .term.op-tag:hover { background: none; padding: 0; margin: 0; }
.lead .lead-def { display: block; } /* section 3: the definition of MinMax recurrence on a line of its own */
/* "MinMax recurrence": a tag in a deeper amber than the other MinMax tags */
.term[data-concept="minmax-recurrence"] { --hl: color-mix(in srgb, var(--ours-bar) 38%, transparent); }
#idea .lead .lead-head:has(> .term[data-concept="minmax-recurrence"]) { font-weight: 500; } /* medium, as the tag carries the emphasis */
/* section 3 lead: the "details" pill after the MinMax algebra tag */
.alg-pill { display: inline-flex; align-items: center; gap: 0.2em; margin-left: 0.1em; padding: 0.05em 0.5em 0.08em 0.6em; border: 1px solid color-mix(in srgb, var(--ours-mark) 70%, var(--line)); border-radius: 999px; background: var(--card); font: inherit; font-size: 0.74em; font-weight: 600; line-height: 1.3; color: var(--link-accent); cursor: pointer; vertical-align: 0.12em; white-space: nowrap; }
.alg-pill:hover { background: color-mix(in srgb, var(--ours-mark) 14%, var(--card)); }
.alg-pill:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.alg-pill .chev { width: 0.85em; height: 0.85em; transition: transform 0.2s ease; }
.alg-pill[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .alg-pill .chev { transition: none; } }
/* "details": a quiet small chip rather than an outlined button */
.alg-pill { gap: 0.15em; margin-left: 0.15em; padding: 0.12em 0.4em 0.14em 0.5em; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--ours-mark) 18%, var(--page)); font-size: 0.7em; font-weight: 600; letter-spacing: 0.02em; color: color-mix(in srgb, var(--link-accent) 80%, var(--ink)); vertical-align: 0.15em; }
.alg-pill:hover { background: color-mix(in srgb, var(--ours-mark) 30%, var(--page)); }
.alg-pill .chev { width: 0.8em; height: 0.8em; }
/* "details": inline text link on the sentence's baseline (no chip, which pulled it off the line) */
.alg-pill { display: inline; padding: 0; margin-left: 0.2em; border: 0; border-radius: 0; background: none; font-size: 0.8em; font-weight: 600; letter-spacing: 0; vertical-align: baseline; color: var(--link-accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link-accent) 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.alg-pill:hover { background: none; text-decoration-color: currentColor; }
.alg-pill .chev { display: inline-block; vertical-align: -0.05em; margin-left: 0.15em; }
#idea .lead .lead-def { text-wrap: pretty; } /* no short last line */
.alg-pill { white-space: nowrap; cursor: pointer; }
/* section 3: the definition runs on after the colon, in italics (the "details" link stays upright) */
.lead .lead-def { display: inline; font-style: italic; }
.lead .lead-def .alg-pill { font-style: normal; }
.lead .lead-def .alg-pill { font-style: italic; }
/* operator symbols inside definition bubbles: small chips, as in the text */
.term-tip .tip-op { display: inline-block; padding: 0 0.22em; margin-inline: 0.05em; border-radius: 0.28em; line-height: 1.25; font-family: "Latin Modern Math Web", "STIX Two Math", "Cambria Math", math; background: color-mix(in srgb, var(--ours-bar) 26%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ours-bar) 55%, transparent); }
.term-tip .tip-op.classic { background: color-mix(in srgb, var(--classic-op) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--classic-op) 50%, transparent); }
/* operators in definition bubbles: a fitted highlight like the tags, not chips */
.term-tip .tip-op { display: inline; padding: 0 0.06em; margin: 0; border-radius: 0.08em; box-shadow: none; line-height: inherit; background: linear-gradient(transparent 18%, color-mix(in srgb, var(--ours-bar) 32%, transparent) 18%, color-mix(in srgb, var(--ours-bar) 32%, transparent) 96%, transparent 96%); }
.term-tip .tip-op.classic { box-shadow: none; background: linear-gradient(transparent 18%, color-mix(in srgb, var(--classic-op) 22%, transparent) 18%, color-mix(in srgb, var(--classic-op) 22%, transparent) 96%, transparent 96%); }
/* the widget chart: the connector of the step in progress, dashed until the step completes */
.rw-trail-live { stroke-dasharray: 3 3; opacity: 0.65; }
/* section 3: the defined terms of the two lead sentences, as tags in deeper amber at medium weight */
#idea .lead .def-tag { font-weight: 500; }
#idea .lead .def-tag > .term { --hl: color-mix(in srgb, var(--ours-bar) 38%, transparent); }
.term[data-concept="feedforward-nets"] { --term-c: var(--nn-c); --hl: color-mix(in srgb, var(--nn-c) 20%, transparent); } /* the feedforward networks: their own olive colour */
/* R, s, r: the default maths style (italic single letters, like x and u), not upright */
mi.fn-reset, mi.fn-set { text-transform: math-auto; }
.rw-fn, .rw-key-r, .rw-key-s, .rw-lab-cap, .rw-lab-floor { font-style: italic; }
/* boxed formulas: Latin Modern brings its own room above and below, so the boxes need less padding */
.formula { padding-block: 0.7rem; margin-block: 1.1rem; }
.formula.formula-sm { padding-block: 0.55rem; }
/* the maths box already holds room below the baseline: a little less padding at the bottom, so both look equal */
.formula { padding-top: 0.75rem; padding-bottom: 0.5rem; }
.formula.formula-sm { padding-top: 0.6rem; padding-bottom: 0.38rem; }
.formula.formula-sm { padding-top: 0.66rem; padding-bottom: 0.4rem; } /* the main line of symbols centred in the box */
.formula math.narrow-only mtd { padding-inline: 0; } /* the browser pads table cells; the = sign brings its own spacing */
.formula math.narrow-only mtd:last-child { padding-left: 0.2778em; } /* the = opening a cell gets no left spacing of its own: give it TeX's */
.formula math.narrow-only mtd:last-child { padding-left: 0.14em; } /* with the = sign's own spacing: about 0.42em before it */
/* stacked formulas: no extra gap from the hidden one-line version before them, and table cells padded only
   between rows (the browser pads every cell top and bottom) */
.formula math.narrow-only { margin-top: 0 !important; }
.formula math.narrow-only mtd { padding-block: 0.22em; }
.formula math.narrow-only mtr:first-child > mtd { padding-top: 0; }
.formula math.narrow-only mtr:last-child > mtd { padding-bottom: 0; }
@media (max-width: 42rem) { .formula.formula-sm:has(math.narrow-only) { padding-top: 0.3rem; padding-bottom: 0.42rem; } } /* stacked: even space above and below */
mo.paren-up { font-size: 1.22em; } /* explicit vector forms: parentheses a little larger, beside the big max / sum */
/* MinMax recurrence player in full window: an overlay over the page, scrolling on its own */
.rw-full { position: fixed; inset: 0; z-index: 300; overflow-y: auto; overscroll-behavior: contain; background: var(--card); }
.rw-full-inner { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem 2.5rem; }
html.rw-full-open, html.rw-full-open body { overflow: hidden; }
.rw-full .rw-controls { top: 0; margin-left: -1.5rem; margin-right: -1.5rem; padding-left: 1.5rem; padding-right: 1.5rem; }
.rw-full .recur-widget { padding-top: 0; }
.rw-controls .rw-full-btn { margin-left: auto; }
.rw-full-btn[aria-pressed="true"] { background: color-mix(in srgb, var(--ours-mark) 22%, var(--card)); }
@media (max-width: 44rem) { .rw-full-inner { padding: 0 0.9rem 2rem; } .rw-full .rw-controls { margin-left: -0.9rem; margin-right: -0.9rem; padding-left: 0.9rem; padding-right: 0.9rem; } }
/* full window on phones: upright, a hint to turn sideways; sideways (short landscape), stage and chart side by side */
.rw-rotate-hint { display: none; }
@media (max-width: 44rem) and (orientation: portrait) {
  .rw-full .rw-rotate-hint { display: flex; align-items: center; gap: 0.5rem; margin: 0.6rem 0 0.2rem; padding: 0.5rem 0.7rem; border-radius: 8px; background: color-mix(in srgb, var(--ours-mark) 16%, var(--card)); font-size: 0.84rem; line-height: 1.35; color: var(--ink); }
  .rw-full .rw-rotate-hint svg { flex: none; width: 1.3rem; height: 1.3rem; color: var(--link-accent); }
}
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full-inner { max-width: none; padding: 0 1rem 1.5rem; }
  .rw-full .recur-widget { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: 0.9rem; align-items: start; }
  .rw-full .recur-widget > .rw-controls { grid-column: 1 / -1; margin-left: -1rem; margin-right: -1rem; padding: 0.4rem 1rem; margin-bottom: 0.6rem; }
  .rw-full .recur-widget > .rw-controls .rw-hint { display: none; }
  .rw-full .recur-widget > .rw-stage { grid-column: 1; margin-bottom: 0; }
  .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { grid-column: 2; margin: 0; }
  .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { grid-column: 1 / -1; margin-top: 0.8rem; }
  .rw-full .rw-stage .rw-stage-legend, .rw-full .rw-chart-legend, .rw-full .rw-fig:not(:has(.rw-table-wrap)) .rw-fig-head p { display: none; }
  .rw-full .rw-fig:not(:has(.rw-table-wrap)) { padding: 0.6rem 0.7rem; }
}
/* sideways full window: the update card as tall as the chart card, its content centred */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget { align-items: stretch; }
  .rw-full .recur-widget > .rw-controls, .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { align-self: start; }
  .rw-full .recur-widget > .rw-stage { display: flex; flex-direction: column; justify-content: center; }
  .rw-full .recur-widget > .rw-stage .rw-stage-head { position: absolute; top: 0.7rem; left: 0.9rem; }
  .rw-full .recur-widget > .rw-stage { position: relative; padding-top: 2.4rem; }
}
/* sideways full window: the values table under the update, in the left column; the chart beside both */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget { grid-template-rows: auto auto 1fr; row-gap: 0.6rem; }
  .rw-full .recur-widget > .rw-stage { grid-column: 1; grid-row: 2; }
  .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { grid-column: 2; grid-row: 2 / span 2; }
  .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { grid-column: 1; grid-row: 3; margin: 0; padding: 0.55rem 0.6rem; align-self: stretch; }
  .rw-full .rw-fig:has(.rw-table-wrap) .rw-fig-head p { display: none; }
  .rw-full .rw-fig:has(.rw-table-wrap) .rw-fig-head h4 { margin-bottom: 0.3rem; }
}
/* sideways full window: compact enough for a phone's height (no card titles, tighter table) */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget > .rw-stage .rw-stage-head, .rw-full .recur-widget > .rw-fig .rw-fig-head { display: none; }
  .rw-full .recur-widget > .rw-stage { padding: 0.5rem 0.6rem; }
  .rw-full .recur-widget { row-gap: 0.5rem; }
  .rw-full .recur-widget > .rw-controls { margin-bottom: 0.4rem; }
  .rw-full .rw-table .rw-val { min-height: 1.6em; padding: 0.05rem 0.25rem; }
  .rw-full .rw-table th, .rw-full .rw-table td { padding-top: 0.1rem; padding-bottom: 0.1rem; }
  .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { padding: 0.35rem 0.5rem; }
  .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { padding: 0.4rem 0.5rem; }
}
/* sideways full window on smaller phones: slimmer controls, smaller table, columns split evenly */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget > .rw-controls .rw-btn { padding: 0.22rem 0.6rem; font-size: 0.82rem; }
  .rw-full .rw-table { font-size: 0.86em; }
  .rw-full .rw-table .rw-val { min-width: 1.9em; }
  .rw-full .recur-widget > .rw-stage { font-size: 0.95em; }
}
@media (orientation: landscape) and (max-height: 32rem) and (max-width: 52rem) {
  .rw-full .recur-widget { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.7rem; }
  .rw-full-inner { padding: 0 0.7rem 1rem; }
  .rw-full .recur-widget > .rw-controls { margin-left: -0.7rem; margin-right: -0.7rem; padding-left: 0.7rem; padding-right: 0.7rem; }
  .rw-full .rw-table { font-size: 0.8em; }
}
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { display: flex; flex-direction: column; justify-content: center; } } /* the chart centred in its tall card */
.rw-full .rw-chart { display: flex; flex-direction: column; align-items: center; } /* the chart centred across its card */
.rw-full .rw-chart > svg { margin-inline: auto; width: 100%; }
/* sideways full window: balance the columns, a smaller left side and a wider chart, so text reads at similar sizes */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .rw-full .recur-widget > .rw-stage, .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { font-size: 0.8rem; }
  .rw-full .rw-table { font-size: 1em; }
}
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .rw-table .rw-val { font-size: 0.85rem; min-width: 1.9em; min-height: 1.7em; } }
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .rw-table thead th { font-size: 0.72rem; }
  .rw-full .rw-table th, .rw-full .rw-table td { padding-left: 0.18rem; padding-right: 0.18rem; }
  .rw-full .rw-table tbody th { padding-right: 0.3rem; }
  .rw-full .rw-table .rw-val { min-width: 1.7em; padding-inline: 0.15rem; }
}
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { display: flex; flex-direction: column; justify-content: center; } } /* the table centred in its stretched card */
/* sideways full window: the left cards fit their content and sit centred, as a group, against the chart */
@media (orientation: landscape) and (max-height: 32rem) {
  .rw-full .recur-widget { grid-template-rows: auto 1fr auto auto 1fr; row-gap: 0; }
  .rw-full .recur-widget > .rw-controls { margin-bottom: 0.6rem; }
  .rw-full .recur-widget > .rw-stage { grid-row: 3; align-self: start; height: auto; margin: 0 0 0.5rem; }
  .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { grid-row: 4; align-self: start; height: auto; }
  .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { grid-row: 2 / span 4; }
}
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { border-color: transparent; box-shadow: none; } } /* sideways full window: the chart without a box */
/* a little more room above the step number inside the column highlight */
.rw-table thead th { padding-top: 0.45rem; }
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .rw-table thead th { padding-top: 0.3rem; } }
/* controls that don't fit one row: the rightmost buttons drop their words first (set by the widget script) */
.rw-controls .rw-btn.rw-ico > span { display: none; }
.rw-controls .rw-btn.rw-ico { padding-left: 0.6rem; padding-right: 0.6rem; }
.recur-widget { min-width: 0; max-width: 100%; } .recur-widget > .rw-controls { min-width: 0; } /* the bar never grows past its card, so overflow turns buttons icon-only */
.rw-controls .rw-btn.rw-ico { align-self: stretch; min-width: 2.4rem; justify-content: center; } /* icon-only buttons keep the row height */
.rw-controls > .rw-pair { align-self: stretch; } .rw-controls > .rw-pair > .rw-btn { align-self: stretch; } /* pairs keep the row height too */
.rw-controls.rw-tight .rw-full-btn { margin-left: 0; } /* once buttons go icon-only, Full window stays next to them */
.recur-collapse > .recur-collapse-inner { min-width: 0; } /* the open footer never grows past its card */
@media (max-width: 24rem) { .rw-controls { gap: 0.25rem; } .rw-controls .rw-btn.rw-ico { min-width: 2.2rem; padding-left: 0.5rem; padding-right: 0.5rem; } }
/* full window on wide screens: side by side, update and table on the left (centred as a group), chart on the right */
@media (min-width: 60rem) and (min-height: 32.01rem) {
  .rw-full-inner { max-width: 88rem; }
  .rw-full .recur-widget { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto auto 1fr; column-gap: 1.5rem; row-gap: 0; min-height: calc(100vh - 2.5rem); }
  .rw-full .recur-widget > .rw-controls { grid-column: 1 / -1; grid-row: 1; }
  .rw-full .recur-widget > .rw-stage { grid-column: 1; grid-row: 3; margin: 0 0 1rem; }
  .rw-full .recur-widget > .rw-fig:has(.rw-table-wrap) { grid-column: 1; grid-row: 4; margin: 0; }
  .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { grid-column: 2; grid-row: 2 / span 4; align-self: center; margin: 0; }
  .rw-full .recur-widget > .rw-pad { grid-column: 1 / -1; grid-row: 6; }
}
@media (min-width: 60rem) and (min-height: 32.01rem) { .rw-full .rw-chart > svg.rw-svg { max-width: 36rem; } } /* wide full window: the chart scaled so its labels match the text beside it (~13px) */
@media (min-width: 60rem) and (min-height: 32.01rem) { .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) { grid-row: 3 / span 2; align-self: stretch; display: flex; flex-direction: column; } .rw-full .recur-widget > .rw-fig:not(:has(.rw-table-wrap)) > .rw-chart { flex: 1; justify-content: center; } } /* wide full window: the chart box as tall as the two left boxes, chart centred inside */
.rw-band.rw-snap { transition: none; } /* placed at once on layout changes */
/* the narrowest phones (~320px): the hero and property chips never run past the screen edge */
@media (max-width: 22rem) {
  nav.links.two-by-two { grid-template-columns: repeat(2, minmax(0, max-content)); max-width: 100%; }
  nav.links.two-by-two > a { white-space: normal; padding-inline: 0.6rem; }
  .prop-nav.two-by-two { max-width: 100%; }
  .prop-nav .dl-item { font-size: 0.88rem; }
  #properties .prop-nav a.dl-item { padding-left: 0.5em; padding-right: 0.45em; }
}
/* phones: the player's sticky bar meets the top nav exactly, no strip of text between them */
@media (max-width: 22rem) {
  .prop-nav.two-by-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; padding-inline: 0.5rem; width: auto; }
  .prop-nav.two-by-two .dl-item { min-width: 0; }
}
@media (max-width: 22rem) { .prop-nav .dl-item { font-size: 0.82rem; gap: 0.3em; } }
.rw-controls { top: 2.55rem; } /* tucked just under the top nav (42-44px tall), so no strip of page shows between them */
/* touch screens: larger invisible tap areas on the small controls (their look is unchanged) */
@media (pointer: coarse) {
  .read-more, .alg-pill, .recur-controls .tabs button, .rw-controls .rw-btn, .rw-table .rw-val, .copy-bib { position: relative; }
  .read-more::after, .alg-pill::after, .recur-controls .tabs button::after, .rw-controls .rw-btn::after, .rw-table .rw-val::after, .copy-bib::after { content: ""; position: absolute; inset: -8px -3px; }
  .alg-pill::after { inset: -13px -6px; }
}
@media (pointer: coarse) { .rw-table .rw-val::after { inset: -3px; } } /* table cells sit close together: only a little extra */
.instant, .instant * { transition: none !important; } /* a panel closed at once (see closeAboveAtOnce) */
/* bounded states: on phones the induction bound takes its own centred line, as it is wider than the column */
.formula.bound-eq { margin: 0.7rem 0; }
.formula.bound-ind { container-type: inline-size; }
.formula.bound-ind > math { font-size: min(1em, calc(100cqi / 18.6)); } /* the bound is about 16em wide: shrink it to the box on phones */
/* switch options take the track's size (the base button rule set its own), never larger than their label */
.recur-controls .tabs button { font-size: inherit; }
.recur-titlebar .recur-controls-head .tabs { font-size: 0.82rem; }
/* equations: binary-operator spacing around the operator chips */
.recur-card mpadded.op:not(.op-inline), .formula mpadded.op:not(.op-inline), .stepper mpadded.op:not(.op-inline) { margin-inline: 0.16em; }
/* [i] after a lower-case symbol (x, s) sits a little lower, centred on the letter and its subscript */
.rw-key-x .rw-idx, .rw-key-s .rw-idx, .rw-v ~ .rw-idx { position: relative; top: 0.14em; }
/* footer rows: keyboard focus shown by a soft tint, not a box around the full-width row */
.card-foot .card-foot-toggle:focus-visible, .recur-foot .compare-toggle:focus-visible { outline: none; color: var(--ink); background: color-mix(in srgb, var(--ours-mark) 14%, transparent); }
/* a footnote inside a footer panel: flush with the text, set off by a little space */
.recur-text .footnote.fn-in-panel { margin: 0.8rem 0 0; padding-left: 1em; padding-right: 0; }
math .mm-idx { margin-left: 0.04em; } /* a hair of air between a subscript and its [i] */
/* the pseudo-gradient by cases: about 16em wide, shrunk to the box on phones */
.formula.grad-cases { container-type: inline-size; }
.formula.grad-cases > math { font-size: min(1em, calc(100cqi / 17)); }
.formula.grad-cases mtext { font-family: inherit; }
.formula.grad-cases mtd { padding: 0.12em 0.1em; } /* column vector: compact cells (centred by default) */
mover.pd > mo:last-child { font-size: 0.7em; transform: translateY(-0.08em); } /* pseudo-derivative: a small tilde with a little air above the symbol, as \tilde in the paper */
/* tall brackets and the sign after a subscripted norm: trim the glyphs' side space */
.formula mo.vec-r { margin-left: -0.3em; }
.formula mo.vec-l { margin-left: -0.1em; }
.formula mo.le-tuck { margin-left: -0.12em; }
/* function-name chips (max, min) sit right against their bracket: no operator spacing after them */
.recur-card mpadded.op:not(.op-inline):has(> mi), .formula mpadded.op:not(.op-inline):has(> mi), .stepper mpadded.op:not(.op-inline):has(> mi) { margin-right: 0.03em; }
/* the condition inside an indicator's brackets: a size smaller, lifted a touch to stay centred */
.formula .ind-in { font-size: 0.82em; }
/* an invisible copy of the trailing "for all ..." on the left keeps the main inequality centred; the line is about 18em wide, so it shrinks to the box on phones */
.formula.norm-frac { container-type: inline-size; }
.formula.norm-frac > math { font-size: min(1em, calc(100cqi / 20.4)); }
/* norm bars around a tall fraction: two hairlines each side, drawn as backgrounds (stretched glyphs come out too heavy) */
mpadded.norm-bars { --l: linear-gradient(currentColor, currentColor); padding: 0.1em 0.42em 0.06em; background-image: var(--l), var(--l), var(--l), var(--l); background-repeat: no-repeat; background-size: 1px 100%; background-position: left top, left round(0.15em, 1px) top, right round(0.15em, 1px) top, right top; }
math .norm-sub { font-size: 0.62em; margin-left: 0.12em; } /* the norm's name: a touch smaller than a normal subscript (0.71em), off the bar; an explicit size replaces the automatic script scaling */
mpadded.norm-bars.nb-sm { padding: 0 0.34em; background-position: left top, left round(0.13em, 1px) top, right round(0.13em, 1px) top, right top; } /* norms of single symbols: bars of letter height (set by the mpadded), a tighter gap */
/* MinMax pseudo-gradients: a technical box between the cards, before Stability */
.cards > .tech-pseudograd { margin: 0; }
.tech-pseudograd p { margin: 0 0 0.7rem; }
.tech-pseudograd p:last-child { margin-bottom: 0.1rem; }
.tech-pseudograd .formula { margin: 0.6rem 0 0.8rem; }
.tech-pseudograd > p:first-of-type { margin-bottom: 0.1rem; }
.tech-pseudograd .see-more { font-size: 0.9rem; color: var(--link-accent); white-space: nowrap; }
.tech-pseudograd .pg-more { padding-top: 0.6rem; }
.tech-pseudograd .see-more .sm-labels { display: inline; } /* one label at a time: the chevron sits right after it */
.tech-pseudograd .see-more .when-open, .tech-pseudograd .see-more[aria-expanded="true"] .when-closed { display: none; }
.tech-pseudograd .see-more[aria-expanded="true"] .when-open { display: inline; }
.up-link .up-arrow { display: inline-block; text-decoration: none; } /* a link to material above: the arrow, not underlined */
.formula .q-small { font-size: 0.82em; } /* a trailing quantifier: quieter than the inequality it qualifies */
mover.pd + mpadded.op { margin-left: 0.06em; } /* a pseudo-derivative followed by a function chip: close up */
/* the parameter-to-loss bound: about 17em wide, shrunk to the box on phones */
.formula.loss-eq { container-type: inline-size; }
.formula.loss-eq > math { font-size: min(1em, calc(100cqi / 18)); }
.results-intro .len { font-weight: 580; } /* a lighter bold */
/* ===== Recurrence card: the title strip stays in view while the card is read =====
   Sticky inside the card (its containing block), so it lets go before the card's bottom edge.
   It sits just under the slim section bar (.stickybar: 42.19px up to 52rem, 43.78px above).
   Up to 42rem the strip is two or three rows (title, then the switches): only the switches stay,
   the title row slides up under the section bar (negative top). The layouts are pinned by width
   (title on its own row up to 42rem, the two switches stacked up to 29.5rem) so the visible height
   is known, and the player's own sticky controls stack right under the strip.
   Short viewports (landscape phones, < 30rem tall): nothing sticks except the player's controls, as before. */
.recur-card { --rc-bar: 2.625rem; --rc-hide: 0rem; --rc-vis: 3.175rem; }
@media (min-width: 52.01rem) { .recur-card { --rc-bar: 2.72rem; } }
@media (max-width: 42rem) {
  .recur-titlebar > .recur-title { flex: 0 0 100%; }
  .recur-card { --rc-hide: 2.665rem; --rc-vis: 2.475rem; } /* 0.7rem padding + 1.365rem title + 0.6rem gap */
}
@media (max-width: 29.5rem) {
  .recur-titlebar > .recur-controls.recur-controls-head { flex-direction: column; align-items: center; }
  .recur-card { --rc-vis: 4.69rem; }
}
@media (min-height: 30.01rem) {
  html.js .recur-titlebar { position: sticky; top: calc(var(--rc-bar) - var(--rc-hide)); z-index: 16; }
  html.js .recur-card .rw-controls { top: calc(var(--rc-bar) + var(--rc-vis) - 1px); } /* tucked under the strip's bottom line */
}
/* while stuck (where scroll-state queries exist, e.g. Chrome 133+): square top corners and a soft shadow below;
   elsewhere the strip simply sticks with its rounded corners */
@supports (container-type: scroll-state) {
  @media (min-height: 30.01rem) {
    html.js .recur-titlebar { container-type: scroll-state; }
    html.js .recur-titlebar::before, html.js .recur-titlebar::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; opacity: 0; transition: opacity 0.15s ease; }
    html.js .recur-titlebar::before { top: 0; height: 10px; z-index: -1; background: inherit; } /* fills the rounded corners */
    html.js .recur-titlebar::after { top: 100%; height: 8px; background: linear-gradient(rgba(0, 0, 0, 0.1), transparent); }
    @container scroll-state(stuck: top) {
      html.js .recur-titlebar::before, html.js .recur-titlebar::after { opacity: 1; }
    }
  }
}
/* throughput charts: the reference line is one element per panel, spanning all its bars (main.js) */
.panel { position: relative; }
.panel > .refline { position: absolute; width: 0; border-left: 2px dashed var(--ink); opacity: 0.55; pointer-events: none; z-index: 1; }
/* ===== Player chips: sizes checked across views (phones, landscape full window, desktop) ===== */
.rw-vec-eq { justify-content: safe center; } /* a too-wide equation is never cut on the left, where it cannot be scrolled to */
@media (max-width: 26rem) { .rw-vec-eq { font-size: clamp(14px, 4.5vw, 1em); } } /* narrow phones: the vector equation shrinks to fit */
.rw-arg { line-height: 1.15; padding: 0.1em 0.22em; } /* chips hug their digit: even air above, below and at the sides */
@media (orientation: landscape) and (max-height: 32rem) { .rw-full .rw-stage .rw-eqs { font-size: 1.1em; } } /* landscape full window: the equation as large as the text around it */
.rw-picked, .rw-stage.p3 .rw-maxwin { font-weight: 400; } /* the coloured border marks the picked value; equal widths for all chips */
.rw-mtext, .rw-stext { font-size: 12px; } /* chart cells (16 units) legible on phones (about 10px there) */
.rw-xtext { font-size: 13px; }
/* the explicit vector equation (max of mins, about 19.6em wide) shrinks to the stage where it would not fit */
.rw-stage { container-type: inline-size; }
:root:has(.recur-card .notation-tabs [data-notation="minmax"][aria-pressed="true"]) .rw-vec-eq { font-size: min(1em, 100cqi / 19.8); }
@media (max-width: 26rem) { :root:has(.recur-card .notation-tabs [data-notation="minmax"][aria-pressed="true"]) .rw-vec-eq { font-size: min(clamp(14px, 4.5vw, 1em), 100cqi / 19.8); } }
/* diagram caption: the words before the switch never wrap; the words after it may */
@media (min-width: 30.01rem) {
  html.js .rnc-diagram figcaption.dg-head .dg-title .dg-cap-sent { grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); }
  html.js .rnc-diagram .dg-title .dg-cap-lead { white-space: nowrap; }
}
.rw-dot text.rw-xtext { font-size: 13px; font-family: "Latin Modern Math Web", "STIX Two Math", serif; } /* the state value in its box, as large as the other chart chips */
/* things that stick under the section bar use its measured height (--bar-h, main.js), tucked 1px under it so no page shows between */
.prop-nav { top: calc(var(--bar-h, 2.75rem) - 1px); }
.rw-controls { top: calc(var(--bar-h, 2.6rem) - 1px); }
/* diagram caption: "Diagram" on its own line above; the sentence centred, wrapping as centred lines where it does not fit.
*/
.rnc-diagram .dg-title .dg-cap-label { display: block; }
html.js .rnc-diagram figcaption.dg-head .dg-title .dg-cap-sent { display: inline; }
html.js .rnc-diagram .dg-title .dg-cap-lead { white-space: normal; text-align: center; }
.rnc-diagram .dg-title .dg-cap-text { display: inline-grid; text-align: left; }
.rnc-diagram .dg-title .dg-cap-text > [data-cap] { display: inline; grid-area: 1 / 1; }
.rnc-diagram .dg-title .dg-cap-text > .dg-cap-off { display: inline; visibility: hidden; }
.rnc-diagram figcaption.dg-head .see-more-line.dg-title { display: block; text-align: center; }
.rnc-diagram .see-more-line.dg-title .recur-controls.dg-controls { display: inline-flex; margin: 0 0.4rem; vertical-align: baseline; }
.rnc-diagram .dg-title .dg-cap-label { margin-bottom: 0.15rem; }
.rnc-diagram .dg-title .dg-cap-text { display: inline; }
.rnc-diagram .dg-title .dg-cap-text > .dg-cap-off { display: none; } /* only the current phrasing takes room: every line truly centred */
@media (max-width: 52rem) { .keywords .kw-break { display: none; } } /* the first four no longer share a row: plain wrapping */
/* narrowest phones (≤ 20rem): the player's control row tightens so the full-window button stays inside the card */
@media (max-width: 20rem) { .rw-controls { padding-left: 0.55rem; padding-right: 0.55rem; gap: 0.2rem; } }
/* the box's take-away, always shown: centred under a hairline */
.tech-pseudograd .pg-key { margin: 0.85rem 0 0.1rem; padding-top: 0.7rem; border-top: 1px solid var(--line); text-align: center; font-weight: 600; font-size: 1.03em; color: var(--link-accent); } /* in the title's colour */
/* phones: one keyword per line */
@media (max-width: 32rem) { .keywords { flex-direction: column; align-items: center; } }
.rnc-diagram .dg-title .dg-cap-label { margin-right: 0; } /* centred on its own line */
