:root {
  --background: #f7f7f3;
  --surface: #ffffff;
  --text: #000000;
  --muted: #687283;
  --line: #dce1e6;
  --accent: #315f89;
  --accent-soft: #edf2f6;
  --shell: min(960px, calc(100vw - 40px));
  --wide-shell: min(960px, calc(100vw - 40px));
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.wide-shell {
  width: var(--wide-shell);
  margin-inline: auto;
}

.example-shell {
  width: var(--shell);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-band {
  padding: 88px 0 52px;
  background: var(--background);
}

.hero { text-align: center; }

.page-note {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

h1 { margin: 0; }

.paper-name {
  display: block;
  font-size: clamp(56px, 8vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.paper-subtitle {
  display: block;
  max-width: 790px;
  margin: 24px auto 0;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.authors {
  max-width: 900px;
  margin: 34px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 20px;
  font-size: 15px;
  font-weight: 600;
}

sup {
  color: var(--accent);
  font-size: 0.68em;
}

.affiliations {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 26px;
  color: var(--muted);
  font-size: 14px;
}

.author-notes {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.resource-nav {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.resource-link {
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  border: 1px solid var(--text);
  border-radius: 10px;
  background: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.resource-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.resource-muted {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}

.visual-band { padding: 0 0 64px; }

.paper-figure {
  margin: 0;
  padding: 16px 16px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(34, 43, 56, 0.07);
}

.paper-figure a {
  display: block;
  overflow: hidden;
  border-radius: 9px;
  text-decoration: none;
}

.paper-figure figcaption {
  max-width: 940px;
  margin-inline: auto;
  padding: 20px 14px 22px;
  color: var(--text);
  font-size: 14px;
  text-align: center;
}

.paper-figure figcaption strong { color: var(--text); }

.section-band { padding: 64px 0; }

.abstract-band,
.benchmark-band,
.results-band {
  background: var(--surface);
}

.section-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-align: center;
}

.section-copy {
  max-width: none;
  margin: 24px 0 0;
  color: var(--text);
  font-size: 17px;
}

.section-copy strong { color: var(--text); }

.section-intro { max-width: none; }

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

.info-card {
  min-height: 176px;
  padding: 26px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

.benchmark-band .info-card,
.results-band .result-card {
  background: var(--background);
}

.info-card h3,
.result-card h3,
.carousel-heading h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.info-card p {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 15px;
}

.section-figure { margin-top: 36px; }

.method-figure {
  max-width: 960px;
  margin-inline: auto;
}

.result-grid {
  max-width: 680px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.metric-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-row p {
  margin: 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.metric-row strong {
  display: block;
  color: var(--accent);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.metric-row span {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
}

.example-overview { margin-top: 36px; }

.reasoning-carousel {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(34, 43, 56, 0.07);
}

.carousel-heading {
  padding: 4px 4px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.carousel-controls button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.carousel-controls button:hover {
  color: var(--accent);
  border-color: #b8c8d6;
}

.carousel-stage {
  overflow: hidden;
  border-radius: 9px;
}

.reasoning-slide { display: block; }

footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--background);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner a {
  font-weight: 600;
  text-decoration: none;
}

.footer-inner a:hover { color: var(--accent); }

@media (max-width: 760px) {
  :root {
    --shell: min(100% - 28px, 960px);
    --wide-shell: min(100% - 28px, 960px);
  }

  .example-shell { width: min(100% - 28px, 960px); }
  .hero-band { padding: 64px 0 42px; }
  .paper-name { font-size: 54px; }
  .paper-subtitle { margin-top: 18px; font-size: 24px; }
  .authors { margin-top: 28px; gap: 6px 14px; font-size: 14px; }
  .affiliations { flex-direction: column; gap: 2px; font-size: 14px; }
  .visual-band { padding-bottom: 48px; }
  .section-band { padding: 48px 0; }
  .section-title { font-size: 34px; }
  .section-copy { margin-top: 20px; font-size: 16px; }
  .info-grid, .result-grid { grid-template-columns: 1fr; }
  .info-grid, .result-grid { margin-top: 30px; }
  .info-card { min-height: 0; padding: 23px; }
  .paper-figure { padding: 8px 8px 0; border-radius: 12px; }
  .paper-figure figcaption { padding: 16px 8px 18px; }
  .section-figure { margin-top: 26px; }
  .reasoning-carousel { padding: 8px; border-radius: 12px; }
  .carousel-heading { padding: 7px 4px 13px; }
  .carousel-heading h3 { font-size: 16px; }
  .carousel-controls { gap: 6px; }
  .carousel-controls button { width: 36px; height: 36px; }
}

@media (max-width: 430px) {
  .resource-nav { flex-direction: column; align-items: stretch; }
  .resource-link { justify-content: center; }
  .paper-name { font-size: 48px; }
  .paper-subtitle { font-size: 22px; }
  .metric-row strong { font-size: 27px; }
  .carousel-heading { align-items: flex-start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

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