/* Belief-Trajectory Energy — project page styles. Shares the homepage's tokens (main.css). */
:root {
  --bg: #FAF9F5;
  --surface: #F0EEE6;
  --lv-1: #f0a26e; --lv-2: #e5854c; --lv-3: #d3693a; --lv-4: #b04d27; --lv-5: #7d3016;
  --mf-tf: #e4eaf7; --mf-tf-border: #c5d2ec; --mf-bte-cur: rgba(217, 119, 87, 0.28);
  --text: #1F1E1D;
  --muted: #6B6A63;
  --border: #E5E3DA;
  --accent: #D97757;
  --accent-strong: #B8552F;
  --accent-tint: rgba(217, 119, 87, 0.10);
  --accent-fill: rgba(217, 119, 87, 0.34); --accent-fill-2: rgba(217, 119, 87, 0.10);
  --strip-0: rgba(217, 119, 87, 0.20); --strip-1: rgba(217, 119, 87, 0.06); --accent-sel: rgba(217, 119, 87, 0.22);
  --shadow: 0 1px 3px rgba(31, 30, 29, 0.04);
  --ink: #1F1E1D;
  /* chart colors: categorical slots (validated order), two generator families, one blue ramp */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s8: #e34948;
  --legacy-1: #a8a69e; --legacy-2: #767470; --legacy-3: #3f3e3a;
  --new-1: #f5a15b; --new-2: #e8632d; --new-3: #b8431a; --new-4: #7b2f12;
  --ramp-1: #86b6ef; --ramp-2: #6da7ec; --ramp-3: #5598e7; --ramp-4: #3987e5; --ramp-5: #2a78d6;
  --ramp-6: #256abf; --ramp-7: #1c5cab; --ramp-8: #184f95; --ramp-9: #104281; --ramp-10: #0d366b;
  --band: rgba(31, 30, 29, 0.055);
  /* energy ramp: from the page background to the theme's ink, so more revision = more ink (darker here, whiter on the dark theme) */
  --heat-lo: #f3f1ec; --heat-mid: #8f8c84; --heat-hi: #1f1e1d;
  --bar-track: #E5E3DA;
}
[data-theme="dark"] {
  --bg: #262624;
  --surface: #30302E;
  --lv-1: #ffcfa8; --lv-2: #ffb083; --lv-3: #f2905f; --lv-4: #df7145; --lv-5: #c2532c;
  --mf-tf: rgba(93, 132, 201, 0.16); --mf-tf-border: rgba(134, 182, 239, 0.35); --mf-bte-cur: rgba(217, 119, 87, 0.34);
  --text: #ECEAE2;
  --muted: #A6A39A;
  --border: #3E3D39;
  --accent: #D97757;
  --accent-strong: #E08B6D;
  --accent-tint: rgba(217, 119, 87, 0.16);
  --accent-fill: rgba(217, 119, 87, 0.46); --accent-fill-2: rgba(217, 119, 87, 0.14);
  --strip-0: rgba(217, 119, 87, 0.26); --strip-1: rgba(217, 119, 87, 0.08); --accent-sel: rgba(217, 119, 87, 0.32);
  --shadow: none;
  --ink: #ECEAE2;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s8: #e66767;
  --legacy-1: #dad8d0; --legacy-2: #aeaca4; --legacy-3: #7d7b74;
  --new-1: #ffb783; --new-2: #f07a45; --new-3: #d95926; --new-4: #a9491f;
  --ramp-1: #cde2fb; --ramp-2: #b7d3f6; --ramp-3: #9ec5f4; --ramp-4: #86b6ef; --ramp-5: #6da7ec;
  --ramp-6: #5598e7; --ramp-7: #3987e5; --ramp-8: #2a78d6; --ramp-9: #256abf; --ramp-10: #1c5cab;
  --band: rgba(255, 255, 255, 0.07);
  --heat-lo: #343330; --heat-mid: #8a8880; --heat-hi: #f2f0e8;
  --bar-track: #3E3D39;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 3.4rem; }
/* the whole layout is in rem; two fixed steps for wide windows (a continuous vw-based size would cancel the browser's pinch zoom) */
@media (min-width: 1800px) { html { font-size: 18px; } }
@media (min-width: 2200px) { html { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, "Noto Serif SC", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #FAF9F5; }
a { color: var(--accent-strong); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s ease, color .15s ease; }
a:hover { border-bottom-color: var(--accent-strong); }
img { max-width: 100%; height: auto; }
.ui, .tick, .legend, .seg, .pill, .btn, .tile .label, .tile .note, figcaption, .note, .tbl, .eyebrow, .affil, .tip, .topnav, .chart-tools, .def-name, .anim-head, footer {
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem 3rem; }
.prose { max-width: 46rem; margin-left: auto; margin-right: auto; }
.intro { max-width: 46rem; margin: 0 auto 1.3rem; text-align: left; font-size: 1.02rem; }
.prose p { margin: 0.6rem 0 0.9rem; }

/* theme toggle (same as homepage) */
.theme-toggle {
  position: fixed; top: 0.55rem; right: 1.1rem; z-index: 30;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color .2s ease, border-color .2s ease, transform .3s cubic-bezier(.22,.61,.36,1);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-20deg); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* sticky section nav */
.topnav {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 0.2rem; align-items: center;
  margin: 0 -1.5rem; padding: 0.45rem 1.5rem; padding-right: 3.6rem;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font-size: 0.8rem; font-weight: 500;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--muted); padding: 0.25rem 0.6rem; border-radius: 999px; border: 0; }
.topnav a:hover, .topnav a.current { color: var(--accent-strong); background: var(--accent-tint); }
.topnav .home { margin-right: auto; color: var(--text); font-weight: 600; }
.topnav .home:hover { background: transparent; color: var(--accent-strong); }

/* hero */
.hero { text-align: center; padding: 3.2rem 0 1.4rem; position: relative; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -40px;
  width: 620px; height: 360px; max-width: 120vw;
  transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse at center, var(--accent-tint) 0%, transparent 68%);
}
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 0.8rem; }
h1.title { font-size: 2.9rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.subtitle { font-size: 1.45rem; font-weight: 400; color: var(--muted); margin: 0.25rem 0 0; letter-spacing: -0.01em; }
.lede { max-width: 40rem; margin: 1.1rem auto 0; font-size: 1.08rem; color: var(--text); }
.authors { margin: 1.3rem 0 0; font-size: 1.05rem; }
.authors a { color: var(--text); border-bottom: 1px dotted var(--border); }
.authors a:hover { color: var(--accent-strong); border-bottom-color: var(--accent-strong); }
.affil { margin: 0.15rem 0 0; font-size: 0.9rem; color: var(--muted); }
.links { margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pill {
  font-size: 0.82rem; font-weight: 500; padding: 0.4rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text); background: transparent; display: inline-flex; align-items: center; gap: 0.4rem;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-tint); transform: translateY(-2px); }
.pill.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #FAF9F5; }
.pill.disabled { color: var(--muted); border-style: dashed; cursor: default; }
.pill.disabled:hover { transform: none; background: transparent; border-color: var(--border); color: var(--muted); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin: 0.6rem 0 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.15rem 0.95rem; transition: transform .25s cubic-bezier(.22,.61,.36,1), border-color .25s ease; }
.tile:hover { transform: translateY(-3px); border-color: var(--accent); }
.tile .value { font-family: Inter, system-ui, sans-serif; font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tile .label { font-size: 0.86rem; margin-top: 0.3rem; color: var(--text); }
.tile .note { font-size: 0.74rem; color: var(--muted); margin-top: 0.2rem; line-height: 1.45; }

/* sections */
.section h2 {
  position: relative; font-size: 1.65rem; font-weight: 600; letter-spacing: -0.012em; text-align: center;
  margin: 2.8rem 0 0.9rem; padding-top: 2.4rem;
}
.section h2 .num { font-family: Inter, system-ui, sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; color: var(--accent-strong); display: block; margin-bottom: 0.35rem; }
.section h2::after { content: ""; position: absolute; left: 50%; top: 0; width: 3rem; height: 2px; margin-left: -1.5rem; background: var(--accent); border-radius: 2px; }
.section.compact .def, .section.compact .cards { max-width: 56rem; margin-left: auto; margin-right: auto; }
.section h3 { font-size: 1.08rem; font-weight: 600; margin: 1.8rem 0 0.6rem; }
.findings { padding-left: 1.2rem; margin: 0.4rem 0 0.8rem; }
.findings li { margin: 0.45rem 0; }
.note { font-size: 0.86rem; color: var(--muted); line-height: 1.6; margin: 0.6rem 0 0; max-width: 52rem; }
.note.tight { margin-top: 0.2rem; }

/* definitions and math */
.math { font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", "Times New Roman", Times, serif; }
.eq { display: block; text-align: center; font-size: 1.12rem; margin: 0.5rem 0 0.7rem; line-height: 1.6; overflow-x: auto; }
.def { margin: 0.9rem 0 1rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.def-row { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.6rem; align-items: center; padding: 0.55rem 1rem; border-bottom: 1px solid var(--border); }
.def-row:last-child { border-bottom: 0; }
.def-row:nth-child(odd) { background: var(--surface); }
.def-name { font-size: 0.78rem; font-weight: 600; color: var(--muted); letter-spacing: 0.03em; text-transform: uppercase; }
.def-row .eq { text-align: left; margin: 0; font-size: 1.08rem; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin: 1rem 0; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.2rem; transition: transform .25s cubic-bezier(.22,.61,.36,1), border-color .25s ease; }
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.card p { margin: 0.35rem 0; font-size: 0.95rem; color: var(--text); }
.card .eq { font-size: 1.02rem; margin: 0.4rem 0 0.6rem; }

/* figures and charts */
.fig { margin: 1rem auto 1.2rem; padding: 0.9rem 1rem 0.7rem; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.two-col .fig, .case .fig, .card-xp .fig, .lab .fig, .ctl-card .fig { max-width: none; }
.fig figcaption { font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin-top: 0.55rem; }
.fig img.paper { display: block; width: 100%; background: #fff; border-radius: 8px; padding: 0.4rem; }
.fig-head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; }
.fig-head:has(.seg) { background: linear-gradient(180deg, var(--strip-0) 0%, var(--strip-1) 60%, transparent 100%); border-radius: 12px 12px 0 0; padding: 0.5rem 0.8rem 0.8rem; margin-bottom: 0.4rem; }
.fig-head:has(.seg) .seg, .fig-head:has(.seg) .seg button { background-color: var(--bg); }
.fig-head:has(.seg) .seg button { background-color: transparent; }
.chart { position: relative; width: 100%; }
.case > .chart, .card-xp > .chart { margin: 0.6rem 0 0.4rem; }
.case .tbl-wrap, .card-xp .tbl-wrap { margin: 1rem 0 0.6rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg text, .anim-stage svg text { font-family: Inter, "Noto Sans SC", system-ui, sans-serif; font-size: calc(0.55rem + 2.2px); fill: var(--muted); }
.chart .tick { font-size: calc(0.52rem + 2.2px); font-variant-numeric: tabular-nums; }
.chart .label { font-size: calc(0.55rem + 2.2px); fill: var(--muted); }
.chart .title { font-size: calc(0.6rem + 2.4px); font-weight: 600; fill: var(--text); }
.chart .subtitle { font-size: calc(0.52rem + 2.2px); fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis { stroke: var(--border); stroke-width: 1; }
.chart .ref { stroke: var(--muted); stroke-width: 1; opacity: 0.55; }
.chart .band { fill: var(--band); }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series path.halo { opacity: 0.55; }
.chart .series .dot { stroke: var(--bg); stroke-width: 2; }
.chart .series .ring { fill: none; stroke-width: 1.5; stroke-dasharray: 3 2.5; opacity: 0.9; }
.chart .series .err { stroke-width: 1.5; opacity: 0.7; }
.chart .series .endlabel { font-size: 10.5px; fill: var(--text); }
.chart .series { transition: opacity .18s ease; }
.chart svg.has-focus .series:not(.focus) { opacity: 0.18; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.chart .hover-dot { stroke: var(--bg); stroke-width: 2; pointer-events: none; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .cell-label { font-size: 10.5px; font-variant-numeric: tabular-nums; pointer-events: none; }
.chart .cell { stroke: var(--bg); stroke-width: 2; }
.chart .cell:hover { stroke: var(--accent); }
.grid-panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem 1rem; }
.grid-panels .panel { position: relative; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem 1rem; }
.grid-2 .panel { position: relative; min-width: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.two-col > * { min-width: 0; }
.two-col.attr { grid-template-columns: 1.25fr 1fr; }
.stack { display: grid; grid-template-columns: 1fr; gap: 0.4rem; }
.stack .panel { position: relative; min-width: 0; }
.two-col .fig { margin: 0.6rem 0; }

.tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 9rem; max-width: 22rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.4rem 0.6rem; font-size: 0.76rem; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.tip .t { font-weight: 600; margin-bottom: 0.15rem; color: var(--muted); }
.tip .row { display: flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.tip .k { width: 14px; height: 0; border-top: 2px solid; flex: 0 0 auto; }
.tip .k.dash { border-top-style: dashed; }
.tip .v { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; flex: 0 0 auto; }
.tip .n { color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }

.legend { display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; font-size: 0.78rem; }
.legend .item { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.15rem 0.45rem; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; cursor: pointer; transition: opacity .15s ease, border-color .15s ease; }
.legend .item:hover, .legend .item:focus-visible { border-color: var(--border); outline: none; }
.legend .item.off { opacity: 0.38; }
.legend .item.off .name { text-decoration: line-through; }
.legend .key { width: 18px; height: 0; border-top: 2.5px solid; flex: 0 0 auto; }
.legend .key.dash { border-top-style: dashed; }
.legend .item.static { cursor: default; }
.legend .group { width: 100%; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem; }

.seg { display: inline-flex; flex: 0 0 auto; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; font-size: 0.78rem; }
.seg button { font: inherit; font-weight: 500; white-space: nowrap; padding: 0.3rem 0.8rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s ease, color .15s ease; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent-sel); color: var(--accent-strong); font-weight: 600; }
.btn { font: inherit; font-size: 0.76rem; font-weight: 500; padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: color .15s ease, border-color .15s ease; }
.btn:hover { color: var(--accent-strong); border-color: var(--accent); }
.chart-tools { display: flex; justify-content: flex-end; gap: 0.4rem; margin-top: 0.3rem; }
.chart-table { margin-top: 0.4rem; }
.chart-table[hidden] { display: none; }

/* tables */
.tbl-wrap { overflow-x: auto; margin: 0.6rem 0 0.4rem; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; line-height: 1.4; }
.tbl th, .tbl td { padding: 0.36rem 0.55rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; white-space: nowrap; }
.tbl th { font-weight: 600; color: var(--muted); font-size: 0.74rem; letter-spacing: 0.02em; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.group td { background: var(--surface); color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding-top: 0.5rem; white-space: normal; }
.tbl td.best { font-weight: 700; color: var(--text); }
.tbl .barcell { display: inline-flex; align-items: center; gap: 0.5rem; }
.tbl .bar { display: inline-block; height: 8px; border-radius: 0 4px 4px 0; background: var(--s1); }
.tbl .track { display: inline-block; height: 8px; width: 120px; background: var(--bar-track); border-radius: 0 4px 4px 0; position: relative; overflow: visible; }
.tbl .track .bar { position: absolute; left: 0; top: 0; }
.tbl .track .ci { position: absolute; top: 3px; height: 2px; background: var(--text); opacity: 0.55; }
.tbl .track .mid { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--text); opacity: 0.35; }
.tbl td.heat { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.dense th, .tbl.dense td { padding: 0.3rem 0.42rem; font-size: 0.78rem; }
.tbl.dense th { white-space: normal; max-width: 7rem; }
.tbl .track.short { width: 64px; }
.tbl .barcell .sub { min-width: 2.2em; }
.tbl .neg { color: var(--accent-strong); }
.tbl .sub { color: var(--muted); font-size: 0.72rem; margin-left: 0.3rem; }

/* animation */
.anim-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }
.anim-stage { position: relative; width: 100%; }
.anim-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.anim-stage .ptitle { font-size: 12px; font-weight: 600; fill: var(--text); }
.anim-stage .psub { font-size: 10.5px; fill: var(--muted); }
.anim-stage .row { fill: var(--border); transition: fill .2s ease; }
.anim-stage .row.on { fill: var(--accent); }
.anim-stage .row.done { fill: var(--muted); opacity: 0.55; }
.anim-stage .frame { fill: none; stroke: var(--border); stroke-width: 1; rx: 6; }
.anim-stage .tok { font-size: 11.5px; fill: var(--text); }
.anim-stage .tok.top { font-weight: 600; }
.anim-stage .bar { fill: var(--s1); transition: width .28s cubic-bezier(.22,.61,.36,1); }
.anim-stage .bar.top { fill: var(--accent); }
.anim-stage .ghost { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; opacity: 0.7; transition: width .28s cubic-bezier(.22,.61,.36,1); }
.anim-stage .pval { font-size: 10.5px; fill: var(--text); font-variant-numeric: tabular-nums; transition: x .28s cubic-bezier(.22,.61,.36,1); }
.anim-stage .readout { font-size: 12px; fill: var(--text); font-variant-numeric: tabular-nums; }
.anim-stage .readout .big { font-weight: 600; }
.anim-stage .pbar { fill: var(--s1); opacity: 0.85; }
.anim-stage .pbar.cur { fill: var(--accent); opacity: 1; }
.anim-stage .pbar.todo { fill: var(--border); }
.anim-stage .band { fill: var(--band); }
.anim-stage .axis { stroke: var(--border); stroke-width: 1; }
.anim-stage .grid { stroke: var(--border); stroke-width: 1; }
.anim-stage .tick { font-size: 10px; font-variant-numeric: tabular-nums; }
.anim-stage .arrow { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.anim-stage .arrowhead { fill: var(--muted); }
.anim-stage .lens { font-size: 10px; fill: var(--muted); font-style: italic; }
.anim-stage .marker { font-size: 10.5px; fill: var(--accent-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.anim-stage .cursor { stroke: var(--accent); stroke-width: 1.5; }
.anim-stage .valtag { font-size: 10.5px; fill: var(--accent-strong); font-weight: 600; font-variant-numeric: tabular-nums; }

/* bibtex */
.bibwrap { position: relative; }
.bib { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; line-height: 1.55; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; overflow-x: auto; margin: 0.6rem 0; white-space: pre; }
.bibwrap .btn { position: absolute; top: 0.9rem; right: 0.8rem; }

footer { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); text-align: center; }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .55s ease, transform .55s cubic-bezier(.22,.61,.36,1); }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .grid-panels { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .cards.three { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 1rem 2.5rem; }
  .topnav { margin: 0 -1rem; padding-left: 1rem; }
  h1.title { font-size: 2.1rem; }
  .subtitle { font-size: 1.15rem; }
  .tiles { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .grid-panels, .grid-2 { grid-template-columns: 1fr; }
  .def-row { grid-template-columns: 1fr; gap: 0.15rem; }
  .fig { padding: 0.7rem 0.6rem 0.6rem; }
  .theme-toggle { top: 0.4rem; right: 0.7rem; width: 32px; height: 32px; }
}
@media print {
  .theme-toggle, .topnav, .chart-tools, .seg, .btn { display: none !important; }
  .fig { break-inside: avoid; }
}

/* ===== case cards and token explorers ===== */
.case { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 1.6rem 1.8rem 1.6rem; margin: 1.4rem 0 2rem; box-shadow: var(--shadow); }
.case-head { max-width: 60rem; margin: 0 auto 1.4rem; }
.case-head h3 { margin: 0 0 0.4rem; font-size: 1.28rem; font-weight: 600; letter-spacing: -0.01em; }
.case-head p { margin: 0; font-size: 0.98rem; color: var(--text); }
.card-xp { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 1.6rem 1.8rem; box-shadow: var(--shadow); }
.xp { position: relative; }
.xp .lab { font-family: Inter, "Noto Sans SC", system-ui, sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.xp-head { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin: 0 0 1.4rem; padding: 0.3rem 1rem; background: linear-gradient(180deg, var(--strip-0) 0%, var(--strip-1) 60%, transparent 100%); border: 0; border-radius: 14px 14px 0 0; padding-bottom: 0.5rem; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.7rem; padding: 0.55rem 0; }
.tb-row + .tb-row, .xp-head > .legend + .tb-row { border-top: 1px solid var(--border); border-image: linear-gradient(90deg, var(--border) 70%, transparent) 1; }
.tb-lab { font-family: Inter, system-ui, sans-serif; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); min-width: 4.2rem; }
.xp-head > .legend { padding: 0.55rem 0; }
.xp-head .chip, .xp-head .seg, .xp-head .attr-key, .xp-head .btn { background: var(--bg); }
.xp-head .seg button { background: transparent; }
.xp-head .seg button[aria-pressed="true"] { background: var(--accent-sel); }
.xp-head .chip.on { background: var(--accent-sel); }
.btn.on { background: var(--accent-sel); border-color: var(--accent); color: var(--accent-strong); }
.shade-key { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: -0.5rem 0 1.1rem; }
.ctl-card .shade-key { margin: 0.5rem 0 0.3rem; }
.xp-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { font-family: Inter, system-ui, sans-serif; font-size: 0.8rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.38rem 0.8rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip.on { background: var(--accent-sel); border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.chip .sw { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.chip .cv { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 400; }
.chip .cl, .chip .cv { white-space: nowrap; }   /* a long chip moves to its own line instead of wrapping inside */
.chip.on .cv { color: var(--accent-strong); }
.scale { display: inline-flex; align-items: center; gap: 0.4rem; font-family: Inter, system-ui, sans-serif; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale .ramp { display: inline-block; width: 84px; height: 9px; border-radius: 4px; border: 1px solid var(--border); }
.xp-prompt { display: flex; gap: 0.8rem; align-items: baseline; padding: 0.6rem 0.9rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 0.8rem; font-size: 0.95rem; line-height: 1.55; }
.xp-prompt .lab { flex: 0 0 auto; padding-top: 0.15rem; }
.xp-prompt .txt { white-space: pre-wrap; }
.xp-body { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 1rem 1.4rem; align-items: start; }
.xp-flowwrap { min-width: 0; }
.xp-flowwrap .lab { margin-bottom: 0.45rem; }
.xp-flow { position: relative; }
.xp-flow.flow { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.82rem; line-height: 1.95; white-space: pre-wrap; word-break: break-word; padding: 0.7rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); max-height: 34rem; overflow: auto; }
.xp-flow.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.4rem 0; }
.xp-flow .tk { border-radius: 4px; cursor: pointer; transition: box-shadow .12s ease; outline: none; }
.xp-flow.flow .tk { padding: 0.1rem 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.xp-flow.chips .tk { font-family: Inter, system-ui, sans-serif; font-size: 1.02rem; font-weight: 500; padding: 0.45rem 0.75rem; border-radius: 10px; border: 1px solid transparent; }
.xp-flow .tk:hover, .xp-flow .tk:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.xp-flow .tk.sel { box-shadow: 0 0 0 2px var(--accent-strong), 0 0 0 4px var(--accent-tint); }
.xp-flow .tk.start { color: var(--muted); background: transparent; border: 1px dashed var(--border); padding-left: 0.4rem; padding-right: 0.4rem; }
.xp-flow.flow .tk.start { display: inline-block; margin-right: 0.3rem; padding: 0 0.35rem; }
.xp-detail { min-width: 0; border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem 0.95rem 0.6rem; background: var(--surface); }
.xp-dhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; margin-bottom: 0.5rem; font-family: Inter, system-ui, sans-serif; font-size: 0.86rem; }
.xp-dhead .txt { font-weight: 600; }
.xp-dhead .val { color: var(--muted); font-size: 0.76rem; font-variant-numeric: tabular-nums; width: 100%; }
.xp-belief { margin-bottom: 0.6rem; }
.xp-belief.wide { margin-top: 0.6rem; padding: 0.7rem 0.9rem 0.5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.xp-belief.wide .bel { grid-template-columns: 9rem 1fr 3.4rem; font-size: 0.86rem; padding: 0.2rem 0; }
.xp-belief.wide .bel .bb { height: 12px; }
.xp-flowwrap .xp-dhead { margin: 0.8rem 0 0.2rem; }
.shint { font-family: Inter, system-ui, sans-serif; font-size: 0.68rem; color: var(--muted); margin-top: 0.1rem; }
.xp-note { font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; line-height: 1.5; color: var(--muted); margin: 0.9rem 0 0.2rem; padding-top: 0.7rem; border-top: 1px solid var(--border); }
.xp-belief .title, .xp-energy .title { font-family: Inter, system-ui, sans-serif; font-size: 0.74rem; font-weight: 600; color: var(--text); margin: 0.2rem 0 0.35rem; }
.bel { display: grid; grid-template-columns: 7.5rem 1fr 3.2rem; align-items: center; gap: 0.5rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; padding: 0.14rem 0; }
.bel .bt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.bel .bb { height: 10px; background: var(--bar-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.bel .bb span { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; transition: width .18s ease; }
.bel .bp { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.bel.hit .bt { color: var(--accent-strong); font-weight: 600; }
.bel.hit .bb span { background: var(--accent); }
.bel.dim { opacity: 0.85; border-top: 1px dashed var(--border); margin-top: 0.2rem; padding-top: 0.3rem; }
.xp-belief .foot { font-family: Inter, system-ui, sans-serif; font-size: 0.7rem; color: var(--muted); margin-top: 0.25rem; }
.xp-energy svg { display: block; width: 100%; height: auto; overflow: visible; }
.xp-energy svg text { font-family: Inter, system-ui, sans-serif; fill: var(--muted); font-size: 10.5px; }
.xp-energy .title { font-size: 11px; font-weight: 600; fill: var(--text); }
.xp-energy .tick { font-size: 10px; font-variant-numeric: tabular-nums; }
.xp-energy .grid { stroke: var(--border); stroke-width: 1; }
.xp-energy .band { fill: var(--band); }
.xp-energy .ebar { fill: var(--s1); opacity: 0.8; transition: opacity .12s ease; }
.xp-energy .ebar:hover { opacity: 1; }
.xp-energy .ebar.on { fill: var(--accent); opacity: 1; }
.xp-energy .cursor { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 3; }
.xp-energy .pline { fill: none; stroke: var(--accent-strong); stroke-width: 2; stroke-linejoin: round; }
.xp-energy .pdot { fill: var(--accent-strong); stroke: var(--surface); stroke-width: 2; }
.slider { display: flex; align-items: center; gap: 0.7rem; margin: 0.35rem 0 0.2rem; font-family: Inter, system-ui, sans-serif; font-size: 0.76rem; color: var(--muted); }
.slider input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent); cursor: pointer; }
.slider .slab { flex: 0 0 auto; font-variant-numeric: tabular-nums; min-width: 10.5rem; text-align: right; }
.xp-profiles { margin-top: 0.9rem; }

details.more { margin: 1.2rem 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
details.more summary { cursor: pointer; padding: 0.95rem 1.2rem; font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 0.92rem; color: var(--text); list-style: none; display: flex; align-items: center; gap: 0.6rem; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "+"; display: inline-flex; width: 1.4rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); color: var(--accent-strong); font-weight: 600; flex: 0 0 auto; }
details.more[open] summary::before { content: "−"; }
details.more .more-body { padding: 0 1.2rem 1.2rem; background: var(--bg); border-radius: 0 0 16px 16px; }
details.more .more-body h3 { margin-top: 1.4rem; }
details.abstract .more-body { padding-top: 0.2rem; }

@media (max-width: 860px) {
  .xp-body { grid-template-columns: 1fr; }
  .case { padding: 1rem 1rem 0.9rem; }
  .card-xp { padding: 1rem; }
}
@media (max-width: 640px) {
  .xp-prompt { flex-direction: column; gap: 0.25rem; }
  .xp-flow.flow { max-height: 22rem; font-size: 0.78rem; }
  .bel { grid-template-columns: 5.5rem 1fr 3rem; }
  .slider .slab { min-width: 0; }
  .section h2 { font-size: 1.4rem; }
}

/* ===== path hero and comparison widgets ===== */
.note.center { text-align: center; margin-left: auto; margin-right: auto; }
.ph-lab { max-width: 44rem; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.78rem; line-height: 1.45; }
.ph-flow { max-height: none; }
.xp-flow .tk.dim { opacity: 0.42; cursor: default; }
.xp-flow .tk.selA { box-shadow: 0 0 0 2.5px var(--s1); }
.xp-flow .tk.selB { box-shadow: 0 0 0 2.5px var(--s2); }
.ph-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin: 0.9rem 0; }
.ph-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 0.7rem 0.9rem; background: var(--surface); }
.ph-ct { display: flex; align-items: center; gap: 0.5rem; font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 0.86rem; margin-bottom: 0.4rem; }
.ph-ct .sw { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.ph-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.8rem; }
.ph-num { display: flex; flex-direction: column; font-family: Inter, system-ui, sans-serif; }
.ph-num .k { font-size: 0.68rem; color: var(--muted); line-height: 1.3; }
.ph-num .v { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-num .s { font-size: 0.66rem; color: var(--accent-strong); }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart .db-line { stroke: var(--border); stroke-width: 3; }
.chart .tick.strong { fill: var(--text); font-weight: 600; }
.tbl.bg th { white-space: normal; vertical-align: bottom; }
.tbl.bg th .sub { display: block; margin: 0; font-weight: 400; }
.tbl.bg td.bgc { min-width: 12rem; }
.tbl.bg .track.wide { width: 110px; }
.tbl.bg .val { font-variant-numeric: tabular-nums; }
.tbl.bg .val.best { font-weight: 700; color: var(--text); }
.tbl.bg tr.hi td { background: var(--accent-tint); }
.tbl.bg td .sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.45rem; vertical-align: middle; }
details.more.inner { background: transparent; margin: 0.9rem 0 0; }
details.more.inner summary { padding: 0.7rem 1rem; font-size: 0.85rem; }
details.more.inner .more-body { padding: 0.2rem 1rem 1rem; background: transparent; }
@media (max-width: 860px) {
  .ph-stats, .ph-grid, .ph-nums { grid-template-columns: 1fr; }
  .tbl.bg .track.wide { width: 70px; }
}

/* ===== token × layer matrices (SVG elements) and exploration blocks ===== */
.mx { position: relative; }
.mx svg { display: block; width: 100%; height: auto; overflow: visible; outline: none; }
.mx svg:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 6px; }
.mx .c { shape-rendering: crispEdges; transition: fill .35s ease; }
.mx .band-frame { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.mx .band-lab { font-family: Inter, system-ui, sans-serif; font-size: 10px; font-weight: 600; fill: var(--accent-strong); }
.mx .tick { font-family: Inter, system-ui, sans-serif; font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.mx .lab { font-family: Inter, system-ui, sans-serif; font-size: 10px; fill: var(--muted); }
.mx .title { font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 600; fill: var(--text); }
.mx .tok { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 10.5px; fill: var(--text); cursor: default; transition: fill .15s ease; }
.mx .tok.hov { fill: var(--accent-strong); font-weight: 700; }
.mx .tok.sel { fill: var(--accent-strong); font-weight: 700; }
.mx .bar { fill: var(--accent); opacity: 0.85; }
.mx .mark { fill: none; stroke: var(--accent-strong); stroke-width: 1.6; stroke-dasharray: 3 2; }
.mx .badge { fill: var(--accent); }
.mx .badge-t { font-family: Inter, system-ui, sans-serif; font-size: 8.5px; font-weight: 700; fill: #FAF9F5; }
.mx .col-hi { fill: rgba(217, 119, 87, 0.12); stroke: var(--accent); stroke-width: 1.5; pointer-events: none; }
.mx .row-hi { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; pointer-events: none; }
.mx .pin-hi { fill: none; stroke: var(--accent-strong); stroke-width: 2.4; pointer-events: none; }
.mx.compact .bar { opacity: 0.7; }
.hm-box { margin: 0.4rem 0 0.2rem; }
.hm-text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.9; white-space: pre-wrap; word-break: break-word; margin: 0.5rem 0 0; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; max-height: 14rem; overflow: auto; }
.hm-text .tk { border-radius: 3px; padding: 0.05rem 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; cursor: pointer; }
.hm-text .tk.hov { box-shadow: 0 0 0 2px var(--accent); }
.hm-text .tk.sel { box-shadow: 0 0 0 2.4px var(--accent-strong); }
.hero-body { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
.hm-insp .insp { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0.7rem 0.9rem 0.5rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1.2fr); gap: 0.4rem 1.2rem; align-items: start; }
.insp-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; align-items: baseline; font-family: Inter, system-ui, sans-serif; font-size: 0.86rem; }
.insp-head .txt { font-weight: 600; }
.insp-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.8rem; }
.insp-num { display: flex; flex-direction: column; font-family: Inter, system-ui, sans-serif; }
.insp-num .k { font-size: 0.66rem; color: var(--muted); line-height: 1.3; }
.insp-num .v { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.insp-num .s { font-size: 0.66rem; color: var(--muted); }
.insp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.insp-chart svg text { font-family: Inter, system-ui, sans-serif; font-size: 10px; fill: var(--muted); }
.insp-chart .title { font-size: 10.5px; font-weight: 600; fill: var(--text); }
.insp-chart .grid { stroke: var(--border); stroke-width: 1; }
.insp-chart .band { fill: var(--band); }
.insp-chart .ibar { fill: var(--s1); opacity: 0.75; }
.insp-chart .ibar.mid { fill: var(--accent); opacity: 1; }
.insp-chart .iline { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-dasharray: 3 2; }
.hm-top { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; margin-top: 0.6rem; }
.hm-top .lab { width: 100%; }
.pill-tok { font: inherit; font-family: ui-monospace, Menlo, monospace; font-size: 0.76rem; padding: 0.2rem 0.55rem 0.2rem 0.3rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; transition: border-color .15s ease, transform .15s ease; }
.pill-tok:hover { border-color: var(--accent); transform: translateY(-1px); }
.pill-tok .num { display: inline-flex; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #FAF9F5; font-family: Inter, system-ui, sans-serif; font-size: 0.62rem; font-weight: 700; align-items: center; justify-content: center; }
.pill-tok b { color: var(--accent-strong); }
.prose-block h3 { margin-top: 0.2rem; }
.prose-block p { font-size: 0.97rem; margin: 0.3rem 0 0.9rem; }
.proof-row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 0.8rem; align-items: start; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.proof-row:first-of-type { border-top: 0; }
.proof-side { font-family: Inter, system-ui, sans-serif; }
.proof-d { font-weight: 600; font-size: 0.95rem; }
.proof-k { font-size: 0.74rem; color: var(--muted); margin-bottom: 0.4rem; }
.proof-stat { display: flex; flex-direction: column; margin-bottom: 0.3rem; }
.proof-stat .k { font-size: 0.66rem; color: var(--muted); }
.proof-stat .v { font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.proof-hm { min-width: 0; }
.proof-hm .hm-text { max-height: 9rem; font-size: 0.74rem; line-height: 1.7; }
details.more.tiny { margin: 0.4rem 0 0; }
details.more.tiny summary { padding: 0.35rem 0.7rem; font-size: 0.76rem; }
details.more.tiny .more-body { padding: 0.2rem 0.8rem 0.6rem; font-size: 0.86rem; white-space: pre-wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.grid-3 .panel { position: relative; min-width: 0; }
.cbs { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 0.6rem; }
@media (max-width: 860px) {
  .two-col.attr { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .proof-row { grid-template-columns: 1fr; }
  .proof-side { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
  .proof-side .proof-k { margin: 0; }
  .hm-insp .insp { grid-template-columns: 1fr; }
}

/* ===== contrast cards ===== */
.contrast { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 1.4rem 1.6rem 1.3rem; margin: 1.4rem 0 2rem; box-shadow: var(--shadow); }
.ct-head { max-width: 60rem; margin: 0 auto 1rem; text-align: center; }
.ct-num { font-family: Inter, system-ui, sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-strong); }
.ct-head h3 { margin: 0.3rem 0 0.5rem; font-size: 1.45rem; font-weight: 600; letter-spacing: -0.012em; }
.ct-q { margin: 0; font-size: 1rem; color: var(--text); }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.ct-panel { border: 1.5px solid var(--border); border-radius: 14px; padding: 0.9rem 1rem 0.7rem; background: var(--surface); }
.ct-panel.path { border-color: var(--accent); }
.ct-lab { font-family: Inter, system-ui, sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ct-panel.path .ct-lab { color: var(--accent-strong); }
.ct-big { font-family: Inter, system-ui, sans-serif; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0.25rem 0 0.1rem; }
.ct-sub { font-family: Inter, system-ui, sans-serif; font-size: 0.76rem; color: var(--muted); line-height: 1.45; margin-bottom: 0.5rem; }
.ct-read { margin: 0.4rem 0 0; font-size: 0.95rem; }
.ct-panel .chart svg text { font-family: Inter, system-ui, sans-serif; font-size: 10.5px; fill: var(--muted); }
.ct-panel .chart .tick.strong { fill: var(--text); font-weight: 600; }
.ct-panel .chart .title { font-size: 11px; font-weight: 600; fill: var(--text); }
.ct-panel .chart .grid line, .ct-panel .chart .grid { stroke: var(--border); stroke-width: 1; }
.ct-panel .chart .axis { stroke: var(--border); stroke-width: 1; }
.ct-panel .chart .ref { stroke: var(--muted); stroke-width: 1; opacity: 0.6; }
.ct-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.6rem 0 0.9rem; }
.ct-specs.one { grid-template-columns: 1fr; }
.ct-specs.three { grid-template-columns: repeat(3, 1fr); }
.spec { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem 0.8rem; background: var(--bg); min-width: 0; }
.spec.hi { border-color: var(--accent); }
.spec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; font-family: Inter, system-ui, sans-serif; font-size: 0.8rem; margin-bottom: 0.35rem; }
.spec-head .sw { width: 9px; height: 9px; border-radius: 50%; display: inline-block; align-self: center; }
.spec-name { font-weight: 600; }
.spec-stats { margin-left: auto; display: flex; gap: 0.7rem; color: var(--muted); font-size: 0.74rem; white-space: nowrap; }
.spec-stats b { color: var(--text); font-variant-numeric: tabular-nums; }
.spec-body { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.76rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 11rem; overflow: auto; color: var(--text); }
.spec-body .added { background: var(--accent-tint); box-shadow: 0 0 0 2px var(--accent-tint); border-radius: 3px; }
.ct-take { margin: 0.6rem 0 0.2rem; font-size: 1.02rem; }
.ct-strip { margin-top: 0.9rem; }
.ct-strip .fig { margin: 0.5rem 0 0; }
.ct-note { font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: 0.5rem 0 0; }
.appendix { margin-top: 2rem; }
@media (max-width: 860px) {
  .ct-grid, .ct-specs, .ct-specs.three { grid-template-columns: 1fr; }
  .contrast { padding: 1rem 1rem 0.9rem; }
  .spec-stats { margin-left: 0; }
}

/* ===== same question, different responses ===== */
.lab { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 1.3rem 1.5rem 1.2rem; margin: 1.2rem 0 1.8rem; box-shadow: var(--shadow); }
.lab-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin-bottom: 0.6rem; }
.lab-head h3 { margin: 0; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; }
.lab-src { font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; color: var(--muted); }
.lab-legend { max-width: 60%; }
.lab-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem 1.2rem; align-items: start; margin-top: 0.4rem; }
.lab-table .tbl td:first-child { white-space: normal; min-width: 11rem; }
.lab-grid > * { min-width: 0; }
.lab-chart { min-width: 0; }
.lab-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.lab-table .tbl td .sw { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.45rem; vertical-align: middle; }
.lab-table .tbl .track.short { width: 56px; }
.lab-table .tbl tr:hover td { background: var(--accent-tint); }
.lab-texts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-top: 1rem; }
.lab-resp { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 0.9rem 0.8rem; background: var(--bg); min-width: 0; }
.lab-resp.ref { border-color: var(--accent); }
.lab-resp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; margin-bottom: 0.55rem; }
.lab-resp-head .sw { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.lab-resp-head .name { font-weight: 600; }
.lab-resp-head .tag { font-size: 0.66rem; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.05rem 0.45rem; }
.lab-resp-head .stats { margin-left: auto; display: flex; gap: 0.55rem; color: var(--muted); font-size: 0.72rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lab-resp-head .stats b { color: var(--text); }
.lab-text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.74rem; line-height: 1.85; white-space: pre-wrap; word-break: break-word; max-height: 12rem; overflow: auto; }
.lab-text .tk { border-radius: 3px; padding: 0.05rem 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; cursor: pointer; outline: none; }
.lab-text .tk:hover, .lab-text .tk:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.lab-text .tk.sel { box-shadow: 0 0 0 2.4px var(--accent-strong); }
.lab-take { margin-top: 1rem; }
.lab .tip { max-width: 24rem; }
@media (max-width: 1000px) { .lab-texts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .lab-grid { grid-template-columns: 1fr; } .lab-legend { max-width: 100%; } .lab { padding: 1rem 1rem 0.9rem; } }
@media (max-width: 640px) { .lab-texts { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .lab-table .tbl .track { display: none; }
  .lab-table .tbl th, .lab-table .tbl td { padding: 0.3rem 0.35rem; font-size: 0.76rem; }
}
.lab-scale { flex-wrap: wrap; }
.lab-scale .ramp { width: 96px; }

/* ===== case studies by setting ===== */
.mid-chips { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin: 0.4rem 0 0.8rem; justify-content: center; font-family: Inter, system-ui, sans-serif; font-size: 0.8rem; color: var(--muted); }
.mid-chip .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.35rem; vertical-align: middle; }
.mid-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 0.6rem 0 1.4rem; }
.pair-card { --card-accent: var(--border); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1.05rem 0.9rem; background: var(--bg); min-width: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--card-accent) 35%, transparent); }
.pair-card > .lab-resp-head .sw { background: var(--card-accent) !important; }
.pair-card .lab { display: block; margin: 0.6rem 0 0.3rem; }
.pair-problem { font-size: 0.9rem; line-height: 1.5; background: var(--surface); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0.5rem 0 0.9rem; display: flex; gap: 0.6rem; align-items: baseline; }
.pair-problem .lab { flex: 0 0 auto; margin: 0; }
.pair-card .lab-text { max-height: 13rem; margin-top: 0.2rem; }
.set-sub { font-size: 1.2rem; font-weight: 600; margin: 2.6rem 0 0.7rem; }
.section > .set-sub + .intro { margin-bottom: 1.3rem; }
.attr-legend { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; width: 100%; }
.attr-key { font: inherit; font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.7rem 0.28rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s ease, opacity .15s ease; }
.attr-key:hover { border-color: var(--accent); }
.attr-key.off { opacity: 0.35; }
.attr-key .sw { width: 9px; height: 9px; border-radius: 50%; }
.attr-wrap { margin-top: 0.6rem; }
.attr-map { display: block; width: 100%; height: auto; overflow: visible; }
.attr-map .frame { fill: var(--surface); stroke: var(--border); stroke-width: 1; rx: 12; }
.attr-map .title { font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 600; fill: var(--text); }
.attr-map .subtitle { font-family: Inter, system-ui, sans-serif; font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.attr-map .ell { fill: none; stroke-width: 1.6; stroke-dasharray: 5 4; opacity: 0.9; }
.attr-map .pt { opacity: 0.55; }
.attr-map .cring { fill: var(--bg); stroke-width: 2.5; }
.attr-map .clab { font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 600; fill: var(--text); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.attr-map .hi { fill: none; stroke-width: 2.5; pointer-events: none; }
@media (max-width: 860px) {
  .pair-grid { grid-template-columns: 1fr; }
  .attr-map .clab { font-size: 10px; }
}

/* ---- case studies from the paper's settings ---- */
.pair-lab { display: block; font-family: Inter, system-ui, sans-serif; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0.6rem 0 0.3rem; }
.pair-problem .pair-lab { margin: 0; flex: 0 0 auto; }
.pair-problem .txt { white-space: pre-wrap; }
.case-meta { margin: 0.2rem 0 1.2rem; }
.case-meta .ttl { font-weight: 600; font-size: 1.02rem; }
.case-meta .sub { font-size: 0.9rem; color: var(--muted); line-height: 1.55; margin-top: 0.25rem; }
.proof-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 0.8rem; margin-bottom: 0.8rem; }
.proof-theory { font-size: 0.84rem; line-height: 1.55; color: var(--muted); padding: 0.5rem 0.8rem 0.6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.proof-theory .pair-lab { margin: 0 0 0.25rem; }
.proof-theory .txt { white-space: pre-wrap; }
.chain { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 0.3rem; font-family: Inter, system-ui, sans-serif; font-size: 0.82rem; padding: 0.5rem 0.8rem 0.6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; }
.chain .pair-lab { width: 100%; margin: 0 0 0.2rem; }
.chain .node { padding: 0.2rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--bg); }
.chain .node.fact { color: var(--text); font-weight: 500; }
.chain .node.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-strong); font-weight: 500; }
.chain .arrow { color: var(--muted); }
.chain .chain-note { width: 100%; font-size: 0.74rem; color: var(--muted); line-height: 1.45; margin-top: 0.3rem; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; margin: 0.6rem 0 1.2rem; }
.proof-grid .lab-text { max-height: 24rem; font-size: 0.78rem; }
.proof-metrics { display: grid; gap: 14px; min-width: 0; align-content: start; }
.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(9, auto); gap: 1rem; align-items: stretch; margin: 0.8rem 0 1.4rem; }
.ctl-grid > .ctl-card { display: grid; grid-template-rows: subgrid; grid-row: span 9; align-content: start; }
.ctl-card .pair-problem, .ctl-card .ctl-texts { align-self: stretch; }
.ctl-sel { margin: 0.2rem 0 0.6rem; }
.ctl-sel .sel-table { font-size: 0.74rem; }
.ctl-sel .sel-table td, .ctl-sel .sel-table th { padding-left: 0.4rem; padding-right: 0.4rem; }
.case .ctl-card { padding-left: 0.9rem; padding-right: 0.9rem; }
.ctl-texts .lab-resp { padding: 0.6rem 0.7rem 0.65rem; }
.case .ctl-grid { gap: 0.9rem; }
.ctl-card { border: 1px solid var(--border); border-radius: 18px; background: var(--bg); padding: 1.4rem 1.5rem 1.4rem; box-shadow: var(--shadow); min-width: 0; }
.ctl-card h4 { margin: 0 0 0.3rem; font-size: 1.1rem; font-weight: 600; }
.ctl-q { margin: 0 0 0.5rem; font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.ctl-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.7rem 0; }
.ctl-texts .lab-text { max-height: 12rem; }
.ctl-plain { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.74rem; line-height: 1.7; white-space: pre-wrap; word-break: break-all; max-height: 12rem; overflow: auto; color: var(--text); }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin: 0.5rem 0 1.3rem; }
.rev-grid .lab-text { max-height: 15rem; }
.lab-resp-head .logo { width: 16px; height: 16px; flex: 0 0 auto; }
.lab-text.spans .sp-label { display: inline-block; font-family: Inter, system-ui, sans-serif; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-strong); background: var(--accent-tint); border-radius: 4px; padding: 0 0.35rem; margin: 0 0.3rem 0 0; vertical-align: 0.12em; white-space: nowrap; cursor: default; }
.lab-text.spans { max-height: none; }
.tbl .mark { font-family: Inter, system-ui, sans-serif; margin-left: 0.35rem; font-size: 0.72rem; }
.tbl .mark.bad { color: var(--accent-strong); font-weight: 600; }
.tbl tr.cur td { background: var(--accent-tint); }
.tbl.dense td:first-child { white-space: normal; }
.detect-auroc { margin-top: 1.4rem; }
.chart .vbar { stroke: none; opacity: 0.85; }
.chart .vbar.pos { fill: var(--accent); }
.chart .vbar.neg { fill: var(--muted); }
.chart .vbar:hover { opacity: 1; }
.note.tight.small { font-size: 0.84rem; }
.case .two-col .fig { margin: 1rem 0 0.4rem; }
@media (max-width: 860px) {
  .proof-top, .proof-grid, .ctl-grid, .ctl-texts { grid-template-columns: 1fr; }
  .ctl-grid { grid-template-rows: none; }
  .ctl-grid > .ctl-card { display: block; }
  .proof-grid .lab-text { max-height: 16rem; }
}

/* ---- same-height rows across the two pair cards (subgrid) ---- */
.pair-grid { grid-template-rows: auto auto auto 1fr; }
.pair-grid > .pair-card { display: grid; grid-template-rows: subgrid; grid-row: span 4; align-content: start; }
.pair-grid > .pair-card .pair-problem { align-self: stretch; }
@media (max-width: 860px) { .pair-grid > .pair-card { display: block; } }
.pair-problem .katex, .ctl-card .katex, .case .katex, .xp-prompt .katex { font-size: 1em; }

/* ---- method figure (the overview figure as page elements) ---- */
.mf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 0.4rem; }
.method-fig { display: block; width: 100%; min-width: 880px; height: auto; overflow: visible; font-family: Inter, system-ui, sans-serif; }
.method-fig text { fill: var(--text); font-size: 12px; }
.method-fig .mf-title { font-family: "Source Serif 4", Georgia, serif; font-size: 19px; font-weight: 600; }
.method-fig .mf-sub { font-size: 11px; fill: var(--muted); }
.method-fig .mf-small { font-size: 10.5px; fill: var(--muted); }
.method-fig .mf-tiny { font-size: 9.5px; fill: var(--muted); }
.method-fig .mf-tick { font-size: 9.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.method-fig .mf-math { font-family: "STIX Two Math", "Cambria Math", "Times New Roman", serif; font-size: 14px; font-style: italic; }
.method-fig .mf-sup { font-size: 9px; font-style: normal; }
.method-fig .mf-val { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; fill: var(--accent-strong); }
.method-fig .mf-tf { fill: var(--mf-tf); stroke: var(--mf-tf-border); stroke-width: 1; }
.method-fig .mf-stream { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.method-fig .mf-skip { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.method-fig .mf-arrowhead { fill: var(--ink); }
.method-fig .mf-layer { fill: var(--bg); stroke: var(--border); stroke-width: 1.3; }
.method-fig .mf-layer.emb, .method-fig .mf-layer.sub { fill: var(--surface); }
.method-fig .mf-layerlab, .method-fig .mf-blocklab { font-size: 12.5px; font-weight: 600; }
.method-fig .mf-block { fill: var(--bg); stroke: var(--border); stroke-width: 1.3; }
.method-fig .mf-dots { font-size: 16px; fill: var(--muted); }
.method-fig .mf-dot { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.method-fig .mf-plus { fill: var(--bg); stroke: var(--ink); stroke-width: 1.2; }
.method-fig .mf-plustxt { font-size: 12px; font-weight: 600; }
.method-fig .mf-dash { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.method-fig .mf-dash.cur { stroke: var(--accent); opacity: 1; stroke-width: 1.4; }
.method-fig .mf-wu { font-size: 9.5px; fill: var(--muted); font-style: italic; }
.method-fig .mf-cardbg { fill: var(--bg); stroke: var(--border); stroke-width: 1.2; }
.method-fig .mf-card.cur .mf-cardbg { stroke: var(--accent); stroke-width: 1.8; }
.method-fig .mf-bar { fill: var(--ink); opacity: 0.55; }
.method-fig .mf-bar.top { opacity: 1; }
.method-fig .mf-btebg { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.2; }
.method-fig .mf-bte.cur .mf-btebg { stroke-width: 2.2; fill: var(--mf-bte-cur); }
.method-fig .mf-brace { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.method-fig .mf-band { fill: var(--band); }
.method-fig .mf-grid { stroke: var(--border); stroke-width: 1; }
.method-fig .mf-pbar { fill: var(--ink); opacity: 0.5; }
.method-fig .mf-pbar.cur { fill: var(--accent); opacity: 1; }
.method-fig .mf-tokline { fill: none; stroke: var(--accent-strong); stroke-width: 1.6; stroke-dasharray: 4 3; }
.method-fig .mf-tokdot { fill: var(--accent-strong); stroke: var(--bg); stroke-width: 1.5; }
.method-fig .mf-headbg { fill: var(--surface); stroke: var(--border); stroke-width: 1; transition: stroke .15s ease; }
.method-fig .mf-head:hover .mf-headbg { stroke: var(--accent); }
.method-fig .mf-headtitle { font-size: 13px; font-weight: 600; }
.method-fig .mf-w { fill: var(--s1); opacity: 0.7; }
.method-fig .mf-tok { fill: var(--bg); stroke: var(--border); stroke-width: 1.2; }
.method-fig .mf-tok.ctx { fill: var(--surface); }
.method-fig .mf-toktxt { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; }
.method-fig .mf-toktxt.ctx { fill: var(--muted); font-weight: 500; }
.method-fig .mf-tokg { cursor: pointer; outline: none; }
.method-fig .mf-tokg:hover .mf-tok, .method-fig .mf-tokg:focus-visible .mf-tok { stroke: var(--accent); }
.method-fig .mf-tokg.cur .mf-tok { stroke: var(--accent-strong); stroke-width: 2; fill: var(--accent-tint); }
.method-fig .mf-tokg.cur .mf-toktxt { fill: var(--accent-strong); }
.mf-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.mf-ctl .btn { min-width: 2.2rem; text-align: center; }
.mf-ctl input[type=range] { width: 220px; accent-color: var(--accent); }
.mf-ctllab { font-family: Inter, system-ui, sans-serif; font-size: 0.8rem; color: var(--muted); }
.mf-ctllab b { color: var(--text); }
.mf-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.mf-dcol { border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 0.75rem 0.6rem; background: var(--bg); min-width: 0; }
.mf-dcol.res { background: var(--surface); }
.mf-dhead { font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; font-weight: 600; margin-bottom: 0.35rem; }
.mf-drow { display: grid; grid-template-columns: minmax(0, 6.5rem) 1fr 3.2rem; align-items: center; gap: 0.5rem; font-size: 0.78rem; padding: 0.12rem 0; }
.mf-dtok { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-dbar { height: 8px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.mf-dfill { display: block; height: 100%; background: var(--ink); opacity: 0.6; }
.mf-dp { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.mf-dbig { font-family: Inter, system-ui, sans-serif; font-size: 1.5rem; font-weight: 600; color: var(--accent-strong); margin: 0.1rem 0 0.3rem; }
.mf-dnote { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) { .mf-detail { grid-template-columns: 1fr; } }

/* one prose column: section-level notes and sub-headings share the intro width */
.section > .note, .section > .note.tight { max-width: 46rem; margin-left: auto; margin-right: auto; }
.section > .set-sub { max-width: 46rem; margin-left: auto; margin-right: auto; }
.method-fig .mf-tok.shaded { stroke: var(--border); }
.mf-cap { margin-top: 1.5rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.case .note, .card-xp .note, .lab .note, .ctl-card .note, .fig figcaption { font-size: 0.84rem; line-height: 1.6; color: var(--muted); max-width: 62rem; margin-left: auto; margin-right: auto; text-align: left; }
.case .note, .card-xp .note, .lab .note { margin-top: 1.2rem; }
.proof-metrics .note, .ctl-card .note { margin-left: 0; margin-right: 0; }
.mf-cap.note { max-width: none; }

/* ---- ProofWriter: the reasoning ladder is the control ---- */
.tb-hint { font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; color: var(--muted); }
.ladder-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ladder { display: block; width: 100%; height: auto; min-width: 760px; overflow: visible; font-family: Inter, system-ui, sans-serif; }
.ladder .lad-pill { fill: var(--bg); stroke: var(--border); stroke-width: 1.4; transition: fill .2s ease, stroke .2s ease; }
.ladder .lad-node.pick { cursor: pointer; outline: none; }
.ladder .lad-node.pick:hover .lad-pill, .ladder .lad-node.pick:focus-visible .lad-pill { stroke: var(--accent-strong); stroke-width: 2; }
.ladder .lad-ring { fill: none; stroke: var(--accent-strong); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ladder .lad-label { font-size: 13px; font-weight: 600; fill: var(--muted); }
.ladder .lad-node.on .lad-label { fill: var(--bg); }
.ladder .lad-edge { stroke: var(--border); stroke-width: 1.6; }
.ladder .lad-edge.on { stroke-width: 2.2; }
.ladder .lad-head { fill: var(--border); }
.ladder .lad-head.on { fill: var(--ink); }
.ladder .lad-arc { fill: none; stroke: var(--border); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ladder .lad-arc.on { stroke: var(--muted); }
.ladder .lad-rule { font-size: 10.5px; fill: var(--muted); opacity: 0.55; font-style: italic; }
.ladder .lad-rule.on { opacity: 1; fill: var(--text); }
.ladder .lad-stat { font-size: 10px; fill: var(--muted); opacity: 0.55; }
.ladder .lad-stat.on { opacity: 1; }
.ladder .lad-stat.num { font-variant-numeric: tabular-nums; }
.ladder .lad-tiny { font-size: 9.5px; fill: var(--muted); }
.proof-theory { margin-bottom: 1.2rem; padding: 0.8rem 1rem 0.9rem; }
.proof-theory .sent { color: var(--muted); border-bottom: 2px solid transparent; padding-bottom: 1px; }
.proof-theory .sent.used { color: var(--text); font-weight: 500; }
.proof-query { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; margin-top: 0.5rem; padding-top: 0.45rem; border-top: 1px solid var(--border); }
.proof-query .pair-lab { margin: 0; }
.proof-query .qtxt { font-family: Inter, system-ui, sans-serif; font-size: 0.86rem; color: var(--text); font-weight: 500; white-space: pre-wrap; }
.lab-text .sp-label { display: inline-block; font-family: Inter, system-ui, sans-serif; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 4px; padding: 0 0.35rem; margin: 0 0.35rem 0 0; vertical-align: 0.12em; white-space: nowrap; cursor: default; }

/* ---- selector table: rows are the options ---- */
.tb-table { display: block; padding: 0.3rem 0 0.45rem; }
.sel-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sel-table { width: 100%; border-collapse: separate; border-spacing: 0; font-family: Inter, system-ui, sans-serif; font-size: 0.8rem; }
.sel-table th { text-align: left; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0.2rem 0.6rem 0.35rem; white-space: nowrap; }
.sel-table th.num, .sel-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sel-table td { padding: 0.42rem 0.6rem; white-space: nowrap; color: var(--muted); border-top: 1px solid var(--border); }
.sel-table td:first-child { border-radius: 8px 0 0 8px; }
.sel-table td:last-child { border-radius: 0 8px 8px 0; }
.sel-row { cursor: pointer; outline: none; transition: background .12s ease; }
.sel-row:hover td, .sel-row:focus-visible td { background: var(--bg); color: var(--text); }
.sel-row.on td { background: var(--accent-sel); color: var(--text); border-top-color: transparent; }
.sel-row.on + .sel-row td { border-top-color: transparent; }
.sel-name { font-weight: 600; color: var(--text) !important; }
.sel-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--muted); margin-right: 0.5rem; vertical-align: 0.05em; }
.sel-row.on .sel-dot { background: var(--accent-strong); border-color: var(--accent-strong); }
.sel-tag { margin-left: 0.5rem; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-strong); border: 1px solid var(--accent); border-radius: 999px; padding: 0 0.4rem; vertical-align: 0.1em; }
.sel-delta { display: inline-block; min-width: 3em; text-align: right; font-weight: 600; color: var(--accent-strong); }
@media (max-width: 640px) { .sel-table td, .sel-table th { padding-left: 0.4rem; padding-right: 0.4rem; } }

.lab-text .tk .nl { font-family: Inter, system-ui, sans-serif; font-size: 0.68em; opacity: 0.75; padding: 0 0.15em; }

.ctl-texts .lab-resp-head .stats, .rev-grid .lab-resp-head .stats { white-space: normal; flex-wrap: wrap; row-gap: 0.1rem; }
.ctl-texts .lab-resp-head .stats > span, .rev-grid .lab-resp-head .stats > span { white-space: nowrap; }
.case .ctl-grid { margin: 0 0 0.4rem; }
.case .ctl-card { box-shadow: none; }
.chip .logo { width: 14px; height: 14px; flex: 0 0 auto; }
.two-col.eq { align-items: stretch; }
.two-col.eq > .fig { display: flex; flex-direction: column; }
.two-col.eq > .fig > figcaption { margin-top: auto; padding-top: 0.55rem; }

/* toolbar controls one step smaller */
.xp-head .chip { font-size: 0.74rem; padding: 0.3rem 0.65rem; gap: 0.35rem; }
.xp-head .chip .cv { font-size: 0.7rem; }
.xp-head .seg { font-size: 0.72rem; }
.xp-head .seg button { padding: 0.26rem 0.65rem; }
.xp-head .tb-lab { font-size: 0.6rem; min-width: 3.9rem; }
.xp-head .tb-row { padding: 0.42rem 0; gap: 0.35rem 0.5rem; }
.xp-head .tb-hint, .xp-head .mf-ctllab { font-size: 0.74rem; }
.xp-head .btn { font-size: 0.72rem; }
.xp-head .attr-key { font-size: 0.72rem; padding: 0.22rem 0.6rem 0.22rem 0.45rem; }
.chip .logo { width: 12px; height: 12px; }
.fig-head:has(.seg) .seg { font-size: 0.72rem; }
.fig-head:has(.seg) .seg button { padding: 0.26rem 0.65rem; }
.chart .vbar.on { opacity: 1; stroke: var(--ink); stroke-width: 1; }

/* ---- appendix: same prose column and rhythm as the sections ---- */
.appendix .more-body { padding: 0.6rem 1.4rem 1.8rem; }
.appendix .more-body > .intro { max-width: 46rem; margin: 0 auto 1.2rem; }
.appendix .more-body > .intro:first-child { margin-top: 1.2rem; }
.appendix .more-body > .set-sub { max-width: 46rem; margin: 2.8rem auto 0.7rem; }
.appendix .more-body > .card-xp, .appendix .more-body > .fig, .appendix .more-body > .two-col, .appendix .more-body > .lab, .appendix .more-body > .tbl-wrap, .appendix .more-body > #proof-chain > .card-xp, .appendix .more-body > #stepgame > .card-xp { margin: 0.8rem 0 1.6rem; }
.appendix .more-body > details.more.inner { margin: 1rem 0 0; }
.appendix .more-body > .lab + .lab { margin-top: 1.2rem; }
/* proof / spatial chains */
.proof-row { border-top: 0; padding: 1rem 0 0.6rem; }
.proof-row + .proof-row { border-top: 1px solid var(--border); margin-top: 0.4rem; }
.proof-prob { font-size: 0.86rem; line-height: 1.5; background: var(--surface); border-radius: 10px; padding: 0.55rem 0.8rem 0.65rem; margin: 0 0 0.7rem; display: flex; gap: 0.6rem; align-items: baseline; }
.proof-prob .pair-lab { margin: 0; flex: 0 0 auto; }
.proof-prob .txt { white-space: pre-wrap; color: var(--text); }
.proof-prob.top { margin: 0.2rem 0 0.6rem; color: var(--muted); }
.proof-prob.top .txt { color: var(--muted); }
/* stacked figures instead of side by side */
.stack > .fig { margin: 1rem 0 1.2rem; }
.lab-text.spans .sp { display: block; }
.lab-text.spans .sp + .sp { margin-top: 0.15rem; }

/* figures inside a case: a small sub-heading, charts centred */
.case .case-sub { font-size: 0.95rem; font-weight: 600; margin: 1.8rem 0 0.4rem; color: var(--text); }
.case > .fig, .case > .two-col { margin-top: 0.4rem; }
.two-col.attr > .fig { display: flex; flex-direction: column; justify-content: center; }
.two-col.attr > .fig .fig-head { justify-content: center; }
#chart-confusion { display: flex; justify-content: center; }
#chart-confusion svg { width: auto; max-width: 100%; }
.two-col.attr figcaption { margin-top: auto; }

.two-col.attr > .fig .tbl-wrap { margin-top: 0; }
/* the feature table is short: centre it vertically beside the confusion map, keep the rows on one line */
.two-col.attr > .fig:first-child { justify-content: center; }
.two-col.attr > .fig:first-child .tbl { font-size: 0.84rem; }
.two-col.attr > .fig:first-child .tbl th, .two-col.attr > .fig:first-child .tbl td { padding-top: 0.7rem; padding-bottom: 0.7rem; white-space: nowrap; }
.two-col.attr > .fig:first-child .tbl td:first-child { white-space: normal; min-width: 11rem; }
.two-col.attr > .fig:first-child .tbl .track { width: 80px; }
.two-col.attr > .fig:first-child figcaption { margin-top: 1rem; }

/* 05 · four response styles through the same four checkpoints */
.style-about { margin: -0.6rem 0 0.9rem; }
.style-keys { gap: 0.4rem 1.6rem; }
.style-legend { justify-content: center; margin: 0.2rem 0 -0.2rem; }
.lab-text.style-plain { max-height: none; margin-top: 0.4rem; }
details.style-train { margin: 1rem 0 0.4rem; }
.pair-card.style-ex { margin: 0 0 1rem; }
.pair-card.style-ex .pair-problem { margin: 0.5rem 0 0.7rem; }
.style-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.style-pair > * { min-width: 0; }
.style-col-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.6rem; font-family: Inter, system-ui, sans-serif; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.25rem; }
.style-col-head .lab { font-weight: 600; color: var(--text); }
.style-col-head .val { font-variant-numeric: tabular-nums; font-weight: 700; }
.style-col-head .val.down { color: var(--s1); }
.style-col-head .val.up { color: var(--s8); }
.style-col-head .cnt { margin-left: auto; font-variant-numeric: tabular-nums; }
.style-col .lab-text { max-height: 22rem; }
@media (max-width: 860px) { .style-pair { grid-template-columns: 1fr; } }

/* attribution: accuracy chart and confusion matrix side by side in one figure, same height */
.attr-fig .fig-head { justify-content: center; gap: 0.6rem 1.2rem; }
.attr-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; margin-top: 0.6rem; }
.attr-body > .chart { min-width: 0; }
.attr-body > #chart-confusion { display: flex; justify-content: center; position: relative; }
.attr-body > #chart-confusion svg { width: auto; max-width: 100%; }
@media (max-width: 860px) { .attr-body { grid-template-columns: 1fr; } }

.tbl .mark.ok { color: var(--muted); opacity: 0.75; }
/* two population figures of unequal content: same card height, chart centred, caption at the bottom */
.two-col.eq.pop > .fig > .chart { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
.case .fig .tbl.bg { font-size: 0.82rem; }
.case .fig .tbl.bg th { white-space: normal; }
.case .fig .tbl.bg .track { width: 44px; }
.case .fig .tbl.bg { table-layout: auto; font-size: 0.78rem; }
.case .fig .tbl.bg th, .case .fig .tbl.bg td { padding-left: 0.35rem; padding-right: 0.35rem; }
.case .fig .tbl.bg td:first-child { white-space: nowrap; }
.case .fig .tbl.bg td:first-child .sw { display: inline-block; vertical-align: middle; margin-right: 0.35rem; }

/* blind human evaluation panel */
.heval { margin: 0.2rem 0 1.2rem; padding: 0.7rem 0.9rem 0.4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.heval-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.8rem; margin-bottom: 0.3rem; }
.heval-head .pair-lab { margin: 0; }
.heval-sub { font-family: Inter, system-ui, sans-serif; font-size: 0.76rem; color: var(--muted); }
.heval-tbl td.heval-c { font-family: Inter, system-ui, sans-serif; font-weight: 600; }
.heval-tbl td.mod { color: var(--accent-strong); }
.heval-tbl td.hum { color: var(--text); }
.heval-tbl td.sim, .heval-tbl td.na { color: var(--muted); font-weight: 400; }
.heval-tbl tr.hi td { background: var(--accent-tint); }
.heval .tbl-wrap { margin: 0.2rem 0 0.3rem; }
.tb-note { font-family: Inter, system-ui, sans-serif; font-size: 0.74rem; color: var(--muted); align-self: center; margin-left: 0.4rem; }
.case .fig .tbl.bg td.bgc { min-width: 0; }
.case .fig > .tbl-wrap { margin: 0.2rem 0 0.4rem; }
.bibfoot { margin-top: 1rem; text-align: left; }
.bibfoot .bib { margin: 0 auto; max-width: 46rem; font-size: 0.78rem; }
.bibfoot .bibwrap { max-width: 46rem; margin: 0 auto; }

/* ---- section 01 · why the path: two synchronised 6 s loops; the static (reduced-motion) picture is the final state ---- */
.brain-fig svg { display: block; width: 100%; height: auto; }
.brain-fig .t-ttl { font-family: Inter, system-ui, sans-serif; font-size: 13px; font-weight: 600; fill: var(--text); }
.brain-fig .t-lb { font-family: Inter, system-ui, sans-serif; font-size: 10px; fill: var(--muted); }
.brain-fig .t-ph { font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 500; fill: var(--accent-strong); opacity: 0; }
.brain-fig .t-hd { font-family: Inter, system-ui, sans-serif; font-size: 10.5px; font-weight: 600; fill: var(--text); }
.brain-fig .t-tok { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 9.5px; fill: var(--muted); } .brain-fig .t-tok.ans { fill: var(--text); font-weight: 700; } .brain-fig .t-p { font-family: Inter, system-ui, sans-serif; font-size: 9px; fill: var(--muted); } .brain-fig .t-ans { font-weight: 700; fill: var(--text); }
.brain-fig .row-bg { fill: var(--bg); stroke: var(--border); stroke-width: 1; } .brain-fig .seg-other { fill: var(--muted); opacity: .55; } .brain-fig .seg-rest { fill: var(--surface); } .brain-fig .lg-rest { stroke: var(--border); stroke-width: 1; } .brain-fig .cell-e .seg-ans, .brain-fig .lg-e { fill: var(--accent); } .brain-fig .cell-h .seg-ans, .brain-fig .lg-h { fill: var(--text); } .brain-fig .seg-lab { font-family: Inter, system-ui, sans-serif; font-size: 9.5px; font-weight: 600; fill: var(--bg); } .brain-fig .cell-e .rev { fill: var(--accent); } .brain-fig .cell-h .rev { fill: var(--text); opacity: .75; }
.brain-fig .cell { transform-box: fill-box; transform-origin: 0 50%; }
p, figcaption, li, .intro, .note { text-wrap: pretty; }
.brain-fig > .fig > figcaption { margin-top: 0.55rem; }
.brain-fig .brain { fill: var(--surface); stroke: var(--muted); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.brain-fig .lobe { opacity: .55; } .brain-fig .lobe-frontal { fill: var(--surface); } .brain-fig .lobe-parietal { fill: var(--border); opacity: .35; } .brain-fig .lobe-occipital { fill: var(--lv-1); opacity: .22; } .brain-fig .lobe-temporal { fill: var(--lv-2); opacity: .16; } .brain-fig .area { stroke-width: 1.6; stroke-dasharray: 5 4; } .brain-fig .area-v1 { fill: var(--lv-1); stroke: var(--lv-4); opacity: .7; } .brain-fig .area-v2 { fill: var(--lv-2); stroke: var(--lv-4); opacity: .5; } .brain-fig .area-v4 { fill: var(--lv-3); stroke: var(--lv-5); opacity: .42; } .brain-fig .area-it { fill: var(--lv-4); stroke: var(--lv-5); opacity: .34; } .brain-fig .lobe-line { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 6 5; opacity: .7; }
.brain-fig .t-lobe { font-family: Inter, system-ui, sans-serif; font-size: 13px; font-weight: 500; fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; letter-spacing: .02em; }
.brain-fig .t-nd { font-weight: 600; fill: var(--text); }
.brain-fig .scene .t-lb { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.brain-fig .axis { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; }
.brain-fig .cardbg { fill: var(--bg); stroke: var(--border); stroke-width: 1.4; } .brain-fig .cat { fill: var(--text); opacity: .85; }
.brain-fig .occl { stroke: var(--muted); stroke-width: 5; opacity: .75; } .brain-fig .clutter circle { fill: var(--muted); opacity: .55; }
.brain-fig .card-a .cardbg { stroke: var(--accent); } .brain-fig .card-b .cardbg { stroke: var(--text); }
.brain-fig .inarr .sh { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; } .brain-fig .inarr .hd { fill: var(--border); }
.brain-fig .ff .sh { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; } .brain-fig .ff .hd { fill: var(--muted); }
.brain-fig .fb { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: round; opacity: .18; }
.brain-fig .ring { fill: var(--bg); stroke: var(--muted); stroke-width: 1.6; } .brain-fig .core { fill: var(--muted); }
.brain-fig .sig { opacity: 0; } .brain-fig .sig-a circle { fill: var(--accent); } .brain-fig .sig-b circle { fill: var(--text); }
.brain-fig .pcard { opacity: 1; } .brain-fig .tag { opacity: 1; } .brain-fig .tag-a .sw { fill: var(--accent); } .brain-fig .tag-b .sw { fill: var(--text); }
.brain-fig .tm { opacity: 0; } .brain-fig .tm-a circle { fill: var(--accent); } .brain-fig .tm-b circle { fill: var(--text); }
.brain-fig .sw-e { fill: var(--accent); } .brain-fig .sw-h { fill: var(--text); }
.brain-fig .t-ph.ph3 { opacity: 1; }
@media (max-width: 640px) { .brain-fig .t-ttl { font-size: 15px; } .brain-fig .cortex .t-lb { font-size: 12px; } .brain-fig .t-ph { font-size: 12.5px; } }
@keyframes bf-sig-a{0%,1%{opacity:0;transform:translate(350px,110px)}3%{opacity:1;transform:translate(350px,110px)}5%{opacity:1;transform:translate(324px,163px)}8%{opacity:1;transform:translate(291px,129px)}11%{opacity:1;transform:translate(241px,187px)}14%{opacity:1;transform:translate(157px,222px)}90%{opacity:(26, 0.45);transform:translate(157px,222px)}94%,100%{opacity:0;transform:translate(157px,222px)}}
@keyframes bf-sig-b{0%,3%{opacity:0;transform:translate(350px,178px)}5%{opacity:1;transform:translate(350px,178px)}7%{opacity:1;transform:translate(324px,173px)}10%{opacity:1;transform:translate(291px,139px)}13%{opacity:1;transform:translate(241px,197px)}16%{opacity:1;transform:translate(157px,232px)}24%{opacity:1;transform:translate(157px,232px)}29%{opacity:1;transform:translate(241px,197px)}34%{opacity:1;transform:translate(291px,139px)}36%{opacity:1;transform:translate(291px,139px)}41%{opacity:1;transform:translate(241px,197px)}46%{opacity:1;transform:translate(157px,232px)}50%{opacity:1;transform:translate(157px,232px)}55%{opacity:1;transform:translate(241px,197px)}60%{opacity:1;transform:translate(291px,139px)}62%{opacity:1;transform:translate(291px,139px)}67%{opacity:1;transform:translate(241px,197px)}72%{opacity:1;transform:translate(157px,232px)}90%{opacity:1;transform:translate(157px,232px)}94%,100%{opacity:0;transform:translate(157px,232px)}}
@keyframes bf-ring-v1{0%,4%{stroke:var(--muted)}5%,6%{stroke:var(--accent)}7%,10%{stroke:var(--text)}11%,100%{stroke:var(--muted)}}
@keyframes bf-ring-v2{0%,7%{stroke:var(--muted)}8%,9%{stroke:var(--accent)}10%,13%{stroke:var(--text)}14%,33%{stroke:var(--muted)}34%,37%{stroke:var(--text)}38%,59%{stroke:var(--muted)}60%,63%{stroke:var(--text)}64%,100%{stroke:var(--muted)}}
@keyframes bf-ring-v4{0%,10%{stroke:var(--muted)}11%,12%{stroke:var(--accent)}13%,16%{stroke:var(--text)}17%,28%{stroke:var(--muted)}29%,32%{stroke:var(--text)}33%,40%{stroke:var(--muted)}41%,44%{stroke:var(--text)}45%,54%{stroke:var(--muted)}55%,58%{stroke:var(--text)}59%,66%{stroke:var(--muted)}67%,70%{stroke:var(--text)}71%,100%{stroke:var(--muted)}}
@keyframes bf-ring-it{0%,13%{stroke:var(--muted)}14%,15%{stroke:var(--accent)}16%,19%{stroke:var(--text)}20%,45%{stroke:var(--muted)}46%,49%{stroke:var(--text)}50%,71%{stroke:var(--muted)}72%,75%{stroke:var(--text)}76%,100%{stroke:var(--muted)}}
@keyframes bf-ff1{0%,4%{stroke:var(--muted)}5%,6%{stroke:var(--accent)}7%,10%{stroke:var(--text)}11%,100%{stroke:var(--muted)}}
@keyframes bf-ff2{0%,7%{stroke:var(--muted)}8%,9%{stroke:var(--accent)}10%,13%{stroke:var(--text)}14%,35%{stroke:var(--muted)}36%,39%{stroke:var(--text)}40%,61%{stroke:var(--muted)}62%,65%{stroke:var(--text)}66%,100%{stroke:var(--muted)}}
@keyframes bf-ff3{0%,10%{stroke:var(--muted)}11%,12%{stroke:var(--accent)}13%,16%{stroke:var(--text)}17%,40%{stroke:var(--muted)}41%,44%{stroke:var(--text)}45%,66%{stroke:var(--muted)}67%,70%{stroke:var(--text)}71%,100%{stroke:var(--muted)}}
@keyframes bf-fb1{0%,23%{opacity:.18}24%,29%{opacity:1}30%,49%{opacity:.18}50%,55%{opacity:1}56%,100%{opacity:.18}}
@keyframes bf-fb2{0%,28%{opacity:.18}29%,34%{opacity:1}35%,54%{opacity:.18}55%,60%{opacity:1}61%,100%{opacity:.18}}
@keyframes bf-pcard{0%,13%{opacity:0}17%,92%{opacity:1}96%,100%{opacity:0}}
@keyframes bf-tag-a{0%,15%{opacity:0;transform:translateX(-6px)}19%,92%{opacity:1;transform:translateX(0)}96%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-tag-b{0%,72%{opacity:0;transform:translateX(-6px)}76%,92%{opacity:1;transform:translateX(0)}96%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-tm-a{0%,2%{opacity:0;transform:translateX(0)}3%{opacity:1;transform:translateX(0)}16%,90%{opacity:1;transform:translateX(57px)}94%,100%{opacity:0;transform:translateX(57px)}}
@keyframes bf-tm-b{0%,2%{opacity:0;transform:translateX(0)}3%{opacity:1;transform:translateX(0)}74%,90%{opacity:1;transform:translateX(188px)}94%,100%{opacity:0;transform:translateX(188px)}}
@keyframes bf-ph1{0%,2%{opacity:0}4%,20%{opacity:1}23%,100%{opacity:0}}
@keyframes bf-ph2{0%,23%{opacity:0}26%,72%{opacity:1}75%,100%{opacity:0}}
@keyframes bf-ph3{0%,75%{opacity:0}78%,90%{opacity:1}94%,100%{opacity:0}}
@keyframes bf-cell-e0{0%,5%{opacity:0;transform:translateX(-8px)}8%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h0{0%,7%{opacity:0;transform:translateX(-8px)}10%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e1{0%,6%{opacity:0;transform:translateX(-8px)}9%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h1{0%,15%{opacity:0;transform:translateX(-8px)}18%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e2{0%,8%{opacity:0;transform:translateX(-8px)}11%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h2{0%,23%{opacity:0;transform:translateX(-8px)}26%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e3{0%,9%{opacity:0;transform:translateX(-8px)}12%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h3{0%,31%{opacity:0;transform:translateX(-8px)}34%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e4{0%,11%{opacity:0;transform:translateX(-8px)}14%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h4{0%,39%{opacity:0;transform:translateX(-8px)}42%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e5{0%,12%{opacity:0;transform:translateX(-8px)}15%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h5{0%,47%{opacity:0;transform:translateX(-8px)}50%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e6{0%,13%{opacity:0;transform:translateX(-8px)}16%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h6{0%,56%{opacity:0;transform:translateX(-8px)}59%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e7{0%,15%{opacity:0;transform:translateX(-8px)}18%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h7{0%,64%{opacity:0;transform:translateX(-8px)}67%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-e8{0%,16%{opacity:0;transform:translateX(-8px)}19%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
@keyframes bf-cell-h8{0%,72%{opacity:0;transform:translateX(-8px)}75%,90%{opacity:1;transform:translateX(0)}94%,100%{opacity:0;transform:translateX(0)}}
.brain-fig .sig-a{animation:bf-sig-a 8s linear infinite both} .brain-fig .sig-b{animation:bf-sig-b 8s linear infinite both}
.brain-fig .nd-v1{animation:bf-ring-v1 8s linear infinite both}
.brain-fig .nd-v2{animation:bf-ring-v2 8s linear infinite both}
.brain-fig .nd-v4{animation:bf-ring-v4 8s linear infinite both}
.brain-fig .nd-it{animation:bf-ring-it 8s linear infinite both}
.brain-fig .ff1 .sh{animation:bf-ff1 8s linear infinite both}
.brain-fig .ff2 .sh{animation:bf-ff2 8s linear infinite both}
.brain-fig .ff3 .sh{animation:bf-ff3 8s linear infinite both}
.brain-fig .fb1{animation:bf-fb1 8s linear infinite both}
.brain-fig .fb2{animation:bf-fb2 8s linear infinite both}
.brain-fig .pcard{animation:bf-pcard 8s linear infinite both} .brain-fig .tag-a{animation:bf-tag-a 8s ease-out infinite both} .brain-fig .tag-b{animation:bf-tag-b 8s ease-out infinite both}
.brain-fig .tm-a{animation:bf-tm-a 8s linear infinite both} .brain-fig .tm-b{animation:bf-tm-b 8s linear infinite both}
.brain-fig .ph1{animation:bf-ph1 8s linear infinite both} .brain-fig .ph2{animation:bf-ph2 8s linear infinite both} .brain-fig .ph3{animation:bf-ph3 8s linear infinite both}
.brain-fig .cell-e0{animation:bf-cell-e0 8s ease-out infinite both} .brain-fig .cell-h0{animation:bf-cell-h0 8s ease-out infinite both}
.brain-fig .cell-e1{animation:bf-cell-e1 8s ease-out infinite both} .brain-fig .cell-h1{animation:bf-cell-h1 8s ease-out infinite both}
.brain-fig .cell-e2{animation:bf-cell-e2 8s ease-out infinite both} .brain-fig .cell-h2{animation:bf-cell-h2 8s ease-out infinite both}
.brain-fig .cell-e3{animation:bf-cell-e3 8s ease-out infinite both} .brain-fig .cell-h3{animation:bf-cell-h3 8s ease-out infinite both}
.brain-fig .cell-e4{animation:bf-cell-e4 8s ease-out infinite both} .brain-fig .cell-h4{animation:bf-cell-h4 8s ease-out infinite both}
.brain-fig .cell-e5{animation:bf-cell-e5 8s ease-out infinite both} .brain-fig .cell-h5{animation:bf-cell-h5 8s ease-out infinite both}
.brain-fig .cell-e6{animation:bf-cell-e6 8s ease-out infinite both} .brain-fig .cell-h6{animation:bf-cell-h6 8s ease-out infinite both}
.brain-fig .cell-e7{animation:bf-cell-e7 8s ease-out infinite both} .brain-fig .cell-h7{animation:bf-cell-h7 8s ease-out infinite both}
.brain-fig .cell-e8{animation:bf-cell-e8 8s ease-out infinite both} .brain-fig .cell-h8{animation:bf-cell-h8 8s ease-out infinite both}
@media (prefers-reduced-motion: reduce) { .brain-fig * { animation: none !important; } }
/* ---- end brain-fig ---- */
