/* Modular Schur: letterpress journal.
 *
 * Layout: a two-column book grid. Column 1 (148px) is the margin, and carries
 * the section numerals and the status labels. Column 2 is the text block; the
 * contents list sits in the flow at its top. Every line of type on the page
 * starts on one left edge, the text spine at var(--reach); only hung margin
 * items sit left of it. Margin items are absolutely positioned against their
 * own paragraph or heading at left: calc(-1 * var(--reach)), so they reach
 * into column 1 without depending on document order.
 *
 * The hooks this file expects from the pipeline are listed at the bottom. */

:root {
  --paper:      oklch(0.982 0.008 85);
  --paper-deep: oklch(0.957 0.013 82);
  --ink:        oklch(0.245 0.014 62);
  --ink-soft:   oklch(0.505 0.016 62);
  /* --ink-faint is used at 0.8rem (kickers, table headers, contents), so it
   * has to clear 4.5:1 against --paper for normal text, not the 2.96:1 the
   * 2026-08-22 audit measured. Small caps and letterspacing carry the
   * hierarchy that the lighter value used to. */
  --ink-faint:  oklch(0.520 0.016 66);
  --rule:       oklch(0.872 0.013 75);
  --rule-soft:  oklch(0.928 0.010 78);
  /* Accent drawn from the site avatar's flounder teal (#23a0a8 ~ oklch 0.65
   * 0.10 202), darkened to clear 4.5:1 with margin on both paper tones. */
  --accent:     oklch(0.480 0.100 202);

  --st-proven:  oklch(0.500 0.090 152);
  --st-empiric: oklch(0.545 0.095 72);
  --st-conj:    oklch(0.500 0.090 262);
  --st-refuted: oklch(0.515 0.110 28);
  --st-cert:    oklch(0.500 0.090 320);

  /* Literata is drawn for long-form reading on screen: large x-height, sturdy
   * stems, open counters. Charter and Iowan Old Style are the closest local
   * fallbacks in weight and x-height. */
  --serif: Literata, Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --margin-w: 148px;
  --gutter: 38px;
  --reach: 186px;     /* margin-w + gutter */
  /* The prose column takes half the screen on ordinary displays, floored at
   * 700px (~62 characters at 22px Literata) on smaller windows and capped at
   * 850px (~75 characters), the top of the usual 45-75 character range; audit
   * F-15 (2026-08-24) measured a 1920px line at a 3840px viewport before the cap. */
  --measure: clamp(700px, 50vw, 850px);
  --breakout: 320px;  /* how far figures and wide tables run past the measure */
  --pad: 56px;
  --grain: 1;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      oklch(0.178 0.009 62);
    --paper-deep: oklch(0.213 0.010 62);
    --ink:        oklch(0.918 0.011 82);
    --ink-soft:   oklch(0.735 0.013 76);
    --ink-faint:  oklch(0.665 0.012 70);   /* was 4.49:1; needs margin over 4.5 */
    --rule:       oklch(0.330 0.012 66);
    --rule-soft:  oklch(0.268 0.010 64);
    --accent:     oklch(0.720 0.090 200);

    --st-proven:  oklch(0.715 0.090 152);
    --st-empiric: oklch(0.750 0.095 76);
    --st-conj:    oklch(0.720 0.085 262);
    --st-refuted: oklch(0.700 0.115 30);
    --st-cert:    oklch(0.720 0.085 320);
    --grain: 0.42;
  }
}

* { box-sizing: border-box; }

/* The type ramp is rem-based, so the root size scales all of it together. */
html { -webkit-text-size-adjust: 100%; font-size: 22px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.66;
  font-variant-numeric: oldstyle-num;
  text-wrap: pretty;
}

/* Paper grain. Decorative only, and it never intercepts a click. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(0.5 * var(--grain));
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23g)' opacity='0.16'/></svg>");
}
@media (prefers-color-scheme: dark) { body::before { mix-blend-mode: screen; } }
@media (prefers-reduced-motion: reduce) { body::before { display: none; } }

.sheet {
  position: relative;
  z-index: 2;
  /* The sheet is the sum of its parts, so it grows with the measure. */
  max-width: calc(var(--reach) + var(--measure) + var(--gutter)
                  + var(--breakout) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad) 84px;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--accent) 34%, transparent);
}
a:hover, a:focus-visible { color: var(--ink); border-bottom-color: var(--ink); }

/* Skip link: off-screen until keyboard focus lands on it, then a small pill
 * pinned to the top-left corner, above the paper grain and the sheet. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  position: fixed;
  left: 14px;
  top: 12px;
  z-index: 10;
  padding: 0.45em 0.95em;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

em, i { font-style: italic; }
strong { font-weight: 600; }

/* ── Masthead ──────────────────────────────────────────────────────────── */

.page-header { padding-top: 74px; }

.page-header .rule-double {
  height: 3px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: 30px;
}

.kicker {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.115em;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0;
}

.page-header h1 {
  margin: 12px 0 0.2em;
  font-size: 2.9rem;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.page-header .subtitle {
  margin: 0 0 0.7em;
  max-width: var(--measure);
  font-size: 1.28rem;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.38;
}

.page-header .dateline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 11px;
  margin-top: 26px;
}

/* The masthead type stands on the text spine with the abstract and the prose.
 * The double rule and the footer stay full width; the dateline closes at the
 * measure so its right end meets the text block's. */
.page-header > .kicker,
.page-header > h1,
.page-header > .subtitle,
.page-header > .byline,
.page-header > .dateline { margin-left: var(--reach); }
.page-header > .dateline { max-width: var(--measure); }

/* ── The book grid ─────────────────────────────────────────────────────── */

/* Three columns: margin, prose, and the breakout field. The third column is
 * deliberately empty; figures and wide tables run into it, prose never does. */
.body-grid {
  display: grid;
  grid-template-columns: var(--margin-w) minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: var(--gutter);
  align-items: start;
  margin-top: 46px;
}

/* The contents list is front matter: it sits on the text spine between the
 * abstract and the first section, leaving the margin column free for the
 * section numerals that hang there. */
.toc { grid-column: 2; margin-bottom: 46px; }
.toc h2 {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.115em;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin: 0 0 0.65em;
  border: 0;
  padding: 0;
}
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  line-height: 1.62;
  columns: 2;
  column-gap: 36px;
}
.toc ul ul { display: none; }             /* level-2 headings only */
.toc li {
  margin-bottom: 0.18em;
  break-inside: avoid;
  padding-left: 1.2em;      /* wrapped entry lines indent under their number */
  text-indent: -1.2em;
}
.toc a { color: var(--ink-soft); border-bottom: 0; }
.toc a:hover { color: var(--accent); }

.content { grid-column: 2; }

/* ── Sections and headings ─────────────────────────────────────────────── */

/* The status page's top level is h2, so its roman numerals hang off
 * section.level2. The paper's top level is h1 and its level2 sections are
 * ordinary subsections, so this counter must not reach them. */
.page-status .content { counter-reset: sect; }
.page-status .content section.level2 { counter-increment: sect; }

.content h2 {
  position: relative;
  margin: 3rem 0 0.7em;
  font-size: 1.48rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.008em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.32em;
  text-wrap: balance;
}
.page-status .content section.level2 > h2::before {
  content: counter(sect, upper-roman);
  position: absolute;
  left: calc(-1 * var(--reach));
  width: var(--margin-w);
  text-align: right;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.92em;
  color: var(--ink-faint);
  border: 0;
}
.content section.level2:first-of-type > h2 { margin-top: 0.3rem; }

.content h3 {
  margin: 2.1rem 0 0.55em;
  font-size: 1.16rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink-soft);
}

.content p { position: relative; margin: 0 0 1.05em; }

/* Drop cap on the opening paragraph only. */
.content > p:first-of-type::first-letter {
  float: left;
  font-size: 2.95em;
  line-height: 0.86;
  padding: 0.04em 0.09em 0 0;
  font-weight: 500;
  color: var(--accent);
}

/* ── Status labels ─────────────────────────────────────────────────────── */

/* .st  is pulled into the margin, one per claim.
 * .stx stays inline, for the legend and for mentions in running text. */
.st, .stx {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.105em;
  font-size: 0.82rem;
  white-space: nowrap;
}
.stx { display: inline-flex; align-items: baseline; gap: 0.45em; }
.stx::before {
  content: "";
  width: 0.46em;
  height: 0.46em;
  background: currentColor;
  flex: none;
  transform: translateY(-0.12em);
}

.content p > .st:first-child {
  position: absolute;
  left: calc(-1 * var(--reach));
  top: 0.34em;
  width: var(--margin-w);
  text-align: right;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.45em;
}
.content p > .st:first-child::before {
  content: "";
  width: 0.46em;
  height: 0.46em;
  background: currentColor;
  flex: none;
  transform: translateY(-0.12em);
}

.st-proven   { color: var(--st-proven); }
.st-empirical{ color: var(--st-empiric); }
.st-conj     { color: var(--st-conj); }
.st-refuted  { color: var(--st-refuted); }
.st-cert     { color: var(--st-cert); }

/* ── Figures ───────────────────────────────────────────────────────────── */

/* Figures leave the prose measure and use the breakout field to their right.
 * The viewport clamp keeps them inside the sheet on narrower windows. */
figure {
  margin: 2.1rem 0;
  padding: 0;
  width: calc(100% + var(--breakout));
  max-width: calc(100vw - 2 * var(--pad) - var(--reach));
}
figure svg { display: block; width: 100%; height: auto; overflow: visible; }
figure .fig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
figure .fig-body { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
figure .fig-body > svg { flex: 0 1 430px; max-width: 460px; min-width: 0; }
figure .fig-aside { flex: 1 1 320px; min-width: 0; }
figcaption {
  margin-top: 16px;
  border-top: 1px solid var(--ink);
  padding-top: 10px;
  font-size: 0.86rem;
  line-height: 1.62;
  font-style: italic;
  color: var(--ink-soft);
}
figure .rule-h {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 12px 0 10px;
}
figure .expr {
  text-align: center;
  font-size: 1.1rem;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 6px 0 0;
}
/* SVG ink. Classes rather than literal colours, so the figures follow the
 * light/dark tokens with the rest of the page. */
figure text { font-family: var(--serif); }
figure .s-rule  { stroke: var(--rule);       fill: none; }
figure .s-ink   { stroke: var(--ink);        fill: none; }
figure .s-faint { stroke: var(--ink-faint);  fill: none; }
figure .s-acc   { stroke: var(--accent);     fill: none; }
figure .s-pass  { stroke: var(--st-proven);  fill: none; }
figure .f-paper { fill: var(--paper); }
figure .f-ink   { fill: var(--ink); }
figure .f-faint { fill: var(--ink-faint); }
figure .f-acc   { fill: var(--accent); }
figure .f-pass  { fill: var(--st-proven); }
figure .lbl     { font-size: 15px; text-anchor: middle; dominant-baseline: central; }
figure .lbl-sm  { font-size: 12.5px; text-anchor: middle; letter-spacing: 1.1px;
                  font-variant-caps: all-small-caps; }

.fig-note { font-size: 0.86rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.fig-count {
  font-variant-numeric: lining-num tabular-nums;
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 500;
  margin: 0;
}

/* Figure 2: the gate. Paired boxes with connector rules between them. */
.fig-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fig-box { border: 1px solid var(--ink); padding: 13px 15px; background: var(--paper); }
.fig-box h4 {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.fig-box p { margin: 0; font-size: 0.87rem; line-height: 1.55; color: var(--ink-soft); }
.fig-box.pass { border-color: var(--st-proven); }
.fig-box.pass h4 { color: var(--st-proven); }
.fig-link { display: block; width: 100%; height: 34px; }
.fig-bar {
  border: 1px solid var(--ink);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  background: var(--paper-deep);
  text-align: center;
}
.fig-bar p { margin: 0; }
.fail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; }
.fail-grid p { display: flex; gap: 9px; align-items: baseline; margin: 0;
               font-size: 0.85rem; line-height: 1.5; }
.fail-grid p::before { content: "\00d7"; color: var(--st-refuted); flex: none; }

/* Figure 3: the audit boundary. Two columns split by a solid rule. */
.bnd { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 26px; }
.bnd-rule { background: var(--ink); }
.bnd-col { display: flex; flex-direction: column; gap: 11px; }
.bnd-col h4 { margin: 0 0 3px; font-size: 1.14rem; font-weight: 500; }
.bnd-col .stack { border-top: 1px solid var(--rule); padding-top: 9px; }
.bnd-col .mods {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin: 0;
}
.bnd-verdict {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  border-top: 1px solid var(--rule);
  padding-top: 9px;
  margin: auto 0 0;
}

@media (max-width: 860px) {
  .fig-pair, .fail-grid { grid-template-columns: 1fr; }
  .bnd { grid-template-columns: 1fr; gap: 20px; }
  .bnd-rule { height: 1px; width: 100%; }
}

/* ── Tables ────────────────────────────────────────────────────────────── */

/* Tables size to their content and may run into the breakout field, so the
 * wide matrices get room without stretching the narrow ones to fill it. */
.content table {
  border-collapse: collapse;
  width: max-content;
  min-width: 60%;
  max-width: min(calc(100% + var(--breakout)),
                 calc(100vw - 2 * var(--pad) - var(--reach)));
  margin: 0.5em 0 1.4em;
  font-size: 0.88rem;
  font-variant-numeric: lining-num tabular-nums;
}
.content th {
  text-align: left;
  font-weight: 400;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding: 0 0.9em 0.42em 0;
  border-bottom: 1px solid var(--ink);
}
.content td {
  padding: 0.42em 0.9em 0.42em 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.content tr:last-child td { border-bottom: 1px solid var(--rule); }
.content th:last-child, .content td:last-child { padding-right: 0; }

/* Wide matrices scroll inside their own box; the page never scrolls sideways. */
.table-wrap { overflow-x: auto; max-width: 100%; }

/* ── Code, quotes, lists, rules ────────────────────────────────────────── */

code, pre { font-family: var(--mono); }

.content code {
  font-size: 0.84em;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.content pre {
  font-size: 0.78rem;
  line-height: 1.62;
  background: var(--paper-deep);
  border-left: 2px solid var(--rule);
  padding: 1em 1.15em;
  margin: 0.5em 0 1.3em;
  overflow-x: auto;
  color: var(--ink-soft);
}
.content pre code { font-size: inherit; color: inherit; }

.content blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1.15em;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}
.content blockquote p:last-child { margin-bottom: 0; }

.content ul, .content ol { margin: 0 0 1.05em; padding-left: 1.25em; }
.content li { margin-bottom: 0.32em; }
.content li::marker { color: var(--ink-faint); }

.content hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.6rem 0;
}

/* ── KaTeX ─────────────────────────────────────────────────────────────── */

.katex { font-size: 1.03em; }
.katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.9em 0;
  margin: 1.5em 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

/* ── Footer ────────────────────────────────────────────────────────────── */

.page-footer {
  margin-top: 62px;
  border-top: 1px solid var(--ink);
  padding-top: 13px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.page-footer p { margin: 0; }

/* ── Narrow screens: the margin folds into the text block ──────────────── */

@media (max-width: 1100px) {
  :root { --breakout: 0px; }
}

@media (max-width: 860px) {
  :root { --pad: 24px; --breakout: 0px; }
  html { font-size: 20px; }
  .sheet { padding: 0 var(--pad) 64px; }
  .page-header { padding-top: 48px; }
  .page-header h1 { font-size: 2.1rem; }
  .page-header .subtitle { font-size: 1.1rem; }

  .body-grid { display: block; margin-top: 34px; }
  .abstract { margin-left: 0; }
  .content table { width: 100%; min-width: 0; max-width: 100%; }

  /* The margin column is gone, so the spine folds back to the sheet edge. */
  .page-header > .kicker, .page-header > h1, .page-header > .subtitle,
  .page-header > .byline, .page-header > .dateline { margin-left: 0; }
  .page-header > .dateline { max-width: none; }

  .toc {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 14px 0;
    margin-bottom: 30px;
  }
  .toc ul { column-gap: 24px; }

  /* Margin items rejoin the flow. */
  .page-status .content section.level2 > h2::before {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 0.2em;
  }
  .page-paper .content h1 .header-section-number {
    position: static;
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 0.15em;
  }
  .content p > .st:first-child {
    position: static;
    width: auto;
    display: inline-flex;
    justify-content: flex-start;
    margin-right: 0.6em;
  }

  figure .fig-body { display: block; }
  figure .fig-aside { margin-top: 20px; }
}

/* ══ The paper ═════════════════════════════════════════════════════════════
 *
 * index.html is docs/paper/modular-schur.md rendered by site/theme/paper.lua. The
 * paper's structure is LaTeX, so these rules dress what that filter emits:
 * theorem-family blocks, proofs, float figures holding a compiled TikZ SVG,
 * the bibliography, and the \ref and \cite links. Section headings here are
 * h1, one level above the status page's.                                    */

.page-header .byline {
  /* This rule is later than the masthead spine group, so it restates the
   * spine offset; the narrow-screen block at the end resets it. */
  margin: 0.7em 0 0 var(--reach);
  font-size: 1.02rem;
  color: var(--ink-soft);
  font-style: italic;
}

.abstract {
  max-width: var(--measure);
  /* Align with the prose column below (margin + gutter), not the sheet edge. */
  margin: 2.1rem 0 0 var(--reach);
  padding: 1.15rem 0 1.2rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.abstract .kicker { margin: 0 0 0.5em; }
.abstract p { margin: 0 0 0.75em; font-size: 0.955rem; line-height: 1.62; }
.abstract p:last-child { margin-bottom: 0; }

/* ── Section headings ──────────────────────────────────────────────────── */

.page-paper .content h1 {
  position: relative;
  margin: 3.2rem 0 0.75em;
  font-size: 1.52rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.008em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.32em;
  text-wrap: balance;
}
.page-paper .content section.level1:first-of-type > h1 { margin-top: 0.3rem; }

/* The section number hangs in the margin, as the roman numerals do opposite. */
.page-paper .content h1 .header-section-number {
  position: absolute;
  left: calc(-1 * var(--reach));
  width: var(--margin-w);
  text-align: right;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.1em;
  font-size: 0.92em;
  color: var(--ink-faint);
}
.page-paper .content h2 { border-bottom: 0; font-size: 1.24rem; margin-top: 2.4rem; }
.page-paper .content h2 .header-section-number { color: var(--ink-faint); }

/* ── Theorem-family blocks ─────────────────────────────────────────────── */

.thm { margin: 1.5rem 0; }
.thm > p:last-child { margin-bottom: 0; }

.thm-kind {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.075em;
  font-weight: 600;
  font-style: normal;
}
.thm-num { font-weight: 600; font-style: normal; }
.thm-title { font-style: normal; color: var(--ink-soft); }
.thm-dot { font-style: normal; }

/* AMS convention: assertions italic, definitions and remarks upright. */
.thm-theorem, .thm-lemma, .thm-proposition, .thm-corollary { font-style: italic; }
.thm-definition, .thm-remark { font-style: normal; }
.thm-definition, .thm-remark { color: var(--ink-soft); }
.thm-definition .thm-kind, .thm-remark .thm-kind { color: var(--ink); }

/* ── Proofs ────────────────────────────────────────────────────────────── */

.proof {
  margin: 1.3rem 0 1.6rem;
  color: var(--ink-soft);
}
.proof > p:last-child { margin-bottom: 0; }
.proof-head {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.075em;
  font-style: italic;
  color: var(--ink);
}
.qed { float: right; margin-left: 0.5em; color: var(--ink-faint); }
.qed-line { text-align: right; }

/* ── Figures compiled from the paper's TikZ ────────────────────────────── */

figure.paper-fig {
  /* The figure box spans the prose measure plus the breakout field, like a
   * wide table. A figure narrower than the measure centers on the prose axis
   * (see .fig-svg); a wider one starts at the prose edge and runs into the
   * breakout. Wider still, it scrolls sideways inside this box rather than
   * shrinking its labels: the labels never drop below the min-width floor. */
  width: calc(100% + var(--breakout));
  margin: 2.6rem 0 2.8rem;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
}
figure.paper-fig .fig-svg {
  display: block;
  /* --fig-w and width come as an inline style from scripts/inline-figures.mjs
   * (2.6x the natural TikZ size). The floor keeps the mostly \scriptsize (7pt)
   * TikZ labels at 16px or more: below it the figure scrolls instead of
   * shrinking. The breakout is 0 on narrow screens, so this is 100% there. */
  max-width: 100%;
  min-width: calc(var(--fig-w) * 0.66);
  height: auto;
  margin-left: max(0px, calc((min(100%, var(--measure)) - var(--fig-w)) / 2));
  padding: 4px 0;
}
figure.paper-fig figcaption {
  text-align: left;
  /* Captions stay on the prose measure even when the figure runs wider (and
   * when the viewport clamp on figure shrinks the box below measure+breakout). */
  max-width: var(--measure);
}
.fig-label {
  font-variant-caps: all-small-caps;
  letter-spacing: 0.075em;
  font-weight: 600;
  color: var(--ink);
}

/* A bare TikZ callout, not a numbered float. Same sizing rules as a figure. */
.paper-aside { margin: 2rem 0; text-align: center; width: calc(100% + var(--breakout)); overflow-x: auto; overflow-y: hidden; }
.paper-aside .fig-svg {
  display: block; max-width: 100%; min-width: calc(var(--fig-w) * 0.66); height: auto; padding: 4px 0;
  margin-left: max(0px, calc((min(100%, var(--measure)) - var(--fig-w)) / 2));
}

/* ── Splash band at the top of the paper page ──────────────────────────── */

.splash { margin: 30px 0 20px; }
.splash svg { display: block; width: 100%; height: auto; }

/* The splash band is the top of the letterhead, so the masthead sits directly
 * under it. The status page has no splash and keeps the base clearance. */
.page-paper .page-header { padding-top: 0; }

/* On load the Schur-triple arcs draw themselves toward z, then the z-rings
 * and the label appear. Static (fully drawn) under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .splash-arc {
    stroke-dasharray: 1;
    animation: splash-draw 1.05s cubic-bezier(0.4, 0, 0.2, 1) both;
  }
  .splash-z, .splash-lab { animation: splash-appear 0.5s ease-out both; }
}
@keyframes splash-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes splash-appear { from { opacity: 0; } to { opacity: 1; } }

/* ── Figure 5 on the status page: the Coordinate-Union Edge Rule ────────
 * Cycles: first-axis cliques, second-axis cliques, then their union.
 * Base state (and reduced motion): the union, bands and phase labels off. */
.er-b1, .er-b2, .er-l1, .er-l2 { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .er-b1, .er-l1 { animation: er-phase1 12s linear infinite; }
  .er-e1         { animation: er-edges1 12s linear infinite; }
  .er-b2, .er-l2 { animation: er-phase2 12s linear infinite; }
  .er-e2         { animation: er-edges2 12s linear infinite; }
  .er-l3         { animation: er-phase3 12s linear infinite; }
}
@keyframes er-phase1 { 0% {opacity:0} 3%,28% {opacity:1} 33%,100% {opacity:0} }
@keyframes er-edges1 { 0% {opacity:0} 3%,28% {opacity:1} 33%,63% {opacity:0} 68%,97% {opacity:1} 100% {opacity:0} }
@keyframes er-phase2 { 0%,33% {opacity:0} 38%,63% {opacity:1} 68%,100% {opacity:0} }
@keyframes er-edges2 { 0%,33% {opacity:0} 38%,97% {opacity:1} 100% {opacity:0} }
@keyframes er-phase3 { 0%,63% {opacity:0} 68%,97% {opacity:1} 100% {opacity:0} }

/* ── Cross-references and citations ────────────────────────────────────── */

a.xref, a.cite { border-bottom-color: var(--rule); font-variant-numeric: oldstyle-num; }
.xref-missing { color: var(--st-refuted); font-weight: 600; }

/* ── Bibliography ──────────────────────────────────────────────────────── */

.refs { list-style: none; margin: 0; padding: 0; }
.refs li {
  position: relative;
  margin: 0 0 0.95em;
  padding-left: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}
.refs li p { margin: 0; }
.ref-sigil {
  position: absolute;
  left: calc(-1 * var(--reach));
  width: var(--margin-w);
  text-align: right;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

@media (max-width: 860px) {
  .page-header > .byline { margin-left: 0; }
  .refs li { padding-left: 0; }
  .ref-sigil {
    position: static;
    width: auto;
    text-align: left;
    display: inline;
    margin-right: 0.45em;
  }
}

/* Hooks this file depends on:
 *   template:  .skip-link  .sheet  .page-header  .rule-double  .kicker
 *              .subtitle  .dateline  .body-grid  .toc  .content  .page-footer
 *   pandoc:    section.level2 / .level3  table/th/td  pre/code  blockquote
 *   content:   [Label]{.st .st-proven}   margin status, first child of a <p>
 *              [Label]{.stx .st-proven}  inline status, legend and prose
 *              <figure> with .fig-head / .fig-body / .fig-aside / figcaption
 *   katex:     .katex  .katex-display    (keep .katex-display scrollable)
 * Status colours: .st-proven .st-empirical .st-conj .st-refuted .st-cert */
