:root {
  --blue: #326896;
  --blue-dark: #183f63;
  --button-blue: #3f718f;
  --button-blue-dark: #315f7b;
  --ink: #202b35;
  --muted: #5f6b76;
  --line: #d8e0e6;
  --gray: #f3f6f8;
  --header-bg: #eaf1f6;
  --blue-soft: #edf4f9;
  --blue-line: #c7d8e5;
  --warm: #fbfaf7;
  --white: #fff;
  --shadow: 0 12px 34px rgba(24, 63, 99, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--warm);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
  margin: 0;
}

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

.container {
  margin: 0 auto;
  max-width: 1080px;
  padding: 0 24px;
}

.paper-header {
  background: var(--header-bg);
  border-bottom: 1px solid #cfdae3;
  border-top: 5px solid var(--blue-dark);
  padding: 68px 0 56px;
  text-align: center;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  color: #182633;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(40px, 5.2vw, 62px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 auto 18px;
  max-width: 1120px;
}

h1 span {
  color: var(--blue);
  font-weight: 700;
}

.paper-tagline {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 720px;
}

.resource-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

.resource-note {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.015em;
  margin: 13px auto 0;
}

.resource-button {
  align-items: center;
  appearance: none;
  background: var(--button-blue);
  border: 1px solid var(--button-blue-dark);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(24, 63, 99, 0.16);
  color: var(--white);
  cursor: default;
  display: inline-flex;
  font: inherit;
  gap: 12px;
  justify-content: center;
  min-width: 154px;
  opacity: 1;
  padding: 13px 23px;
  text-align: center;
}

.resource-button span {
  font-size: 17px;
  font-weight: 700;
}

.resource-icon {
  flex: 0 0 23px;
  height: 23px;
  width: 23px;
}

.section {
  background: var(--white);
  padding: 72px 0;
}

.gray {
  background: var(--gray);
  border-bottom: 1px solid #e1e7eb;
  border-top: 1px solid #e1e7eb;
}

h2 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 18px;
  text-align: center;
}

.section-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 7px;
  text-align: center;
  text-transform: uppercase;
}

h3 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 10px;
}

.section-lead {
  color: #4f5c67;
  font-size: 17px;
  line-height: 1.65;
  margin: 0 auto 40px;
  max-width: 820px;
  text-align: center;
}

.demo-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr 1fr;
}

.demo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.demo-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  padding: 19px 21px 15px;
}

.demo-heading h3 {
  margin: 3px 0 0;
}

.input-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.sample-id {
  color: var(--muted);
  font-family: monospace;
  font-size: 12px;
}

.demo-card video {
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
  width: 100%;
}

.demo-summary,
.demo-note {
  margin: 0;
  padding-left: 20px;
  padding-right: 20px;
}

.demo-summary {
  font-size: 15px;
  line-height: 1.6;
  padding-top: 17px;
}

.demo-note {
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 17px;
}

details {
  background: #fbfcfd;
  border-top: 1px solid var(--line);
}

summary {
  color: var(--blue-dark);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 20px;
}

summary:hover {
  background: var(--blue-soft);
}

.caption {
  background: #fafafa;
  border-top: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
  max-height: 420px;
  overflow: auto;
  padding: 20px;
}

.prose {
  max-width: 900px;
}

.prose p {
  font-size: 17px;
  text-align: justify;
}

.abstract-layout {
  margin: 38px auto 0;
  max-width: 960px;
}

.abstract-copy {
  margin: 0 auto;
  max-width: 920px;
}

.abstract-copy p:first-child {
  margin-top: 0;
}

.abstract-copy p:last-child {
  margin-bottom: 0;
}

.abstract-contract {
  background: var(--white);
  border: 1px solid var(--blue-line);
  border-top: 4px solid var(--blue);
  border-radius: 7px;
  box-shadow: 0 10px 26px rgba(24, 63, 99, 0.06);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px auto 0;
  overflow: hidden;
}

.abstract-contract > div {
  border-right: 1px solid var(--line);
  padding: 19px 21px 20px;
}

.abstract-contract > div:last-child {
  border-right: 0;
}

.abstract-contract span {
  color: var(--blue-dark);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.abstract-contract p {
  color: #4c5964;
  font-size: 13px;
  line-height: 1.55;
  margin: 5px 0 0;
}

.figure {
  margin: 36px auto 8px;
  max-width: 1040px;
}

.figure.compact {
  max-width: 720px;
}

.figure img {
  margin: 0 auto;
  width: 100%;
}

.abstract-figure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 42px;
  max-width: 720px;
  overflow: hidden;
  padding: 14px 14px 16px;
}

.abstract-figure figcaption {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 13px 12px 0;
}

.abstract-figure figcaption strong {
  color: #444;
}

figcaption {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-top: 12px;
  text-align: center;
}

.training-sequence {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  margin: 34px auto 42px;
  max-width: 980px;
}

.training-sequence > div {
  background: var(--gray);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 15px;
}

.training-sequence > div:nth-of-type(3),
.training-sequence > div:nth-of-type(4) {
  background: var(--blue-soft);
  border-color: var(--blue-line);
}

.training-sequence span,
.training-sequence small,
.training-sequence strong {
  display: block;
}

.training-sequence span {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.training-sequence strong {
  font-size: 16px;
  margin-top: 1px;
}

.training-sequence small {
  color: var(--muted);
  font-size: 12px;
}

.training-sequence i {
  align-self: center;
  color: #999;
  font-size: 18px;
  font-style: normal;
}

.framework-figure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 0;
  padding: 14px;
}

.method-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 44px;
}

.method-grid article {
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 24px;
}

.method-grid p {
  font-size: 15px;
  margin-bottom: 0;
}

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

.stats div {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 22px 16px;
  text-align: center;
}

.stats strong {
  color: var(--blue-dark);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.dataset-overview {
  background: var(--white);
  border: 1px solid var(--blue-line);
  border-top: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(24, 63, 99, 0.06);
  margin: 34px auto 0;
  max-width: 920px;
  padding: 21px 26px 23px;
}

.dataset-overview-label {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.dataset-copy {
  color: #4c5964;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
  text-align: left;
}

.dataset-pipeline {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin: 28px auto 0;
  max-width: 960px;
}

.dataset-pipeline article {
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 14px;
  padding: 19px;
}

.dataset-pipeline article > span {
  align-items: center;
  background: var(--blue-soft);
  border: 1px solid var(--blue-line);
  color: var(--blue-dark);
  display: flex;
  flex: 0 0 30px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  height: 30px;
  justify-content: center;
}

.dataset-pipeline h3 {
  font-size: 15px;
  margin: 1px 0 4px;
}

.dataset-pipeline p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.result-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin: 38px 0 34px;
}

.result-grid > div {
  background: var(--gray);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 22px 24px;
}

.result-grid strong {
  color: var(--blue-dark);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.result-grid small {
  color: var(--blue);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.result-grid span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-top: 6px;
}

.result-grid p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}

.user-study {
  align-items: center;
  background: var(--blue-dark);
  border-radius: 9px;
  color: var(--white);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.35fr);
  margin: 0 0 50px;
  padding: 28px 30px;
}

.user-study .section-kicker {
  color: #bcd6ea;
  margin-bottom: 5px;
  text-align: left;
}

.user-study h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
}

.user-study-copy > p:last-child {
  color: #d9e5ee;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.mos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.mos-grid div {
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  text-align: center;
}

.mos-grid strong,
.mos-grid span {
  display: block;
}

.mos-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  line-height: 1.15;
}

.mos-grid span {
  color: #d9e5ee;
  font-size: 10px;
  line-height: 1.35;
  margin-top: 5px;
}

.qualitative-figure {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 1040px;
  overflow: hidden;
  padding: 12px 12px 15px;
}

.qualitative-figure figcaption {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding: 13px 12px 0;
}

.qualitative-figure figcaption strong {
  color: #444;
}

.qualitative-readout {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
  margin: 30px auto 0;
  max-width: 900px;
}

.qualitative-readout article {
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 14px;
  padding: 19px;
}

.qualitative-readout article > span {
  color: var(--blue);
  flex: 0 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.qualitative-readout h3 {
  font-size: 16px;
  margin: 0 0 5px;
}

.qualitative-readout p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.ablation-grid {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr 1fr;
}

.ablation-grid .figure {
  margin-top: 24px;
}

footer {
  background: var(--blue-dark);
  color: #d8e4ed;
  font-size: 12px;
  letter-spacing: 0.01em;
  padding: 34px 0;
  text-align: center;
}

@media (max-width: 820px) {
  .demo-grid,
  .ablation-grid,
  .method-grid,
  .abstract-layout,
  .dataset-pipeline,
  .qualitative-readout,
  .user-study {
    grid-template-columns: 1fr;
  }

  .abstract-contract {
    grid-template-columns: 1fr;
  }

  .abstract-contract > div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .abstract-contract > div:last-child {
    border-bottom: 0;
  }

  .training-sequence {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }

  .training-sequence i {
    display: none;
  }

  .stats,
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .mos-grid div:nth-child(3),
  .mos-grid div:nth-child(4) {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 14px;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .paper-header {
    padding: 48px 0 42px;
  }

  h1 {
    font-size: 33px;
  }

  .section {
    padding: 54px 0;
  }

  .resource-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: auto;
    margin-right: auto;
    max-width: 260px;
  }

  .resource-button {
    width: 100%;
  }

  .prose p {
    text-align: left;
  }

  .stats,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .training-sequence {
    grid-template-columns: 1fr;
  }

  .user-study {
    padding: 24px 20px;
  }

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

  .abstract-figure {
    padding: 8px 8px 13px;
  }

  .qualitative-figure {
    padding: 7px 7px 12px;
  }
}
