/* Light, sans-serif project page. Accent (coral) marks the token readout and our rows; blue marks the latent. */
:root {
  --accent: #d1553c;
  --accent-soft: #fdeeea;
  --accent-line: #f3cfc6;
  --feed: #b5533c;          /* feed-back arrows, as in the paper figures */
  --blue: #2f66b3;
  --blue-soft: #e6eef9;
  --ink: #1a1c20;
  --ink-soft: #4a4f57;
  --muted: #8b8f97;
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --card: #ffffff;
  --line: #e7e7ea;
  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.04), 0 8px 24px rgba(20, 22, 26, 0.06);
  --radius: 18px;
  --sans: "Inter", "Noto Sans", system-ui, -apple-system, sans-serif;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 110%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.section, .hero { scroll-margin-top: 3.636rem; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.012em; margin: 0; line-height: 1.2; }
p { margin: 0 0 1rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.ac { color: var(--accent); }

/* Inline math written in HTML */
.m { font-family: "KaTeX_Math", "Times New Roman", serif; font-style: italic; font-size: 1.05em; white-space: nowrap; }
.m sub { font-size: 0.7em; }
.m sub.num, .m .up { font-family: "KaTeX_Main", "Times New Roman", serif; font-style: normal; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.container.narrow { max-width: 980px; }

/* Top navigation */
.topnav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 0.9091rem;
  padding: 0.5909rem 1.591rem; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); font-size: 0.8364rem;
}
.brand { font-weight: 800; letter-spacing: -0.01em; text-decoration: none; font-size: 0.9545rem; }
.topnav ul { list-style: none; display: flex; align-items: center; gap: 1.455rem; margin: 0; padding: 0; }
.topnav ul a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.topnav ul a:hover { color: var(--ink); }
.topnav .nav-pill { background: var(--ink); color: #fff; padding: 0.4091rem 0.9091rem; border-radius: 999px; font-weight: 600; }
.topnav .nav-pill:hover { background: #000; color: #fff; }

/* Hero */
.hero {
  position: relative; padding: 3.864rem 1.364rem 3.182rem; text-align: center;
  background:
    radial-gradient(900px 380px at 82% -10%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    radial-gradient(900px 380px at 0% 0%, rgba(47, 102, 179, 0.07), transparent 60%),
    #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero-inner { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; }
.publication-title {
  font-size: clamp(30.4px, 3.6vw, 44px); line-height: 1.16; letter-spacing: -0.022em; font-weight: 800;
  margin: 0 auto 0.8182rem; max-width: 22ch;
}
.subtitle { max-width: 66ch; margin: 0 auto 1.727rem; font-size: clamp(18px, 1.9vw, 23px); font-weight: 500; color: var(--ink-soft); line-height: 1.4; text-wrap: balance; }
.subtitle .hl { color: var(--accent); font-weight: 700; white-space: nowrap; background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 0.1em; }
.authors { margin: 0 0 0.5rem; font-size: 0.9273rem; line-height: 1.8; }
.authors > a, .authors > span { white-space: nowrap; }
.authors a { text-decoration: none; border-bottom: 1px solid var(--line); }
.authors a:hover { border-color: var(--ink); }
.authors sup, .affils sup, .affils .num { color: var(--accent); font-weight: 600; font-size: 0.72em; }
.authors sup { margin-left: 0.06em; }
.affils { margin: 0 0 1.727rem; font-size: 0.8636rem; color: var(--ink-soft); line-height: 1.7; }
.affils span { display: inline-block; margin: 0 0.6818rem; }
.affils .num { font-size: 0.85em; margin-right: 0.25em; vertical-align: 0.08em; }
.todo { color: #5a4300; background: #ffe9b3; border-radius: 4px; padding: 0 0.3em; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6364rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4545rem;
  padding: 0.5636rem 1.136rem; border-radius: 999px; font-size: 0.8364rem; font-weight: 600;
  color: #fff; background: var(--ink); border: 1px solid var(--ink); text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }
.btn.todo-link { background: #fff; color: #7a5b00; border: 1px dashed #d9a400; }
.btn.todo-link:hover { background: #fff7e0; }

/* Figures */
.figure { margin: 0; }
.figure figcaption { margin: 0.9rem auto 0; max-width: 78ch; text-align: center; font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); }
.figure figcaption strong { color: var(--ink); }
.framed-svg .svg-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem 0.5rem; box-shadow: var(--shadow-1); }
.framed-svg svg { width: 100%; height: auto; display: block; }

/* Sentence demo */
.demo { position: relative; z-index: 1; max-width: calc(1180px - 2.727rem); margin: 2.5rem auto 0; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 1.273rem 1.455rem 1.136rem; }
.demo-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.364rem; flex-wrap: wrap; margin-bottom: 1.136rem; }
.demo-kicker { margin: 0 0 0.2727rem; font-size: 0.6364rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.demo-title { font-size: 18.4px; text-align: left; margin: 0; }
.demo-controls { display: flex; align-items: center; gap: 0.5455rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-soft); flex: none; }
.ctl { font: inherit; font-weight: 600; font-size: 0.7727rem; padding: 0.3636rem 0.8636rem; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.ctl.ghost { background: transparent; color: var(--ink); }
.ctl:hover { background: #000; color: #fff; }
.demo-step { margin-left: 0.3636rem; white-space: nowrap; }
.demo-step output { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); min-width: 2.6em; display: inline-block; }
#demo-range { width: 160px; accent-color: var(--accent); }
.demo .svg-scroll { overflow-x: auto; margin: 0 -0.2273rem 0.6818rem; padding: 0.2273rem 0.2273rem 0; border-bottom: 1px solid var(--line); }
.demo svg { width: 100%; height: auto; display: block; }
.demo-grid { display: grid; grid-template-columns: 3.091rem 1fr; column-gap: 0.9091rem; row-gap: 0.4091rem; align-items: center; }
.demo-sym { font-size: 1.182rem; line-height: 1; text-align: right; padding-right: 0.1818rem; }
.demo-links { display: flex; gap: 1.818rem; min-height: 2.182rem; }
.demo-arrow { display: flex; align-items: center; gap: 0.5rem; }
.demo-arrow.read { color: var(--ink-soft); }
.demo-arrow.feed { color: var(--feed); }
.demo-arrow.read { margin-left: 1.364rem; }
.demo-arrow.feed { margin-left: 10.91rem; }
.demo-arrow i { position: relative; align-self: stretch; width: 2px; background: currentColor; }
/* The head sits outside the line, so offset the line by the head's 8px: both arrows then span the same height. */
.demo-arrow.read i { margin: 4px 0 12px; }
.demo-arrow.feed i { margin: 12px 0 4px; }
.demo-arrow i::after { content: ""; position: absolute; left: -5px; border: 6px solid transparent; }
.demo-arrow.read i::after { bottom: -8px; border-top: 8px solid currentColor; border-bottom: 0; }
.demo-arrow.feed i::after { top: -8px; border-bottom: 8px solid currentColor; border-top: 0; }
.demo-arrow b { font-size: 0.6727rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2rem 0.5455rem; border-radius: 999px; }
.demo-arrow.read b { background: #eceef1; color: var(--ink); }
.demo-arrow.feed b { background: color-mix(in srgb, var(--feed) 12%, #fff); color: var(--feed); }
.latent-box { position: relative; height: 2.364rem; border-radius: 10px; border: 1px solid var(--blue); background: linear-gradient(90deg, #cfe0f7, #e6eef9); overflow: hidden; }
.demo .latent-box svg { position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; display: block; }
.latent-box line { stroke: #1f3350; stroke-width: 2.2; }
.latent-box g { opacity: 0.75; }
.token-row { display: flex; flex-wrap: wrap; gap: 0.3636rem; min-height: 2.182rem; align-items: center; }
.tok { text-align: center; font-family: var(--mono); font-size: 0.8636rem; padding: 0.2909rem 0.5455rem; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); line-height: 1.2; transition: background-color 500ms ease, color 500ms ease, border-color 500ms ease; }
.tok.settled { border-color: #cfd3d9; font-weight: 500; }
.tok.changed { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: flash calc(var(--arrow, 700ms) * 1.3) ease-out; }
.tok.noised { color: var(--muted); background: repeating-linear-gradient(45deg, #ededf0 0 3px, #f8f8f9 3px 7px); border-style: dashed; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: var(--card); } }
.demo-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3636rem 1.136rem; margin-top: 0.8182rem; padding-top: 0.6818rem; border-top: 1px solid var(--line); font-size: 0.7273rem; color: var(--ink-soft); }
.demo-legend .sw { display: inline-block; width: 0.7727rem; height: 0.7727rem; border-radius: 3px; margin-right: 0.3636rem; vertical-align: -0.1em; border: 1px solid var(--line); background: #fff; }
.demo-legend .sw.settled { border-color: #cfd3d9; }
.demo-legend .sw.changed { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.demo-legend .sw.noised { background: repeating-linear-gradient(45deg, #ededf0 0 2px, #f8f8f9 2px 5px); border-style: dashed; }

/* Hero SVG */
.chain .svg-label { font-family: var(--sans); font-size: 15px; fill: var(--muted); font-weight: 500; }
.chain .svg-label.coral { fill: var(--feed); }
.chain .svg-label.blue { fill: var(--blue); }
.chain .math { font-family: "KaTeX_Math", "Times New Roman", serif; font-style: italic; font-size: 24px; fill: var(--ink); text-anchor: middle; }
.chain .math .sub { font-size: 15px; }
.chain .math.small { font-size: 17px; }
.chain .math.small .sub { font-size: 11px; }
.chain .svg-label.lg { font-size: 19px; font-weight: 600; }
/* p_theta, p_phi and both q labels share one size. */
.chain .math.mid, .chain .math.kern, .chain .math.phi { font-size: 23px; }
.chain .math.mid .sub, .chain .math.kern .sub, .chain .math.phi .sub { font-size: 15px; }
.chain .math.kern { fill: var(--ink-soft); }
.chain .math.phi { paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 4px; stroke-linejoin: round; }
.chain .svg-label.region { font-size: 23.5px; }
.chain .math .up, .chain .math .sub.num { font-family: "KaTeX_Main", "Times New Roman", serif; font-style: normal; }
.chain .math.coral { fill: var(--feed); }
.chain .math.blue { fill: var(--blue); }
.chain .ctr { text-anchor: middle; }
.chain .end { text-anchor: end; }
.chain .start { text-anchor: start; }
.chain .dots { font-size: 26px; fill: var(--blue); font-weight: 600; letter-spacing: 1px; }
.chain .ln { fill: none; stroke-width: 2.4; stroke-linecap: round; }
.chain .ln.blue { stroke: var(--blue); }
.chain .ln.coral { stroke: var(--feed); }
.chain #arrowCoral path { fill: var(--feed); }
.chain .ln.grey { stroke: #9aa5b1; }
.chain .ln.dashed { stroke-dasharray: 6 6; }
.chain .tk.c1 { fill: #a8dcc9; } .chain .tk.c2 { fill: #f6c996; } .chain .tk.c3 { fill: #f0a3a3; } .chain .tk.c4 { fill: #d3c4ea; }
.chain .tk { stroke: rgba(21, 32, 43, 0.18); }
.chain .faded { opacity: 0.32; }
.chain .ln.ink { stroke: var(--ink); }
.chain .svg-label.ink { fill: var(--ink); }
.chain .math.grey { fill: var(--muted); }
.chain .kernels { opacity: 0.8; }
.chain .live .draw { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
/* demo.js adds .go-read at the start of a step and .go-feed once the read-out has been shown. */
.chain .live.go-read .a-read-t { animation: draw-once var(--arrow, 700ms) ease-out forwards; }
.chain .live.go-feed .a-feed-t, .chain .live.go-feed .a-chain-t { animation: draw-once var(--arrow, 700ms) ease-out forwards; }
.chain[data-phase="final"] .live .a-read-t { animation: none; }
.chain[data-phase="final"] .live.go-read .a-read-0 { animation: draw-once var(--arrow, 700ms) ease-out forwards; }
@keyframes draw-once { from { stroke-dashoffset: 1; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
/* Flash the label of the latent an update lands on: x_{t-1} at feed-back, x_0 at the final read-out. */
.chain .latents text { transform-box: fill-box; transform-origin: center; paint-order: stroke; stroke: rgba(255, 255, 255, 0.9); stroke-width: 5px; stroke-linejoin: round; }
.chain .live.go-feed ~ .latents .p-t1 text,
.chain[data-phase="final"] .live.go-read ~ .latents .p-0 text { animation: fl-text calc(var(--arrow, 700ms) * 1.5) ease-out; }
@keyframes fl-text { 0%, 100% { fill: var(--ink); } 15%, 55% { fill: var(--accent); } }
.chain .pop { transform-box: fill-box; transform-origin: center; }
.chain .live.go-read ~ .tokens .k-t { animation: pop-once var(--arrow, 700ms) ease-out calc(var(--arrow, 700ms) / 3) both; }
.chain[data-phase="final"] .live.go-read ~ .tokens .k-t { animation: none; }
.chain[data-phase="final"] .live.go-read ~ .tokens .k-0 { animation: pop-once var(--arrow, 700ms) ease-out calc(var(--arrow, 700ms) / 3) both; }
@keyframes pop-once { 0% { opacity: 0.35; transform: scale(0.94); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .chain .live .draw, .chain .latents rect, .chain .latents text, .chain .pop { animation: none !important; }
  .chain .live .draw { stroke-dashoffset: 0; opacity: 1; }
  .chain .faded { opacity: 0.6; }
}

/* Sections */
.section { padding: 4.5rem 0 4rem; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { display: block; width: fit-content; margin: 0 auto 0.8rem; padding: 0.3em 0.7em 0.3em 0.75em; font-size: 1.55rem; font-weight: 700; line-height: 1.2; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: 3px 10px 10px 3px; }
h2 { text-align: center; font-size: clamp(25.6px, 2.8vw, 34.4px); letter-spacing: -0.02em; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.lead { text-align: center; color: var(--ink-soft); max-width: 72ch; margin: 0 auto 1rem; font-size: 1.02rem; }
.prose { max-width: 66rem; margin: 1.75rem auto 0; font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft); }
.prose p { margin-bottom: 1.1rem; text-align: justify; hyphens: auto; }
.prose strong { color: var(--ink); }
.container.narrow + .container { margin-top: 2rem; }
.container > * + * { margin-top: 1.75rem; }
.container > .figure + .figure { margin-top: 2.25rem; }

/* Figures in cards */
.framed img { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow-1); }
.equation { margin: 1.25rem 0 0; overflow-x: auto; font-size: 1.05rem; }
.steps { list-style: none; counter-reset: step; margin: 0 auto; padding: 0; max-width: 1040px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 2rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.4rem; font-size: 0.97rem; line-height: 1.6; color: var(--ink-soft); }
.steps li b { color: var(--ink); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 1.7rem; height: 1.7rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 700; display: grid; place-items: center; }
.steps li:nth-child(2)::before { background: var(--accent); }
.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 0 1.5rem; }
.fold summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: space-between; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--accent); line-height: 1; }
.fold[open] summary::after { content: "–"; }
.fold[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.fold > .tables { margin-top: 0; }
.fold > .table-note { margin-bottom: 1.25rem !important; }
.equation .katex-display { margin: 0.5rem 0; }

/* Structural comparison */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.compare th, table.compare td { padding: 0.95rem 1rem; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); }
table.compare thead th { background: #f3f3f5; font-weight: 600; color: var(--ink); line-height: 1.35; }
table.compare tbody th { font-weight: 700; text-align: left; white-space: nowrap; }
table.compare.families tbody th { white-space: normal; }
table.compare thead th:first-child { text-align: left; }
table.compare tbody tr:last-child th, table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare tr.ours { background: var(--accent-soft); }
table.compare tr.ours th, table.compare tr.ours td { font-weight: 700; }
table.compare .na { color: var(--muted); }
table.compare.families th, table.compare.families td { text-align: left; vertical-align: top; line-height: 1.5; }
table.compare.families thead th { text-align: center; vertical-align: top; font-size: 1rem; }
table.compare.families thead th.ours { color: var(--accent); }
table.compare.families .eg { display: block; margin-top: 0.15rem; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
table.compare.families { min-width: 760px; }
table.compare.families tbody th { width: 24%; padding-right: 1.25rem; }
table.compare.families tbody th .sub { display: block; margin-top: 0.2rem; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
table.compare.families td { width: 19%; padding: 1rem 0.9rem; }
table.compare.families td .note { display: block; margin-top: 0.3rem; font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
table.compare.families td.ours .note { color: var(--ink-soft); }
table.compare.families td.ours, table.compare.families th.ours { background: var(--accent-soft); }
table.compare.families td.ours { color: var(--ink); }
table.compare.families td, table.compare.families tbody th { vertical-align: middle; }
table.compare.families td { text-align: center; }
table.compare.families td .mark { display: block; font-size: 1.25rem; line-height: 1.2; font-weight: 700; }
.mark.part { color: #c98a00; }

.mark.no { color: #b7bac0; }
.mark.yes { color: #2f9e5f; font-weight: 700; }
.table-note { text-align: center; color: var(--muted); font-size: 0.9rem; max-width: 80ch; margin: 1rem auto 0 !important; line-height: 1.55; }

.tag { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--ink); border-radius: 999px; padding: 0.3rem 0.75rem; }

/* Findings */
.finding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto auto auto; gap: 1.25rem; }
.finding { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.6rem 1.35rem; box-shadow: var(--shadow-1); display: grid; grid-template-rows: subgrid; grid-row: span 5; align-content: start; }
.stat { display: flex; flex-direction: column; margin: 1rem 0 0.35rem; align-self: start; }
.stat-num { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-num small { font-size: 0.5em; font-weight: 700; margin-left: 0.05em; }
.stat-sub { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.35rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.delta { list-style: none; margin: 0 0 0.9rem; padding: 0; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
.delta b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.dir { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; vertical-align: 0.05em; }
.dir.up { background: #e6f4ea; color: #2f7d43; }
.dir.down { background: var(--blue-soft); color: var(--blue); }
.finding > p { margin: 1rem 0 0; font-size: 0.93rem; color: var(--ink-soft); line-height: 1.55; align-self: start; }
.finding ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }
.finding li { margin-bottom: 0.45rem; }
.finding li::marker { color: var(--accent); }
.finding strong { color: var(--ink); }

/* Bars */
.bars { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem 1rem 0.8rem; align-self: start; }
.bars-title { margin: 0 0 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.bar-row { display: grid; grid-template-columns: minmax(6rem, 9.5rem) 1fr 3.2rem; align-items: center; gap: 0.6rem; font-size: 0.8rem; padding: 0.22rem 0; color: var(--ink-soft); }
.bar-label { line-height: 1.25; }
.bar { display: block; height: 0.85rem; background: #e6e6ea; border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--v) * 1%); background: #b9bcc4; border-radius: 4px; }
.bars-ppl .bar i { width: calc(var(--v) / 120 * 100%); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row.ours { color: var(--accent); font-weight: 700; }
.bar-row.ours .bar i { background: var(--accent); }
.bar-row.ours .bar { background: var(--accent-soft); }

/* Result tables */
.tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.tables .tall { grid-column: 2; grid-row: 1 / 3; }
.tables-2 .tall { grid-column: auto; grid-row: auto; }
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem 0.5rem; overflow-x: auto; }
.table-card figcaption { text-align: left; margin: 0 0 0.75rem; max-width: none; font-size: 0.9rem; }
table.results { width: 100%; border-collapse: collapse; font-size: 0.88rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
table.results th, table.results td { padding: 0.48rem 0.5rem; text-align: right; vertical-align: bottom; white-space: nowrap; }
table.results thead th { font-weight: 600; color: var(--ink-soft); border-bottom: 1.5px solid var(--ink); padding-bottom: 0.55rem; white-space: normal; }
table.results thead th:first-child, table.results tbody th, table.results td.txt { text-align: left; }
table.results tbody th { font-weight: 400; }
table.results tbody tr { border-bottom: 1px solid var(--line); }
table.results tbody tr:last-child { border-bottom: 1.5px solid var(--ink); }
table.results tr.group th { padding-top: 0.7rem; padding-bottom: 0.25rem; font-style: italic; font-size: 0.85rem; color: var(--muted); border-bottom: 0; }
table.results tr.group { border-bottom: 0; }
table.results tr.ours { background: var(--accent-soft); }
table.results tr.ours th, table.results tr.ours td { font-weight: 700; color: var(--accent); }
table.results tr.ref th, table.results tr.ref td { color: var(--muted); font-style: italic; }
table.results .best { font-weight: 700; }
table.results .best-scale { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
table.results .na { color: var(--muted); }
table.results .mark { text-align: center; }

/* Analysis panels and callout */
.panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.panel img { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.75rem; box-shadow: var(--shadow-1); }
.panel figcaption { font-size: 0.9rem; }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 1rem 1.25rem; max-width: 980px; margin-left: auto; margin-right: auto; }
.callout p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.callout strong { color: var(--ink); }

/* BibTeX */
.bibtex-box { position: relative; margin-top: 1.5rem; }
.bibtex-box pre { margin: 0; padding: 1.25rem 1.4rem; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.55; }
.copy { position: absolute; top: 0.75rem; right: 0.75rem; font-family: var(--sans); font-size: 0.8rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.copy:hover { background: #000; }

/* Footer */
.footer { padding: 2.5rem 0 3rem; font-size: 0.9rem; color: var(--muted); }
.footer p { margin: 0; text-align: center; max-width: 80ch; margin-left: auto; margin-right: auto; }

@media (max-width: 1000px) {
  .finding-grid, .panels { grid-template-columns: 1fr 1fr; }
  .finding-grid { grid-template-rows: none; }
  .finding { grid-template-rows: none; grid-row: auto; display: flex; flex-direction: column; }
  .finding:last-child { grid-column: 1 / -1; }
  .panels .panel:last-child { grid-column: 1 / -1; max-width: 60%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topnav ul li:not(:last-child) { display: none; }
  body { font-size: 17px; }
  .hero { padding: 2.727rem 0.9091rem 2.273rem; }
  .framed-svg .svg-scroll { padding: 0.6rem 0.6rem 0.2rem; }
  .framed-svg svg { min-width: 760px; }
  .finding-grid, .panels, .tables { grid-template-columns: 1fr; }
  .finding:last-child { grid-column: auto; }
  .panels .panel:last-child { grid-column: auto; max-width: none; }
  .demo { padding: 0.9091rem; }
  .demo-grid { grid-template-columns: 2.182rem 1fr; column-gap: 0.5455rem; }
  .demo-arrow.feed { margin-left: 3.636rem; }
  .demo svg { min-width: 760px; }
  .latent-box { height: 1.818rem; }
  .tables .tall { grid-column: auto; grid-row: auto; }
  .framed img { padding: 0.75rem; }
  .prose p { text-align: left; }
}
