:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --surface-muted: #eef2f7;
  --ink: #1e2a39;
  --muted: #607086;
  --line: #d9e1ec;
  --line-strong: #c3cfdf;
  --accent: #1e5aa8;
  --accent-soft: #eaf2ff;
  --accent-strong: #123e75;
  --shadow: 0 14px 34px rgba(16, 35, 64, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f8fbff 0%, #ffffff 240px),
    #ffffff;
  color: var(--ink);
  font-family: "Avenir Next", "Helvetica Neue", sans-serif;
}

code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.94em;
}

audio {
  width: 100%;
  height: 34px;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  padding: 56px 0 42px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.footer-copy h2 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  letter-spacing: -0.02em;
}

.hero h1 {
  max-width: 20ch;
  margin: 0 auto;
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  line-height: 1.04;
}

.hero-subtitle {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta span {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.section {
  margin-top: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading.centered {
  text-align: center;
}

.section h2,
.footer-copy h2 {
  font-size: clamp(1.9rem, 2.8vw, 2.7rem);
  line-height: 1.08;
}

.section-subtitle {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.75;
}

.narrative {
  padding-top: 38px;
  padding-bottom: 38px;
}

.narrative-copy {
  max-width: 920px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.95;
  text-align: left;
}

.abstract-card {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.method-overview {
  background:
    linear-gradient(180deg, rgba(234, 242, 255, 0.68) 0%, rgba(255, 255, 255, 1) 100%);
}

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

.pipeline-step {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.pipeline-step {
  padding: 22px 20px;
}

.pipeline-index {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pipeline-step h3 {
  margin: 0;
  font-size: 1.08rem;
}

.pipeline-step p,
.block-subtitle,
.footer-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.pipeline-step p {
  margin: 10px 0 0;
}

.figure-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.benchmark-results-stack {
  display: grid;
  gap: 28px;
  margin-top: 18px;
}

.benchmark-result-item {
  text-align: center;
}

.benchmark-result-image {
  display: block;
  width: min(100%, 760px);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.benchmark-result-image-wide {
  width: min(100%, 980px);
}

.benchmark-result-caption {
  max-width: 1100px;
  margin: 10px auto 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 720px) {
  .benchmark-result-caption {
    font-size: 0.96rem;
    line-height: 1.65;
  }
}

.figure-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}

.figure-card-head {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 18px 18px 0;
}

.figure-frame {
  padding: 16px 18px 18px;
}

.figure-frame img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.block-title {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.matrix-panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.prompt-overview {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
  overflow: hidden;
}

.prompt-overview-head {
  padding-bottom: 0;
}

.prompt-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 20px 20px;
}

.sector-figure-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 760px;
  margin: 10px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.sector-figure-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sector-figure-media img {
  display: block;
  width: 100%;
  max-width: 240px;
  max-height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sector-figure-copy {
  text-align: left;
}

.sector-figure-copy .block-title {
  margin-bottom: 8px;
}

.sector-figure-copy .block-subtitle {
  margin: 0;
}

@media (max-width: 720px) {
  .sector-figure-card {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 12px;
  }

  .sector-figure-media img {
    max-width: 220px;
    max-height: 220px;
  }

  .sector-figure-copy {
    text-align: left;
  }
}

.sector-figure-card {
  max-width: 560px;
  margin: 8px auto 0;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.sector-figure-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sector-figure-media img {
  display: block;
  width: 100%;
  max-width: 420px;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sector-figure-copy {
  margin-top: 12px;
  text-align: left;
}

.sector-figure-copy .block-subtitle {
  margin-top: 6px;
}

.prompt-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.prompt-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 0;
}

.prompt-card-head h3 {
  margin: 6px 0 0;
  font-size: 1.2rem;
}

.speaker-chip {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-video {
  display: block;
  width: calc(100% - 36px);
  margin: 16px 18px 0;
  border-radius: 14px;
  background: #0d1726;
}

.prompt-list {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
}

.prompt-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}

.prompt-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.prompt-item-text p {
  font-size: 0.96rem;
}

.prompt-label {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.matrix-panel-standalone {
  margin-top: 8px;
}

.matrix-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 20px 20px 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.active {
  background: var(--accent);
}

.dot.inactive {
  background: #cfd8e4;
}

.subset-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.2fr repeat(4, minmax(118px, 0.82fr));
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.stress-grid {
  display: grid;
  gap: 0;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.stress-model-cell {
  display: grid;
  place-items: center;
  padding: 14px 12px;
  text-align: center;
  background: #f9fbff;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
}

.stress-grid .matrix-header-cell,
.stress-grid .matrix-row {
  min-width: 0;
}

.stress-grid .matrix-header-cell {
  display: grid;
  place-items: center;
}

.stress-grid .matrix-audio-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

.stress-grid .inline-audio {
  width: min(100%, 310px);
  justify-items: center;
}

.stress-grid .inline-media {
  width: min(100%, 310px);
  display: grid;
  gap: 8px;
}

.stress-grid .inline-audio audio {
  width: 100%;
}

.stress-grid .matrix-header-cell:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f4f7fb;
}

.matrix-header-cell {
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f4f7fb;
  color: #43546b;
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.matrix-header-cell:nth-child(7n) {
  border-right: none;
}

.matrix-row {
  min-height: 112px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.matrix-row:nth-child(7n) {
  border-right: none;
}

.matrix-row:hover {
  background: #f9fbff;
}

.matrix-row.selected {
  background: #f1f7ff;
  box-shadow: inset 0 0 0 1px #8eb3e8;
}

.matrix-audio-cell,
.matrix-prompt-cell {
  width: 100%;
  padding: 10px;
}

.matrix-audio-cell {
  display: flex;
}

.matrix-prompt-cell {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
}

.matrix-prompt-cell.active {
  background: rgba(234, 242, 255, 0.55);
}

.prompt-cell-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.matrix-prompt-cell.active .prompt-cell-value {
  color: var(--accent-strong);
}

.prompt-cell-meta {
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.inline-audio {
  display: grid;
  width: 100%;
  gap: 8px;
}

.inline-audio-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-panel {
  padding-top: 28px;
  padding-bottom: 28px;
}

.footer-copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.footer-copy p {
  margin: 12px 0 0;
}

@media (max-width: 1160px) {
  .pipeline,
  .figure-showcase,
  .prompt-gallery {
    grid-template-columns: 1fr;
  }

  .matrix-heading {
    display: grid;
    padding-bottom: 0;
  }

  .subset-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(170px, 1fr));
  }

  .stress-grid {
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 18px, 1180px);
    padding-top: 16px;
  }

  .section {
    padding: 22px 16px;
  }

  .hero {
    padding: 36px 0 24px;
  }

  .hero h1 {
    max-width: none;
  }

  .abstract-card {
    padding: 22px 18px;
  }

  .figure-frame {
    padding: 12px 14px 14px;
  }
}

.stress-sticky-firstcol {
  position: sticky;
  left: 0;
}

.stress-pre-label-cell {
  display: grid;
  place-items: center;
  padding: 14px 12px;
  text-align: center;
  background: #f9fbff;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}

.stress-pre-audio-cell {
  min-height: 88px;
}

.stress-sample-cell {
  padding: 12px;
}

.stress-video {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #0d1726;
}

.stress-text-card {
  min-height: 132px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: left;
  white-space: normal;
}

.stress-grid .matrix-header-cell.stress-sticky-firstcol {
  z-index: 2;
  background: #f4f7fb;
}

.stress-grid .stress-model-cell.stress-sticky-firstcol,
.stress-grid .stress-pre-label-cell.stress-sticky-firstcol {
  z-index: 1;
  background: #f9fbff;
}
