:root {
  --bg: #ffffff;
  --bg-alt: #f5f8f5;
  --ink: #1b2024;
  --muted: #5a646b;
  --line: #e2e8e3;
  --accent: #2ea24c;
  --accent-ink: #1c7536;
  --accent-soft: #e8f5eb;
  --radius: 14px;
  --maxw: 1040px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1240px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 52px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav .wrap::-webkit-scrollbar { display: none; }
.nav .brand { font-weight: 800; color: var(--ink); margin-right: auto; }
.nav .brand span { color: var(--accent); }
.nav a { font-size: 14.5px; font-weight: 600; color: var(--muted); }
.nav a:hover { color: var(--accent-ink); text-decoration: none; }

/* header */
header.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.hero h1 .flash { color: var(--accent); }
.hero .subtitle { margin: 14px auto 0; max-width: 780px; font-size: clamp(18px, 2.4vw, 25px); font-weight: 600; line-height: 1.35; color: #30383e; }
.authors { margin: 28px auto 0; max-width: 880px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 17.5px; }
.authors span { white-space: nowrap; }
.authors sup, .affils sup { font-size: 0.7em; color: var(--muted); margin-left: 1px; }
.affils { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; color: var(--muted); font-size: 16px; }
.affils .note { width: 100%; font-size: 14px; }

.buttons { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15.5px;
  border: 1px solid var(--ink);
}
.btn:hover { background: #000; text-decoration: none; }
.btn svg { width: 17px; height: 17px; fill: currentColor; }
.btn.disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; }

/* sections */
section { padding: 52px 0; }
section.alt { background: var(--bg-alt); }
h2 { margin: 0 0 18px; font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; text-align: center; }
h3 { margin: 40px 0 10px; font-size: 22px; font-weight: 700; line-height: 1.3; }
h3:first-child { margin-top: 0; }
.lead { max-width: 820px; margin: 0 auto 26px; text-align: center; color: #3a4349; font-size: 18px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }

/* media */
.media-card { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.media-card.flat { border: none; }
figure { margin: 0; }
figcaption { margin-top: 10px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
figcaption b { color: var(--ink); }
.figure-img { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }

.hero-video { margin-top: 36px; }
.hero-video video { width: 100%; height: auto; }

.video-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 12px 34px rgba(18, 40, 25, 0.14); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }

/* stats */
.tldr { max-width: 860px; margin: 0 auto; text-align: center; font-size: 19px; }
.tldr b { color: var(--accent-ink); }
.stats { margin: 28px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 900px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; }
.stat .num { font-size: 38px; font-weight: 800; color: var(--accent); line-height: 1.1; letter-spacing: -0.02em; }
.stat .lbl { margin-top: 6px; font-size: 14.5px; color: var(--muted); line-height: 1.45; }


/* clip grids */
.clips { display: grid; gap: 12px; }
.clips.c2 { grid-template-columns: repeat(2, 1fr); }
.clips.c3 { grid-template-columns: repeat(3, 1fr); }
.clip video { width: 100%; height: auto; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.clip .cap { margin-top: 6px; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.35; }
.clip .cap b { display: block; color: var(--ink); font-weight: 600; }
.component > .clip { width: 100%; max-width: 460px; justify-self: center; }

/* method components */
.component { display: grid; grid-template-columns: 5fr 6fr; gap: 28px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line); }
.component:first-of-type { border-top: none; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.component > * { min-width: 0; }
.component h4 { margin: 0 0 8px; font-size: 21px; line-height: 1.3; }
.component p { color: #3a4349; }
.eq { overflow-x: auto; overflow-y: hidden; padding: 4px 0; font-size: 15.5px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 8px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h4 { margin: 6px 0 8px; font-size: 20px; }
.card p { margin: 0; color: #3a4349; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { font-size: 13.5px; font-weight: 600; border-radius: 999px; padding: 3px 11px; background: var(--accent-soft); color: var(--accent-ink); }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 15px; }
th, td { padding: 9px 12px; text-align: center; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 700; border-bottom: 2px solid var(--ink); background: #fafbfa; }
tbody tr.group td { text-align: left; font-style: italic; color: var(--muted); padding-top: 14px; border-top: 1px solid var(--line); }
tbody tr.ours td { background: var(--accent-soft); font-weight: 700; }
td b { font-weight: 800; }
.metric-note { margin-top: 10px; font-size: 14px; color: var(--muted); }

.findings { margin: 18px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; }
.findings li { position: relative; padding-left: 18px; font-size: 15.5px; color: #3a4349; }
.findings li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }

/* real world */
.real-head { display: grid; grid-template-columns: 110px repeat(3, 1fr); gap: 12px; margin-bottom: 6px; font-size: 14.5px; font-weight: 700; text-align: center; }
.real-row { display: grid; grid-template-columns: 110px repeat(3, 1fr); gap: 12px; align-items: center; margin-bottom: 12px; }
.real-row .task { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.real-row video { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

/* bibtex */
.bibtex { position: relative; }
.bibtex pre { margin: 0; padding: 20px 22px; background: #f3f5f4; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; font-size: 13.5px; line-height: 1.6; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.copy { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 10px; font: 600 13px "Open Sans", sans-serif; color: var(--muted); cursor: pointer; }
.copy:hover { color: var(--accent-ink); }

footer { padding: 30px 0 40px; text-align: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

@media (max-width: 860px) {
  .component { grid-template-columns: 1fr; gap: 16px; }
  .cards, .findings, .split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  header.hero { padding-top: 36px; }
  .authors { font-size: 16px; gap: 2px 14px; }
  .stats { grid-template-columns: 1fr; }
  .eq { font-size: 13px; }
  .clips.c3 { gap: 6px; }
  .clip .cap { font-size: 12px; }
  .real-head, .real-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .real-head .spacer { display: none; }
  .real-head { font-size: 12px; }
  .real-row .task { grid-column: 1 / -1; margin-top: 8px; }
  section { padding: 40px 0; }
  .figure-img { padding: 6px; }
}
