:root {
  --paper: #f3eee4;
  --sheet: #fbf7f0;
  --ink: #221e18;
  --muted: #6d655c;
  --line: #e3d6c4;
  --fair: #0f6b4c;
  --fair-soft: rgba(15, 107, 76, 0.13);
  --bell: #b64024;
  --red: #c43737;
  --blue: #2a5fd0;
  --green: #1d8644;
  --shadow: 0 1px 0 rgba(34, 30, 24, 0.04);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
a { color: var(--fair); text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
.skip {
  position: absolute; left: 12px; top: -40px; background: var(--ink); color: var(--sheet);
  padding: 6px 10px; z-index: 20;
}
.skip:focus { top: 8px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 22px 72px; }
.subnav {
  position: sticky; top: 0; z-index: 8;
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  margin: 0 -22px 18px; padding: 10px 22px;
  background: rgba(243, 238, 228, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  font-size: 14px;
}
.subnav a { color: var(--ink); text-decoration: none; }
.subnav a:hover { color: var(--fair); }
.subnav .now { margin-left: auto; color: var(--muted); }
.kicker {
  margin: 0 0 8px;
  font-family: "KaiTi", "STKaiti", "Kaiti SC", serif;
  letter-spacing: 0.08em;
  color: var(--muted);
}
h1 {
  margin: 0;
  max-width: 14em;
  font-family: Georgia, "Palatino Linotype", "Microsoft YaHei", serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.answer { max-width: 40em; font-size: 20px; margin: 16px 0 8px; }
.fine { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 22px; padding: 0; }
.facts div { border-top: 1px solid var(--ink); padding-top: 8px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 28px; line-height: 1.15; }
.facts small { display: block; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 12px; color: var(--muted); font-weight: 400; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; counter-reset: step; }
.steps li { background: var(--sheet); padding: 14px 14px 12px; border-top: 3px solid var(--ink); }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font-family: Georgia, serif; color: var(--muted); font-size: 13px; }
.steps b { display: block; margin: 2px 0 4px; }
.steps span { display: block; color: var(--muted); font-size: 14px; }
section { padding: 10px 0 34px; scroll-margin-top: 58px; }
.sec-h { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.sec-h span { font-family: Georgia, serif; font-style: italic; color: var(--muted); }
.sec-h h2 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -0.02em; }
.lead { margin-top: 8px; max-width: 44em; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin: 14px 0; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 7px 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.chart-scroll { overflow-x: auto; }
svg.chart { width: 100%; min-width: 760px; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; margin: 8px 0 4px; }
.sw { display: inline-block; width: 22px; height: 8px; margin-right: 6px; vertical-align: middle; }
.sw.fair { background: var(--fair); height: 3px; }
.sw.band { background: var(--fair-soft); border: 1px solid rgba(15,107,76,.35); height: 12px; }
.sw.bell { background: repeating-linear-gradient(90deg, var(--bell) 0 4px, transparent 4px 7px); height: 3px; }
.sw.bar { background: linear-gradient(90deg, var(--red), var(--blue), var(--green)); }
.inspector {
  display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center;
  min-height: 132px; margin: 8px 0 18px; padding: 12px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.replica {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  color: white; font-family: Georgia, "Times New Roman", serif; font-size: 32px;
}
.inspector h3 { margin: 0 0 4px; font-size: 22px; }
.inspector p { margin: 0; }
.board { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px 8px; }
.cell { text-align: center; }
.ball {
  width: 100%; aspect-ratio: 1; border: 0; border-radius: 50%; color: white; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0;
}
.ball .n { font-family: Georgia, "Times New Roman", serif; font-size: clamp(16px, 2.1vw, 26px); line-height: 1; }
.ball .c { font-size: 11px; opacity: 0.95; margin-top: 2px; }
.ball.red { background: var(--red); }
.ball.blue { background: var(--blue); }
.ball.green { background: var(--green); }
.ball.on { box-shadow: inset 0 0 0 3px white, 0 0 0 2px var(--ink); }
.ball:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--fair); outline-offset: 3px; }
.dev { display: block; margin-top: 4px; font-family: Georgia, serif; font-size: 12px; color: var(--muted); }
.dev.far { color: var(--ink); font-weight: 700; }
.dates { margin-top: 8px; color: var(--muted); font-size: 13px; }
.dates summary { cursor: pointer; color: var(--ink); }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 22px; align-items: start; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 650; }
td.num, th.num { text-align: right; font-family: Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
tr.on td { background: rgba(15, 107, 76, 0.08); }
.heat-scroll { overflow-x: auto; margin-top: 12px; }
.heat { display: grid; grid-template-columns: 108px repeat(49, minmax(12px, 1fr)); gap: 3px; min-width: 920px; align-items: center; }
.heat .ylab, .heat .xlab { font-size: 11px; color: var(--muted); }
.heat .xlab { text-align: center; font-family: Georgia, serif; }
.heat button { width: 100%; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; border-radius: 2px; }
.heat button.on { outline: 2px solid var(--bell); outline-offset: 1px; }
.scale { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.scale i { width: 120px; height: 10px; background: linear-gradient(90deg, #f4ecdf, #221e18); display: inline-block; }
.parade { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.parade span, .mini-ball {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  color: white; font-family: Georgia, serif; font-size: 13px;
}
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.miniwrap { position: relative; height: 128px; background: var(--sheet); border-top: 1px solid var(--line); }
.mini { height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.mini i { flex: 1 1 0; display: block; min-height: 1px; }
.exp-line { position: absolute; left: 0; right: 0; border-top: 2px solid var(--fair); pointer-events: none; }
.primary {
  background: var(--ink); color: var(--sheet); border: 0; border-radius: 999px;
  padding: 10px 16px; cursor: pointer;
}
.primary:hover { background: #3a332b; }
details { margin-top: 12px; }
details summary { cursor: pointer; font-weight: 650; }
.method { font-size: 15px; color: var(--ink); }
.method li { margin: 6px 0; }
footer {
  margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--ink);
  color: var(--muted); font-size: 14px;
}
footer strong { color: var(--ink); font-weight: 650; }
@media (max-width: 860px) {
  .facts, .steps, .split, .sim-grid { grid-template-columns: 1fr 1fr; }
  .steps, .split, .sim-grid { grid-template-columns: 1fr; }
  .subnav .now { margin-left: 0; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts dd { font-size: 22px; }
  .inspector { grid-template-columns: 72px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.replica {
  width: 100%;
  max-width: 84px;
  aspect-ratio: 1;
  height: auto;
}
.replica.red, .parade .red { background: var(--red); }
.replica.blue, .parade .blue { background: var(--blue); }
.replica.green, .parade .green { background: var(--green); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0 10px; }
.kpis div { background: var(--sheet); padding: 6px 8px 7px; }
.kpis b { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 600; line-height: 1.15; }
.kpis span { color: var(--muted); font-size: 12px; }
.inspector .say { margin-top: 2px; }
#rankTable tr { cursor: pointer; }
.heat .xlab { font-size: 8px; line-height: 1.1; }
.subnav a.active { font-weight: 700; color: var(--ink); }
svg.chart g.bar { cursor: pointer; }
svg.chart g.bar:hover rect.ink { stroke: #221e18; stroke-width: 1.25; }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; }
}



svg.chart text {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  fill: #6d655c;
}
svg.chart text.fair { fill: #0f6b4c; }
svg.chart text.bell { fill: #b64024; }
svg.chart text.ink { fill: #221e18; font-weight: 650; }
svg.chart text.axis { font-size: 11px; }
svg.chart text.xnum { font-size: 10px; }
.board { max-width: 560px; }
.mini i.red { background: #c43737; }
.mini i.blue { background: #2a5fd0; }
.mini i.green { background: #1d8644; }
.parade span { box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 0 0 1px rgba(34,30,24,.38); }
.heat .ylab { text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.heat .xlab.on { color: var(--ink); font-weight: 700; }
#tests { margin-top: 16px; }
#tests td:last-child { color: var(--muted); }
.inspector .say { max-width: 62em; }

.scroll-hint { display: none; }
@media (max-width: 900px) {
  .scroll-hint { display: block; }
}
