@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/eb-garamond-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #FBFCFA;
  --bg-alt: #F2F5F3;
  --card: #FFFFFF;
  --ink: #142F45;
  --ink-2: #3A5266;
  --muted: #687A8A;
  --line: #E2E8EC;
  --line-2: #CFD8DF;
  --link: #205C78;
  --dace: #E07020;
  --dace-soft: #FCE8D8;
  --waft: #5E7894;
  --h4: #7B5EA7;
  --other: #A9B5C0;
  --occ: #3B9FDB;
  --good: #1A7F37;
  --bad: #C2412D;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 47, 69, .04), 0 6px 22px rgba(20, 47, 69, .06);
  --nav-h: 52px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 14px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

b, strong { font-weight: 650; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--dace); outline-offset: 2px; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

/* ---------------------------------------------------------------- nav */
.topnav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(251, 252, 250, .86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topnav.scrolled { border-bottom-color: var(--line); }
.topnav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px; height: 100%;
  display: flex; align-items: center; gap: 22px;
}
.brand {
  font-weight: 800; letter-spacing: .04em; color: var(--ink); font-size: 15px;
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.topnav.scrolled .brand { opacity: 1; transform: none; }
.brand:hover { text-decoration: none; color: var(--dace); }
.navlinks {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto;
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  padding: 0 8px;
}
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  white-space: nowrap; font-size: 14px; color: var(--ink-2);
  padding: 5px 10px; border-radius: 999px;
}
.navlinks a:hover { text-decoration: none; background: rgba(20, 47, 69, .06); }
.navlinks a.active { color: var(--ink); background: rgba(224, 112, 32, .12); }

/* --------------------------------------------------------------- hero */
.hero { text-align: center; padding: 34px 0 10px; }
.venue {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--dace);
  background: var(--dace-soft); border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--sans); font-weight: 750;
  font-size: clamp(2.05rem, 4.6vw, 3.25rem); line-height: 1.12;
  letter-spacing: -.022em; margin: 0 auto 20px; max-width: 900px;
}
.hero h1 .ac { color: var(--dace); }
.authors { font-size: 1.2rem; margin: 0; }
.authors a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.authors a:hover { text-decoration: none; border-bottom-color: var(--dace); color: var(--link); }
.authors .sep { color: var(--muted); margin: 0 10px; }
.affil { color: var(--muted); margin: 4px 0 22px; }

.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 34px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
  padding: 9px 18px 9px 15px; border-radius: 999px; transition: background .15s, transform .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: #1F4563; text-decoration: none; transform: translateY(-1px); }
.btn.disabled { background: #E7ECEF; color: #7D8E9C; cursor: default; }
.btn.disabled:hover { transform: none; }
.btn small { font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }

/* ------------------------------------------------------------- teaser */
.teaser { margin: 0 auto; max-width: 1100px; }
.teaser-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; margin-bottom: 10px;
}
.teaser figcaption, .fig figcaption {
  color: var(--ink-2); font-size: 15px; line-height: 1.6; text-align: left; margin-top: 12px;
}
.teaser figcaption { max-width: 900px; margin: 14px auto 0; text-align: center; }

/* -------------------------------------------------------------- pills */
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pill {
  font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer;
  background: var(--card); color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px;
  transition: background .15s, color .15s, border-color .15s;
}
.pill:hover { border-color: var(--ink-2); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills.small .pill { font-size: 13px; padding: 5px 11px; }
.pill-label { font-size: 13px; color: var(--muted); margin-right: 2px; }

/* ------------------------------------------------------- compare view */
.compare {
  position: relative; width: 100%; overflow: hidden; border-radius: 12px;
  background: #0E1A24; user-select: none; -webkit-user-select: none; touch-action: pan-y;
  box-shadow: var(--shadow); cursor: ew-resize;
}
.compare .layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.compare .base { position: relative; height: auto; }
.compare .clip {
  position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
.compare .divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 0; z-index: 3;
  border-left: 2px solid rgba(255, 255, 255, .95); box-shadow: 0 0 8px rgba(0, 0, 0, .35);
  transform: translateX(-1px);
}
.compare .knob {
  position: absolute; top: 50%; left: 0; width: 40px; height: 40px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.compare .knob svg { width: 22px; height: 22px; }
.compare .tag {
  position: absolute; top: 10px; z-index: 2; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
  color: #fff; background: rgba(14, 26, 36, .62); padding: 3px 10px; border-radius: 999px;
  backdrop-filter: blur(4px); pointer-events: none;
}
.compare .tag-left { left: 10px; }
.compare .tag-right { right: 10px; }
.compare .lens {
  position: absolute; z-index: 4; width: 190px; height: 190px; border-radius: 50%;
  border: 3px solid #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  pointer-events: none; opacity: 0; transition: opacity .15s;
  background-repeat: no-repeat; background-color: #0E1A24;
  transform: translate(-50%, -50%);
}
.compare.lens-on .lens { opacity: 1; }
/* --------------------------------------------------------------- tldr */
.tldr { padding: 40px 24px 10px; }
.tldr-text {
  max-width: 880px; margin: 0 auto 28px; font-size: 1.12rem; line-height: 1.7; text-align: center;
}
.kicker {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: #fff;
  background: var(--dace); border-radius: 6px; padding: 1px 7px; margin-right: 6px; vertical-align: 2px;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow); text-align: left;
}
.stat-num {
  font-family: var(--serif); font-weight: 500; font-size: 2.6rem; line-height: 1; color: var(--dace);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-label { font-weight: 650; margin-top: 8px; line-height: 1.35; }
.stat-note { color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 4px; }

/* ----------------------------------------------------------- sections */
.section { padding: 64px 0 56px; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { text-align: left; margin-bottom: 26px; }
.eyebrow {
  font-size: 12.5px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--dace);
  margin-bottom: 6px;
}
h2 {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  line-height: 1.15; letter-spacing: -.005em; margin: 0 0 14px;
}
h3 { font-size: 1.12rem; margin: 0 0 8px; }
h3.sub { margin: 34px 0 10px; font-size: 1.16rem; }
.lead { font-size: 1.07rem; color: var(--ink-2); margin: 0; }
p { margin: 0 0 14px; }

.abstract { padding-top: 46px; padding-bottom: 20px; }
.abstract h2 { margin-bottom: 12px; }
.abstract p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

.callout {
  border-left: 3px solid var(--dace); background: var(--dace-soft); border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 18px 0;
}
.better { color: var(--good); font-weight: 650; }
.worse { color: var(--bad); font-weight: 650; }
.small-text { font-size: 15px; color: var(--ink-2); }

/* -------------------------------------------------------------- cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.fig { margin: 0 0 22px; padding: 18px 20px 16px; }
.fig-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin-bottom: 10px;
}
.fig-title { font-weight: 650; font-size: 16px; }
.fig-note { font-size: 13px; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }

.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); margin: -2px 0 6px; }
.lg::before {
  content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px;
}
.lg.waft::before { background: var(--waft); }
.lg.h4::before { background: var(--h4); }
.lg.dace::before { background: var(--dace); transform: rotate(45deg) scale(.9); border-radius: 2px; }
.lg.sq::before { border-radius: 2px; transform: none; }
.lg-ctx { color: var(--muted); }
.lg-ctx i {
  display: inline-block; box-sizing: border-box; width: 10px; height: 10px; border-radius: 50%;
  border: 1.8px solid var(--muted); margin-right: 5px; vertical-align: -1px;
}
.lg-ctx i.f { background: var(--muted); margin-left: 2px; }

/* ------------------------------------------------------------- charts */
.chart { position: relative; width: 100%; min-height: 120px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.chart text { fill: var(--ink-2); font-size: 12px; }
.chart .axis text { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .axis path, .chart .axis line { stroke: var(--line-2); }
.chart .grid line { stroke: var(--line); }
.chart .grid path { display: none; }
.chart .axis-title { fill: var(--ink-2); font-size: 12px; font-weight: 600; }
.chart .panel-title { fill: var(--ink); font-size: 13px; font-weight: 650; }
.chart .label { font-size: 11.5px; fill: var(--ink-2); }
.chart .label.muted { fill: var(--muted); }
.chart .label.dace { fill: var(--dace); font-weight: 750; font-size: 12.5px; }
.chart .label.waft { fill: var(--waft); font-weight: 650; }
.chart .value { font-size: 11.5px; font-variant-numeric: tabular-nums; fill: var(--ink-2); }
.chart .value.dace { fill: var(--dace); font-weight: 700; }
.chart .value.h4 { fill: var(--h4); font-weight: 650; }
.chart .value.good { fill: var(--good); font-weight: 650; }
.chart .value.bad { fill: var(--bad); font-weight: 650; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .dim { opacity: .25; }

.numbers { margin-top: 10px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.numbers summary, .reading summary {
  cursor: pointer; font-size: 14px; color: var(--link); font-weight: 600; list-style: none; display: inline-flex;
  align-items: center; gap: 6px;
}
.numbers summary::-webkit-details-marker, .reading summary::-webkit-details-marker { display: none; }
.numbers summary::before, .reading summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; margin-right: 2px;
}
.numbers[open] summary::before, .reading[open] summary::before { transform: rotate(45deg); }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table.num {
  border-collapse: collapse; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.num th, table.num td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: right; }
table.num th:first-child, table.num td:first-child { text-align: left; }
table.num thead th { font-weight: 650; color: var(--ink-2); border-bottom: 1.5px solid var(--line-2); vertical-align: bottom; }
table.num tr.group td { font-style: italic; color: var(--muted); text-align: left; background: #FAFBFC; }
table.num td.best { font-weight: 750; }
table.num tr.ours td { background: #FFF7F0; }
table.num .src { font-size: 12px; color: var(--muted); }

.tooltip {
  position: fixed; z-index: 90; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: rgba(20, 47, 69, .96); color: #fff; font-size: 13px; line-height: 1.45;
  padding: 7px 10px; border-radius: 8px; max-width: 280px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.tooltip.on { opacity: 1; }
.tooltip b { color: #FFC08F; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- idea */
.camps { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; margin: 4px 0 30px; }
.camp { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.camp.ours { border: 1.5px solid #F0B88A; background: linear-gradient(180deg, #FFF8F1, var(--card) 60%); }
.camp-head { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.camp-fig { margin: 0; text-align: center; }
.camp-fig svg { width: 88px; height: 88px; display: block; }
.camp-fig figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.camp.ours .camp-fig figcaption { color: var(--dace); font-weight: 650; }
.camp-kicker { font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.camp.ours .camp-kicker { color: var(--dace); }
.camp h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 2px 0 4px; }
.camp-head p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.camp-list, .camp-points { list-style: none; padding: 0; margin: 0; font-size: 14.5px; }
.camp-list li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line); color: var(--muted); }
.camp-list li b { color: var(--ink); font-weight: 650; }
.camp-list .yr { flex: none; width: 40px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.camp-points li { position: relative; padding: 5px 0 5px 22px; border-top: 1px solid #F6DCC6; color: var(--ink-2); }
.camp-points li::before { content: "\2713"; position: absolute; left: 2px; color: var(--dace); font-weight: 800; }
.camp-vs {
  align-self: center; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--muted);
  background: var(--card); border: 1px solid var(--line-2);
}

.unit-legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 13px; color: var(--ink-2);
  margin: -16px 0 28px;
}
.ul { display: inline-flex; align-items: center; gap: 7px; }
.ul::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 3px; }
.ul-obj::before { background: #F5B07A; }
.ul-unit::before { box-sizing: border-box; border: 1.5px solid #34495E; border-radius: 2px; background: radial-gradient(circle, #34495E 0 1.8px, #DDE5EC 2.3px); }
.ul-mixed::before { box-sizing: border-box; border: 1.5px solid #34495E; border-radius: 2px; background: repeating-linear-gradient(45deg, rgba(214, 69, 69, .6) 0 2px, #DDE5EC 2px 5px); }
.ul-feat::before { width: 7px; height: 7px; border-radius: 50%; background: #8A9AA8; margin: 0 3px; }

.setup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; margin-top: 4px; }
.su { margin: 0; }
.su svg { display: block; width: 100%; max-width: 210px; margin: 0 auto; }
.setup .su figcaption { margin: 10px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); text-align: center; }
.setup .su figcaption b { display: block; color: var(--ink); font-size: 14.5px; margin-bottom: 1px; }
.setup .su figcaption span { display: block; }
.setup .su.ours figcaption b { color: var(--dace); }
.su-ctx { border-left: 1px dashed var(--line-2); padding-left: 22px; }
.chip {
  display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 650; color: var(--dace);
  background: var(--dace-soft); border-radius: 999px; padding: 1px 9px;
}
#fig-setup .unit-legend { margin: 18px 0 2px; }
.stat-sep { color: var(--muted); margin: 0 .14em; font-weight: 400; }

.toy-goal { font-size: 15px; color: var(--ink-2); margin: -2px 0 12px; }
.toy-goal b { color: var(--ink); }
.n {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; margin: 0 5px 0 1px;
  background: var(--dace); color: #fff; font-size: 11px; font-weight: 750; line-height: 1; vertical-align: 1px;
}

.toy-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.toy-card {
  font: inherit; color: inherit; cursor: pointer; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px 9px;
  display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto auto; column-gap: 10px;
  align-items: center; text-align: left; transition: border-color .15s, background .15s, transform .15s;
}
.toy-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.toy-card img { grid-row: 1 / span 3; width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--line); }
.toy-card-name { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.toy-card-units { font-size: 12.5px; color: var(--muted); }
.toy-card .verdict { justify-content: flex-start; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.toy-card > * { min-width: 0; }
.toy-card .verdict span { font-size: 11.5px; padding: 1px 7px 1px 5px; }
.toy-card[aria-pressed="true"] { border-color: var(--ink); background: #F6F8FA; }
.toy-card.best .toy-card-name { color: var(--dace); }
.toy-card.best[aria-pressed="true"] { border-color: var(--dace); background: var(--dace-soft); }
.toy-stage { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); gap: 16px; align-items: end; }
.toy-heads { display: flex; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.toy-match .toy-heads > span { width: 40%; }
.toy-match .toy-heads > span + span { margin-left: 13.3%; }
#toy-svg { width: 100%; height: auto; display: block; touch-action: manipulation; overflow: visible; }
#toy-svg .frame-border { fill: none; stroke: var(--line-2); stroke-width: .5; }
#toy-svg .gridline { stroke: #fff; stroke-opacity: .85; stroke-width: .35; pointer-events: none; }
#toy-svg .gridline.fine { stroke-opacity: .5; stroke-width: .18; }
#toy-svg .unit-shape { fill: transparent; stroke: #fff; stroke-width: .4; stroke-opacity: .95; }
#toy-svg .cell-hit { fill: transparent; }
#toy-svg .tint-1 { fill: rgba(214, 48, 39, .55); }
#toy-svg .tint-2 { fill: rgba(245, 166, 35, .62); }
#toy-svg .corr { stroke-width: .45; fill: none; opacity: .8; pointer-events: none; }
#toy-svg .corr.s0 { stroke: #1F9D55; }
#toy-svg .corr.s1 { stroke: #D63027; }
#toy-svg .corr.s2 { stroke: #F0A020; }
#toy-svg .corr.gt { stroke: #fff; opacity: .9; }
#toy-svg .land { stroke: #fff; stroke-width: .3; pointer-events: none; }
#toy-svg .land.s0 { fill: #1F9D55; }
#toy-svg .land.s1 { fill: #D63027; }
#toy-svg .land.s2 { fill: #F0A020; }
#toy-svg .land.small { stroke: none; }
#toy-svg .land.small.s0 { opacity: .8; }
#toy-svg .land.gt { fill: var(--ink); }
#toy-svg .land.out { fill: #fff; stroke: var(--ink); stroke-width: .4; }
#toy-svg .ghost { fill: none; stroke: var(--ink-2); stroke-width: .5; stroke-dasharray: 2 1.5; }
#toy-svg .outline2 { fill: none; stroke: #fff; stroke-width: .5; stroke-dasharray: 2 1.5; pointer-events: none; }
#toy-svg .hatch-area { fill: url(#toy-hatch); stroke: #fff; stroke-width: .3; pointer-events: none; }
#toy-svg .hl { fill: none; stroke: #fff; stroke-width: 1.1; pointer-events: none; }
#toy-svg .hl-match { fill: none; stroke-width: 1.1; pointer-events: none; }
#toy-svg .hl-true { fill: none; stroke: #fff; stroke-width: .7; stroke-dasharray: 1.6 1.2; pointer-events: none; }
#toy-svg .hl-corr { stroke-width: 1.1; pointer-events: none; }
#toy-svg .note { font-size: 5px; fill: var(--muted); }
#toy-svg .note.strong { fill: var(--ink-2); font-weight: 650; }
#toy-svg .still { font-size: 5.5px; fill: #fff; }
.toy-flow img { width: 100%; height: auto; border-radius: 3px; border: .5px solid var(--line-2); }
.toy-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); margin: 12px 0 4px; }
.lg-line::before {
  content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px;
}
.lg-line.ok::before { background: #1F9D55; }
.lg-line.bad::before { background: #D63027; }
.lg-line.mixed::before { background: #F0A020; }
.lg-hatch::before {
  content: ""; display: inline-block; width: 14px; height: 12px; margin-right: 6px; vertical-align: -2px; border-radius: 2px;
  background: repeating-linear-gradient(45deg, #E9A15F 0 2px, #fff 2px 4px); border: 1px solid #E5B48A;
}
.toy-text {
  font-size: 15px; line-height: 1.55; color: var(--ink); background: #F7F9FA; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; margin: 8px 0 0; min-height: 50px;
}
.verdict { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.verdict span {
  font-size: 12.5px; font-weight: 650; padding: 2px 9px 2px 7px; border-radius: 999px; white-space: nowrap;
}
.verdict .yes { background: #E3F3E7; color: var(--good); }
.verdict .no { background: #FBE7E3; color: var(--bad); }
.verdict .yes::before { content: "\2713\00a0"; }
.verdict .no::before { content: "\2717\00a0"; }

/* ------------------------------------------------------------- method */
.pipeline-stage { position: relative; margin: 4px 0 0; }
.pipeline-stage img { width: 100%; height: auto; }
.pipeline-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pipeline-overlay .dim { fill: rgba(255, 255, 255, .8); transition: opacity .25s; }
.pipeline-overlay .hl { fill: none; stroke: var(--dace); stroke-width: 1.6; rx: 5; }
.step-text {
  min-height: 74px; margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: #F7F9FA;
  border: 1px solid var(--line); font-size: 15px; line-height: 1.55;
}
.step-text .step-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--dace); color: #fff; font-size: 12.5px; font-weight: 750; margin-right: 8px; vertical-align: 1px;
}
.step-text .step-name { font-weight: 700; }

.eq { overflow-x: auto; overflow-y: hidden; margin: 8px 0 16px; padding: 2px 0; }
.eq.small { font-size: 14.5px; margin: 10px 0 0; }
.katex { font-size: 1.06em; }
.katex-display { margin: .4em 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }

.assign-layout { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 26px; align-items: start; }
.assign-canvas-wrap svg { width: 100%; height: auto; touch-action: none; display: block; }
.assign-canvas-wrap .hint { font-size: 13px; color: var(--muted); text-align: center; margin: 6px 0 0; }
#assign-svg .cell { fill: none; stroke: var(--line-2); stroke-dasharray: 3 4; }
#assign-svg .cell.center { fill: rgba(224, 112, 32, .05); stroke: #EBC3A3; stroke-dasharray: none; }
#assign-svg .contour { fill: rgba(224, 112, 32, .07); stroke: var(--dace); stroke-width: 1.4; }
#assign-svg .contour.outer { fill: rgba(224, 112, 32, .04); stroke-dasharray: 4 4; stroke-width: 1; }
#assign-svg .anchor-bubble { fill: var(--waft); }
#assign-svg .anchor-dot { fill: var(--ink); }
#assign-svg .link { stroke: var(--waft); }
#assign-svg .pct { font-size: 13px; font-weight: 650; fill: var(--ink); font-variant-numeric: tabular-nums; }
#assign-svg .cell-note { font-size: 11px; font-weight: 500; fill: #B9875E; }
#assign-svg .mu { fill: var(--dace); stroke: #fff; stroke-width: 2.5; cursor: grab; }
#assign-svg .mu:active { cursor: grabbing; }
#assign-svg .mu-label { font-size: 13px; font-style: italic; fill: var(--dace); font-weight: 600; }
.assign-side { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 14px; font-weight: 600; }
.slider span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--dace); }
.entropy { margin-top: 6px; }
.entropy-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.entropy-head b { font-variant-numeric: tabular-nums; }
.entropy-track {
  position: relative; height: 12px; border-radius: 999px; margin: 6px 0 4px;
  background: linear-gradient(90deg, #2A1D5C, #34618D 25%, #21908C 50%, #5DC863 75%, #FDE725);
}
.entropy-mark {
  position: absolute; top: -4px; width: 4px; height: 20px; border-radius: 2px; background: var(--ink);
  box-shadow: 0 0 0 2px #fff; transform: translateX(-50%); transition: left .08s;
}
.entropy-scale { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.assign-msg {
  font-size: 14.5px; color: var(--ink-2); background: #F7F9FA; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 4px 0 0; min-height: 64px;
}

.ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 4px 0 8px; }
.op { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.op img { width: 78%; margin: 0 auto 8px; height: auto; }
.op figcaption { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.op .katex-display { font-size: 13px; overflow-x: auto; overflow-y: hidden; }

.losses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 6px 0 18px; }
.loss { padding: 16px 18px; }
.loss p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin-bottom: 0; }
.loss-tag {
  display: inline-block; font-weight: 750; font-size: 13px; letter-spacing: .02em; color: var(--dace);
  margin-bottom: 6px;
}
/* ------------------------------------------------------------ gallery */
.gallery { padding: 16px 18px 18px; }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.thumb {
  font: inherit; text-align: left; padding: 0; border: 2px solid transparent; border-radius: 10px; background: none;
  cursor: pointer; overflow: hidden; transition: border-color .15s, transform .15s;
}
.thumb img { width: 100%; height: auto; aspect-ratio: 2.35 / 1; object-fit: cover; border-radius: 8px 8px 0 0; }
.thumb span { display: block; font-size: 12.5px; padding: 4px 6px 5px; color: var(--ink-2); line-height: 1.3; }
.thumb span b { display: block; font-size: 11px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.thumb:hover { transform: translateY(-1px); }
.thumb[aria-pressed="true"] { border-color: var(--dace); background: var(--dace-soft); }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ex-title { font-weight: 700; font-size: 17px; }
.ex-meta { font-size: 13.5px; color: var(--muted); }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.mini { margin: 0; }
.mini-img { position: relative; border-radius: 8px; overflow: hidden; background: #0E1A24; cursor: crosshair; }
.mini-img img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-select: none; }
.mini figcaption { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 5px; }
.sw-occ { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: #56B4E9; margin-right: 6px; vertical-align: -1px; }
#gallery-compare { cursor: ew-resize; }
#gallery-compare .tag-right { background: var(--dace); }
.gallery .mark {
  position: absolute; left: var(--fx, 50%); top: var(--fy, 50%); z-index: 3; width: 14px; height: 14px;
  border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px rgba(14, 26, 36, .8);
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
}
.gallery.marking .mark { opacity: 1; }
.gallery.marking .here .mark, .gallery.marking .here > .mark { opacity: 0; }
.gallery-hint { font-size: 13.5px; color: var(--muted); margin: 8px 0 4px; }
.ex-caption { margin: 2px 0 12px; font-size: 15px; color: var(--ink-2); }
.reading { margin-top: 6px; }
.reading-body { display: flex; gap: 18px; align-items: flex-start; margin-top: 10px; }
.reading-body canvas { flex: none; width: 132px; height: 132px; border-radius: 50%; }
.reading-body p { font-size: 14.5px; color: var(--ink-2); margin: 0; }

/* -------------------------------------------------------- conclusion */
.conclusion { font-family: var(--serif); font-size: 1.36rem; line-height: 1.55; margin: 0; }
.conclusion b { font-weight: 600; }
.bibtex { position: relative; padding: 0; overflow: hidden; }
.bibtex pre {
  margin: 0; padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.6;
  color: var(--ink); background: #F7F9FA;
}
.copy {
  position: absolute; top: 10px; right: 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 12px;
}
.copy:hover { border-color: var(--ink-2); color: var(--ink); }
.copy.done { background: var(--good); color: #fff; border-color: var(--good); }

.footer { border-top: 1px solid var(--line); padding: 22px 0 34px; font-size: 14px; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* --------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .losses { grid-template-columns: minmax(0, 1fr); }
  .camps { grid-template-columns: minmax(0, 1fr); }
  .camp-vs { justify-self: center; margin: -4px 0; }
  .thumbs { grid-template-columns: repeat(3, 1fr); }
  .toy-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 46px 0 40px; }
  .toy-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toy-stage { grid-template-columns: minmax(0, 1fr); }
  .toy-flow { max-width: 200px; }
  #toy-svg .note { font-size: 5.8px; }
  #toy-svg .still { font-size: 7px; }
  .ops { grid-template-columns: minmax(0, 1fr); }
  .op img { width: 60%; }
  .assign-layout { grid-template-columns: minmax(0, 1fr); }
  .fig { padding: 14px 12px 12px; }
  .compare .lens { display: none; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .su-ctx { border-left: 0; padding-left: 0; }
  .reading-body { flex-direction: column; align-items: center; }
  .brand { display: none; }
  .navlinks { margin-left: 0; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat-num { font-size: 2.1rem; }
  .thumbs { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .thumb { flex: 0 0 42%; scroll-snap-align: start; }
  .abstract p { text-align: left; }
  .compare .tag { font-size: 11px; }
  .toy-picker { gap: 8px; }
  .toy-card { grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; padding: 7px 8px; min-width: 0; }
  .toy-card img { width: 34px; height: 34px; }
  .toy-card-name { font-size: 13.5px; }
  .toy-card .verdict { flex-wrap: wrap; gap: 3px; }
  .toy-card .verdict span { font-size: 10.5px; }
  .camp-head { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .camp-fig svg { width: 64px; height: 64px; }
}
@media (hover: none) { .compare .lens { display: none; } }
