:root {
  --accent: #a9182b;
  --accent-dark: #821120;
  --ink: #24272d;
  --muted: #626a75;
  --gray: #f5f6f7;
  --line: #e0e3e7;
  --white: #fff;
  --sans: "Noto Sans", Arial, sans-serif;
  --serif: "Castoro", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
button { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.content-width { max-width: 930px; }
.wide-content { max-width: 1180px; }

.hero {
  padding: 58px 0 42px;
  background: #f2f3f4;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.hero-content { max-width: 1080px; }
.venue {
  display: inline-block;
  margin: 0 0 16px;
  padding: 5px 12px;
  color: #4b515a;
  border: 1px solid #cfd3d8;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .025em;
}
h1 {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.13;
}
.framework-tagline {
  margin: 20px 0 0;
  color: #4c535d;
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}
.authors { margin: 15px 0 0; color: #4b515a; font-size: 19px; }
.authors a, .affiliations a, .correspondence a { color: inherit; }
.authors a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.authors sup, .affiliations sup { color: var(--accent); font-size: .66em; }
.affiliations { margin: 10px 0 0; color: #555b64; font-size: 14px; line-height: 1.55; }
.correspondence { margin: 7px 0 0; color: #6b717a; font-size: 12px; }
.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}
.resource-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 16px 7px 8px;
  color: #fff;
  background: #36383c;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
}
.resource-button:hover { background: #161719; transform: translateY(-1px); }
.resource-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}
.cite-icon { font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1; }
.code-icon { font-size: 9px; letter-spacing: -.08em; }

.section { padding: 62px 0; }
.section-white { background: #fff; }
.section-gray { background: var(--gray); }
.tldr-section { padding-top: 48px; }
h2 {
  margin: 0 0 20px;
  color: #35383d;
  font-size: clamp(27px, 3.5vw, 38px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
}
h3 { color: #363a40; font-size: 20px; line-height: 1.35; }
.section-heading { max-width: 930px; margin: 0 auto; }
.section-kicker {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.case-study-lead { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.72; }
.tldr {
  margin: 0;
  color: #363a40;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.62;
}
.prose p { margin: 0 0 18px; font-size: 17px; line-height: 1.78; }

.figure { margin: 34px 0 0; }
.figure img { display: block; width: 100%; border-radius: 4px; }
.figure figcaption {
  max-width: 850px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.teaser { margin-top: 38px; }
.method-figure { max-width: 720px; margin-right: auto; margin-left: auto; }
.dark-figure img { background: #050505; }

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}
.comparison-card {
  padding: 24px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid #9ca1a9;
  border-radius: 7px;
}
.comparison-card.proposed { border-top-color: var(--accent); }
.comparison-card h3 { margin: 5px 0 9px; }
.comparison-card p { margin: 0; color: #555d68; }
.comparison-card .card-label { color: #727984; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.comparison-card.proposed .card-label { color: var(--accent); }
.insight-box {
  margin-top: 24px;
  padding: 19px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #9ca1a9;
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 17px;
}
.insight-box p { margin: 0; }

.formula-box {
  overflow-x: auto;
  margin: 28px 0;
  padding: 22px 18px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.steps article { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 6px; }
.steps span {
  display: grid;
  width: 29px;
  height: 29px;
  margin-bottom: 14px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}
.steps h3 { margin: 0 0 7px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.result-figure { margin-top: 30px; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 930px;
  margin: 31px auto 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.metric-grid div { padding: 17px 12px; border-right: 1px solid var(--line); text-align: center; }
.metric-grid div:last-child { border-right: 0; }
.metric-grid strong, .metric-grid span { display: block; }
.metric-grid strong { color: var(--accent); font-family: var(--serif); font-size: 27px; font-weight: 400; }
.metric-grid span { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.table-wrap {
  max-width: 930px;
  margin: 22px auto 0;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: right; }
th:first-child, td:first-child { text-align: left; }
th { color: #fff; background: #41454b; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fafafa; }
tr.best { color: var(--accent-dark); background: #fff1f2 !important; font-weight: 700; }
.result-insight { max-width: 930px; margin-right: auto; margin-left: auto; border-left-color: var(--accent); }
.subsection-title { margin: 43px 0 0; font-size: 23px; }

.bibtex-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bibtex-heading h2 { margin-bottom: 0; }
.copy-button {
  padding: 7px 14px;
  color: #44484e;
  background: #fff;
  border: 1px solid #cfd3d8;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.copy-button:hover { border-color: var(--accent); color: var(--accent); }
.bibtex-box { margin: 19px 0 0; }
.bibtex-box code {
  display: block;
  overflow-x: auto;
  padding: 21px;
  color: #e7e9ed;
  background: #34373c;
  border-radius: 6px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}
.copy-status { min-height: 24px; margin: 7px 0 0; color: var(--accent); font-size: 13px; text-align: right; }

footer { padding: 27px 0; color: #9298a1; background: #2d3034; text-align: center; }
footer p { margin: 2px 0; font-size: 12px; }
footer a { color: #cdd1d6; }

a:focus-visible, button:focus-visible { outline: 3px solid rgb(169 24 43 / 25%); outline-offset: 3px; }

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 930px); }
  .hero { padding: 42px 0 34px; }
  h1 { font-size: 36px; }
  .section { padding: 48px 0; }
  .comparison-grid, .steps, .metric-grid { grid-template-columns: 1fr; }
  .metric-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-grid div:last-child { border-bottom: 0; }
  .katex-display { font-size: .82em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
