:root {
  --ink: #1b1b1b;
  --ink-2: #444;
  --ink-3: #777;
  --rule: #e3e3e3;
  --paper: #ffffff;
  --panel: #f6f6f4;
  --accent: #b5121b;
  --serif: 'Times New Roman', Times, serif;
  --sans: Helvetica, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  margin: 0;
  padding: 60px 30px;
}

.main-content { max-width: 960px; margin: 0 auto; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
a { color: var(--ink); }

/* ---------- side nav ---------- */
.side-nav {
  position: fixed;
  top: 40px;
  left: 32px;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 10;
}
.side-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.side-nav a {
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 300;
  border-left: 1px solid transparent;
  padding-left: 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: color .2s ease, border-color .2s ease;
}
.side-nav-num { font-size: 9px; color: #aaa; letter-spacing: .5px; }
.side-nav a:hover, .side-nav a.active { color: var(--ink); border-left-color: var(--ink); font-weight: 400; }
@media (max-width: 1280px) { .side-nav { display: none; } }

/* ---------- header ---------- */
.org-logo { height: 34px; display: block; margin-bottom: 26px; }
.hero-text { font-size: 64px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; margin: 0 0 14px; }
.hero-sub { font-size: 26px; line-height: 1.3; margin: 0 0 26px; color: var(--ink-2); }
.authors { font-family: var(--sans); line-height: 1.6; margin-bottom: 30px; }
.authors p { margin: 0; }
.author-list { font-size: 15px; }
.author-list .core .name { font-weight: 700; }
.affiliation-list { font-size: 13px; color: #555; }

.teaser-frame { margin: 0 0 10px; background: #000; }
#teaser-video { width: 100%; display: block; }

.link-row { font-family: var(--sans); font-size: 16px; text-align: center; margin: 26px 0 44px; }
.link-row a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  margin: 0 22px;
  transition: opacity .15s ease;
}
.link-row a:hover { opacity: .6; }
.link-row a.soon { color: #aaa; border-bottom-color: #ccc; cursor: default; }
.link-row a.soon::after { content: " (soon)"; font-size: 12px; }

/* ---------- stats ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 30px;
}
.stat { padding: 18px 14px 18px 0; }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--rule); }
.stat-num { font-size: 40px; font-weight: 700; letter-spacing: -.5px; }
.stat-label { font-family: var(--mono); font-size: 12px; color: var(--ink-2); line-height: 1.4; margin-top: 4px; }
@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---------- sections ---------- */
.section { font-size: 20px; line-height: 1.7; margin-bottom: 40px; scroll-margin-top: 30px; }
.section p { margin: 0 0 18px; }
.tagline { margin: 64px 0 24px; font-size: 44px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.tldr { font-size: 28px; line-height: 1.4; }

details.abstract { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 8px 0 24px; }
details.abstract summary {
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 12px 0;
  list-style: none;
}
details.abstract summary::-webkit-details-marker { display: none; }
details.abstract summary::before { content: '+ '; }
details.abstract[open] summary::before { content: '\2212  '; }
details.abstract summary:hover { color: var(--ink); }
details.abstract p { font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* collapsible question blocks (Modes section), collapsed by default */
details.qa { border-bottom: 1px solid var(--rule); margin: 0 0 6px; }
details.qa summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::before { content: '+'; font-family: var(--mono); font-size: 20px; color: var(--ink-3); width: 14px; }
details.qa[open] summary::before { content: '\2212'; }
details.qa summary .subhead { margin: 22px 0 18px; }
details.qa summary:hover .subhead { text-decoration: underline; text-underline-offset: 5px; }

.subhead { font-size: 26px; margin: 36px 0 12px; line-height: 1.2; }
.mono-num { font-family: var(--mono); font-size: 14px; font-weight: 400; color: var(--ink-3); margin-right: 8px; vertical-align: middle; }

.caption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.caption.mono { font-family: var(--mono); font-size: 12px; }

.figure { margin: 26px 0 34px; }
.figure img { width: 100%; display: block; }
.figure.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.figure figcaption { font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 10px; }

.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 34px; align-items: start; }
.two-col .figure { margin-top: 6px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.eq {
  font-family: var(--serif);
  font-size: 19px;
  background: var(--panel);
  border: 1px solid #e2e2dd;
  border-radius: 8px;
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 8px 30px;
  margin: 10px 0 20px;
}

/* ---------- modes ---------- */
.mode-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.mode-chip {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px 12px 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color .15s ease, background .15s ease;
}
.mode-chip .swatch { width: 10px; height: 10px; border-radius: 50%; }
.mode-chip b { font-weight: 600; }
.mode-chip:hover, .mode-chip.on { border-color: var(--ink); background: var(--panel); }

/* ---------- charts / tables ---------- */
.chart-wrap { margin: 20px 0 10px; }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-wrap text { font-family: var(--mono); }
.chart-tip {
  position: fixed;
  pointer-events: none;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 8px 10px;
  border-radius: 4px;
  z-index: 50;
  max-width: 280px;
}

.table-wrap { overflow-x: auto; margin: 18px 0 8px; }
table.results { border-collapse: collapse; width: 100%; font-family: var(--mono); font-size: 12.5px; line-height: 1.4; white-space: nowrap; }
table.results th, table.results td { padding: 6px 9px; text-align: right; border-bottom: 1px solid var(--rule); }
table.results th:first-child, table.results td:first-child { text-align: left; }
table.results thead th { font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--ink); vertical-align: bottom; }
table.results thead tr.group th { border-bottom: 1px solid var(--rule); text-align: center; }
table.results tr.ours td { font-weight: 600; background: #fbf3f3; }
table.results td.best { text-decoration: underline; text-underline-offset: 3px; }
table.results td.sep, table.results th.sep { border-left: 1px solid var(--rule); }

/* ---------- video grids ---------- */
.filter-row, .method-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 16px; }
.pill {
  font-family: var(--mono);
  font-size: 13px;
  background: none;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--ink-3); color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 30px;
}
@media (max-width: 700px) { .video-grid { grid-template-columns: 1fr; } }

/* four columns of full-frame clips (closed-loop rollouts) */
.video-grid.cols4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cols4 .vcell figcaption { font-size: 11px; }
@media (max-width: 700px) { .video-grid.cols4 { grid-template-columns: repeat(2, 1fr); } }

/* three columns of camera-only clips (refusals) */
.video-grid.cols3 { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cols3 .vcell video { aspect-ratio: 960 / 534; cursor: default; }
.cols3 .vcell figcaption { display: block; }
.cols3 .vcell figcaption .tag { display: block; margin-top: 2px; }
@media (max-width: 700px) { .video-grid.cols3 { grid-template-columns: 1fr; } }

/* one row of four clips (Say != Do) */
.video-grid.row4 { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.row4 .vcell video { aspect-ratio: 16 / 9; }
.row4 .vcell figcaption { display: block; text-align: center; }
@media (max-width: 700px) {
  .video-grid.row4 { grid-template-columns: repeat(2, 1fr); }
}

.vcell { margin: 0; min-width: 0; }
.vcell video { width: 100%; aspect-ratio: 2.8 / 1; object-fit: cover; background: #000; display: block; cursor: zoom-in; }
.vcell figcaption { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.4; display: flex; justify-content: space-between; gap: 10px; }
.vcell figcaption .tag { color: var(--ink-3); white-space: nowrap; }
.vcell figcaption q { font-style: italic; }
.vcell.hidden { display: none; }

/* ---------- SayDo explorer ---------- */
.explorer {
  margin: 26px 0 30px;
  padding: 22px 24px 18px;
  background: var(--panel);
  border: 1px solid #e2e2dd;
  border-radius: 10px;
}
@media (max-width: 700px) { .explorer { padding: 16px 14px; } }
.explorer-label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 8px; }

.scene-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
@media (max-width: 900px) {
  .scene-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; padding-bottom: 6px; }
}
.scene-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: border-color .15s ease;
}
.scene-btn img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 25% 50%; display: block; }
.scene-btn:hover { border-color: var(--ink-3); }
.scene-btn.on { border-color: var(--accent); }

.request-box {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.45;
  background: #fff;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 0 0 12px;
}
.request-block + .request-block { margin-top: 28px; }
.request-box .req-safe { color: #1d8a3a; }
.request-box .req-unsafe { color: var(--accent); }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }
.compare-cell { margin: 0; min-width: 0; }
.compare-cell video { width: 100%; aspect-ratio: 2.8 / 1; object-fit: cover; background: #000; display: block; }
.compare-head { font-size: 13px; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #888; display: inline-block; }
.dot.ours { background: var(--accent); }


/* ---------- citation / footer ---------- */
.citation-block {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  background: var(--panel);
  border: 1px solid #e2e2dd;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 0;
  overflow-x: auto;
  color: #333;
}
.footer { font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 60px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, .88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-inner { width: min(1500px, 100%); }
.lightbox video { width: 100%; display: block; background: #000; }
.lightbox p { color: #ddd; font-size: 13px; margin: 10px 0 0; }

@media (max-width: 700px) {
  body { padding: 36px 16px; }
  .hero-text { font-size: 44px; }
  .hero-sub { font-size: 20px; }
  .tagline { font-size: 32px; margin-top: 48px; }
  .section { font-size: 17px; }
  .link-row a { margin: 0 10px; }
}
