:root {
  color-scheme: light;
  --ink: #1c2330;
  --muted: #5b6577;
  --line: #e3e7ee;
  --wash: #f5f7fa;
  --accent: #3d74cc;
  --accent-ink: #2a5aa8;
  --pink: #e8298a;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }

/* header */
header.hero { padding: 64px 0 28px; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -0.02em; font-weight: 750; }
.hero h1 .logo { display: block; margin: 0 auto; height: clamp(54px, 9vw, 86px); width: auto; }
.hero .sub { margin: 12px auto 0; font-size: clamp(19px, 2.6vw, 26px); color: var(--ink); font-weight: 500; max-width: 760px; line-height: 1.3; }
.hero .who { margin: 20px 0 0; color: var(--muted); font-size: 16.5px; line-height: 1.7; }
.hero .authors { color: var(--ink); font-size: 19px; font-weight: 600; }
.buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.98rem;
}
a.btn:hover { background: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--muted); border: 1.5px dashed #b9c4cd; cursor: default; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

nav.toc { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
nav.toc ul { display: flex; gap: 22px; justify-content: center; margin: 0; padding: 11px 20px; list-style: none; overflow-x: auto; white-space: nowrap; font-size: 15px; }
nav.toc a { color: var(--muted); text-decoration: none; font-weight: 600; }
nav.toc a:hover { color: var(--accent-ink); }

section { padding: 44px 0 8px; }
h2 { font-size: clamp(25px, 3.4vw, 33px); letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 14px; text-wrap: balance; }
h3 { font-size: 22px; margin: 44px 0 6px; letter-spacing: -0.005em; }
h4 { font-size: 18px; margin: 30px 0 2px; }
p { margin: 0 0 14px; }
.lead { color: var(--muted); max-width: 820px; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: 14.5px; margin-top: 10px; max-width: 900px; }
.framed { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }

.tldr { margin: 30px 0 0; max-width: 900px; font-size: clamp(18px, 2.1vw, 21px); line-height: 1.55; }
.tldr b { color: var(--accent-ink); letter-spacing: 0.04em; margin-right: 6px; }

/* rotating results */
.task { margin-top: 26px; }
.task p { color: var(--muted); font-size: 15.5px; margin: 0 0 10px; max-width: 820px; }
.strip { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.strip-inner { min-width: 660px; }
.strip-inner.c7 { min-width: 910px; }
.strip.wide { width: min(1500px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); }
.cols { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; font-size: 13.5px; font-weight: 650; color: var(--muted); }
.cols .group { grid-column: span 2; padding: 8px 0 2px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); border-bottom: 2px solid #d5e2f6; margin: 0 14px; }
.c7 .cols { grid-template-columns: repeat(7, 1fr); }
.c7 .cols .group.q { grid-column: span 5; }
.strip .c7 img { aspect-ratio: 7 / 1; }
.cols .group.q { grid-column: span 3; border-bottom-color: var(--line); color: var(--muted); }
.cols .name { padding: 6px 0 2px; }
.cols .ours { color: var(--ink); }
.strip img { width: 100%; aspect-ratio: 5 / 1; }
.strip picture + picture img { border-top: 1px solid var(--wash); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin: 10px 0 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 7px 12px; text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-size: 13.5px; color: var(--muted); font-weight: 650; border-bottom: 1px solid var(--line); background: var(--wash); }
thead tr:first-child th { border-bottom: 0; padding-bottom: 0; }
tbody tr + tr td { border-top: 1px solid #eef1f5; }
tbody tr.sep td { border-top: 1px solid #c9d1dc; }
tr.ours td { background: #eef4fd; }
tr.ours td:first-child { font-weight: 700; }
td b { font-weight: 750; }
.note { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 900px; }

pre { max-width: 820px; background: var(--wash); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0; }
footer { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  header.hero { padding-top: 40px; }
  nav.toc ul { justify-content: flex-start; }
}
