/* ============================================================
   CompliantWBC project page
   One typeface (Apple system sans), one accent (light blue),
   no cards, no rules beyond a single hairline per section.
   ============================================================ */

:root {
  --text: #10243f;            /* headings, body ink */
  --subtext1: #3f4a5a;
  --subtext0: #5b6675;        /* secondary body */
  --overlay2: #77818f;
  --overlay1: #8b95a2;        /* captions, notes */
  --overlay0: #a4adb8;        /* faintest labels */
  --surface1: #cfd6de;
  --base: #f4f6f8;

  --page-bg: #fdfaf6;
  --accent: #4a9fe0;          /* light blue — the only accent */
  --accent-ink: #1f6fae;      /* accent, darkened for small text */
  --accent-soft: rgba(74, 159, 224, 0.09);
  --line: rgba(16, 36, 63, 0.09);
  --line-strong: rgba(16, 36, 63, 0.16);

  --radius: 6px;

  /* body copy: Noto Sans; headings and titles: Google Sans */
  --sans: "Noto Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "Segoe UI", Roboto, system-ui, sans-serif;
  --display: "Google Sans", "Noto Sans", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco,
    "Cascadia Mono", "Liberation Mono", monospace;
  /* plots read this for canvas text; spelled out so getPropertyValue always
     hands the canvas a usable stack, never an unresolved var() */
  --plot-font: "Noto Sans", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--page-bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Brand ---------- */

.brand {
  display: flex;
  justify-content: center;
  margin: clamp(10px, 2vw, 24px) 0 0;
}

.brand-logo {
  font-family: "JetBrains Mono", var(--mono);
  font-weight: 350;
  font-size: clamp(40px, 7vw, 82px);
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-compliant { color: var(--accent); }
.brand-wbc { color: var(--text); }

/* ---------- Layout shell ---------- */

.page {
  padding: 26px 6vw 88px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
}

.content { display: flex; flex-direction: column; }
.content-inner { max-width: 1040px; margin: 0 auto; width: 100%; }

/* ---------- Sticky table of contents ---------- */

.page-toc { display: none; }

.page-toc-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--overlay0);
}

.page-toc-links { display: grid; gap: 7px; }

.page-toc-links a {
  width: fit-content;
  font-size: 13px;
  line-height: 1.45;
  color: var(--overlay1);
  transition: color 0.16s ease;
}

.page-toc-links a:hover { color: var(--subtext0); }
.page-toc-links a[aria-current="true"] { color: var(--accent-ink); font-weight: 500; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 600;
  line-height: 1.125;
  letter-spacing: -0.01em;
  margin: 18px auto 4px;
  max-width: 900px;
  text-align: center;
  text-wrap: balance;
}

.hero-actions { display: grid; margin: 20px 0 26px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.cta {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--subtext0);
  font-size: 13.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cta:hover { color: var(--text); border-color: var(--accent); }

.cta.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.cta.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

.hero-media { display: flex; justify-content: center; width: 100%; }

.video-frame {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: none;
}

.video-frame img, .video-frame video { width: 100%; display: block; }

.figure-caption {
  margin: 12px auto 0;
  max-width: 760px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--overlay1);
  text-align: center;
}

/* ---------- Section scaffolding ---------- */

.section {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 40px;
  padding-top: 48px;
  padding-bottom: 8px;
  scroll-margin-top: 24px;
}

/* Section titles sit centred over a centred column, with the spacing
   doing the dividing instead of a rule. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 6px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1.125;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- Running prose: justified both edges ---------- */

.abstract-text,
.lede,
.results-head p,
.contrib p,
.qual-desc,
.hw-stage-info p,
.note,
figure figcaption {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* captions that label a single clip stay centred */
.qual-compare figcaption,
.qual-multisite figcaption,
.figure-caption {
  text-align: center;
  hyphens: manual;
}

/* ---------- Abstract ---------- */

.abstract-text {
  margin: 0 auto;
  max-width: 900px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--subtext1);
}

/* ---------- Section lede + standalone section figures ---------- */

.lede {
  margin: 0 auto;
  max-width: 860px;
  font-size: 16px;
  line-height: 1.62;
  color: var(--subtext1);
}

.section > figure { margin: 6px 0 0; display: grid; gap: 12px; }

.section > figure img {
  width: 100%;
  display: block;
  border: none;
  border-radius: 0;
  background: none;
}

.section > figure figcaption,
figure figcaption {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--overlay1);
  max-width: 900px;
}

figure figcaption strong { color: var(--subtext0); font-weight: 600; }

/* ---------- Contribution cards ---------- */

.contrib-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contrib {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 251, 253, 0.952);
}

.contrib h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.contrib p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--subtext0); }

/* ---------- Result blocks ---------- */

.results-panel {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.results-panel + .results-panel { margin-top: 60px; }

.results-head { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }

.results-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.008em;
  text-align: center;
}

.results-head p { margin: 0; color: var(--subtext0); font-size: 15px; line-height: 1.58; }

/* ---------- Split layout: text beside a plot ---------- */

.method-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 28px;
  align-items: center;
}

.method-split .method-split-text { display: grid; gap: 12px; }
.method-split .method-split-text p { margin: 0; font-size: 15px; line-height: 1.58; color: var(--text); }

.method-split img, .method-split video {
  width: 100%;
  border-radius: var(--radius);
  border: none;
}

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

table.data th, table.data td {
  padding: 10px 10px;
  border-top: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

table.data thead th {
  border-top: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--overlay1);
  line-height: 1.3;
}

table.data th:first-child, table.data td:first-child { text-align: left; }

table.data tbody tr:first-child td { border-top: 1px solid var(--line-strong); }

table.data tr.ours td { background: var(--accent-soft); font-weight: 600; }

table.data .yes { color: var(--accent-ink); font-weight: 600; }
table.data .no { color: var(--overlay0); }

table.data td { white-space: nowrap; }
table.data td small { font-size: 0.8em; font-weight: 400; color: var(--overlay0); margin-left: 3px; }
table.data tr.subhead th { padding-top: 0; }

/* header: metric symbol on top, plain-English description below */
table.data thead th .sym {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
table.data thead th .sym sub, table.data thead th .sym sup { font-size: 0.62em; font-weight: 500; }
table.data thead th .sym i { font-style: italic; }

table.data tr.subhead th .desc {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--overlay1);
}
table.data tr.subhead th .unit {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--overlay0);
}

/* stray prose inside a panel keeps the same centred column as the heading */
.results-panel > p { max-width: 860px; margin-inline: auto; }

.note {
  margin: 0 auto;
  max-width: 860px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--overlay1);
}

/* Body copy from "What the Residual Actually Fixes" downwards reads at the
   same size as the abstract and the section ledes. */
.prose-lg .results-head p,
.prose-lg .method-split .method-split-text p,
.prose-lg .qual-desc,
.prose-lg .hw-stage-info p,
.prose-lg .note {
  font-size: 16px;
  line-height: 1.62;
}

/* ---------- Redrawn wrench-estimate figure ---------- */

.ampdir-figure { margin: 0; display: grid; gap: 12px; }

.ampdir-svg {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  background: none;
}

/* ---------- Interactive 3-D force-latent t-SNE ---------- */

.method-split--latent { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.method-split--latent .latent3d { aspect-ratio: 5 / 3; }

.latent3d-figure { margin: 0; display: grid; gap: 10px; }

.latent3d {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: none;
  overflow: hidden;
  touch-action: none;
}

.latent3d-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.latent3d-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.latent3d.is-dragging .latent3d-canvas { cursor: grabbing; }

.latent3d-legend {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  gap: 2px;
  padding: 6px 8px;
}

.latent3d-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 2px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--subtext0);
  line-height: 1.5;
}

.latent3d-legend-item.is-off { opacity: 0.3; }

.latent3d-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.latent3d-bar {
  position: absolute;
  left: 8px;
  bottom: 6px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.latent3d-hint { font-size: 11px; color: var(--overlay0); }

.latent3d-reset {
  pointer-events: auto;
  font-family: var(--sans);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  color: var(--overlay1);
  cursor: pointer;
}

.latent3d-reset:hover { color: var(--text); border-color: var(--accent); }

.latent3d-tip {
  position: absolute;
  transform: translate(12px, -50%);
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(16, 36, 63, 0.9);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Interactive joint-torque plot ---------- */

.torqueplot-figure {
  margin: 0 auto;
  display: grid;
  gap: 12px;
  width: 80%;
}
.torqueplot { display: grid; gap: 10px; }

.torqueplot-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 7;
  border-radius: var(--radius);
  background: none;
  overflow: hidden;
  touch-action: none;
}

.torqueplot-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.torqueplot-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.torqueplot-stage.is-dragging .torqueplot-canvas { cursor: grabbing; }

.torqueplot-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
}

.torqueplot-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; }

.torqueplot-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1px 2px;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--subtext0);
  line-height: 1.5;
}

.torqueplot-legend-item.is-off { opacity: 0.3; }

.torqueplot-swatch {
  width: 16px;
  height: 0;
  flex: none;
  border-top: 2px solid var(--swatch);
}

.torqueplot-swatch--force { border-top-style: dashed; }

.torqueplot-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.torqueplot-hint { font-size: 11px; color: var(--overlay0); }

.torqueplot-modes {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.torqueplot-modes button {
  font-family: var(--sans);
  font-size: 11px;
  padding: 3px 11px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--overlay1);
  cursor: pointer;
}

.torqueplot-modes button:hover { color: var(--text); }
.torqueplot-modes button.is-active { background: var(--accent); color: #fff; }

.torqueplot-reset {
  font-family: var(--sans);
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--overlay1);
  cursor: pointer;
}

.torqueplot-reset:hover { color: var(--text); border-color: var(--accent); }

.torqueplot-tip {
  position: absolute;
  transform: translate(12px, -50%);
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(16, 36, 63, 0.9);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.65;
  white-space: nowrap;
  pointer-events: none;
}

.torqueplot-tip.is-flipped { transform: translate(-100%, -50%) translateX(-12px); }

.torqueplot-key {
  display: inline-block;
  width: 12px;
  height: 0;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 2px solid var(--swatch);
}

/* ---------- Per-joint effort heatmap ---------- */

.heatmap-figure {
  margin: 0 auto;
  display: grid;
  gap: 10px;
  width: 88%;
}

.heatmap { display: block; width: 100%; }

.heatmap-stage { position: relative; width: 100%; }

.heatmap-canvas { display: block; width: 100%; cursor: crosshair; }

.heatmap-tip {
  position: absolute;
  transform: translate(12px, -50%);
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(16, 36, 63, 0.9);
  color: #fff;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.65;
  white-space: nowrap;
  pointer-events: none;
}

.heatmap-tip.is-flipped { transform: translate(-100%, -50%) translateX(-12px); }
.heatmap-tip-sat { color: #ff9aa1; }

.heatmap-figure figcaption { text-align: center; }

/* ---------- Qualitative video demos ---------- */

.qual-block { display: grid; gap: 8px; }
.qual-block + .qual-block { margin-top: 26px; }

.qual-title {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.qual-desc { margin: 0 0 4px; font-size: 14.5px; line-height: 1.55; color: var(--subtext0); }

.qual-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.qual-compare figure, .qual-multisite figure { margin: 0; display: grid; gap: 7px; }

.qual-compare video {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.qual-multisite { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 auto; }

.qual-multisite video {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: none;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.qual-compare figcaption, .qual-multisite figcaption {
  font-size: 12.5px;
  text-align: center;
  color: var(--overlay1);
}

/* ---------- Hardware gallery ---------- */

.hw-gallery { display: grid; gap: 16px; }

.hw-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.hw-thumb {
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--radius);
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  display: grid;
  align-content: start;
  opacity: 0.55;
  transition: opacity 0.16s ease;
}

.hw-thumb:hover, .hw-thumb.is-active { opacity: 1; }

.hw-thumb video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  pointer-events: none;
}

.hw-thumb-label {
  display: block;
  padding: 7px 2px 0;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--overlay1);
}

.hw-thumb.is-active .hw-thumb-label { color: var(--accent-ink); font-weight: 600; }

.hw-stage { display: grid; gap: 14px; }

.hw-stage-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: none;
  overflow: hidden;
  /* portrait clips (squat under payload) letterbox against black, not white */
  background: #000;
}

.hw-stage-video video { width: 100%; height: 100%; object-fit: contain; display: block; }

.hw-stage-info { display: grid; gap: 6px; max-width: 860px; }

.hw-stage-info h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.hw-stage-info p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--subtext0); }

/* ---------- Authors (hero line + photo grid; layout from CrossBFM) ---------- */

.hero-authors {
  margin: 14px auto 0;
  max-width: 900px;
  text-align: center;
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.8;
  color: var(--subtext0);
}

.hero-authors a { white-space: nowrap; color: var(--text); transition: color 0.15s ease; }
.hero-authors a:hover { color: var(--accent-ink); }
.hero-author-line { display: block; }
.hero-authors sup { font-size: 0.65em; margin-left: 1px; }

.hero-author-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--overlay1);
}

.hero-author-notes sup { margin-right: 2px; }

.author-grid,
.author-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px 18px;   /* 5 x 152 + 4 x 18 fits the ~900px content column */
}

.author-row { width: 100%; }

.author-card {
  width: 152px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--text);
}

.author-card img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface1);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.author-card:hover img,
.author-card:focus-visible img { border-color: var(--accent); transform: translateY(-2px); }

.author-name { font-size: 16px; font-weight: 500; line-height: 1.35; transition: color 0.15s ease; }
.author-card:hover .author-name { color: var(--accent-ink); }

.author-name sup,
.author-affiliations sup { font-size: 0.7em; color: var(--overlay1); }
.author-name sup { margin-left: 1px; }
.author-affiliations sup { margin-right: 2px; }

.author-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
  margin-top: 18px;
  font-size: 16px;
  color: var(--subtext0);
}

.author-notes { margin-top: -12px; font-size: 14.5px; color: var(--overlay1); }

@media (max-width: 1040px) {
  .author-grid, .author-row { gap: 32px 14px; }
  .author-card { width: 146px; }
  .author-card img { width: 116px; height: 116px; }
}

/* below this the two rows dissolve into one 3-column grid */
@media (max-width: 960px) {
  .author-row { display: contents; }
  .author-grid { max-width: 600px; margin: 0 auto; }
  .author-card { width: calc((100% - 28px) / 3); }
}

@media (max-width: 430px) {
  .author-grid { gap: 22px 8px; }
  .author-card { width: calc((100% - 16px) / 3); }
  .author-card img { width: 92px; height: 92px; }
  .author-name { font-size: 15px; }
  .author-affiliations { font-size: 14px; gap: 4px 14px; }
}

/* ---------- BibTeX ---------- */

.bibtex-panel { display: grid; gap: 10px; }

.bibtex-head { display: flex; align-items: center; justify-content: flex-end; }

.copy-btn {
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--overlay1);
  border-radius: 999px;
  padding: 5px 14px;
  font-family: var(--sans);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover { color: var(--text); border-color: var(--accent); }

pre.bibtex {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--base);
  border: none;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--subtext0);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
  justify-items: center;
  text-align: center;
}

.site-footer p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--overlay0); }
.site-footer a { color: var(--overlay1); }
.site-footer a:hover { color: var(--accent-ink); }

/* ---------- Responsive ---------- */

@media (min-width: 1400px) {
  .page { max-width: 1180px; padding-left: 160px; }
  .page-toc {
    display: block;
    position: fixed;
    left: max(20px, calc((100vw - 1180px) / 2));
    top: 50vh;
    transform: translateY(-50%);
    width: 124px;
    z-index: 3;
  }
  .page-toc-inner { display: grid; gap: 12px; }
}

@media (max-width: 820px) {
  .contrib-grid { grid-template-columns: 1fr; gap: 12px; }
  .method-split, .method-split--latent { grid-template-columns: 1fr; }
  .torqueplot-figure { width: 100%; }
  .heatmap-figure { width: 100%; }
}

@media (max-width: 620px) {
  .page { padding-inline: 20px; }
  .section { margin-top: 28px; padding-top: 36px; }
  .latent3d-legend { padding: 4px 6px; }
  .latent3d-legend-item { font-size: 11px; gap: 6px; }
  .torqueplot-figure { width: 100%; }
  .torqueplot-stage { aspect-ratio: 3 / 4; }
  .torqueplot-foot { justify-content: center; }
  .torqueplot-legend { justify-content: center; gap: 2px 12px; }
  .torqueplot-legend-item { font-size: 10.5px; gap: 6px; }
  .torqueplot-controls { margin: 0 auto; }
  .torqueplot-hint { display: none; }
  table.data { width: max-content; min-width: 100%; }
}
