:root {
  color-scheme: light;
  --ink: #17211e;
  --muted: #5c6763;
  --paper: #f4f6f3;
  --panel: #ffffff;
  --line: #dce2de;
  --dark: #111a18;
  --dark-2: #182522;
  --mint: #60ddb4;
  --cyan: #43b7d2;
  --yellow: #e6dc6f;
  --coral: #ec765f;
  --shadow: 0 18px 48px rgba(23, 33, 30, 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;
}

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

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 10px clamp(18px, 4vw, 58px);
  color: #f7fbf9;
  background: rgba(17, 26, 24, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #111a18;
  background: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
  color: rgba(247, 251, 249, 0.76);
  font-size: 0.86rem;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  transition: color 150ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: #ffffff;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(88vh - 58px));
  place-items: center;
  overflow: hidden;
  color: #f8fcfa;
  background: var(--dark);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 18, 16, 0.76), rgba(10, 18, 16, 0.88)),
    url("assets/images/experiments.png") center / cover no-repeat;
  transform: scale(1.03);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 36px));
  padding: 42px 0 58px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #159a73;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow,
.diagnosis-band .eyebrow,
.results-band .eyebrow,
.citation-band .eyebrow {
  color: var(--mint);
}

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

h1 {
  max-width: 1280px;
  margin: 0 auto 26px;
  font-size: clamp(2.35rem, 4.2vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 span {
  color: var(--mint);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 3vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 15px;
  max-width: 1160px;
  margin: 0 auto 17px;
  color: rgba(248, 252, 250, 0.9);
  font-size: clamp(0.88rem, 1.2vw, 1.02rem);
  line-height: 1.5;
}

.authors a {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(96, 221, 180, 0.6);
  text-underline-offset: 3px;
}

.authors span:not(.author-break):not(.author-row-end)::after,
.authors a::after {
  content: ",";
}

.authors .author-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
  margin-top: -7px;
}

.authors sup,
.affiliations sup {
  font-size: 0.68em;
  line-height: 0;
}

.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  max-width: 1120px;
  margin: 0 auto 28px;
  color: rgba(248, 252, 250, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  color: #f8fcfa;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 760;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover,
.button:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.48);
}

.button.primary {
  color: #0c1815;
  background: var(--mint);
  border-color: var(--mint);
}

.metrics {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin: -28px auto 0;
  background: var(--line);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metrics div {
  min-height: 116px;
  padding: 23px 25px;
  background: var(--panel);
}

.metrics strong,
.result-callouts strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.8vw, 2.6rem);
  line-height: 1;
}

.metrics span,
.result-callouts span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(58px, 7vw, 92px) 0;
}

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

.section-intro {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.overview-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 34px;
  color: #44514d;
  line-height: 1.72;
}

.overview-copy p {
  margin-bottom: 0;
}

figure {
  margin: 0;
}

.paper-figure {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.paper-figure img {
  width: 100%;
  background: #ffffff;
}

.paper-figure figcaption {
  padding: 12px 15px 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.5;
}

.intro-figure {
  width: min(900px, 100%);
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.diagnosis-band {
  color: #f4faf7;
  background: var(--dark);
}

.diagnosis-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.diagnosis-number {
  color: var(--yellow);
  font-size: clamp(4.6rem, 10vw, 8.2rem);
  font-weight: 900;
  line-height: 0.9;
}

.diagnosis-summary {
  max-width: 540px;
  margin: 18px 0 0;
  color: rgba(244, 250, 247, 0.82);
  font-size: 1.08rem;
  line-height: 1.6;
}

.diagnosis-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.diagnosis-details > div {
  min-height: 130px;
  padding: 20px;
  background: var(--dark-2);
}

.diagnosis-details strong {
  display: block;
  margin-bottom: 8px;
  color: var(--mint);
  font-size: 2rem;
}

.diagnosis-details span {
  color: rgba(244, 250, 247, 0.65);
  font-size: 0.84rem;
  line-height: 1.45;
}

.diagnosis-details > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  color: rgba(244, 250, 247, 0.78);
  background: var(--dark-2);
  line-height: 1.65;
}

.method-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.method-points article {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  min-height: 220px;
  padding: 23px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.method-points p,
.mask-layout p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.66;
}

.step-index {
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 900;
}

.method-figure {
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}

.mask-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  padding-top: 12px;
}

.compact-figure {
  box-shadow: 0 12px 32px rgba(23, 33, 30, 0.1);
}

.results-band {
  color: #f4faf7;
  background: var(--dark);
}

.results-band .section {
  width: min(1240px, calc(100% - 36px));
}

.results-band .section-heading {
  max-width: 920px;
}

.experiments-figure,
.attention-figure {
  margin-bottom: 34px;
  border-color: rgba(255, 255, 255, 0.14);
}

.experiments-figure {
  width: min(1000px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.table-block {
  margin: 26px 0;
  overflow: hidden;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
}

.table-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.table-title .eyebrow {
  color: #159a73;
  margin-bottom: 6px;
}

.table-title h3 {
  margin-bottom: 0;
  font-size: 1.22rem;
}

.table-title > p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-align: right;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.79rem;
}

th,
td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

thead th {
  color: #33403c;
  background: #eef2ef;
  font-weight: 800;
}

tbody th {
  text-align: left;
  font-weight: 720;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tr.highlight th,
tr.highlight td {
  color: #0c1a16;
  background: #d8f5e8;
  font-weight: 850;
}

.result-callouts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 26px 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.result-callouts > div {
  min-height: 118px;
  padding: 22px;
  background: var(--dark-2);
}

.result-callouts strong {
  color: var(--yellow);
}

.result-callouts span {
  color: rgba(244, 250, 247, 0.65);
}

.attention-figure {
  width: min(920px, 100%);
  margin: 34px auto 0;
}

.videos-section {
  width: min(1240px, calc(100% - 36px));
}

.video-groups {
  display: grid;
  gap: 34px;
}

.video-group {
  display: grid;
  gap: 14px;
}

.video-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.video-group-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-group-heading h3 {
  margin: 0;
}

.video-group-heading > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.model-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.lingbot-dot {
  background: var(--coral);
}

.fastwam-dot {
  background: var(--cyan);
}

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

.video-grid figure {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(23, 33, 30, 0.1);
}

.video-grid video {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: contain;
  background: #080b0a;
}

.video-grid figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--muted);
  font-size: 0.82rem;
}

.video-grid figcaption strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.citation-band {
  color: #f4faf7;
  background: var(--dark);
}

.citation-inner {
  padding-top: clamp(52px, 6vw, 76px);
  padding-bottom: clamp(52px, 6vw, 76px);
}

.citation-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.copy-button {
  flex: 0 0 auto;
}

pre {
  overflow-x: auto;
  margin: 0;
  padding: 21px;
  color: #eaf7f1;
  background: #0b1210;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  line-height: 1.58;
}

code {
  display: block;
  min-width: 100%;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.81rem;
  white-space: pre;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 4vw, 58px);
  color: rgba(244, 250, 247, 0.62);
  background: #0b1210;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
}

footer a {
  color: var(--mint);
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
  }

  .metrics,
  .overview-copy,
  .diagnosis-inner,
  .method-points,
  .result-callouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnosis-inner {
    align-items: start;
  }

  .diagnosis-details {
    grid-column: 1 / -1;
  }

  .mask-layout {
    grid-template-columns: 1fr;
  }

  .compact-figure {
    width: min(760px, 100%);
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .video-grid video {
    aspect-ratio: 2 / 1;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    white-space: nowrap;
  }

  .hero-content {
    padding-top: 30px;
    padding-bottom: 30px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: 1.8rem;
    line-height: 1.04;
    overflow-wrap: break-word;
  }

  h2 {
    font-size: 1.9rem;
  }

  .authors .author-break {
    display: none;
  }

  .authors {
    gap: 4px 10px;
    margin-bottom: 11px;
    font-size: 0.75rem;
    line-height: 1.34;
  }

  .authors span:not(.author-break):not(:last-child)::after {
    content: ",";
  }

  .affiliations {
    gap: 2px 10px;
    margin-bottom: 17px;
    font-size: 0.66rem;
    line-height: 1.3;
  }

  .hero-actions {
    gap: 7px;
  }

  .button {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    margin-top: 0;
  }

  .metrics div {
    min-height: 100px;
    padding: 18px;
  }

  .overview-copy,
  .diagnosis-inner,
  .method-points,
  .result-callouts {
    grid-template-columns: 1fr;
  }

  .diagnosis-number {
    font-size: 5rem;
  }

  .diagnosis-details {
    grid-template-columns: 1fr;
  }

  .diagnosis-details > p {
    grid-column: 1;
  }

  .method-points article {
    min-height: auto;
    grid-template-columns: 38px 1fr;
  }

  .table-title,
  .citation-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-title > p {
    text-align: left;
  }

  .video-group-heading {
    align-items: flex-start;
  }

  .button {
    flex: 1 1 auto;
  }

  footer {
    flex-direction: column;
  }
}

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


  .video-grid video {
    aspect-ratio: 1 / 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button,
  .copy-button {
    transition: none;
  }
}
