/* =========================================================================
   HeadLight project page
   ========================================================================= */

:root {
  /* Warm "paper" palette */
  --ink: #1e1c19;            /* headings, emphasis */
  --ink-2: #37342f;          /* running text */
  --ink-soft: #57524a;       /* subtitles, ledes */
  --muted: #645e54;          /* captions, secondary */
  --line: #ebe4d2;           /* hairline */
  --line-strong: #d9d0bb;
  --bg: #fcf8eb;             /* page: slightly warm yellow */
  --bg-alt: #f6f0de;         /* alternate sections, wells */
  --surface: #ffffff;        /* cards, tables */
  --navy: #1f1c17;           /* dark chrome (BibTeX, tooltip) */
  --gold: #f5c242;
  --gold-ink: #8a5d00;
  --link: #a94e06;

  /* Head families (match paper figures) */
  --nih: #9333c4;
  --nih-soft: #f4ebfa;
  --mot: #2b9a48;
  --mot-soft: #e9f6ed;

  /* Chart series: validated categorical palette (light surface) */
  --c-base: #b9bdc8;
  --c-ft: #4a78c2;
  --c-lora: #c2577a;
  --c-hl: #c98a00;
  --c-rand: #b9bdc8;

  --radius: 14px;
  --maxw: 1120px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); line-height: 1.18; letter-spacing: -.01em; }
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
sup { font-size: .68em; line-height: 0; }
::selection { background: #f7dc8f; color: var(--ink); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Head-family text accents */
.c-nih { color: var(--nih); font-style: normal; font-weight: 600; }
.c-mot { color: var(--mot); font-style: normal; font-weight: 600; }

/* ============================== HERO ============================== */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(245, 194, 66, .22), transparent 70%),
    var(--bg);
  padding: 76px 0 64px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.beam {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    conic-gradient(from 104deg at 50% -8%, transparent 0deg, rgba(245, 194, 66, .20) 14deg, rgba(245, 194, 66, .06) 38deg, transparent 52deg);
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent 85%);
          mask-image: linear-gradient(180deg, #000 25%, transparent 85%);
  animation: sweep 9s ease-in-out infinite alternate;
  transform-origin: 50% 0;
}
@keyframes sweep {
  from { transform: rotate(-6deg); }
  to   { transform: rotate(6deg); }
}
@media (prefers-reduced-motion: reduce) { .beam { animation: none; } }

.hero-inner { position: relative; max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  margin: 0 0 20px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 7vw, 4.7rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .26em;
}
.lamp {
  width: .42em; height: .42em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d6, var(--gold) 55%, #d99a00);
  box-shadow: 0 0 18px 4px rgba(245, 194, 66, .6), 0 0 60px 16px rgba(245, 194, 66, .25);
  flex: none;
}
.lamp.small { width: 12px; height: 12px; box-shadow: 0 0 8px 2px rgba(245, 194, 66, .6); }
.subtitle {
  margin: 18px auto 0;
  max-width: 900px;
  font-family: var(--serif);
  font-size: clamp(1.22rem, 2.6vw, 1.6rem);
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-soft);
  text-wrap: balance;
}
.authors {
  list-style: none; padding: 0;
  margin: 2.1rem auto .5rem; max-width: 1000px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0 1.1rem;
  font-family: var(--serif);
  font-size: 1.17rem;
  line-height: 2.05;
  color: var(--ink);
}
.authors li { white-space: nowrap; }
.authors a { color: var(--ink); border-bottom: 1px solid var(--line-strong); }
.authors a:hover { color: var(--link); border-bottom-color: currentColor; text-decoration: none; }
.authors sup { color: var(--muted); }

/* Affiliation logos (logo + university name lockups) */
.affiliations {
  list-style: none; padding: 0; margin: 1.3rem auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 16px 36px;
  font-size: .93rem; color: var(--muted);
}
.affiliations li { display: inline-flex; align-items: flex-start; gap: 5px; }
.affiliations sup { font-size: .8rem; color: var(--muted); line-height: 1; }
.affiliations img { height: var(--logo-h, 40px); width: auto; display: block; }

.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-weight: 500; font-size: .93rem;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(32, 26, 18, .18); background: #000; }
.btn.is-pending { background: transparent; color: var(--muted); border-color: var(--line-strong); cursor: default; }
.btn.is-pending:hover { transform: none; box-shadow: none; background: transparent; }
.soon {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 999px; background: rgba(30, 28, 25, .07);
}

/* ============================== NAV ============================== */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 248, 235, .9);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
          backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-weight: 600; font-size: 20px; color: var(--ink);
}
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  white-space: nowrap;
  padding: 6px 12px; border-radius: 8px;
  font-size: .85rem; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { color: var(--bg); background: var(--ink); }

/* ============================== SECTIONS ============================== */
.section { padding: 76px 0 84px; border-top: 1px solid var(--line); }
main > .section:first-child { border-top: 0; }
.section.alt { background: var(--bg-alt); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.section-title::before {           /* short accent rule above each section title */
  content: ""; display: block;
  width: 46px; height: 3px; border-radius: 2px;
  background: var(--gold);
  margin-bottom: 18px;
}
.section-title + .lead { margin-top: 0; }
.sub-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-weight: 500;
  margin: 56px 0 14px;
}
.lead { font-size: 1.03rem; color: var(--ink-soft); max-width: 72ch; margin: 0 0 30px; }
.lead.small { font-size: 1rem; }

/* TL;DR + stats */
.tldr {
  font-size: 1.06rem; line-height: 1.72;
  margin: 0 0 34px;
  padding: 20px 24px;
  border-left: 4px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.tldr strong {
  display: inline-block; margin-right: 8px;
  font-size: .72rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-ink);
}
.tldr em { font-style: normal; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.stat {
  padding: 20px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.4rem; font-weight: 500; line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-num span { font-size: .6em; color: var(--muted); margin-left: 1px; }
.stat-num .arrow { font-size: .62em; margin: 0 4px; color: var(--muted); }
.stat-label { margin-top: 8px; font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.stat-delta { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--gold-ink); }

/* Figures */
.figure {
  margin: 0 0 40px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.figure img { width: 100%; height: auto; border-radius: 6px; }
.figure.flat { margin: 0; border: 0; padding: 0; background: transparent; }
.figure figcaption, .caption-out {
  margin-top: 14px; font-size: .875rem; line-height: 1.62; color: var(--muted);
}
.figure figcaption b { color: var(--ink); }

/* Abstract */
.abstract { max-width: 860px; }
.abstract p { margin: 0 0 16px; text-align: justify; hyphens: auto; color: var(--ink-2); font-size: 1.03rem; line-height: 1.72; }

/* ============================== HEAD FAMILIES ============================== */
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 34px; }
.family-grid > *, .two-col > *, .steps > * { min-width: 0; }   /* let wide content scroll instead of stretching the grid */
.family {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  display: flex; flex-direction: column;
}
.family.nih { --accent: var(--nih); --soft: var(--nih-soft); }
.family.mot { --accent: var(--mot); --soft: var(--mot-soft); }
.family header { margin-bottom: 14px; }
.family h3 { margin: 6px 0 0; font-family: var(--serif); font-size: 1.65rem; font-weight: 500; color: var(--accent); }
.family-sub { margin: 2px 0 0; color: var(--muted); font-style: italic; }
.family .tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--accent);
}
.family img { border-radius: 8px; margin-bottom: 14px; }
.family p { margin: 0 0 12px; font-size: 1rem; color: var(--ink-2); }
.family .note { font-size: .875rem; color: var(--muted); margin-top: auto; }
.eq {
  background: var(--soft);
  border-radius: 10px;
  padding: 4px 12px;
  margin: 2px 0 14px;
  overflow-x: auto;
  font-size: 15px;
}

/* ============================== TABS ============================== */
.tabs { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; }
.tab-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab-list button {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: 500 14.5px var(--sans); color: var(--muted);
  padding: 10px 14px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
}
.tab-list button:hover { color: var(--ink); }
.tab-list button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tab-list button:focus-visible, .seg button:focus-visible, .chip:focus-visible, .copy:focus-visible {
  outline: 2px solid #3554c4; outline-offset: 2px; border-radius: 6px;
}

/* ============================== METHOD ============================== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px 18px;
}
.step-n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 15px;
}
.steps h3 { margin: 12px 0 8px; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }
.steps p { margin: 0; font-size: .95rem; color: var(--ink-2); }

/* ============================== CARDS & CHARTS ============================== */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
}
.card h3 { margin: 0; font-family: var(--sans); font-size: 1.04rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-sub { margin: 4px 0 16px; font-size: .875rem; color: var(--muted); }
.card-foot { margin: 14px 0 0; font-size: .875rem; color: var(--muted); line-height: 1.62; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.two-col .card { margin-bottom: 0; }

.seg { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button {
  appearance: none; border: 0; cursor: pointer; background: transparent;
  font: 500 14px var(--sans); color: var(--muted);
  padding: 6px 14px; border-radius: 7px;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 25, 50, .12); }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-base { background: var(--c-base); }
.sw-ft { background: var(--c-ft); }
.sw-lora { background: var(--c-lora); }
.sw-hl { background: var(--c-hl); }

/* Horizontal bar chart */
.hbars { display: grid; gap: 10px; }
.hbars.compact { gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(130px, 210px) 1fr; align-items: center; gap: 14px; }
.hbars.compact .hbar { grid-template-columns: minmax(120px, 190px) 1fr; }
.hbar-label { font-size: 14px; color: var(--ink-2); text-align: right; line-height: 1.25; }
.hbar-label small { display: block; color: var(--muted); font-size: 12px; }
.hbar-track {
  position: relative; height: 26px;
  margin-right: 52px;                /* room for the value label */
  border-left: 1px solid #c9ccd6;
  cursor: default;
}
.hbars.compact .hbar-track { height: 22px; }
.hbar-track::before {               /* recessive gridlines, one per axis tick */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(90deg, transparent calc(100% - 1px), #eef0f5 calc(100% - 1px));
  background-size: var(--gstep, 20%) 100%;
  pointer-events: none;
}
.hbar-fill {
  position: absolute; left: 0; top: 3px; bottom: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--fill);
  width: 0;
  transition: width .7s cubic-bezier(.2, .8, .2, 1);
}
.hbar-err {
  position: absolute; top: 50%; height: 1.5px; background: rgba(22, 26, 43, .55);
  transform: translateY(-50%);
}
.hbar-err::before, .hbar-err::after {
  content: ""; position: absolute; top: -4px; width: 1.5px; height: 9px; background: rgba(22, 26, 43, .55);
}
.hbar-err::before { left: 0; } .hbar-err::after { right: 0; }
.hbar-val {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 13px; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  transition: left .7s cubic-bezier(.2, .8, .2, 1);
}
.hbar.is-hl .hbar-label { color: var(--ink); font-weight: 600; }
.hbar-track:hover .hbar-fill { filter: brightness(1.06) saturate(1.1); }
.hbar.divider { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.axis { display: grid; grid-template-columns: minmax(130px, 210px) 1fr; gap: 14px; font-size: 11.5px; color: var(--muted); }
.hbars.compact + .axis, .hbars.compact .axis { grid-template-columns: minmax(120px, 190px) 1fr; }
.axis-ticks { position: relative; height: 14px; margin-right: 52px; }
.axis-ticks span { position: absolute; transform: translateX(-50%); font-variant-numeric: tabular-nums; }

/* Vertical grouped bars (real robot) */
.vbar-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.vpanel h4 { margin: 0 0 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.vchart { position: relative; height: 230px; display: grid; grid-template-columns: 34px 1fr; }
.vaxis { position: relative; font-size: 11.5px; color: var(--muted); }
.vaxis span { position: absolute; right: 6px; transform: translateY(50%); font-variant-numeric: tabular-nums; }
.vplot { position: relative; border-bottom: 1px solid #c9ccd6; display: flex; justify-content: space-around; align-items: flex-end; padding: 0 4px; }
.vplot .gl { position: absolute; left: 0; right: 0; height: 1px; background: #eef0f5; }
.vgroup { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.vbar {
  position: relative; width: 34px;
  background: var(--fill);
  border-radius: 4px 4px 0 0;
  height: 0;
  transition: height .7s cubic-bezier(.2, .8, .2, 1);
}
.vbar span {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
}
.vbar:hover { filter: brightness(1.06) saturate(1.1); }
.vlabels { display: grid; grid-template-columns: 34px 1fr; }
.vlabels div { display: flex; justify-content: space-around; padding: 8px 4px 0; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }

/* Tables */
.table-toggle { margin-top: 22px; }
.table-toggle summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 10px; }
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  background: #fff;
}
table.data th, table.data td { padding: 9px 10px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-weight: 600; color: var(--ink-2); font-size: 13px; vertical-align: bottom; }
table.data td:first-child, table.data th:first-child { text-align: left; }
table.data tr.is-hl td { background: #fff8e6; }
table.data tr.is-hl td:first-child { font-weight: 600; }
table.data td b { color: var(--ink); }
table.data .pm { color: var(--muted); font-size: 12px; margin-left: 2px; }
table.data th.grp { border-bottom: 2px solid; }
th.c-nih-bg { color: var(--nih) !important; border-color: var(--nih) !important; }
th.c-mot-bg { color: var(--mot) !important; border-color: var(--mot) !important; }
table.data.compact { max-width: 760px; border: 1px solid var(--line); border-radius: 10px; }

/* ============================== ROLLOUT BROWSER ============================== */
.browser {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.task-picker {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.task-group { padding: 14px 18px; }
.task-group + .task-group { border-left: 1px solid var(--line); }
.group-label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; cursor: pointer;
  font: 500 14px var(--sans);
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: #c9ccd6; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.browser-body { padding: 20px 20px 22px; }
.instruction { margin: 0 0 14px; font-family: var(--serif); font-size: 1.3rem; font-style: italic; color: var(--ink); }
.instruction::before { content: "“"; color: var(--c-hl); font-weight: 700; margin-right: 2px; }
.instruction::after { content: "”"; color: var(--c-hl); font-weight: 700; margin-left: 2px; }
.frames { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.frames img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--bg-alt); animation: fadein .35s ease both; }
.frames img:nth-child(2) { animation-delay: .04s; } .frames img:nth-child(3) { animation-delay: .08s; }
.frames img:nth-child(4) { animation-delay: .12s; } .frames img:nth-child(5) { animation-delay: .16s; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.frame-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 2px 18px; }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.count-block h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.count-row { display: grid; grid-template-columns: 82px 1fr 46px; align-items: center; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.count-row .name { color: var(--ink-2); }
.count-row.is-hl .name { color: var(--ink); font-weight: 600; }
.dots { display: grid; grid-template-columns: repeat(20, 1fr); gap: 2px; }
.dots i { height: 10px; border-radius: 2px; background: #eceef3; }
.dots i.on { background: var(--fill); }
.count-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============================== BIBTEX ============================== */
.bib { position: relative; }
.bib pre {
  margin: 0;
  padding: 22px 24px;
  background: var(--navy);
  color: #e3e7f7;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.copy {
  position: absolute; top: 12px; right: 12px;
  appearance: none; cursor: pointer;
  font: 600 13px var(--sans);
  color: var(--navy); background: var(--gold);
  border: 0; border-radius: 8px; padding: 6px 14px;
}
.copy:hover { filter: brightness(1.05); }

/* ============================== FOOTER ============================== */
.footer { padding: 34px 0 46px; text-align: center; font-size: .875rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }
.footer .muted { color: var(--muted); font-size: 13px; }

/* ============================== TOOLTIP ============================== */
.tooltip {
  position: fixed; z-index: 100; pointer-events: none;
  background: var(--navy); color: #fff;
  font-size: 13px; line-height: 1.4;
  padding: 8px 11px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(10, 14, 30, .25);
  max-width: 260px;
}
.tooltip b { color: var(--gold); }

/* ============================== RESPONSIVE ============================== */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .family-grid, .two-col, .steps, .vbar-panels { grid-template-columns: 1fr; }
  .nav-brand { display: none; }
  .topnav-inner { justify-content: center; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 54px 0 60px; }
  .stat-num { font-size: 1.9rem; }
  .authors { gap: 0 .8rem; font-size: 1.08rem; line-height: 1.9; }
  .affiliations { gap: 12px 22px; }
  .affiliations img { height: calc(var(--logo-h, 40px) * .8); }
  .figure { padding: 10px; }
  .task-picker { grid-template-columns: 1fr; }
  .task-group + .task-group { border-left: 0; border-top: 1px solid var(--line); }
  .frames { grid-template-columns: repeat(3, 1fr); }
  .frames img:nth-child(2), .frames img:nth-child(4) { display: none; }   /* keep first, middle, last */
  .axis-ticks span:nth-child(even) { display: none; }
  .counts { grid-template-columns: 1fr; }
  .hbar, .axis { grid-template-columns: 110px 1fr !important; gap: 10px; }
  .hbar-label { font-size: 12.5px; }
  .vbar { width: 24px; }
  .vbar span { font-size: 10.5px; }
}
