:root {
  --bg: #fbfbfd;
  --bg-alt: #f2f5fa;
  --card: #ffffff;
  --text: #182033;
  --muted: #667085;
  --line: #d9e0ea;
  --primary: #3157d5;
  --primary-dark: #1f3fa8;
  --accent: #14a38b;
  --warning: #f4a340;
  --danger: #d9534f;
  --shadow: 0 18px 60px rgba(24, 32, 51, 0.10);
  --shadow-soft: 0 10px 30px rgba(24, 32, 51, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img, video { max-width: 100%; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { left: 12px; }

.container {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
}
.narrow .container, .container.narrow { width: min(100% - 36px, 860px); }
.section-pad { padding: 68px 0; }
.section-pad.alt { background: var(--bg-alt); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(251, 251, 253, 0.82);
  border-bottom: 1px solid rgba(217, 224, 234, 0.75);
}
.nav {
  width: min(100% - 28px, var(--max));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 0.8rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
  color: var(--muted);
  font-weight: 600;
}
.nav-links a.active { color: var(--primary); }
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: 110px;
}
.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 560px;
  background:
    radial-gradient(circle at 20% 20%, rgba(49, 87, 213, 0.18), transparent 35%),
    radial-gradient(circle at 70% 30%, rgba(20, 163, 139, 0.18), transparent 30%),
    linear-gradient(180deg, #eef4ff, rgba(251, 251, 253, 0));
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 42px;
  align-items: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--primary);
}
.authors {
  margin: 22px 0 4px;
  font-weight: 700;
  font-size: 1.05rem;
}
.affiliation {
  margin: 0 0 22px;
  color: var(--muted);
}
.hero-lede {
  font-size: 1.17rem;
  color: #3f4a5f;
  max-width: 740px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(24, 32, 51, 0.06);
}
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.62);
}
.btn:hover { transform: translateY(-1px); color: inherit; }
.btn.primary:hover { background: var(--primary-dark); }

.hero-card {
  padding: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.70);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.figure-placeholder {
  min-height: 240px;
  border-radius: var(--radius);
  border: 1px dashed #aab7cc;
  background:
    linear-gradient(135deg, rgba(49, 87, 213, 0.12), rgba(20, 163, 139, 0.12)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.45) 0, rgba(255, 255, 255, 0.45) 8px, transparent 8px, transparent 16px);
  display: grid;
  place-items: center;
  text-align: center;
  color: #526078;
  padding: 24px;
}
.figure-placeholder span {
  display: block;
  font-weight: 800;
  color: var(--text);
  font-size: 1.15rem;
}
.figure-placeholder small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.hero-placeholder { min-height: 340px; }
.figure-placeholder.tall { min-height: 430px; }
.figure-placeholder.wide { min-height: 310px; margin: 24px 0 26px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-grid.compact { margin-top: 14px; }
.stat-grid div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 12px;
  text-align: center;
}
.stat-grid strong {
  display: block;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  letter-spacing: -0.04em;
}
.stat-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}
.section-heading.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}
.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.tldr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 38px);
  box-shadow: var(--shadow-soft);
  font-size: 1.15rem;
}
.tldr-card p { margin: 0; }

.feature-grid, .condition-grid, .resource-grid, .result-callouts {
  display: grid;
  gap: 18px;
  margin-top: 36px;
}
.feature-grid { grid-template-columns: repeat(4, 1fr); }
.feature-card, .condition-card, .resource-card, .result-callouts article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.feature-card .icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef4ff;
  font-size: 1.35rem;
}
.feature-card h3, .condition-card h3, .result-callouts h3 { margin: 16px 0 8px; line-height: 1.15; }
.feature-card p, .condition-card p, .result-callouts p { color: var(--muted); margin-bottom: 0; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
  align-items: center;
}
.media-block { margin-top: 46px; }
.check-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}
.check-list li {
  position: relative;
  padding-left: 28px;
  margin: 9px 0;
  color: #3f4a5f;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 900;
}

.condition-grid { grid-template-columns: repeat(4, 1fr); }
.condition-card { position: relative; overflow: hidden; }
.condition-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--primary);
}
.condition-card[data-accent="light"]::before { background: var(--warning); }
.condition-card[data-accent="camera"]::before { background: var(--primary); }
.condition-card[data-accent="conflict"]::before { background: var(--danger); }
.condition-card[data-accent="motion"]::before { background: var(--accent); }
.condition-card .label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.condition-card code {
  display: inline-block;
  margin: 8px 6px 0 0;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f3f8;
  color: #435067;
  font-size: 0.78rem;
}

.code-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}
.code-card-head {
  padding: 14px 18px;
  background: #1f2937;
  color: #dce4f2;
  font-weight: 700;
}
pre {
  margin: 0;
  overflow-x: auto;
  padding: 20px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.code-card pre { color: #e6edf7; }
.mini-cards {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.mini-cards div {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 16px;
}
.mini-cards strong { display: block; }
.mini-cards span { color: var(--muted); }

.result-callouts { grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }
.result-callouts span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 900;
}

.tabs {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tab-list {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #f8faff;
}
.tab-button {
  border: 0;
  background: transparent;
  padding: 11px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
}
.tab-button.active {
  background: var(--primary);
  color: white;
}
.tab-panel { padding: clamp(18px, 3vw, 30px); }
.benchmark-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 50px;
  align-items: end;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: white;
}
caption {
  caption-side: top;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
  background: #f8faff;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
thead th {
  background: #f0f4fb;
  font-weight: 850;
}
tr.best th, tr.best td { color: var(--primary-dark); font-weight: 800; }

.chart {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 56px;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}

.bar-label {
  font-weight: 800;
  font-size: 0.95rem;
}

.bar-track {
  height: 15px;
  background: #e9eef5;
  border-radius: 999px;
  overflow: hidden;
  display: block;
}

.bar-fill {
  height: 100%;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6df6, #18b6a7);
}

.bar-value {
  font-weight: 800;
  color: var(--muted);
  text-align: right;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.heat {
  min-height: 110px;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(24, 32, 51, 0.08);
}
.heat strong { font-size: 1.1rem; }
.heat span { font-size: 0.8rem; color: #344054; }
.heat small { font-weight: 900; }
.heat.high { background: #ffd7d3; }
.heat.mid { background: #ffe8d0; }
.heat.low { background: #fff4cb; }
.heat.lowest { background: #dbf6ed; }

.steps {
  counter-reset: item;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: item;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.steps li::before {
  content: counter(item);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 900;
}
.steps strong { display: block; }
.steps span { color: var(--muted); }

.resource-grid { grid-template-columns: repeat(4,1fr); }
.resource-card {
  display: grid;
  gap: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  color: var(--text);
  box-shadow: var(--shadow);
}
.resource-card span { font-size: 1.7rem; }
.resource-card strong { font-size: 1.08rem; }
.resource-card small { color: var(--muted); }

.ethics-note {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  color: #3f4a5f;
  box-shadow: var(--shadow-soft);
}

.citation-box {
  position: relative;
  background: #111827;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.citation-box pre {
  color: #e6edf7;
  padding-top: 56px;
}
.copy-btn {
  position: absolute;
  right: 14px;
  top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: white;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}
.copy-btn.copied { background: var(--accent); }

.footer {
  padding: 28px 0;
  background: #111827;
  color: #cbd5e1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.footer p { margin: 0; }
.footer a { color: white; font-weight: 800; }

@media (max-width: 980px) {
  .hero-grid, .two-col, .benchmark-grid { grid-template-columns: 1fr; }
  .feature-grid, .condition-grid { grid-template-columns: repeat(2, 1fr); }
  .result-callouts, .resource-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 86px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 68px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .feature-grid, .condition-grid, .stat-grid { grid-template-columns: 1fr; }
  .section-pad { padding: 64px 0; }
  .hero-card { padding: 12px; }
  .hero-placeholder { min-height: 260px; }
  .tab-panel { padding: 16px; }
  .bar-row { grid-template-columns: 88px 1fr 42px; }
  .heatmap { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

.results-summary {
  margin-bottom: 18px;
}

.chart-title {
  margin: 24px 0 6px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.chart-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.interpretation-panel {
  align-self: start;
}

.recording-summary {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 22px;
}

.recording-summary h3 {
  font-size: 1.25rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.recording-summary p {
  margin: 0;
  color: var(--muted);
}

.experiment-design-all-img {
  width: 85%;
  max-width: 900px;
  margin: 0 auto;
  padding: 12px;
  background: white;
  border: 4px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.setup-overview-img {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border: 3px solid #667085;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-centered {
  position: relative;
  display: grid;
  gap: 34px;
  justify-items: center;
}

.hero-copy-centered {
  max-width: 1040px;
  text-align: center;
}

.hero-copy-centered h1 {
  margin: 0 0 45px;
  font-size: clamp(2.3rem, 5vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-copy-centered .hero-lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 820px;
}

.button-row.centered {
  justify-content: center;
}

.hero-stats-row {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.hero-stats-row div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.hero-stats-row strong {
  display: block;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -0.04em;
}

.hero-stats-row span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-image-wrap {
  width: min(100%, 1120px);
  display: flex;
  justify-content: center;
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.teaser-img-large {
  width: 100%;
  border-radius: 22px;
  border: 0;
  box-shadow: none;
}

@media (max-width: 760px) {
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-copy-centered h1 {
    font-size: clamp(2rem, 11vw, 3.2rem);
  }
}


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

.hero-pill {
  height: 40px;
  min-width: 132px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(24, 32, 51, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hero-pill:hover {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(49, 87, 213, 0.35);
  box-shadow: var(--shadow-soft);
}

.hero-pill img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

@media (max-width: 760px) {
  .hero-link-row {
    gap: 8px;
  }

  .hero-pill {
    min-width: 118px;
    height: 38px;
    font-size: 0.86rem;
  }
}

.citation-container {
  max-width: 820px;
}

.citation-box pre {
  white-space: pre-wrap;
  overflow-x: hidden;
}

.citation-box code {
  white-space: pre-wrap;
  word-break: break-word;
}

.condition-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.experiment-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
}

.experiment-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--primary);
}

.experiment-card[data-accent="light"]::before { background: var(--warning); }
.experiment-card[data-accent="camera"]::before { background: var(--primary); }
.experiment-card[data-accent="conflict"]::before { background: var(--danger); }
.experiment-card[data-accent="motion"]::before { background: var(--accent); }

.experiment-card-text {
  margin-bottom: 18px;
}

.experiment-card .label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.experiment-card h3 {
  margin: 0 0 10px;
  line-height: 1.15;
}

.experiment-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.experiment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experiment-tags code {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f3f8;
  color: #435067;
  font-size: 0.78rem;
}

.experiment-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.experiment-media {
  margin: 0;
}

.experiment-media img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.experiment-media figcaption {
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

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