:root {
  color-scheme: light;
  --bg: #ffffff;
  --light: #f6f7fb;
  --ink: #1c2333;
  --muted: #4a5468;
  --line: #e2e6ee;
  --accent: #3f4fb8;
  --accent-strong: #2f3d95;
  --accent-soft: #edf0fb;
  --accent-softer: #f7f8fd;
  --accent-row: #e4e9fa;
  --amber-soft: #fdf3e3;
  --amber-ink: #92400e;
  --danger: #b42318;
  --button: #232a3d;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgb(28 35 51 / 6%), 0 2px 8px rgb(28 35 51 / 5%);
  --shadow-md: 0 2px 6px rgb(28 35 51 / 8%), 0 10px 24px rgb(63 79 184 / 12%);
  --max-desktop: 960px;
  --max-wide: 1152px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

a:focus-visible,
.button:focus-visible,
.copy-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.is-max-desktop {
  width: min(100% - 40px, var(--max-desktop));
}

section[id] {
  scroll-margin-top: 1.5rem;
}

.hero {
  padding: 3rem 0;
}

.publication-header {
  padding-top: 4rem;
  padding-bottom: 2.75rem;
  text-align: center;
  background: linear-gradient(180deg, var(--accent-soft) 0%, rgb(237 240 251 / 40%) 60%, var(--bg) 100%);
}

.publication-title {
  max-width: 980px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.05rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.publication-venue {
  display: inline-block;
  margin: 1.15rem 0 0;
  padding: 0.28rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.publication-authors {
  margin-top: 1.2rem;
  color: var(--ink);
  font-size: 1.13rem;
  line-height: 1.6;
}

.publication-authors a {
  font-weight: 500;
}

.author-block {
  display: inline-block;
}

.publication-affiliation {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 1rem;
}

.publication-links {
  margin-top: 1.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.button {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  background: var(--button);
  color: #ffffff;
  font-size: 0.97rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.acl-anthology-icon {
  width: 1.05rem;
  height: 1.05rem;
  object-fit: contain;
}

.teaser {
  padding-top: 2.5rem;
  padding-bottom: 3.25rem;
}

.figure-card {
  margin: 0 auto;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.teaser-image {
  width: 100%;
  margin: 0 auto;
  border-radius: calc(var(--radius) - 4px);
}

.subtitle {
  max-width: 900px;
  margin: 1.5rem auto 0;
  font-size: clamp(1.03rem, 2vw, 1.22rem);
  font-weight: 400;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
}

.subtitle strong {
  color: var(--ink);
}

.section {
  padding: 3.25rem 0;
}

.section.is-light {
  background: var(--light);
}

.section-title {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
}

.section-title.align-left {
  text-align: left;
}

.content {
  color: var(--ink);
  font-size: 1rem;
}

.content p {
  margin: 0;
}

.content p + p {
  margin-top: 1rem;
}

.narrow {
  width: min(100%, 900px);
  margin: 1.2rem auto 0;
}

.result-title {
  margin: 2.25rem 0 0.9rem;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.method-grid {
  width: min(100%, var(--max-wide));
  margin: 1.75rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.method-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.method-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.method-grid h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
}

.method-grid .step {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.method-grid p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.stat-grid {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.45rem 1.2rem 1.3rem;
  background: linear-gradient(180deg, var(--accent-softer) 0%, #ffffff 65%);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent) 55%, #93a1ea 100%);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: #c9d3f2;
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 1.7rem;
  height: 1.7rem;
  margin: 0 auto 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgb(63 79 184 / 14%);
  transition: background-color 180ms ease;
}

.stat-card:hover .stat-icon {
  background: var(--accent-row);
}

.stat-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.stat-title {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent-strong);
}

.stat-symbol {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-style: italic;
}

.stat-label {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.stat-label::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 2px;
  margin: 0 auto 0.6rem;
  border-radius: 999px;
  background: #c9d3f2;
}

.method-note {
  width: min(100%, 720px);
  margin: 1.75rem auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.content-note {
  width: min(100%, 720px);
  margin: 0 auto 1.25rem;
  padding: 0.55rem 0.95rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.example-context {
  width: min(100%, 900px);
  margin: 0 auto 1.5rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.example-grid {
  width: min(100%, var(--max-wide));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.example-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.example-card h3 {
  margin: 0 0 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.example-label {
  display: inline-block;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.label-before {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.label-after {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.example-caption {
  margin: 0.9rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.example-prompt {
  margin: 0;
  padding: 0.55rem 0 0.55rem 0.9rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.prob-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.32rem 0;
  font-size: 0.87rem;
  line-height: 1.4;
}

.prob-text {
  flex: 1 1 auto;
}

.prob-track {
  flex: 0 0 84px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
}

.prob-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.prob-fill.high {
  background: var(--danger);
}

.prob-fill.low {
  background: #9aa3b5;
}

.prob-num {
  flex: 0 0 2rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.verdict {
  margin: 1rem 0 0;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.87rem;
  font-weight: 500;
  line-height: 1.45;
}

.verdict-before {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.verdict-after {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.legend {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.chip {
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.4rem;
  display: inline-block;
  border-radius: 3px;
  vertical-align: -0.08rem;
}

.chip-seen {
  border: 1px solid #c9d3f2;
  background: var(--accent-row);
}

.chip-unseen {
  border: 1px solid #f0ddba;
  background: var(--amber-soft);
}

.th-year {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

td.cell-seen {
  background: var(--accent-row);
}

td.cell-unseen {
  background: var(--amber-soft);
}

.tradeoff-figure {
  width: min(100%, 980px);
  margin: 1.5rem auto 0;
}

.figure-caption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
}

.takeaways {
  width: min(100%, 900px);
  margin: 1.25rem auto 0;
  padding-left: 1.2rem;
}

.takeaways li {
  margin-top: 0.4rem;
}

.section.is-light pre {
  background: #ffffff;
}

.table-wrap {
  width: 100%;
  margin-top: 1.4rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

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

th,
td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

td {
  font-variant-numeric: tabular-nums;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

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

tbody tr:nth-child(even) {
  background: var(--accent-softer);
}

tbody tr.rad-row {
  background: var(--accent-row);
}

tbody tr.rad-row th:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.model-group th {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

tbody tr:not(.model-group):hover {
  background: #e9edfb;
}

tbody tr.rad-row:hover {
  background: #dbe2f8;
}

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

pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--light);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

code {
  font-family: var(--font-mono);
}

.citation-heading {
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.citation-heading .section-title {
  margin-bottom: 0;
}

.copy-button {
  min-width: 10rem;
  min-height: 2.6rem;
  margin-left: auto;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.55rem 1.05rem;
  background: var(--accent);
  color: #ffffff;
  font: 600 0.95rem/1.2 var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.copy-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.copy-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.copy-button svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.clipboard-fallback {
  position: fixed;
  top: 0;
  left: -9999px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--light);
  padding: 2.5rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer .sep {
  margin: 0 0.5rem;
}

@media (min-width: 941px) and (max-width: 1200px) {
  .method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .container,
  .is-max-desktop {
    width: min(100% - 28px, var(--max-wide));
  }

  .hero,
  .section {
    padding: 2.2rem 0;
  }

  .publication-header {
    padding-top: 2.75rem;
    padding-bottom: 2.25rem;
  }

  .teaser {
    padding-top: 2.2rem;
  }

  .publication-authors {
    font-size: 1.05rem;
  }

  .publication-links {
    flex-direction: column;
    align-items: center;
  }

  .button {
    width: min(100%, 320px);
  }

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

  .citation-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
