:root {
  --ink: #172033;
  --muted: #5a6578;
  --paper: #fbfbf8;
  --surface: #ffffff;
  --line: #d9dee8;
  --blue: #1554b7;
  --orange: #d86419;
  --green: #16723f;
  --red: #b3262f;
  --violet: #4b3ca8;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 251, 248, 0.94);
  border-bottom: 1px solid rgba(217, 222, 232, 0.75);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 62px;
  margin: 0 auto;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  color: white;
  background: var(--ink);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 38px;
}

.hero-copy {
  max-width: 940px;
  margin: 0 auto 28px;
  text-align: center;
}

.venue {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0 0 14px;
  padding: 5px 13px;
  border: 1px solid rgba(21, 84, 183, 0.22);
  border-radius: 6px;
  color: var(--blue);
  background: rgba(21, 84, 183, 0.07);
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 4.2rem;
  line-height: 1.03;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.subtitle {
  max-width: 810px;
  margin: 0 auto 18px;
  color: #30394a;
  font-size: 1.22rem;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 700;
}

.authors a {
  color: var(--blue);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--ink);
  font-weight: 800;
}

.button-primary {
  color: white;
  background: var(--ink);
}

.button-secondary {
  color: var(--ink);
  background: white;
}

.button:hover {
  transform: translateY(-1px);
}

.teaser {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.teaser figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

.hero-teaser-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 34px 18px;
  background: #111827;
  border-radius: 8px 8px 0 0;
}

.hero-teaser-grid::before,
.hero-teaser-grid::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 18px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 14px,
      rgba(255, 255, 255, 0.82) 14px,
      rgba(255, 255, 255, 0.82) 26px,
      transparent 26px,
      transparent 40px
    );
  opacity: 0.9;
  pointer-events: none;
}

.hero-teaser-grid::before {
  top: 8px;
}

.hero-teaser-grid::after {
  bottom: 8px;
}

.teaser-video-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.teaser-video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}

.teaser-video-card p {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 7px 9px;
  color: var(--ink);
  background: white;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  white-space: normal;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.compact-section {
  padding-top: 42px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.wide-heading {
  max-width: 900px;
}

.section-heading h2 {
  margin-bottom: 12px;
  font-size: 2.2rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.02rem;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.claim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.claim {
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.claim-mark {
  display: block;
  width: 32px;
  height: 6px;
  margin-bottom: 26px;
  border-radius: 4px;
}

.mark-blue {
  background: var(--blue);
}

.mark-orange {
  background: var(--orange);
}

.mark-green {
  background: var(--green);
}

.mark-red {
  background: var(--red);
}

.claim h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.claim p {
  margin-bottom: 0;
  color: var(--muted);
}

.results-stack {
  display: grid;
  gap: 42px;
}

.sample-block {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.sample-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.sample-title h3 {
  margin: 0;
  font-size: 1.12rem;
}

.sample-title span {
  flex: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.video-card.highlight {
  border-color: rgba(22, 114, 63, 0.55);
  box-shadow: 0 0 0 2px rgba(22, 114, 63, 0.12);
}

.video-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: #2e3748;
  font-size: 0.84rem;
  font-weight: 900;
}

.video-label small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.highlight .video-label {
  color: var(--green);
}

.video-shell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #e9edf3;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-shell::after {
  content: "Loading";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  pointer-events: none;
}

.video-shell.is-loaded::after {
  content: "";
}

.method {
  width: min(1320px, calc(100% - 32px));
}

.method-figure {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.method-figure img {
  display: block;
  width: 100%;
}

.sample-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: white;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: white;
  border-color: var(--ink);
  background: var(--ink);
}

.sample-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.evd-sample-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.evd-sample-card[hidden] {
  display: none;
}

.evd-sample-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #e9edf3;
}

.evd-sample-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evd-sample-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.sample-tag {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 5px;
  color: var(--green);
  background: rgba(22, 114, 63, 0.09);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.evd-sample-body p {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.sample-actions [hidden] {
  display: none;
}

.comparison-inspector {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.comparison-inspector summary {
  min-height: 58px;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  list-style: none;
}

.comparison-inspector summary::-webkit-details-marker {
  display: none;
}

.comparison-inspector summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue);
  background: white;
}

.comparison-inspector[open] summary::before {
  content: "-";
}

.gallery-stack {
  padding: 6px 0 42px;
}

.bibtex pre {
  overflow-x: auto;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #eef2f7;
  font-size: 0.93rem;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 920px) {
  h1 {
    font-size: 3rem;
  }

  .claim-grid,
  .video-grid,
  .sample-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-teaser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 30px 12px;
  }
}

@media (max-width: 640px) {
  .nav,
  .hero,
  .section,
  .method,
  .footer {
    width: calc(100vw - 32px);
    max-width: 358px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 20px;
    font-size: 0.8rem;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: 2.04rem;
  }

  .subtitle {
    font-size: 1.05rem;
  }

  .section {
    padding: 44px 0;
  }

  .section-heading h2 {
    font-size: 1.46rem;
    overflow-wrap: break-word;
  }

  .claim-grid,
  .video-grid,
  .sample-results {
    grid-template-columns: 1fr;
  }

  .sample-filters {
    gap: 8px;
  }

  .filter-chip {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .claim {
    min-height: auto;
  }

  .sample-title {
    display: block;
  }

  .sample-title span {
    display: block;
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .teaser figcaption {
    font-size: 0.88rem;
  }
}
