:root {
  --bg: #f5f1e8;
  --bg-soft: #ebe4d6;
  --paper: rgba(255, 252, 246, 0.92);
  --paper-strong: #fffdf8;
  --line: rgba(28, 42, 69, 0.16);
  --line-strong: rgba(28, 42, 69, 0.3);
  --ink: #17233b;
  --muted: #5f6d86;
  --accent: #183a75;
  --accent-soft: #dfe8fb;
  --accent-strong: #0f5bd8;
  --gold: #a5722a;
  --shadow: 0 24px 60px rgba(34, 47, 74, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
  --maxw: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  line-height: 1.72;
  background:
    radial-gradient(circle at top left, rgba(24, 58, 117, 0.09), transparent 26%),
    radial-gradient(circle at top right, rgba(165, 114, 42, 0.09), transparent 24%),
    linear-gradient(180deg, #f8f4eb 0%, #f3efe7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(23, 35, 59, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 35, 59, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
}

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

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

code,
pre,
.figure-meta span,
.axis-tag,
.step-index,
.figure-label,
.eyebrow,
.fact-value,
.mini-value,
.results-table td,
.results-table th,
.bar-row strong {
  font-family: "IBM Plex Mono", monospace;
}

.container {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(248, 244, 235, 0.86);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  font-family: "Source Serif 4", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.lang-switch a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.lang-switch a.active {
  background: var(--accent);
  color: #fff;
}

.nav-links a,
.site-footer a {
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav-links a:hover,
.site-footer a:hover {
  color: var(--accent-strong);
}

.hero {
  padding: 48px 0 34px;
}

.eyebrow,
.section-kicker,
.figure-label,
.axis-tag,
.qual-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.figure-label,
.qual-tag {
  color: var(--accent);
}

.eyebrow {
  color: var(--accent);
  background: rgba(24, 58, 117, 0.08);
  padding: 8px 12px;
  border-radius: 999px;
  margin: 0 0 18px;
}

.hero-grid,
.paper-grid {
  display: grid;
  gap: 22px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  align-items: start;
}

.hero-copy h1,
.section-head h2,
.figure-head h3,
.card-title,
.resource-card h3 {
  font-family: "Source Serif 4", serif;
}

.hero-copy h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2.35rem, 4.2vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-title-en {
  max-width: 20ch;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-title-zh {
  max-width: 16ch;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-title-en-main,
.hero-title-en-sub,
.hero-title-zh-main,
.hero-title-zh-sub {
  display: block;
}

.hero-title-en-main {
  font-size: clamp(2.55rem, 4.4vw, 4.2rem);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.hero-title-zh-main {
  font-size: clamp(2.45rem, 4.2vw, 3.95rem);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-title-en-sub {
  margin-top: 0.22em;
  font-size: clamp(1.45rem, 2.15vw, 2.05rem);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: rgba(23, 35, 59, 0.9);
}

.hero-title-zh-sub {
  margin-top: 0.24em;
  font-size: clamp(1.32rem, 2.05vw, 1.9rem);
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: rgba(23, 35, 59, 0.9);
}

.subtitle {
  margin: 20px 0 0;
  max-width: 63ch;
  font-size: 1.08rem;
  color: var(--muted);
}

.meta-block {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.author-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.author-link:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 91, 216, 0.38);
  background: rgba(255, 255, 255, 0.96);
}

.author-link-corresponding {
  background: linear-gradient(180deg, rgba(24, 58, 117, 0.08), rgba(255, 255, 255, 0.92));
}

.author-name {
  font-family: "Source Serif 4", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.author-name sup,
.affiliation-item sup {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72em;
  vertical-align: super;
  color: var(--accent);
}

.author-meta {
  font-size: 0.84rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.affiliations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}

.affiliation-item {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font-weight: 600;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover,
.resource-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 91, 216, 0.4);
}

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

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

.fact-card,
.paper-card,
.figure-card,
.resource-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.fact-card {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
}

.fact-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}

.fact-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.paper-card,
.figure-card,
.resource-card {
  border-radius: var(--radius);
  padding: 24px;
}

.paper-card p + p {
  margin-top: 12px;
}

.paper-card-head,
.figure-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.paper-card-head {
  margin-bottom: 20px;
  color: var(--muted);
}

.paper-card-head span:first-child {
  color: var(--accent);
  font-weight: 600;
}

.task-demo {
  padding: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(24, 58, 117, 0.06), rgba(255, 255, 255, 0.55)),
    var(--paper-strong);
}

.task-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border-left: 4px solid var(--accent);
  background: rgba(24, 58, 117, 0.07);
  color: var(--ink);
  font-size: 0.94rem;
}

.task-note strong {
  color: var(--accent);
}

.task-canvas {
  display: grid;
  gap: 18px;
}

.patch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.patch-grid span,
.candidate {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px solid rgba(24, 58, 117, 0.1);
  background:
    linear-gradient(135deg, rgba(24, 58, 117, 0.16), rgba(165, 114, 42, 0.18)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
}

.patch-grid .masked {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 91, 216, 0.18), rgba(15, 91, 216, 0.08));
  border: 1px dashed rgba(15, 91, 216, 0.7);
}

.patch-grid .masked::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: rgba(15, 91, 216, 0.82);
  box-shadow: 0 0 0 6px rgba(15, 91, 216, 0.12);
}

.patch-arrow {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--accent);
  font-size: 0.9rem;
}

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

.candidate {
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--ink);
}

.candidate.correct {
  border-color: rgba(165, 114, 42, 0.48);
  box-shadow: inset 0 0 0 2px rgba(165, 114, 42, 0.28);
}

.section {
  padding: 42px 0;
}

.section-alt {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.22);
}

.section-head {
  margin-bottom: 20px;
}

.section-kicker {
  color: var(--gold);
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 10px 0 0;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-title,
.figure-head h3,
.resource-card h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.figure-meta {
  display: none;
}

.figure-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

.paper-figure {
  margin: 18px 0 0;
}

.figure-image {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  box-shadow: 0 14px 36px rgba(34, 47, 74, 0.08);
}

.figure-image-tall {
  max-width: 760px;
  margin: 0 auto;
}

.compare-columns,
.config-showcase,
.qual-grid,
.mini-metrics {
  display: grid;
  gap: 16px;
}

.clean-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.clean-list li + li {
  margin-top: 8px;
}

.compare-columns,
.config-showcase,
.qual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.compare-card,
.qual-card,
.config-mock,
.pipeline-step {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}

.compare-card,
.qual-card {
  padding: 18px;
}

.compare-card.strong,
.qual-card.improved,
.accent-step {
  background: linear-gradient(180deg, rgba(24, 58, 117, 0.08), rgba(255, 255, 255, 0.72));
}

.compare-title {
  margin: 0 0 12px;
  font-weight: 700;
}

.compact {
  margin-top: 0;
}

.prompt-box {
  margin-top: 18px;
  padding: 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: rgba(24, 58, 117, 0.06);
  color: var(--ink);
}

.prompt-box p {
  margin: 0;
}

.mini-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.mini-metrics > div {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.prompt-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(24, 58, 117, 0.16);
  background: rgba(24, 58, 117, 0.045);
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.68;
}

.mini-value {
  display: block;
  color: var(--accent);
  font-weight: 600;
}

.mini-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.pipeline-step {
  padding: 18px;
}

.step-index {
  display: inline-block;
  color: var(--gold);
  margin-bottom: 10px;
}

.pipeline-step h4 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.pipeline-step p,
.axis-card p,
.resource-card p,
.caption,
.hardest-subtitle,
.mock-caption span,
.qual-card p {
  margin: 0;
  color: var(--muted);
}

.axis-card {
  min-height: 190px;
}

.axis-tag {
  color: var(--accent);
}

.axis-card h3 {
  margin: 12px 0 10px;
  font-size: 1.3rem;
}

.top-gap {
  margin-top: 22px;
}

.config-mock {
  padding: 18px;
}

.mock-grid {
  min-height: 200px;
  border-radius: 14px;
  border: 1px solid rgba(24, 58, 117, 0.12);
  background:
    linear-gradient(90deg, rgba(24, 58, 117, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(24, 58, 117, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, rgba(24, 58, 117, 0.12), rgba(165, 114, 42, 0.12));
  background-size: 18px 18px, 18px 18px, auto;
  position: relative;
  overflow: hidden;
}

.mock-grid::after {
  content: "";
  position: absolute;
  width: 18%;
  aspect-ratio: 1;
  top: 32%;
  left: 44%;
  border-radius: 8px;
  border: 2px dashed rgba(15, 91, 216, 0.8);
  background: rgba(15, 91, 216, 0.14);
}

.mock-grid.dense {
  background-size: 12px 12px, 12px 12px, auto;
}

.mock-grid.ellipse::after {
  border-radius: 50%;
}

.mock-caption {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.hardest-card {
  overflow: hidden;
}

.hardest-subtitle {
  margin-top: 10px;
}

.bar-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: center;
  font-size: 0.92rem;
}

.bar-row span {
  color: var(--muted);
}

.bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(24, 58, 117, 0.1);
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.table-wrap {
  margin-top: 18px;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.88rem;
}

.results-table thead th {
  color: var(--accent);
  font-weight: 600;
  background: rgba(24, 58, 117, 0.05);
}

.results-table tbody tr:hover {
  background: rgba(24, 58, 117, 0.03);
}

.results-table td strong {
  font-weight: 700;
  color: var(--ink);
}

.highlight-row {
  background: rgba(165, 114, 42, 0.06);
}

pre {
  margin: 0;
  padding-top: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
  font-size: 0.95rem;
}

.caption {
  margin-top: 14px;
  font-size: 0.95rem;
}

.faq-intro {
  max-width: 860px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
}

.faq-grid {
  align-items: stretch;
}

.faq-item {
  position: relative;
  padding-top: 52px;
}

.faq-index {
  position: absolute;
  top: 22px;
  left: 22px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.faq-item h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.faq-item p + p {
  margin-top: 10px;
}

.resource-card {
  display: block;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.resource-card h3 {
  margin-bottom: 10px;
}

.site-footer {
  padding: 26px 0 42px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1060px) {
  .hero-grid,
  .two-col,
  .three-col,
  .pipeline,
  .compare-columns,
  .config-showcase,
  .qual-grid,
  .mini-metrics {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .section-head h2 {
    max-width: none;
  }

  .author-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nav {
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .nav-right {
    width: 100%;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }

  .author-links {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-row strong {
    justify-self: start;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--maxw), calc(100% - 24px));
  }

  .section {
    padding: 34px 0;
  }

  .paper-card,
  .figure-card,
  .resource-card {
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 2.4rem;
  }
}