:root {
  --ink: #171914;
  --muted: #666a61;
  --paper: #f7f4ee;
  --cream: #eeeadf;
  --line: #d7d2c7;
  --accent: #e85d36;
  --sky: #68add8;
  --green: #b8db70;
  --dark: #20241d;
  --max: 1180px;
}

/* Typography, widths, and section rhythm follow the companion template in docs2. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.68 Arial, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button, select { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b44c2e; outline-offset: 5px; }
sub, sup { position: relative; font-size: .7em; line-height: 0; }
.shell { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 40; padding: 12px 20px; color: var(--paper); background: var(--ink); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 max(24px, calc((100vw - var(--max)) / 2)); border-bottom: 1px solid rgba(23,25,20,.16); background: rgba(247,244,238,.94); backdrop-filter: blur(14px); }
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.wordmark-accent { color: var(--sky); }
nav { display: flex; gap: 28px; }
nav a { font-size: 17.55px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
nav a:hover { color: #b54728; }
.hero.shell { width: calc(100% - 48px); }
.hero { padding: 82px 0 70px; text-align: center; }
.hero h1 { margin: 0 auto; font-size: clamp(25.2px, 3.5vw, 63px); font-weight: 900; letter-spacing: -.065em; line-height: 1.05; }
.title-sky { color: var(--sky); }
.dek { margin: 34px auto 0; font: clamp(22px, 3vw, 43px)/1.1 Georgia, serif; letter-spacing: -.04em; }
.authors { max-width: 1296px; margin: 34px auto 0; font-size: 20.4px; font-weight: 700; line-height: 1.8; }
.authors span { margin-inline: 8px; color: #a29f96; }
.authors sup { color: #b54728; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.5em; margin: 6px auto 0; color: var(--muted); font-size: 20.16px; text-align: center; }
.affiliations sup { margin-right: .2em; color: #b54728; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; gap: 18px; padding: 13px 17px; border: 1px solid var(--ink); border-radius: 4px; font-size: 16.8px; font-weight: 800; line-height: 1.4; text-decoration: none; transition: transform .2s; }
.button:hover { transform: translateY(-2px); }
.button.dark { color: var(--paper); background: var(--ink); }
/* The supplied writing skill requires callouts to inherit the body type size. */
.thesis { width: fit-content; max-width: 1180px; margin: 55px auto 0; padding: 14px 20px; background: #eef4fb; border: .4pt solid #456d87; border-left: 3pt solid #456d87; border-radius: 2pt; font: inherit; }
.answer { max-width: 1180px; margin: 20px auto 0; font-size: 18px; line-height: 1.65; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--ink); margin-bottom: 70px; }
.numbers > div { padding: 28px 18px; text-align: center; border-right: 1px solid var(--ink); }
.numbers > div:last-child { border-right: 0; }
.stat-value { display: block; color: #b54728; font: 42px/1 Georgia, serif; }
.stat-label { display: block; margin-top: 9px; color: var(--muted); font-size: 13px; font-weight: 700; line-height: 1.4; }

.section { padding: 90px 0; scroll-margin-top: 64px; }
.section-label { padding-top: 9px; color: #397ba4; font-size: 21.6px; font-weight: 800; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; }
.split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 58px; }
h2 { margin: 0; font: 500 clamp(42px, 6vw, 72px)/.98 Georgia, serif; letter-spacing: -.055em; }
.prose { max-width: 850px; }
.prose > p, .section-head p, .figure-setup, .figure-readout, .subsection > p, .method-objective > p:not(.equation) { color: var(--muted); font-size: 17px; line-height: 1.68; }
.prose > p:first-of-type { margin-top: 30px; }
.prose > p:last-child { margin-bottom: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) 430px; align-items: end; gap: 55px; margin: 18px 0 35px; }
.section-head p { margin: 0; }
.single-column { grid-template-columns: 1fr; }
.motivation { background: #eaf1f4; }
.subsection { margin-top: 48px; }
.subsection h3 { margin: 0 0 14px; font: 500 clamp(28px, 3.3vw, 38px)/1.15 Georgia, serif; letter-spacing: -.025em; }
.subsection p { margin: 0; }
.figure-story { margin-top: 44px; }
.paper-figure { margin: 28px 0 0; }
/* Blend white PDF backgrounds into the surrounding section. */
.paper-figure img { width: 100%; background: transparent; mix-blend-mode: multiply; }
.paper-figure a { display: block; }
.paper-figure figcaption { margin-top: 13px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.figure-readout { max-width: 980px; margin: 22px auto 0; }
.figure-setup { margin: 0; }
.compact-figure { max-width: 600px; margin-inline: auto; }
.pipeline-figure { max-width: 880px; margin-inline: auto; }
.method-section { background: var(--cream); }
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 36px; background: var(--ink); border: 1px solid var(--ink); }
.stages article { padding: 27px 24px; background: var(--paper); }
.stages span { color: #b54728; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stages h3 { margin: 15px 0 10px; font: 500 24px/1.1 Georgia, serif; }
.stages p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.method-objective { max-width: 980px; margin: 30px auto 0; }
.equation { margin: 24px 0; text-align: center; font: clamp(21px, 3vw, 30px)/1.5 Georgia, serif; overflow-wrap: anywhere; }
.method-objective strong { color: var(--ink); }
.dark-section { color: var(--paper); background: var(--dark); }
.dark-section .section-label { color: var(--sky); }
.dark-section .section-head p, .dark-section .figure-readout, .dark-section figcaption { color: #c4c8bf; }
.dark-section .paper-figure img { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.figure-pair > div { min-width: 0; }
.figure-pair img { aspect-ratio: 1.56; object-fit: contain; }
.figure-pair span { display: block; margin-top: 10px; text-align: center; font-size: 14px; }

.table-block { margin-top: 32px; border: 1px solid var(--ink); }
.table-heading { display: flex; align-items: baseline; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--ink); }
.table-heading > span { flex-shrink: 0; color: #b54728; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.table-heading h3 { margin: 0; font: 500 24px/1.3 Georgia, serif; }
.table-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 13px; }
.table-tools label { font-weight: 700; }
.table-tools select { min-height: 38px; max-width: 100%; padding: 5px 30px 5px 10px; border: 1px solid #8b8d85; border-radius: 3px; color: var(--ink); background: var(--paper); }
#gap-count { margin-left: auto; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: nowrap; }
th, td { padding: 14px 16px; text-align: right; border-bottom: 1px solid var(--line); }
th[scope="row"], th[scope="rowgroup"], thead th:first-child { text-align: left; }
th[scope="rowgroup"] { vertical-align: top; }
thead th { color: var(--muted); background: rgba(23,25,20,.035); font-size: 11px; letter-spacing: .04em; }
tbody th { font-weight: 400; }
tbody + tbody { border-top: 1px solid #93968c; }
tbody:last-child tr:last-child th, tbody:last-child tr:last-child td { border-bottom: 0; }
.gap-table { min-width: 900px; }
.gap-table thead th:nth-child(2), .results-table thead th:nth-child(2) { text-align: left; }
.gap-table th, .gap-table td { padding-block: 11px; }
.gap-table th[scope="row"] { white-space: normal; }
.gap-table a { text-decoration: none; }
.gap-table a:hover { text-decoration: underline; }
.gap-table .dataset-col { width: 17%; }
.gap-table .model-col { width: 43%; }
.fd-col { background: rgba(104,173,216,.09); }
.fad-col { background: rgba(184,219,112,.12); }
.adapted-row { background: rgba(184,219,112,.25); }
.table-note { margin: 0; padding: 12px 20px 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.result-readout { margin: 30px auto 0; font: 23px/1.5 Georgia, serif; text-align: center; }
.analysis-section { background: var(--cream); }
.section.analysis-section { padding-bottom: 0; }
.separated { margin-top: 34px; }

.takeaways { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 58px; }
.takeaways ol { margin: 0; padding: 0; list-style: none; counter-reset: item; }
.takeaways li { counter-increment: item; display: grid; grid-template-columns: 58px 1fr; gap: 22px; padding: 21px 0; border-top: 1px solid var(--line); font: 27.6px/1.35 Georgia, serif; }
.takeaways li::before { content: "0" counter(item); padding-top: 7px; color: #397ba4; font: 800 15.6px Arial, sans-serif; }
.takeaways li > span { min-width: 0; }
.citation { color: var(--ink); background: var(--sky); }
.citation .section-label { color: var(--ink); }
.citation-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 15px 0 38px; }
.resource-links { display: flex; flex-wrap: wrap; gap: 20px; }
.resource-links a { font-weight: 700; text-decoration: none; }
.citation pre { margin: 0; padding: 26px; overflow: auto; color: #eef1e8; background: var(--ink); border-radius: 3px; font: 21px/1.65 Consolas, Monaco, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.citation code { font: inherit; }
.citation-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.copy-button { padding: 12px 18px; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 4px; font-weight: 700; cursor: pointer; }
.copy-button:hover { color: var(--paper); background: var(--ink); }
#copy-status { font-size: 14px; }
footer { padding: 24px 0; color: #c5c8bf; background: var(--ink); font-size: 13px; }
footer .shell { display: flex; justify-content: space-between; gap: 24px; }

@media (max-width: 1000px) {
  .section-head { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 30px; }
  .single-column { grid-template-columns: 1fr; }
  .split, .takeaways { grid-template-columns: 170px minmax(0, 1fr); gap: 34px; }
  .section-label { font-size: 18px; }
  .stages article { padding: 22px 16px; }
}
@media (max-width: 800px) {
  .shell { width: min(100% - 30px, var(--max)); }
  .topbar { padding-inline: 15px; }
  nav { gap: 16px; }
  nav a { font-size: 15px; }
  nav a:nth-child(2), nav a:nth-child(5) { display: none; }
  .hero.shell { width: calc(100% - 30px); }
  .hero { padding-top: 58px; padding-bottom: 48px; }
  .hero h1 { max-width: 700px; font-size: clamp(33.6px, 7.5vw, 54.6px); }
  .dek { font-size: clamp(25px, 3.6vw, 43px); }
  .thesis { margin-top: 38px; padding: 12px 16px; }
  .authors { font-size: 18px; }
  .numbers { grid-template-columns: 1fr 1fr; margin-bottom: 48px; }
  .numbers > div:nth-child(2) { border-right: 0; }
  .numbers > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .section { padding: 64px 0; }
  .split, .takeaways { grid-template-columns: 1fr; gap: 22px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-head p { max-width: 650px; }
  .stages { grid-template-columns: 1fr 1fr; }
  .figure-pair { grid-template-columns: 1fr; gap: 24px; }
  .figure-pair img { aspect-ratio: auto; }
  .citation-head { display: block; }
  .resource-links { margin-top: 24px; }
}
@media (max-width: 500px) {
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  .wordmark { font-size: 22px; }
  .hero h1 { font-size: 10.5vw; }
  .authors span { margin-inline: 3px; }
  .authors { max-width: 360px; }
  .stat-value { font-size: 34px; }
  .numbers > div { padding: 23px 8px; }
  .stat-label { font-size: 12px; }
  .stages { grid-template-columns: 1fr; }
  .table-heading { display: block; padding: 14px; }
  .table-heading h3 { margin-top: 4px; }
  .table-tools { padding-inline: 14px; }
  #gap-count { width: 100%; margin-left: 0; }
  .takeaways li { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; font-size: 23px; }
  .citation pre { padding: 18px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
@media print {
  .topbar, .actions, .table-tools, .citation-actions, .skip-link { display: none !important; }
  body, .dark-section, .citation, .method-section, .analysis-section, .motivation { color: #000; background: #fff; }
  .dark-section .section-head p, .dark-section .figure-readout, .dark-section figcaption { color: #333; }
  .dark-section .paper-figure img { filter: none; mix-blend-mode: multiply; }
  .section { padding-block: 24px; }
  .table-scroll { overflow: visible; }
  table, .gap-table { min-width: 0; white-space: normal; font-size: 9px; }
  th, td { padding: 5px; }
  #gap-table tbody[hidden] { display: table-row-group !important; }
  .paper-figure { break-inside: avoid; }
}
