/* Synthetic Reference Audio, project page
   The four pipeline hues (spotting, generation, retrieval, placement) are those of the
   paper's figures, tuned for a dark ground. Teal doubles as the page's accent. */

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #080b10;
  --surface: #0d1218;
  --surface-2: #141b24;
  --ink: #eef3f6;
  --soft: #c4ced7;
  --mute: #94a1ae;
  --off: #6d7a87;
  --line: #1c2530;
  --line-strong: #2c3846;

  --accent: #5fd0c5;
  --accent-hi: #93e6dd;

  --in: #8d959e;  /* input: the silent picture */
  --sp: #5fd0c5;  /* spotting */
  --ge: #ecb651;  /* generation: the synthetic reference */
  --re: #f08a7f;  /* retrieval: recordings as found */
  --pl: #6ea8ea;  /* placement: recordings as placed */

  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 56px;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 460px at 50% -200px, rgba(95, 208, 197, 0.13), transparent 72%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hi); }

button { font: inherit; color: inherit; }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  padding: 10px 14px; border-radius: 8px;
  background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--bg); }

/* ---------- Title block ---------- */
.masthead { text-align: center; padding: clamp(36px, 6vw, 64px) 0 clamp(28px, 4vw, 40px); }

.venue {
  margin: 0;
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent);
}
.venue span { margin: 0 0.45em; }

h1 {
  margin: 18px 0 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -0.032em;
  text-wrap: balance;
}

.subtitle {
  max-width: 34ch; margin: 16px auto 0;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.1rem, 2.4vw, 1.55rem); line-height: 1.25; color: var(--soft);
  text-wrap: balance;
}

.authors, .affiliations { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.authors { margin: 28px 0 0; gap: 4px 30px; font-family: var(--display); font-weight: 500; font-size: 1.14rem; }
.affiliations { margin: 10px 0 0; gap: 2px 22px; font-size: 0.9rem; color: var(--mute); }
.authors sup, .affiliations sup { font-size: 0.62em; line-height: 0; color: var(--accent); }
.authors sup { margin-left: 3px; }
.affiliations sup { margin-right: 4px; }

.links { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 42px; padding: 0 18px 0 15px;
  border: 1.5px solid var(--accent); border-radius: 999px;
  color: var(--accent); background: transparent;
  font-family: var(--display); font-weight: 700; font-size: 0.8rem;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
a.btn:hover { background: var(--accent); color: var(--bg); }

.btn.is-off { border-color: var(--line-strong); color: var(--off); cursor: not-allowed; padding-right: 8px; }
.btn small {
  padding: 3px 9px; border-radius: 999px; background: var(--surface-2);
  font-family: var(--body); font-weight: 500; font-size: 0.7rem;
  letter-spacing: 0.02em; text-transform: none; color: var(--off);
}

figcaption { margin-top: 12px; font-size: 0.84rem; line-height: 1.5; color: var(--mute); }
figcaption b { font-weight: 600; color: var(--soft); }

/* ---------- The method as a timeline ---------- */
.hero { margin-block: 0; }
.hero figcaption { max-width: 96ch; margin-inline: auto; text-align: center; }

.pipeline {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: clamp(16px, 2.2vw, 28px);
  overflow-x: auto;
}
.lanes {
  display: grid; grid-template-columns: 196px minmax(0, 1fr);
  column-gap: 22px; row-gap: 18px; align-items: center;
  min-width: 900px;
}

/* lane titles */
.ll { display: grid; gap: 3px; padding-left: 12px; border-left: 3px solid var(--in); }
.ll .k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--in); }
.ll b { font-family: var(--display); font-weight: 600; font-size: 0.98rem; line-height: 1.22; }
.ll .sub { font-family: var(--mono); font-size: 0.68rem; line-height: 1.45; color: var(--mute); }
.ll.sp { border-left-color: var(--sp); } .ll.sp .k { color: var(--sp); }
.ll.ge { border-left-color: var(--ge); } .ll.ge .k { color: var(--ge); }
.ll.re { border-left-color: var(--re); } .ll.re .k { color: var(--re); }
.ll.pl { border-left-color: var(--pl); } .ll.pl .k { color: var(--pl); }

.lt { position: relative; }

.frames { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong); }
.frames img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* spotting: markers as in a DAW, a flag at the start and a shaded range for the event */
.lt.mks { height: 66px; }
.mk, .atmo {
  position: absolute;
  background: rgba(95, 208, 197, 0.13);
  border-left: 2px solid var(--sp); border-radius: 0 5px 5px 0;
  color: var(--accent-hi); font-family: var(--mono); font-size: 0.7rem;
}
.mk { top: 8px; height: 35px; padding: 3px 4px 0 6px; line-height: 1.22; overflow: hidden; }
.mk::before {
  content: ""; position: absolute; left: -6px; top: -7px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--sp);
}
.lt.mks .mk { overflow: visible; }
.atmo { left: 0; right: 0; bottom: 0; height: 18px; padding-left: 6px; line-height: 18px; background: rgba(95, 208, 197, 0.08); white-space: nowrap; overflow: hidden; }

/* tracks and clips */
.lt.tracks { display: grid; gap: 5px; }
.trk { position: relative; height: 40px; border-radius: 5px; background: rgba(255, 255, 255, 0.035); }
.trk.sm { height: 32px; }

.cl {
  position: absolute; top: 0; bottom: 0; overflow: hidden;
  padding: 2px 4px; display: flex; flex-direction: column;
  border-radius: 4px; transition: opacity 0.15s ease;
}
.cl span { position: relative; z-index: 2; font-family: var(--mono); font-size: 0.66rem; line-height: 1.25; white-space: nowrap; }
.cl .wave { position: relative; flex: 1; min-height: 0; margin: 2px 0 1px; display: flex; align-items: center; gap: 1px; }
.cl .wave i { flex: 1; min-height: 1px; border-radius: 1px; }

.cl.ge { border: 1.5px dashed var(--ge); background: rgba(236, 182, 81, 0.10); color: #f6d596; }
.cl.ge .wave i { background: var(--ge); }
.cl.re { border: 1px solid var(--re); background: rgba(240, 138, 127, 0.13); color: #f9c3bc; }
.cl.re .wave i { background: var(--re); }
.cl.pl { border: 1px solid var(--pl); background: rgba(110, 168, 234, 0.17); color: #c6dcf8; }
.cl.pl .wave i { background: var(--pl); }

/* retrieval: the whole file; what placement cuts away lies pale behind cut lines */
.cl .veil { position: absolute; top: 0; bottom: 0; z-index: 1; background: rgba(13, 18, 24, 0.68); }
.cl .veil.l { left: 0; border-right: 1.3px dashed var(--re); }
.cl .veil.r { right: 0; border-left: 1.3px dashed var(--re); }

/* placement: fades at the clip edges, scissors where pieces were spliced */
.cl.pl .wave::before, .cl.pl .wave::after { content: ""; position: absolute; top: -1px; bottom: -1px; width: 8px; background: #c6dcf8; }
.cl.pl .wave::before { left: -4px; clip-path: polygon(0 100%, 1.2px 100%, 100% 0, calc(100% - 1.2px) 0); }
.cl.pl .wave::after { right: -4px; clip-path: polygon(0 0, 1.2px 0, 100% 100%, calc(100% - 1.2px) 100%); }
.cut {
  position: absolute; top: -10px; z-index: 3; transform: translateX(-50%);
  display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); color: var(--pl); font-family: 'Segoe UI Symbol', 'Apple Symbols', sans-serif; font-size: 12px; line-height: 1;
}

/* pointing at one event dims the others, in every lane */
.lanes [data-ev] { transition: opacity 0.15s ease; }
.lanes:has([data-ev="bird"]:hover)    [data-ev]:not([data-ev="bird"]),
.lanes:has([data-ev="wings"]:hover)   [data-ev]:not([data-ev="wings"]),
.lanes:has([data-ev="rustle"]:hover)  [data-ev]:not([data-ev="rustle"]),
.lanes:has([data-ev="grass"]:hover)   [data-ev]:not([data-ev="grass"]),
.lanes:has([data-ev="yawn"]:hover)    [data-ev]:not([data-ev="yawn"]),
.lanes:has([data-ev="sniff"]:hover)   [data-ev]:not([data-ev="sniff"]),
.lanes:has([data-ev="flutter"]:hover) [data-ev]:not([data-ev="flutter"]),
.lanes:has([data-ev="amb"]:hover)     [data-ev]:not([data-ev="amb"]):not(img) { opacity: 0.22; } /* the ambience runs under every frame */

/* ---------- Sticky section navigation ---------- */
.sitenav {
  position: sticky; top: 0; z-index: 10;
  margin-top: clamp(28px, 4vw, 44px);
  background: rgba(8, 11, 16, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
}
.sitenav-inner {
  display: flex; align-items: center; gap: 4px; height: var(--nav-h);
  overflow-x: auto; scrollbar-width: none;
}
.sitenav-inner::-webkit-scrollbar { display: none; }

.sitenav a {
  flex: none; display: inline-flex; align-items: baseline; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  font-family: var(--display); font-weight: 500; font-size: 0.9rem;
  color: var(--soft); text-decoration: none; white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.sitenav a:hover { color: var(--ink); }
.sitenav a.is-current { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.sitenav .num { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; }
.sitenav .n-sp { color: var(--sp); } .sitenav .n-ge { color: var(--ge); }
.sitenav .n-re { color: var(--re); } .sitenav .n-pl { color: var(--pl); }

.stepper { flex: none; display: flex; align-items: center; margin-inline: auto; padding-inline: 8px; }
.stepper .dash { flex: none; width: 14px; height: 1px; background: var(--line-strong); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(56px, 8vw, 96px); }

.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px;
  padding-top: 22px; margin-bottom: 28px;
  border-top: 1px solid var(--line-strong);
}
h2 {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.25rem); line-height: 1.1; letter-spacing: -0.02em;
}
.section-head p { margin: 0; font-size: 0.95rem; color: var(--mute); }

.intro { max-width: 70ch; margin: 0 0 28px; color: var(--soft); }
.nb { white-space: nowrap; }

/* The first section sits directly under the navigation bar, which already draws a rule. */
#abstract { padding-top: clamp(40px, 5vw, 60px); }
#abstract .section-head { padding-top: 0; border-top: 0; }

/* ---------- Abstract ---------- */
.abstract { columns: 2; column-gap: 48px; font-size: 1.04rem; line-height: 1.68; }
.abstract p { margin: 0; }
.abstract em { font-style: normal; color: var(--accent-hi); }

/* ---------- Listen: one picture, three soundtracks ---------- */
.ex-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.ex-head .intro { margin: 0; }

/* with several examples the script shows one at a time and adds these arrows */
.ex-nav { display: flex; align-items: center; gap: 10px; }
.ex-nav button {
  display: grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1.5px solid var(--accent); border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ex-nav button:hover { background: var(--accent); color: var(--bg); }
.ex-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ex-count { min-width: 3.4em; text-align: center; font-family: var(--mono); font-size: 0.8rem; color: var(--mute); font-variant-numeric: tabular-nums; }

.examples { display: grid; gap: clamp(36px, 5vw, 56px); }

.example { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.example[hidden] { display: none; }

.ex-stage { position: relative; border-radius: 14px 14px 0 0; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.ex-video { width: 100%; aspect-ratio: 16 / 9; background: #000; cursor: pointer; }
.ex-big {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(8, 11, 16, 0.72); color: var(--ink); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.ex-big:hover { transform: scale(1.06); background: rgba(8, 11, 16, 0.86); }
.ex-big svg { width: 30px; height: 30px; margin-left: 4px; fill: currentColor; }
.example.is-playing .ex-big { display: none; }

.ex-now {
  position: absolute; left: 12px; top: 12px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid currentColor;
  background: rgba(8, 11, 16, 0.78);
  font-family: var(--display); font-weight: 700; font-size: 0.66rem; line-height: 1.3;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--in);
}
.example[data-on="gen"] .ex-now { color: var(--ge); border-style: dashed; }
.example[data-on="lib"] .ex-now { color: var(--pl); }

.ex-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line);
}
.ex-pp { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; }
.ex-pp:hover { background: var(--line-strong); }
.ex-pp svg { width: 15px; height: 15px; fill: currentColor; }
.ex-pp .i-pause, .example.is-playing .ex-pp .i-play { display: none; }
.example.is-playing .ex-pp .i-pause { display: block; }
.ex-seek { flex: 1; min-width: 0; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.ex-time { flex: none; font-family: var(--mono); font-size: 0.76rem; color: var(--mute); font-variant-numeric: tabular-nums; }

/* the switch: what is audible */
.ex-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 0 0 14px 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.ex-switch button {
  position: relative; display: grid; gap: 2px; padding: 15px 14px 13px; border: 0; background: var(--surface); cursor: pointer; text-align: left;
  --stage: var(--in);
  transition: background-color 0.15s ease;
}
.ex-switch [data-set="gen"] { --stage: var(--ge); }
.ex-switch [data-set="lib"] { --stage: var(--pl); }
.ex-switch button:hover { background: var(--surface-2); }
.ex-switch .k { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--off); }
.ex-switch b { font-family: var(--display); font-weight: 600; font-size: 0.98rem; line-height: 1.2; color: var(--soft); }
.ex-switch [aria-checked="true"] { background: var(--surface-2); }
.ex-switch [aria-checked="true"] b { color: var(--ink); }
.ex-switch [aria-checked="true"] .k { color: var(--stage); }

/* the bar on top of the stage that is audible: full while paused, filling up while its pass runs */
.ex-switch [aria-checked="true"]::before, .ex-switch [aria-checked="true"]::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; background: var(--stage); }
.ex-switch [aria-checked="true"]::before { width: 100%; opacity: 0.28; }
.ex-switch [aria-checked="true"]::after { width: 100%; }
.example.is-playing .ex-switch [aria-checked="true"]::after { width: calc(var(--p, 0) * 100%); }

.ex-text h3 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.15; letter-spacing: -0.012em; }
.ex-text > p { margin: 10px 0 0; font-size: 0.97rem; line-height: 1.6; color: var(--soft); }
.ex-text .credit { font-size: 0.8rem; color: var(--mute); }

/* a long list of events scrolls inside the example, so every example is about as tall as its player */
.ex-scroll { margin-top: 18px; max-height: 292px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; border-bottom: 1px solid var(--line); }
.ex-events { width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.4; }
.ex-events caption { position: sticky; top: 0; z-index: 1; padding-bottom: 8px; background: var(--bg); text-align: left; font-family: var(--display); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.ex-events th, .ex-events td { padding: 8px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.ex-events th { width: 38%; padding-right: 14px; font-weight: 500; color: var(--ink); }
.ex-events th small { display: block; font-family: var(--mono); font-size: 0.7rem; font-weight: 400; color: var(--mute); }
.ex-events td { color: var(--soft); }
.ex-events td.none { color: var(--ge); }
.ex-events .t { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--mute); }

.examples-empty {
  display: grid; place-items: center; min-height: 180px; padding: 24px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 14px;
}
.examples-empty p { margin: 0; max-width: 52ch; font-family: var(--display); font-weight: 500; color: var(--off); }

/* ---------- Method: four stages, two per row ---------- */
.stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.stage { padding: 26px 28px 28px; background: var(--bg); }
.stage-no { margin: 0; font-family: var(--display); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }
.stage h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.1; letter-spacing: -0.012em; }
.stage .lead { margin: 12px 0 0; font-size: 1.08rem; line-height: 1.4; font-weight: 500; }
.stage .detail { margin: 10px 0 0; font-size: 0.97rem; line-height: 1.64; color: var(--soft); }
.stage.sp .stage-no { color: var(--sp); } .stage.ge .stage-no { color: var(--ge); }
.stage.re .stage-no { color: var(--re); } .stage.pl .stage-no { color: var(--pl); }

.shot { margin: clamp(32px, 4vw, 48px) 0 0; }
.shot img { width: 100%; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }

/* ---------- The tool ---------- */
.overview { margin: 0; }
.video-frame { border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.overview figcaption { text-align: center; }

.modes { margin-top: clamp(36px, 5vw, 56px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3.6vw, 44px) clamp(24px, 3.2vw, 40px); }
.mode { margin: 0; }
.mode .video-frame { border-radius: 12px; }
.mode-no { margin: 18px 0 0; font-family: var(--display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.mode h3 { margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.012em; }
.mode p.desc { margin: 8px 0 0; font-size: 0.97rem; line-height: 1.6; color: var(--soft); }

/* ---------- The study ---------- */
.facts { margin: 0 0 28px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.facts > div { padding: 20px 24px 22px; background: var(--surface); }
.facts dt { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.facts dd { margin: 8px 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--mute); }

.findings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 32px); }
.finding { padding-top: 18px; border-top: 3px solid var(--line-strong); }
.finding .k { margin: 0; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
.finding h3 { margin: 8px 0 0; font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.012em; }
.finding p.body { margin: 10px 0 0; font-size: 0.97rem; line-height: 1.64; color: var(--soft); }
.finding.sp { border-top-color: var(--sp); } .finding.sp .k { color: var(--sp); }
.finding.re { border-top-color: var(--re); } .finding.re .k { color: var(--re); }
.finding.pl { border-top-color: var(--pl); } .finding.pl .k { color: var(--pl); }

.note { max-width: 86ch; margin: 28px 0 0; font-size: 0.84rem; line-height: 1.6; color: var(--mute); }

/* ---------- Open source ---------- */
.repos { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.repos a {
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: 8px 24px; align-items: baseline;
  padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: background-color 0.15s ease;
}
.repos a:hover { background: var(--surface); }
.repos .name { font-family: var(--mono); font-size: 0.95rem; color: var(--accent); }
.repos a:hover .name { color: var(--accent-hi); }
.repos .what { font-size: 0.97rem; color: var(--soft); }
.repos .where { font-family: var(--display); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--mute); white-space: nowrap; }
.repos .where::after { content: " \2197"; }

.install { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.install p { margin: 0; max-width: 62ch; font-size: 0.92rem; line-height: 1.55; color: var(--mute); }

/* ---------- Cite ---------- */
.cite-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: clamp(24px, 3.2vw, 40px); row-gap: clamp(56px, 8vw, 96px); }
.cite-block { display: flex; flex-direction: column; min-width: 0; }

.bibtex { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bibtex pre { margin: 0; padding: 24px; overflow-x: auto; font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; color: var(--soft); }
.bibtex code { font-family: inherit; }

.copy {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--bg); color: var(--soft); cursor: pointer;
  font-family: var(--display); font-weight: 500; font-size: 0.8rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy:hover, .copy.is-done { color: var(--accent); border-color: var(--accent); }
.copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.acks p { margin: 0; font-size: 0.97rem; line-height: 1.64; color: var(--soft); }
.acks p + p { margin-top: 12px; }

/* ---------- Footer ---------- */
.footer { margin-top: clamp(64px, 9vw, 112px); padding: 36px 0 56px; border-top: 1px solid var(--line-strong); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 40px; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 44px; }
.logos a { display: block; opacity: 0.92; transition: opacity 0.15s ease; }
.logos a:hover { opacity: 1; }
.logos img { width: auto; }
.logo-hff { height: 45px; }
.logo-lmu { height: 55px; }
.footer p { margin: 0; max-width: 64ch; font-size: 0.8rem; line-height: 1.6; color: var(--mute); text-align: right; }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .example { grid-template-columns: minmax(0, 1fr); }
  .ex-scroll { max-height: none; border-bottom: 0; }
  .findings { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .abstract { columns: 1; }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .cite-grid { grid-template-columns: minmax(0, 1fr); }
  .stepper { margin-inline: 0; }
  .repos a { grid-template-columns: minmax(0, 1fr) auto; }
  .repos .what { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
  /* The method figure scrolls sideways: each lane's title sits above its tracks and stays in view. */
  .lanes { grid-template-columns: minmax(0, 1fr); min-width: 760px; row-gap: 8px; }
  .ll { position: sticky; left: 0; justify-self: start; width: max-content; max-width: calc(100vw - 2 * var(--gutter) - 34px); margin-top: 12px; }
  .ll:first-child { margin-top: 0; }
  .ll .sub { display: none; }
}

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

@media (max-width: 1160px) {
  /* The navigation scrolls sideways once it no longer fits: fade the edges as a hint. */
  .sitenav-inner {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
    padding-inline: 8px;
  }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .masthead { padding: 28px 0 24px; }
  h1 { margin-top: 14px; }
  .subtitle { margin-top: 10px; }
  .authors { margin-top: 20px; gap: 2px 18px; font-size: 1rem; }
  .affiliations { margin-top: 8px; gap: 0 14px; font-size: 0.82rem; }
  .links { margin-top: 20px; gap: 8px; }
  .btn { height: 38px; gap: 7px; padding: 0 13px 0 11px; font-size: 0.7rem; letter-spacing: 0.1em; }
  .btn.is-off { padding-right: 13px; }
  .btn svg { width: 15px; height: 15px; }
  .btn small { display: none; }
  .pipeline, .video-frame { border-radius: 10px; }
  .hero figcaption { text-align: left; }
  .stage { padding: 22px 20px 24px; }
  .ex-switch button { padding: 13px 10px 11px; }
  .ex-switch b { font-size: 0.86rem; }
  .ex-switch .k { font-size: 0.58rem; letter-spacing: 0.08em; }
  .ex-big { width: 60px; height: 60px; }
  .facts > div { padding: 16px 16px 18px; }
  .bibtex pre { padding: 56px 18px 20px; font-size: 0.76rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer p { text-align: left; }
  .logos { flex-wrap: nowrap; gap: 8vw; }
  .logo-hff { height: 34px; }
  .logo-lmu { height: 42px; }
}

/* ---------- QR code to the paper, in the corner of the window ---------- */
.qr-corner { position: fixed; right: 18px; bottom: 18px; z-index: 30; }
.qr-corner summary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 15px 0 12px; list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(13, 18, 24, 0.92); color: var(--soft);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.qr-corner summary::-webkit-details-marker { display: none; }
.qr-corner summary svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qr-corner summary:hover, .qr-corner[open] summary { border-color: var(--accent); color: var(--accent); }
.qr-card {
  position: absolute; right: 0; bottom: 48px; width: 239px; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}
.qr-card img { display: block; width: 205px; height: 205px; max-width: none; border-radius: 6px; } /* 5 px per module: stays crisp */
.qr-card p { margin: 12px 0 0; display: grid; gap: 3px; }
.qr-card b { font-family: var(--display); font-size: 0.88rem; color: var(--ink); }
.qr-card .url { font-family: var(--mono); font-size: 0.66rem; color: var(--accent); white-space: nowrap; }
.qr-card small { margin-top: 5px; font-size: 0.72rem; line-height: 1.45; color: var(--mute); }
.qr-card a { color: var(--accent); }
@media (max-width: 760px) { .qr-corner { display: none; } } /* nothing to scan on the phone itself; the Paper button stays */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .sitenav, .links, .copy, .skip, .ex-big, .ex-bar, .ex-switch, .ex-nav, .qr-corner { display: none; }
  body { background: #fff; color: #000; }
}
