/* Logic replicant — "Paper and signal" design system
   Fonts: Space Grotesk (display) · Source Serif 4 (body) · JetBrains Mono (labels, numerals) */

:root {
  color-scheme: light;
  --paper: #F3F2EC; --surface: #FBFAF6; --surface-2: #EAE9E1;
  --ink: #141412; --ink-2: #3B3A35; --muted: #7A786F;
  --line: #D8D6CC; --line-2: #C2C0B5;
  --dot: rgba(20,20,18,.13);
  --accent: #E8420A; --accent-ink: #C2360A; --accent-soft: #FBE3D8; --on-accent: #fff;
  --ok: #2F7D32; --bad: #C62828;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 4px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F0F0E; --surface: #161615; --surface-2: #1F1F1D;
  --ink: #F2F1EB; --ink-2: #CFCEC6; --muted: #8B897F;
  --line: #2A2A27; --line-2: #3B3B37;
  --dot: rgba(242,241,235,.10);
  --accent: #FF5A1F; --accent-ink: #FF7A48; --accent-soft: #3A1C10; --on-accent: #0F0F0E;
}
html[data-accent="blue"] { --accent: #1F4FE0; --accent-ink: #1A41B8; --accent-soft: #DEE5FB; --on-accent: #fff; }
html[data-theme="dark"][data-accent="blue"] { --accent: #6D8CFF; --accent-ink: #8FA6FF; --accent-soft: #172352; --on-accent: #0F0F0E; }
html[data-accent="mono"] { --accent: #141412; --accent-ink: #141412; --accent-soft: #E4E3DB; --on-accent: #F3F2EC; }
html[data-theme="dark"][data-accent="mono"] { --accent: #F2F1EB; --accent-ink: #F2F1EB; --accent-soft: #262623; --on-accent: #0F0F0E; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--paper) radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 24px 24px;
  color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.25rem; margin-top: 1.6em; letter-spacing: -.01em; }
h4 { font-size: 1rem; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-top: 1.6em; }
p { margin: 0 0 1em; }
p.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-2); max-width: 40em; }
small, .small { font-size: .85rem; color: var(--muted); font-family: var(--display); }
code, kbd { font-family: var(--mono); font-size: .85em; background: var(--surface-2); padding: .1em .4em; border-radius: 3px; }
pre { background: var(--surface); border: 1px solid var(--line); padding: 1rem 1.2rem; border-radius: var(--r); overflow-x: auto; font-size: .82rem; line-height: 1.55; font-family: var(--mono); }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
blockquote { margin: 1.4rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 2px solid var(--accent); color: var(--ink-2); font-style: italic; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: .45em; }
li::marker { color: var(--accent); font-family: var(--mono); }
strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; border-radius: var(--r); z-index: 100; }

/* Tables: hairlines + mono numerals */
table { border-collapse: collapse; width: 100%; font-size: .92rem; font-family: var(--display); }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--mono); font-weight: 500; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .86rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table-wrap table { min-width: 640px; }
.table-wrap tr:last-child td { border-bottom: 0; }
tr.hl td { background: var(--accent-soft); }
tr.hl td b { color: var(--accent-ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .bar { max-width: 1320px; margin: 0 auto; padding: .55rem 1.25rem; display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.brand .mark { width: 22px; height: 22px; }
.brand:hover { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0 .2rem; }
.nav a { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); text-decoration: none; padding: .5rem .6rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.controls { margin-left: auto; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; padding: .38rem .7rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; line-height: 1; }
.seg button svg { width: 13px; height: 13px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:focus-visible, .swatches button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatches { display: inline-flex; gap: 6px; padding: 0 2px; }
.swatches button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line-2); background: var(--sw); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 900px) { .controls { margin-left: 0; width: 100%; } }

/* Reading level */
html[data-level="simple"] .detailed, html[data-level="simple"] .eq, html[data-level="simple"] .def { display: none !important; }
html[data-level="detailed"] .simple { display: none !important; }
.level-note { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; border: 1px dashed var(--line-2); border-radius: var(--r); padding: .7rem 1rem; margin: 0 0 1.6rem; font-family: var(--display); font-size: .92rem; color: var(--ink-2); background: var(--surface); }
.level-note .tag { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); }
.level-note button { margin-left: auto; }

/* Layout */
.layout { max-width: 1320px; margin: 0 auto; padding: 0 1.25rem 4rem; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.content { min-width: 0; max-width: 780px; padding-top: 2.2rem; counter-reset: sec; }
.side-desktop { display: none; }
.side-mobile { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: .5rem .9rem; }
.side-mobile summary { cursor: pointer; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.side-mobile .sidebar { padding-top: .6rem; }
@media (min-width: 1000px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); gap: 3.5rem; }
  .side-mobile { display: none; }
  .side-desktop { display: block; position: sticky; top: 66px; max-height: calc(100vh - 80px); overflow: auto; padding: 2.4rem 0 2rem; border-right: 1px solid var(--line); }
}
.sidebar .sb-group { margin-bottom: 1.2rem; }
.sidebar .sb-title { font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; font-size: .64rem; color: var(--muted); margin: 0 0 .4rem; }
.sidebar ol { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin: 0; }
.sidebar a { display: block; padding: .3rem .8rem .3rem .9rem; color: var(--ink-2); text-decoration: none; font-family: var(--display); font-size: .9rem; line-height: 1.3; border-left: 2px solid transparent; }
.sidebar a:hover { color: var(--ink); }
.sidebar a[aria-current="page"] { color: var(--ink); border-left-color: var(--accent); font-weight: 600; }

/* Section anatomy */
.eyebrow { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 1rem; display: flex; align-items: center; gap: .7rem; }
.eyebrow .pips { display: inline-flex; gap: 4px; }
.eyebrow .pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); display: block; }
.eyebrow .pips i.on { background: var(--accent); }
.content > h1 { margin-bottom: .7rem; }
section { padding-top: 2.4rem; }
section + section { border-top: 1px solid var(--line); margin-top: 2.4rem; }
.content > section:first-of-type, .content > .simple > section:first-of-type, .content > .detailed > section:first-of-type { padding-top: 1rem; }
.content section > h2 { counter-increment: sec; display: flex; align-items: baseline; gap: .8rem; }
.content section > h2::before { content: counter(sec, decimal-leading-zero); font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--accent-ink); font-weight: 500; }

/* Hero (index) */
.hero { padding: .5rem 0 0; }
.hero .kicker { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 1rem; }
.hero .kicker b { color: var(--accent-ink); font-weight: 500; }
.hero .display { font-size: clamp(3rem, 8vw, 6.4rem); line-height: .95; letter-spacing: -.035em; margin: 0 0 1.4rem; font-weight: 500; }
.hero .display .dot { display: inline-block; width: .22em; height: .22em; border-radius: 50%; background: var(--accent); margin-left: .12em; vertical-align: .05em; }
.hero-canvas { display: block; width: 100%; height: 340px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 1.6rem 0 .5rem; }
.hero-cap { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 0; }
.btn { display: inline-flex; align-items: center; gap: .45rem; padding: .62rem 1.1rem; border-radius: 999px; text-decoration: none; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; line-height: 1; }
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn.small { padding: .45rem .8rem; font-size: .66rem; }

/* Ticker */
.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; margin: 1.8rem 0; padding: .55rem 0; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); white-space: nowrap; }
.ticker .track { display: inline-flex; gap: 2.5rem; padding-left: 1rem; animation: ticker 40s linear infinite; }
.ticker .track span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 1rem; vertical-align: middle; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; flex-wrap: wrap; white-space: normal; } }

/* Fact cells */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 1.6rem 0 0; overflow: hidden; }
.fact { min-width: 0; padding: 1.1rem 1.1rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 1180px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fact { border-bottom: 0; }
  .fact:nth-child(2n) { border-right: 1px solid var(--line); }
  .fact:last-child { border-right: 0; }
}
.fact .n { font-family: var(--display); font-size: clamp(1.1rem, 1.35vw, 1.35rem); line-height: 1.1; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.fact .l { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-top: .6rem; line-height: 1.5; }

/* Panels, callouts, figures */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; }
.callout { border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--surface); border-radius: var(--r); padding: .9rem 1.1rem; margin: 1.4rem 0; font-size: .97rem; }
.callout.warm { border-left-color: var(--ink); }
.callout p:last-child { margin-bottom: 0; }
.callout .t { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); margin-bottom: .35rem; }
figure { margin: 1.8rem 0; }
figure img { border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
figcaption { font-family: var(--display); font-size: .86rem; color: var(--muted); margin-top: .6rem; line-height: 1.45; }
figcaption b { color: var(--ink-2); font-weight: 600; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-right: .3rem; }
.fig-pair { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 640px) { .fig-pair { grid-template-columns: 1fr 1fr; } .fig-pair.w64 { grid-template-columns: 64fr 36fr; } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.steps li { counter-increment: step; padding: 1.1rem 1.2rem 1.1rem 3.6rem; position: relative; margin: 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 1.2rem; top: 1.25rem; font-family: var(--mono); font-size: .72rem; color: var(--accent-ink); letter-spacing: .08em; }
.steps li h3 { margin-top: 0; font-size: 1.1rem; }
.steps li p:last-child { margin-bottom: 0; }
.dl dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 1rem; }
.dl dd { margin: .2rem 0 0; color: var(--ink-2); }
.glossary, .principles, .cards, .datasets { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; margin: 1.4rem 0; }
@media (min-width: 640px) { .glossary, .principles, .cards, .datasets { grid-template-columns: 1fr 1fr; } }
.glossary .g, .principles .p, .cards a, .datasets .ds { padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); margin: -1px 0 0 -1px; }
.glossary .g b, .principles .p b, .cards a b { display: block; font-family: var(--display); font-weight: 500; font-size: 1.15rem; letter-spacing: -.01em; margin-bottom: .35rem; color: var(--ink); }
.glossary .g span, .principles .p p, .cards a span { font-size: .95rem; color: var(--ink-2); margin: 0; }
.cards a { display: block; text-decoration: none; color: var(--ink); }
.cards a:hover { background: var(--surface-2); }
.cards a em { display: block; margin-top: .7rem; color: var(--accent-ink); font-style: normal; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; }
.ds { display: flex; flex-direction: column; gap: .35rem; }
.ds .tag { font-family: var(--mono); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); }
.ds h3 { margin: 0; font-size: 1.15rem; }
.ds .meta { font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.ds p { margin: .3rem 0 0; font-size: .93rem; color: var(--ink-2); }
.ds .score { margin-top: auto; padding-top: .7rem; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); }
.ds .score .v { font-family: var(--display); font-size: 1.5rem; color: var(--ink); }
.ds .score .vs { font-family: var(--mono); font-size: .66rem; color: var(--muted); text-align: right; text-transform: uppercase; letter-spacing: .06em; }

/* Dot chart */
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem 1rem; margin: 1.4rem 0; }
.chart .ttl { font-family: var(--display); font-weight: 500; font-size: 1.05rem; margin-bottom: .2rem; }
.chart .sub { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 1rem; }
.chart .legend { display: flex; gap: 1.2rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 1rem; }
.chart .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 0; margin-right: .4rem; }
.chart .legend .a i { background: var(--accent); }
.chart .legend .b i { background: var(--muted); }
.cgroup { margin-bottom: 1rem; }
.cgroup .gname { font-family: var(--display); font-size: .9rem; font-weight: 500; margin-bottom: .35rem; }
.crow { display: grid; grid-template-columns: 7.5rem 1fr 3.6rem; gap: .7rem; align-items: center; font-family: var(--mono); font-size: .7rem; color: var(--ink-2); padding: 3px 0; }
.crow .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .06em; }
.crow .track { display: flex; gap: 3px; align-items: center; }
.crow .track i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); flex: 0 0 auto; transition: background .25s, transform .25s; }
.crow.a .track i.on { background: var(--accent); }
.crow.b .track i.on { background: var(--muted); }
.crow .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.crow:hover .track i { transform: scale(1.25); }
@media (max-width: 560px) { .crow { grid-template-columns: 5.5rem 1fr 3rem; } .crow .track { gap: 2px; } .crow .track i { width: 4px; height: 4px; } }

/* Parity widget */
.parity { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; margin: 1.4rem 0; }
.bits { display: flex; gap: .45rem; flex-wrap: wrap; margin: .8rem 0 1rem; }
.bits button { width: 48px; height: 56px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-2); cursor: pointer; padding: 0; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.bits button svg { width: 22px; height: 30px; }
.bits button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
html[data-accent="mono"] .bits button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bits button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.parity .out { display: flex; gap: 2rem; flex-wrap: wrap; align-items: flex-end; }
.parity .out .cell { display: flex; flex-direction: column; gap: .4rem; }
.parity .out .cap { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.parity .out svg.dots { height: 44px; width: auto; display: block; color: var(--ink); }
.parity .out .odd svg.dots { color: var(--accent); }
.parity .out .word { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); }
.parity .note { font-size: .92rem; color: var(--muted); margin: 1rem 0 0; font-family: var(--display); }
.parity .note b { color: var(--ink-2); }

/* Diagram, math */
.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; margin: 1.6rem 0; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram .cap { font-family: var(--display); font-size: .86rem; color: var(--muted); margin-top: .6rem; }
mjx-container[display="true"] { margin: 1.1em 0 !important; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding-bottom: .2em; }
.eq { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-width: 0; }
.eq > mjx-container { min-width: 0; }
.eq .no { font-family: var(--mono); color: var(--muted); font-size: .7rem; letter-spacing: .06em; }
@media (max-width: 640px) { .eq { grid-template-columns: minmax(0, 1fr); gap: .1rem; } .eq .no { justify-self: end; margin-top: -.6rem; } }
.def { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); padding: 1rem 1.2rem; margin: 1.4rem 0; }
.def .h { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); margin-bottom: .5rem; }
.def p:last-child { margin-bottom: 0; }
.def.lemma { border-left-color: var(--ink); }
.def.lemma .h { color: var(--ink); }
.reactions { font-size: .95rem; line-height: 2; font-variant-numeric: tabular-nums; font-family: var(--display); }
.reactions .cy { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; margin-top: .9rem; color: var(--muted); }
.reactions div:not(.cy) { color: var(--ink-2); }
.reactions sup, .reactions-table sup { font-size: .7em; }

/* Pager + footer */
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { flex: 1; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1.1rem; }
.pager a:hover { border-color: var(--accent); }
.pager a small { display: block; font-family: var(--mono); color: var(--muted); font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: .3rem; }
.pager a.next { text-align: right; }
.pager a span { font-family: var(--display); font-size: 1.05rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .in { max-width: 1320px; margin: 0 auto; padding: 1.6rem 1.25rem; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: flex; flex-wrap: wrap; gap: .8rem 2rem; justify-content: space-between; }
.site-footer a { color: var(--ink-2); }
.site-footer em { font-style: normal; }

@media print {
  .site-header, .side, .actions, .pager, .ticker { display: none !important; }
  body { font-size: 11pt; background: #fff; }
  .simple, .detailed { display: block !important; }
}
