/* ═══════════════════════════════════════════════════════════════
   A Qualitative Analysis of Common Practices in Annotations:
   A Taxonomy and Design Space
   A sibling of the Annotation Survey, Design, Strategies, and
   AnnoGram sites: paper on a quiet desk, Lora for reading, Inter
   for interface, hairline rules, one navy accent, one warm
   highlight. The paper's three questions keep one color each:
   Why? warm, How? navy, What? ochre.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #F5F4F0;
  --bg-2: #EFEDE7;
  --surface: #FBFAF7;
  --ink: #15171B;
  --ink-2: #3E4148;
  --ink-3: #5E6169;
  --line: #DCDAD2;
  --line-soft: #E8E6E0;
  --grid: rgba(21, 23, 27, 0.05);
  --accent: #24466F;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(36, 70, 111, 0.08);
  --accent-line: rgba(36, 70, 111, 0.28);
  --warm: #9E4E24;
  --warm-soft: rgba(158, 78, 36, 0.08);
  --highlight: rgba(214, 140, 72, 0.26);
  --scrim: rgba(21, 23, 27, 0.32);
  --glass: rgba(245, 244, 240, 0.88);
  --bar: #C9C6BD;

  /* the design space's three questions, used everywhere on the page */
  --c-how: #2A5B8C;
  --c-how-soft: rgba(42, 91, 140, 0.11);
  --c-why: #A04F27;
  --c-why-soft: rgba(160, 79, 39, 0.11);
  --c-what: #8A6510;
  --c-what-soft: rgba(138, 101, 16, 0.12);

  /* figures stay on paper in both themes */
  --paper: #FFFFFF;
  --paper-shadow:
    0 1px 1px rgba(21, 23, 27, 0.05),
    0 3px 8px -2px rgba(21, 23, 27, 0.07),
    0 14px 28px -12px rgba(21, 23, 27, 0.16);
  --paper-shadow-up:
    0 1px 1px rgba(21, 23, 27, 0.05),
    0 12px 22px -6px rgba(21, 23, 27, 0.10),
    0 34px 56px -22px rgba(21, 23, 27, 0.28);
  --sheet-shadow: 0 30px 80px -20px rgba(21, 23, 27, 0.35);

  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1240px;
  --gutter: 32px;
  --radius: 10px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E1013;
  --bg-2: #121519;
  --surface: #15181D;
  --ink: #ECEDEF;
  --ink-2: #C3C7CE;
  --ink-3: #8F959E;
  --line: #2A2E35;
  --line-soft: #1D2026;
  --grid: rgba(236, 237, 239, 0.045);
  --accent: #9DBBE0;
  --accent-ink: #0E1013;
  --accent-soft: rgba(157, 187, 224, 0.10);
  --accent-line: rgba(157, 187, 224, 0.32);
  --warm: #F0B07C;
  --warm-soft: rgba(240, 176, 124, 0.09);
  --highlight: rgba(240, 176, 124, 0.22);
  --scrim: rgba(4, 5, 7, 0.66);
  --glass: rgba(14, 16, 19, 0.86);
  --bar: #3A3F47;
  --c-how: #93B9E3;
  --c-how-soft: rgba(147, 185, 227, 0.15);
  --c-why: #EFAA7D;
  --c-why-soft: rgba(239, 170, 125, 0.15);
  --c-what: #E2C27A;
  --c-what-soft: rgba(226, 194, 122, 0.15);
  --paper: #F7F6F2;
  --paper-shadow:
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 6px 14px -4px rgba(0, 0, 0, 0.45),
    0 20px 40px -14px rgba(0, 0, 0, 0.6);
  --paper-shadow-up:
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 16px 28px -8px rgba(0, 0, 0, 0.5),
    0 44px 72px -24px rgba(0, 0, 0, 0.8);
  --sheet-shadow: 0 30px 90px -16px rgba(0, 0, 0, 0.8);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::selection {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
}

a {
  color: inherit;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  margin: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

html.has-modal {
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sep {
  color: var(--ink-3);
  opacity: 0.6;
  margin: 0 0.5em;
}

/* Underlines that draw in on hover */
.u {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--line), var(--line));
  background-size: 0% 1px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.45s var(--ease-out), color 0.2s ease;
}

.u:hover {
  background-size: 100% 1px, 100% 1px;
}

.u.quiet {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
}

.u.quiet:hover {
  background-size: 100% 1px;
}

.num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.9em;
  height: 1.9em;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}

.btn:hover {
  border-color: var(--ink-3);
  background: var(--accent-soft);
}

.btn:active {
  transform: translateY(1px);
}

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--solid:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  border-color: transparent;
}

html[data-theme="dark"] .btn--solid:hover {
  background: color-mix(in srgb, var(--accent) 86%, white);
}

.btn--ghost {
  border-color: transparent;
  color: var(--ink-2);
}

.btn--ghost:hover {
  border-color: var(--line);
}

.btn--small {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
}

.icon-btn svg,
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--line);
  color: var(--ink);
}

/* ── Top bar ──────────────────────────────────────────────────── */
.bar {
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  z-index: 2;
}

.bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  text-decoration: none;
  color: var(--ink);
}

.mark__glyph {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.mark__hl {
  fill: var(--highlight);
}

.bar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-2);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -6px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, transform 0.4s var(--ease-out);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.theme-toggle:active {
  transform: rotate(-20deg);
}

.theme-toggle .i-moon,
html[data-theme="dark"] .theme-toggle .i-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .i-moon {
  display: block;
}

/* ── Masthead ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 64px 0 72px;
  overflow: hidden;
}

/* the desk: a faint grid that fades out toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow .sep {
  margin: 0 0.6em;
}

.hero__title {
  max-width: 22ch;
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.hero__name {
  display: block;
  margin-bottom: 0.08em;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.hero__name b {
  font-weight: inherit;
  color: var(--accent);
}

.hero__title em {
  font-style: italic;
  letter-spacing: -0.03em;
}

/* the title annotates itself */
.marked {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.marked__word {
  position: relative;
}

.marked__band {
  position: absolute;
  left: -0.12em;
  right: -0.1em;
  top: 0.2em;
  bottom: 0.02em;
  border-radius: 0.08em 0.14em 0.1em 0.06em;
  background: var(--highlight);
  transform-origin: 0 50%;
}

.js .marked__band {
  transform: scaleX(0);
  animation: sweep 1.05s var(--ease-out) 0.8s forwards;
}

@keyframes sweep {
  to {
    transform: scaleX(1);
  }
}

.hero__authors {
  margin: 26px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

.hero__authors a {
  color: var(--ink-2);
}

.hero__authors a:hover {
  color: var(--ink);
}

.hero__authors a:first-child {
  color: var(--ink);
  font-weight: 500;
}

.hero__authors sup {
  margin-left: 1px;
  font-size: 0.7em;
  color: var(--ink-3);
}

.hero__equal {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px 88px;
  align-items: start;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.hero__lede p {
  max-width: 62ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero__lede strong {
  font-weight: 600;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* study at a glance */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, auto));
  gap: 0;
  margin: 0;
  min-width: 300px;
}

.stats div {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.stats div:nth-child(odd) {
  padding-right: 28px;
}

.stats div:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid var(--line-soft);
}

.stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stats dt {
  font-size: 12.5px;
  color: var(--ink-3);
}

.stats dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}

/* entry motion */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 80ms + 60ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

.js .in-view {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 70ms);
}

.js .in-view.is-in {
  opacity: 1;
  transform: none;
}

/* ── Sections ─────────────────────────────────────────────────── */
.sec {
  padding: 24px 0 112px;
  border-top: 1px solid var(--line-soft);
  outline: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 48px;
  padding: 48px 0 40px;
}

.section-head h2,
.cite h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.section-head h2 em,
.cite h2 em {
  font-style: italic;
}

.section-head__note {
  max-width: 50ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: pretty;
}

.section-head__note a {
  color: var(--ink-2);
}

.sub {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose {
  max-width: 60ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose + .prose {
  margin-top: 16px;
}

.prose strong {
  font-weight: 600;
  color: var(--ink);
}

.prose em {
  font-family: var(--serif);
  color: var(--ink);
}

/* paper sheet for figures */
.sheet {
  position: relative;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.sheet img {
  width: 100%;
  height: auto;
}

.js .sheet img {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.js .sheet img.is-loaded {
  opacity: 1;
}

.figcap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.figcap__n {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--warm);
}

.zoomable {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: zoom-in;
}

.zoomable .sheet {
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

@media (hover: hover) {
  .zoomable:hover .sheet {
    transform: translateY(-3px);
    box-shadow: var(--paper-shadow-up);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--ink);
}

.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.seg button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.seg button:hover {
  color: var(--ink);
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
/* ── Cite ─────────────────────────────────────────────────────── */
.cite {
  padding: 88px 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
}

.cite__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px 72px;
  align-items: start;
}

.cite__ref {
  max-width: 54ch;
  margin: 22px 0 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
}

.cite__more {
  max-width: 54ch;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-3);
}

.cite__more a {
  color: var(--ink-2);
}

.bib {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.bib__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.bib pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

/* ── Footer ───────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line-soft);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--ink-3);
}

.foot__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.foot p {
  margin: 0;
}

.foot__inner a {
  white-space: nowrap;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ── Full-size figure ─────────────────────────────────────────── */
.zoom {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.zoom[open] {
  animation: fade-in 0.3s ease;
}

.zoom::backdrop {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.zoom__stage {
  width: 100%;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  place-items: center;
  padding: 64px 24px calc(24px + env(safe-area-inset-bottom));
  cursor: zoom-out;
}

.zoom__stage img {
  max-width: 100%;
  max-height: 100%;
  padding: 2%;
  background: #fff;
  border-radius: 3px;
  box-shadow: var(--paper-shadow-up);
}

.zoom__close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  z-index: 2;
  border-color: var(--line);
  background: var(--surface);
}

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-out);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: 13.5px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}
/* ── Figure chrome shared by the animated figures ─────────────── */
.fig__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.fig__play {
  flex: none;
  border-color: var(--line);
}

.fig__play .i-play,
.is-paused .fig__play .i-pause {
  display: none;
}

.is-paused .fig__play .i-play {
  display: block;
}

.fig__cap {
  min-height: 3.1em;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
}

.fig__note {
  max-width: 82ch;
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: pretty;
}

.beats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beats button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px 0 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 0.3s, border-color 0.3s;
}

.beats .num {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
}

.beats button:hover {
  color: var(--ink);
}

.beats button.is-on {
  border-color: var(--line);
  color: var(--ink);
}

.beats button.is-on .num {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.beats button.is-done .num {
  color: var(--ink-2);
}
.hero__sub {
  max-width: 36ch;
  margin: 20px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 25px);
  line-height: 1.35;
  color: var(--ink-2);
  text-wrap: balance;
}

.method__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 80px;
}

.funnel {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the thread that runs through the steps */
.funnel::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 30px;
  bottom: 34px;
  width: 1px;
  background: var(--line);
}

.funnel li {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 0 0 22px;
}

.funnel li:last-child {
  padding-bottom: 0;
}

.funnel__n {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  min-width: 64px;
  padding: 2px 0;
  background: var(--bg);
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}

.funnel__n--step {
  width: 11px;
  min-width: 0;
  height: 11px;
  margin-top: 6px;
  padding: 0;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
}

.funnel__end .funnel__n {
  color: var(--warm);
}

.funnel p {
  margin: 0;
  padding-top: 4px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.funnel li:not(:has(.funnel__n--step)) p {
  padding-top: 9px;
}

.funnel strong {
  font-weight: 600;
  color: var(--ink);
}

.discuss {
  padding: 96px 0;
  border-top: 1px solid var(--line-soft);
}

.discuss__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px 96px;
  align-items: start;
}

.discuss__kicker {
  display: block;
  margin: 0 0 18px;
}

.discuss__quote {
  max-width: 20ch;
  font-family: var(--serif);
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.016em;
  text-indent: -0.42em;
  text-wrap: balance;
}

.discuss__quote em {
  font-style: italic;
  background: linear-gradient(transparent 52%, var(--highlight) 52%, var(--highlight) 92%, transparent 92%);
}

.discuss__attr {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--ink-3);
}

.discuss__text {
  max-width: 56ch;
  margin: 28px 0 0;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-2);
  text-wrap: pretty;
}

.limits {
  margin: 0;
  padding: 0;
  list-style: none;
}

.limits li {
  position: relative;
  padding: 13px 0 13px 22px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}

.limits li:first-child {
  border-top: 1px solid var(--line-soft);
}

.limits li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 23px;
  width: 7px;
  height: 1px;
  background: var(--ink-3);
}

.discuss__next {
  margin: 22px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-3);
}

.discuss__next a {
  color: var(--ink-2);
}

/* ── Cite ─────────────────────────────────────────────────────── */

/* ── Shared bits this page adds ───────────────────────────────── */
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 8px 8px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.seg--sm button {
  height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
}

.chip--sm {
  height: 30px;
  padding: 0 11px;
  gap: 6px;
  font-size: 12.5px;
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

/* the three questions keep their colors everywhere */
.q {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}

.q--why {
  color: var(--c-why);
}

.q--how {
  color: var(--c-how);
}

.q--what {
  color: var(--c-what);
}

/* tasks are set in the paper's typewriter voice */
.c-why {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--c-why);
}

.hero__lede .q {
  font-size: 1.04em;
}

/* type glyphs */
.ti {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ti .i-f {
  fill: currentColor;
  fill-opacity: 0.22;
}

.ti .i-soft {
  stroke-opacity: 0.45;
}

/* swatches for keys */
.kx {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 6px 0 0;
  border-radius: 3px;
  vertical-align: -1px;
  flex: none;
}

.kx--why {
  background: var(--c-why);
}

.kx--0 {
  border: 1px solid var(--line);
}

.kx--1 {
  background: color-mix(in srgb, var(--c-how) 26%, var(--surface));
}

.kx--2 {
  background: color-mix(in srgb, var(--c-how) 58%, var(--surface));
}

.kx--3 {
  background: var(--c-how);
}

.kx--w1 {
  background: color-mix(in srgb, var(--c-what) 22%, var(--surface));
}

.kx--w2 {
  background: color-mix(in srgb, var(--c-what) 50%, var(--surface));
}

.kx--w3 {
  background: var(--c-what);
}

/* glyphs drawn for this page */
.g-ax {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
}

.g-dot {
  fill: var(--ink-3);
}

.g-ring {
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.5;
}

.g-warmfill {
  fill: var(--warm);
}

.g-warm {
  fill: none;
  stroke: var(--warm);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.g-text {
  fill: var(--ink-2);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

/* Why/How/What rows under a chart, as the paper prints them */
.wtable {
  width: 100%;
  margin: 12px 0 0;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}

.wtable th {
  padding: 0 10px 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 400;
  text-align: left;
}

.wtable td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}

.wtable th:first-child,
.wtable td:first-child {
  width: 26%;
}

.wtable th:last-child,
.wtable td:last-child {
  width: 30%;
  padding-right: 0;
}

.wtable--lg {
  margin-top: 16px;
  font-size: 14px;
}

/* ── What counts as an annotation ─────────────────────────────── */
.defn {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}

.defn__quote {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  border-left: 2px solid var(--warm);
}

.defn__quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 22px);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: pretty;
}

.defn__attr {
  margin: 12px 0 0 24px;
  font-size: 13px;
  color: var(--ink-3);
}

.defn__parts {
  margin: 32px 0 0;
}

.defn__parts div {
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}

.defn__parts dt {
  font-size: 14.5px;
  font-weight: 600;
}

.defn__parts dd {
  margin: 4px 0 0;
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

.ba {
  margin: 0;
}

.ba__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ba__sheet {
  --p: 50%;
  padding: 3%;
}

.ba__art {
  position: relative;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.ba__art img {
  -webkit-user-drag: none;
  pointer-events: none;
}

.ba__art.is-dragging .ba__handle span {
  transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(158, 78, 36, 0.16), 0 2px 6px rgba(21, 23, 27, 0.18);
}

.ba__art > img,
.ba__over img {
  width: 100%;
  height: auto;
}

.ba__over {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--p));
}

.ba__handle {
  position: absolute;
  top: -2%;
  bottom: -2%;
  left: var(--p);
  width: 0;
  border-left: 1.5px solid #9E4E24;
  pointer-events: none;
}

.ba__handle span {
  position: absolute;
  top: 50%;
  left: -15px;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border: 1.5px solid #9E4E24;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(21, 23, 27, 0.18);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.ba__handle span::before,
.ba__handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border: solid #9E4E24;
  border-width: 0 0 1.5px 1.5px;
}

.ba__handle span::before {
  left: 7px;
  transform: rotate(45deg);
}

.ba__handle span::after {
  right: 7px;
  transform: rotate(-135deg);
}

.ba__tag {
  position: absolute;
  bottom: 100%;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5E6169;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ba__tag--l {
  left: 0;
}

.ba__tag--r {
  right: 0;
}

.ba__sheet {
  padding-top: 5%;
}

.ba.is-easing .ba__over,
.is-easing .ba__over {
  transition: clip-path 0.8s var(--ease-out);
}

.is-easing .ba__handle {
  transition: left 0.8s var(--ease-out);
}

/* the drag is handled by the page; the range stays for keyboards and screen readers */
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.ba__art:has(.ba__range:focus-visible) .ba__handle span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Seven types, on Fig. 4 ───────────────────────────────────── */
.anat {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: start;
}

.anat__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px 10px 44px;
  border-bottom: 1px solid var(--line);
}

.tlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.trow {
  display: grid;
  grid-template-columns: 22px minmax(0, 1.05fr) minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: none;
  text-align: left;
  transition: background-color 0.25s ease, opacity 0.3s ease;
}

.trow .ti {
  color: var(--ink-3);
  transition: color 0.25s ease;
}

.trow__name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.trow__bar {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: var(--line-soft);
  overflow: hidden;
}

.trow__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 3px;
  background: var(--bar);
  transition: background-color 0.25s ease;
}

.js .anat__list:not(.is-in) .trow__bar span {
  width: 0;
}

.js .anat__list.is-in .trow__bar span {
  transition: width 1s var(--ease-out) calc(0.25s + var(--i, 0) * 60ms), background-color 0.25s ease;
}

.trow__n {
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  text-align: right;
}

@media (hover: hover) {
  .trow:hover {
    background: var(--accent-soft);
  }

  .trow:hover .ti {
    color: var(--warm);
  }
}

.trow[aria-pressed="true"] {
  background: var(--warm-soft);
}

.trow[aria-pressed="true"] .ti {
  color: var(--warm);
}

.trow[aria-pressed="true"] .trow__bar span {
  background: var(--warm);
}

.tlist.has-on .trow[aria-pressed="false"] {
  opacity: 0.6;
}

.anat__fig {
  margin: 0;
}

.anat__fig .sheet {
  padding: 2% 2.5% 1.5%;
}

/* ── Fig. 4, redrawn ── */
.f4__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.f4__status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0;
  min-width: 0;
}

.f4__status strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
}

.f4__status span {
  font-size: 13px;
  color: var(--ink-3);
}

.f4__ctrl {
  display: flex;
  flex: none;
  gap: 4px;
}

.f4__ctrl .icon-btn {
  border-color: var(--line);
}

.f4__play .i-pause,
.f4__play.is-playing .i-play {
  display: none;
}

.f4__play.is-playing .i-pause {
  display: block;
}

.f4__play.is-playing {
  border-color: var(--warm);
  color: var(--warm);
}

.f4 {
  display: block;
  width: 100%;
  font-family: var(--sans);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.f4 text {
  font-family: var(--sans);
}

.f4-title {
  fill: #5E6169;
  font-weight: 500;
}

.f4-tick {
  fill: #6B6F76;
  font-variant-numeric: tabular-nums;
}

.f4-axt {
  fill: #4A4D54;
  font-weight: 600;
}

.f4-note,
.f4-legend {
  fill: #1F2328;
}

.f4-avg {
  fill: #B4533A;
  font-weight: 500;
}

.f4-avg--n {
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}

.f4-val {
  fill: #4A4D54;
  font-variant-numeric: tabular-nums;
}

.f4-data {
  transition: opacity 0.4s ease;
}

.f4.has-on .f4-data {
  opacity: 0.75;
}

.f4 .an {
  transition: opacity 0.45s var(--ease-out);
}

/* the others step back to faint ghosts, so the plain chart stays readable */
.f4 .an.is-ghost {
  opacity: 0.08;
}

/* glyphs are shapes in ink; the color layer tints them red and green */
.gl {
  fill: none;
  stroke: #1F2328;
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke 0.45s ease;
}

.gl--o {
  stroke-width: 1.7;
}

.f4.has-color .gl--x {
  stroke: #C23B30;
}

.f4.has-color .gl--o {
  stroke: #2F7D4E;
}

.f4 .an[data-t="color"] .tint {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.f4 .an[data-t="color"].is-on .tint {
  opacity: 1;
}

/* a soft warm halo under the annotation being shown */
.f4 .halo {
  fill: none;
  stroke: rgba(214, 140, 72, 0.26);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.f4 .halo--box,
.f4 .halo--dot {
  fill: rgba(214, 140, 72, 0.2);
  stroke: none;
}

.f4 .an.is-on .halo {
  opacity: 1;
}

.f4 .hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
  cursor: pointer;
}

.f4 .hit--fill,
.f4 rect.hit {
  fill: transparent;
  pointer-events: all;
}

.f4 .an.is-draw .draw {
  stroke-dasharray: 1;
  animation: f4-draw 0.75s var(--ease-out) both;
}

.f4 .an.is-draw .pop,
.f4 .an.is-draw .f4-note,
.f4 .an.is-draw .gl,
.f4 .an.is-draw .f4-legend {
  animation: f4-pop 0.5s var(--ease-out) both;
}

.f4 .an.is-draw .pop {
  animation-delay: 0.45s;
}

@keyframes f4-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

@keyframes f4-pop {
  from {
    opacity: 0;
  }
}

.f4-tag {
  pointer-events: none;
  animation: f4-tag 0.45s var(--ease-out) both;
}

.f4-tag rect {
  fill: #9E4E24;
}

.f4-tag text {
  fill: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@keyframes f4-tag {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.trow.is-hover {
  background: var(--accent-soft);
}

.anat__read {
  min-height: 6.4em;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.anat__read p {
  margin: 0;
  text-wrap: pretty;
}

.anat__def {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

.anat__def strong {
  font-weight: 600;
}

.anat__here {
  margin-top: 8px !important;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.anat__hint {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ── Three questions ──────────────────────────────────────────── */
.qs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 64px;
  padding: 0;
  list-style: none;
}

.qs__q {
  padding: 18px 32px 0 0;
  border-top: 2px solid currentColor;
}

.qs__q + .qs__q {
  padding-left: 32px;
}

.qs__k {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 32px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
}

.qs__q p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.qs__q strong {
  font-weight: 600;
  color: var(--ink);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gcard__art {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: 6%;
}

.gcard__art img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gcard__k {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.gcard__cap {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

/* ── The design space (Fig. 5) ────────────────────────────────── */
.ds {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ds__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.ds__task {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.ds__task .seg button[aria-pressed="true"]:not([data-task=""]) {
  background: var(--c-why);
  color: var(--surface);
}

.ds__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: stretch;
}

.mx-wrap {
  min-width: 0;
  padding: 24px 20px 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.mx-wrap.can-right {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}

.mx {
  --c: 29px;
  --lab: 124px;
  display: grid;
  grid-template-columns: var(--lab) repeat(4, var(--c)) 20px repeat(14, var(--c));
  grid-template-rows: auto 124px repeat(7, var(--c));
  gap: 4px;
  width: max-content;
  margin: 0 auto;
  /* room for the last rotated labels */
  padding-right: 44px;
}

.mx__grp {
  grid-row: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid currentColor;
  font-size: 12.5px;
  white-space: nowrap;
}

.mx__grp .q {
  font-size: 19px;
}

.mx__grp span:not(.q) {
  color: var(--ink-3);
}

.mx__grp--why {
  color: var(--c-why);
}

.mx__grp--how {
  color: var(--c-how);
}

.mx__corner {
  grid-row: 1;
  grid-column: 1;
}

.mx__corner--2 {
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
}

.mx__th {
  position: relative;
  grid-row: 2;
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.mx__th span {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: rotate(-62deg);
  transform-origin: 0 50%;
  white-space: nowrap;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mx__th i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.mx__th--why {
  color: var(--c-why);
  font-family: var(--mono);
  font-size: 12px;
}

.mx__th:hover span,
.mx__th.is-hi span {
  background: var(--accent-soft);
  color: var(--ink);
}

.mx__th--why:hover span,
.mx__th--why.is-hi span {
  background: var(--c-why-soft);
  color: var(--c-why);
}

.mx__th[aria-pressed="true"] span {
  font-weight: 600;
}

.mx__rh {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 8px 0 0;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: opacity 0.3s ease, color 0.2s ease;
}

.mx__rh .ti {
  color: var(--ink-3);
}

/* type names stay put while the chart types scroll past */
.mx__rh,
.mx__corner {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: -24px 0 0 var(--surface), 6px 0 0 var(--surface);
}

.mx__rh:hover .ti,
.mx__rh[aria-pressed="true"] .ti {
  color: var(--warm);
}

.mx__rh[aria-pressed="true"] span {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 94%, transparent 94%);
}

.mx__rh.is-dim {
  opacity: 0.38;
}

.mx__c {
  display: block;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.mx__c--why {
  border: 1px solid var(--line);
}

.mx__c--why.is-yes {
  border-color: transparent;
  background: var(--c-why);
}

.mx__c--how.l0 {
  background: radial-gradient(circle, var(--line) 0 1.6px, transparent 2.2px);
}

.mx__c--how.l1 {
  background: color-mix(in srgb, var(--c-how) 26%, var(--surface));
}

.mx__c--how.l2 {
  background: color-mix(in srgb, var(--c-how) 58%, var(--surface));
}

.mx__c--how.l3 {
  background: var(--c-how);
}

.mx__c.is-dim {
  opacity: 0.16;
}

.mx__c.is-pt {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink);
  transform: scale(1.06);
}

.js .ds:not(.is-in) .mx__c {
  opacity: 0;
  transform: scale(0.6);
}

.js .ds.is-in .mx__c {
  transition: opacity 0.5s ease, transform 0.6s var(--ease-out), box-shadow 0.25s ease;
}

.ds__read {
  min-width: 0;
  border-left: 1px solid var(--line-soft);
}

.ds__readbody {
  padding: 20px 22px 24px;
}

.ds__readbody.is-swap {
  animation: fade 0.4s var(--ease-out);
}

.rd__kind {
  margin: 0 0 6px;
}

.rd__kind .q {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.rd__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.rd__title .ti {
  width: 22px;
  height: 22px;
  color: var(--warm);
}

.rd__text {
  margin: 12px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.62;
  color: var(--ink);
  text-wrap: pretty;
}

.rd__text .kx {
  margin-right: 8px;
}

.rd__text--quiet {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink-2);
}

.rd__go {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
}

.rd__go .ti {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.rd__usage {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.rd__usage li {
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}

.rd__note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

.rd__sub {
  margin: 22px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.rd__sub .q {
  margin-right: 4px;
  font-size: 15px;
}

.bands__row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.5;
}

.bands__k {
  display: flex;
  align-items: baseline;
  color: var(--ink-3);
  white-space: nowrap;
}

.bands__v {
  color: var(--ink);
}

.srcline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.srcline__k {
  color: var(--ink-3);
}

.ds__key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 14px 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--ink-2);
}

.ds__keyset {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
}

.ds__keyset .label {
  margin-right: 10px;
}

.ds__keyset .kx + .kx,
.ds__keyset .kx:not(:first-of-type) {
  margin-left: 12px;
}

.ds__keyhint {
  margin-left: auto;
  font-style: italic;
  color: var(--ink-3);
}

/* What? */
.what {
  margin-top: 80px;
}

.what__head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 56px;
  align-items: baseline;
}

.what__head .sub .q {
  margin-right: 6px;
}

.srcs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.src {
  padding: 24px 32px 0 0;
}

.src + .src {
  padding-left: 32px;
  border-left: 1px solid var(--line-soft);
}

.src__n {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}

.src__n span {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  color: var(--ink-3);
}

.src__bar {
  position: relative;
  display: block;
  height: 4px;
  margin: 14px 0 18px;
  border-radius: 2px;
  background: var(--line-soft);
  overflow: hidden;
}

.src__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 2px;
  background: var(--c-what);
}

.js .src:not(.is-in) .src__bar span {
  width: 0;
}

.js .src.is-in .src__bar span {
  transition: width 1.1s var(--ease-out) 0.3s;
}

.src__name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  color: var(--c-what);
}

.src__def {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

.src__ex {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: pretty;
}

.t1 {
  margin-top: 56px;
  padding: 24px 24px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.t1__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.t1__title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.t1__sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

.t1__scroll {
  margin: 18px 0 0;
  overflow-x: auto;
}

.t1__table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.t1__table th[scope="row"] {
  padding: 0 14px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.t1__table td {
  height: 38px;
  padding: 0 8px;
  border-radius: 4px;
  text-align: center;
  color: var(--ink-2);
  transition: opacity 0.3s ease, box-shadow 0.25s ease;
}

.t1__table td.w1 {
  background: color-mix(in srgb, var(--c-what) 22%, var(--surface));
  color: var(--ink);
}

.t1__table td.w2 {
  background: color-mix(in srgb, var(--c-what) 50%, var(--surface));
  color: var(--ink);
}

.t1__table td.w3 {
  background: var(--c-what);
  color: var(--surface);
  font-weight: 600;
}

.t1__table td.w0 {
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.t1__th {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.t1__th .ti {
  color: var(--ink-3);
}

.t1__th:hover,
th.is-hi .t1__th {
  background: var(--accent-soft);
  color: var(--ink);
}

th.is-hi .t1__th .ti {
  color: var(--warm);
}

.t1__table.has-on td:not(.is-hi) {
  opacity: 0.4;
}

.t1__total th,
.t1__total td {
  font-size: 12.5px;
  font-weight: 400 !important;
  color: var(--ink-3) !important;
}

.t1__total td {
  height: 30px;
  box-shadow: none !important;
}

.t1__key {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.t1__key .kx:not(:first-child) {
  margin-left: 16px;
}

/* ── Ensembles ────────────────────────────────────────────────── */
.ens {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px 80px;
  align-items: start;
}

.combos {
  margin: 0;
  padding: 0;
  list-style: none;
}

.combos li {
  padding: 14px 0 15px;
  border-top: 1px solid var(--line-soft);
}

.combos li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.combo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.combo__n {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 82px;
}

.combo__parts {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.combo__t {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.combo__t .ti {
  width: 15px;
  height: 15px;
  color: var(--c-how);
}

.combo__plus {
  font-size: 13px;
  color: var(--ink-3);
}

.combos p {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.ens__note {
  margin: 18px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-3);
  text-wrap: pretty;
}

.deps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.deps li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line-soft);
}

.deps li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.deps__ill {
  width: 120px;
  height: 64px;
  overflow: visible;
}

.deps h4 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.deps__sym {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--warm);
}

.deps p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ── Case studies ─────────────────────────────────────────────── */
.cs {
  padding: 22px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cs__short {
  display: none;
}

.cs__intro {
  margin: 18px 0 24px;
}

.cs__kicker {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
}

.cs__kicker .sep {
  margin: 0 0.55em;
}

.cs__story {
  max-width: 68ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.cs__body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4.6fr);
  gap: 40px;
  align-items: start;
}

.cs__fig {
  margin: 0;
}

.cs__sheet {
  padding: 2.5%;
}

.cs__art {
  position: relative;
  display: grid;
}

.cs__art img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.js .sheet .cs__art img {
  transition: opacity 0.45s ease;
}

.js .sheet .cs__art img:not(.is-on) {
  opacity: 0;
}

/* holding the button shows the bare chart */
.js .sheet .cs__art.is-bare img {
  opacity: 0;
  transition-duration: 0.2s;
}

.js .sheet .cs__art.is-bare img:first-child {
  opacity: 1;
}

.cs__art.is-bare .cs__ov {
  opacity: 0;
}

/* outlines on the panel: what this step adds */
.cs__ov {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: opacity 0.2s ease;
}

.cs__veil {
  fill: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.cs__art.has-focus .cs__veil {
  opacity: 0.62;
}

.cs__mk {
  pointer-events: none;
}

.cs__mk.is-shown {
  pointer-events: auto;
  cursor: pointer;
}

/* outlines stay hidden; they flash once when a step opens, and return for the card in focus */
.cs__mk .mk {
  fill: none;
  stroke: #9E4E24;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cs__mk line.mk {
  stroke: rgba(214, 140, 72, 0.5);
  stroke-width: 7;
  stroke-linecap: round;
}

.cs__mk .mk-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 14;
  vector-effect: non-scaling-stroke;
}

.cs__mk.is-new .mk {
  animation: cs-flash 2.4s ease both;
}

@keyframes cs-flash {
  0% {
    opacity: 0;
  }

  18%,
  55% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.cs__mk.is-focus .mk {
  opacity: 1;
  animation: none;
}

.cs__ov .hole {
  fill: #000;
  stroke: #000;
  stroke-width: 2.4;
}

/* the steps, as a track under the chart */
.cs__track {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.cs__track::before,
.cs__track::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 12.5%;
  height: 2px;
  border-radius: 1px;
}

.cs__track::before {
  right: 12.5%;
  background: var(--line);
}

.cs__track::after {
  width: calc(75% * var(--p));
  background: var(--warm);
  transition: width 0.6s var(--ease-out);
}

.cs__track button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0 4px;
  border: 0;
  background: none;
  text-align: center;
}

.cs__dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1;
  color: var(--ink-3);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease-out);
}

.cs__lbl {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-3);
  transition: color 0.3s ease;
}

.cs__track button:hover .cs__dot {
  border-color: var(--ink-3);
  color: var(--ink);
}

.cs__track button:hover .cs__lbl {
  color: var(--ink);
}

.cs__track button.is-done .cs__dot {
  border-color: var(--warm);
  color: var(--warm);
}

.cs__track button.is-on .cs__dot {
  border-color: var(--warm);
  background: var(--warm);
  color: var(--surface);
  transform: scale(1.1);
}

.cs__track button.is-on .cs__lbl {
  color: var(--ink);
}

.cs__tools {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 12px;
}

.cs__hold {
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

.cs__hold:active {
  color: var(--warm);
}

.cs__fig .figcap {
  margin-top: 14px;
}

/* the reading beside the chart */
.cs__step.is-swap,
.cs__ens.is-swap {
  animation: fade 0.45s var(--ease-out);
}

.cs__title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.cs__text {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

.cs__ens {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.cs__ens li + li {
  border-top: 1px solid var(--line-soft);
}

.ens__card {
  display: block;
  width: 100%;
  margin: 0 -12px;
  width: calc(100% + 24px);
  padding: 14px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  transition: background-color 0.25s ease;
}

.ens__card:hover,
.ens__card.is-focus {
  background: var(--warm-soft);
}

.ens__why {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.ens__why .q {
  display: none;
}

.ens__why .c-why {
  font-size: 0.82em;
}

.ens__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.ens__meta .q {
  font-size: 13.5px;
}

.ens__how {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}

.ens__t {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ens__t .ti {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}

.ens__plus {
  color: var(--ink-3);
}

.ens__dot {
  margin: 0 4px;
  color: var(--ink-3);
}

.ens__src {
  color: var(--ink-2);
}

/* the longer reading opens only for the card in focus */
.ens__more {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s var(--ease-out);
}

.ens__more > span {
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}

.ens__card[aria-pressed="true"] .ens__more,
.ens__card.is-focus .ens__more {
  grid-template-rows: 1fr;
}

.ens__card[aria-pressed="true"] .ens__more > span,
.ens__card.is-focus .ens__more > span {
  padding-top: 8px;
}

/* ── Method ───────────────────────────────────────────────────── */
.ctypes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ctypes li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  height: 30px;
  font-size: 13.5px;
}

.ctypes__name {
  color: var(--ink-2);
  white-space: nowrap;
}

.ctypes__bar {
  position: relative;
  height: 12px;
}

.ctypes__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 0 3px 3px 0;
  background: var(--bar);
}

.ctypes__n {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  text-align: right;
}

.ctypes__note {
  margin: 16px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ── Discussion ───────────────────────────────────────────────── */
.uses {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.uses li {
  padding: 14px 0 15px;
  border-top: 1px solid var(--line-soft);
}

.uses h4 {
  font-size: 14.5px;
  font-weight: 600;
}

.uses p {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ── Scroll-linked reveals, where the browser supports them ──── */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head h2 {
      animation: head-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }

    .section-head__note {
      animation: head-in linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 32%;
    }
  }
}

@keyframes head-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

/* ═══ Responsive ═══════════════════════════════════════════════ */
@media (max-width: 1239px) {
  .ds__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ds__read {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .ds__readbody {
    max-width: 720px;
  }
}

@media (max-width: 1000px) {
  .hero__grid,
  .defn,
  .anat,
  .ens,
  .cs__body,
  .method__grid,
  .discuss__inner,
  .cite__inner,
  .what__head {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    max-width: 520px;
  }

  .defn,
  .anat {
    gap: 40px;
  }

  .anat__fig {
    order: -1;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* on narrower screens the chart stays in view while the cards scroll beneath it */
@media (max-width: 1000px) {
  .cs__fig,
  .cs__side {
    display: contents;
  }

  .cs__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .cs__track {
    order: 0;
    margin: 0 0 18px;
  }

  .cs__sheet {
    order: 1;
    position: sticky;
    top: 8px;
    z-index: 3;
  }

  .cs__step {
    order: 2;
    margin-top: 22px;
  }

  .cs__ens {
    order: 3;
  }

  .cs__tools {
    order: 1;
    position: relative;
    z-index: 3;
    margin: 0 0 4px;
  }

  .cs__fig .figcap {
    order: 5;
  }
}

@media (max-width: 760px) {
  .qs,
  .srcs {
    grid-template-columns: minmax(0, 1fr);
  }

  .qs__q,
  .qs__q + .qs__q {
    padding: 16px 0 20px;
  }

  .src,
  .src + .src {
    padding: 22px 0 24px;
    border-left: 0;
  }

  .src + .src {
    border-top: 1px solid var(--line-soft);
  }
}

@media (max-width: 700px) {
  :root {
    --gutter: 18px;
  }

  .bar__inner {
    height: 56px;
  }

  .bar__nav {
    gap: 16px;
  }

  .bar__nav a:not(.bar__ext) {
    display: none;
  }

  .mark span {
    font-size: 16px;
  }

  .hero {
    padding: 44px 0 52px;
  }

  .hero__title {
    font-size: clamp(31px, 8.8vw, 44px);
    line-height: 1.1;
  }

  .hero__grid {
    margin-top: 30px;
    padding-top: 26px;
  }

  .hero__lede p {
    font-size: 16px;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .hero__actions .btn--ghost {
    flex-basis: 100%;
    border-color: var(--line);
  }

  .stats {
    min-width: 0;
  }

  .stats dd {
    font-size: 30px;
  }

  .stats div:nth-child(odd) {
    padding-right: 16px;
  }

  .stats div:nth-child(even) {
    padding-left: 16px;
  }

  .sec {
    padding-bottom: 80px;
  }

  .section-head {
    padding: 40px 0 28px;
  }

  .ba__sheet,
  .anat__fig .sheet,
  .cs__sheet {
    margin: 0 calc(-1 * var(--gutter) + 6px);
  }

  .ba__top .seg {
    width: auto;
  }

  .trow {
    grid-template-columns: 20px minmax(0, 1.2fr) minmax(0, 1fr) 42px;
    gap: 10px;
    padding: 8px 4px;
  }

  .anat__head {
    padding-left: 34px;
  }

  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .ds,
  .t1,
  .cs {
    margin-left: calc(-1 * var(--gutter) + 6px);
    margin-right: calc(-1 * var(--gutter) + 6px);
  }

  .ds__bar {
    padding: 14px;
  }

  .ds__task,
  .ds__task .seg {
    width: 100%;
  }

  .ds__task .seg button {
    flex: 1 1 auto;
    padding: 0 6px;
  }

  .mx-wrap {
    padding: 18px 12px 14px;
  }

  .mx {
    --c: 27px;
    --lab: 104px;
    gap: 4px;
    margin: 0;
  }

  .mx__rh {
    gap: 7px;
    font-size: 13px;
  }

  .mx__rh .ti {
    width: 15px;
    height: 15px;
  }

  .mx__th {
    font-size: 11.5px;
  }

  .ds__readbody {
    padding: 18px 16px 22px;
  }

  .ds__key {
    padding: 12px 14px;
  }

  .ds__keyhint {
    margin-left: 0;
  }

  .t1 {
    padding: 20px 14px 14px;
  }

  .cs {
    padding: 16px 14px 20px;
  }

  .cs__top .seg {
    width: 100%;
  }

  .cs__long {
    display: none;
  }

  .cs__short {
    display: inline;
  }

  .cs__lbl {
    font-size: 11.5px;
  }


  .deps li {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ctypes li {
    grid-template-columns: 100px minmax(0, 1fr) 32px;
  }

  .discuss {
    padding: 72px 0;
  }

  .cite {
    padding: 64px 0;
  }

  .cite__ref {
    font-size: 16px;
  }

  .bib pre {
    font-size: 11.5px;
  }

  .foot__inner {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .marked__band {
    transform: none;
  }

  .js .in-view {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .bar,
  .hero__actions,
  .foot,
  .seg,
  .ds__bar {
    display: none !important;
  }

  .reveal,
  .in-view {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* on dark paper the lightest bands need a little more weight */
html[data-theme="dark"] .mx__c--how.l1,
html[data-theme="dark"] .kx--1 {
  background: color-mix(in srgb, var(--c-how) 36%, var(--surface));
}

html[data-theme="dark"] .mx__c--how.l2,
html[data-theme="dark"] .kx--2 {
  background: color-mix(in srgb, var(--c-how) 66%, var(--surface));
}

html[data-theme="dark"] .t1__table td.w1,
html[data-theme="dark"] .kx--w1 {
  background: color-mix(in srgb, var(--c-what) 30%, var(--surface));
}

/* ── Family: the way home and the sibling sites ───────────────────
   Shared by every annotation site on dilshadur.com. Keep identical. */
.bar__start {
  display: flex;
  align-items: center;
  min-width: 0;
}

.home {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  outline-offset: 3px;
  transition: transform 0.4s var(--ease-out), box-shadow 0.2s;
}

.home img {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 999px;
}

.home:hover {
  transform: translateX(-2px);
  box-shadow: 0 0 0 1px var(--line);
}

.bar__div {
  flex: none;
  width: 1px;
  height: 18px;
  margin: 0 14px;
  background: var(--line);
}

.bar__start .mark {
  min-width: 0;
}

.bar__start .mark span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family + .foot__inner {
  justify-content: flex-end;
}

.family {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 14px 40px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.family__home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.family__home img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
}

.family__home span {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--ease-out);
}

.family__home:hover span {
  background-size: 100% 1px;
}

.family__set {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.family__set a,
.family__set [aria-current] {
  font-size: 13.5px;
  white-space: nowrap;
}

.family__set [aria-current] {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.family__set [aria-current]::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--warm);
}

@media (max-width: 760px) {
  .family {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .family__set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: start;
    gap: 10px 16px;
  }

  .family__label {
    grid-column: 1 / -1;
  }
}

.bar__start + .bar__nav {
  flex: none;
}

.bar__inner:has(.bar__start) {
  gap: 16px;
}

@media (max-width: 600px) {
  .bar__start + .bar__nav .bar__ext {
    display: none;
  }
}

@media (max-width: 520px) {
  .bar__div {
    margin: 0 10px;
  }
}
