@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("assets/fonts/source-sans-3-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #252a30;
  --muted: #5c6670;
  --blue: #447890;
  --blue-ink: #39657a;
  --purple: #94508a;
  --green: #276449;
  --surface: #f5f7f9;
  --line: #dce3e8;
  --page-width: 1100px;
  --column-gap: 40px;
  --section-heading-gap: 24px;
  --blue-tint: #edf3f6;
  --purple-tint: #f5eef4;
  --figure-shadow: 0 16px 48px rgb(68 120 144 / 14%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--scroll-offset, 90px); }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Source Sans 3", "Segoe UI", sans-serif; font-size: 18px; line-height: 1.6; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: var(--blue); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; border-radius: 3px; }
img { display: block; max-width: 100%; height: auto; }
figure, p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
h2 { font-size: clamp(29px, 3.3vw, 38px); letter-spacing: -0.025em; font-weight: 600; }
h3 { font-size: 21px; font-weight: 600; }
strong { font-weight: 600; }
sup { font-size: .66em; line-height: 0; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
code { font-size: .83em; }
[hidden] { display: none !important; }
.container { width: min(var(--page-width), calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; padding: 8px 14px; background: #fff; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.nav-shell { width: min(var(--page-width), calc(100% - 64px)); min-height: 66px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.wordmark { display: flex; flex-shrink: 0; align-items: center; gap: 13px; color: var(--ink); font-size: 23px; font-weight: 700; text-decoration: none; letter-spacing: -.035em; }
.wordmark-nodes { display: inline-flex; align-items: center; gap: 3px; }
.wordmark-nodes i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.wordmark-nodes i:nth-child(2) { background: var(--purple); }
.wordmark-nodes i:nth-child(3) { background: var(--green); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 15px; }
.nav-links a { position: relative; text-decoration: none; color: var(--muted); white-space: nowrap; padding: 10px; border-radius: 6px; transition: color .16s ease, background .16s ease; }
.nav-links a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; height: 2px; background: var(--blue); opacity: 0; }
.nav-links a:hover { color: var(--blue-ink); }
.nav-links a[aria-current="location"] { color: var(--blue-ink); background: var(--blue-tint); }
.nav-links a[aria-current="location"]::after { opacity: 1; }
.hero { padding-top: 64px; text-align: center; }
.hero h1 { font-size: clamp(38px, 4.1vw, 54px); letter-spacing: -.035em; font-weight: 700; line-height: 1.14; }
.hero .title-action, .wordmark .title-action { color: var(--blue); }
.hero .title-opd, .wordmark .title-opd { color: var(--purple); }
.hero .title-subtitle { font-weight: 400; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 19px; list-style: none; padding: 0; margin: 28px auto 3px; font-size: 18px; }
.authors li { white-space: nowrap; }
.authors a { color: var(--blue); text-decoration: none; }
.authors a:hover, .authors a:focus-visible { text-decoration: underline; }
.authors sup { margin-left: 2px; }
.affiliation { font-size: 18px; }
.author-notes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin-top: 5px; color: var(--muted); font-size: 14px; }
.resources { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0; }
.resource-link { display: inline-flex; gap: 10px; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border: 1px solid #b8cbd5; border-radius: 9px; color: var(--ink); font-size: 17px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; background: #fff; box-shadow: 0 2px 3px rgb(37 42 48 / 4%); transition: background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.resource-link:hover { border-color: var(--blue); background: var(--blue-tint); box-shadow: 0 4px 12px rgb(68 120 144 / 12%); }
.icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; }
.hf-icon { width: 24px; height: 24px; }
.hero-summary { max-width: 74ch; margin-inline: auto; font-size: 21px; line-height: 1.5; color: #47545e; text-wrap: pretty; }
.overview-figure { margin: 40px auto 0; }
.overview-figure .figure-link { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--figure-shadow); }
.overview-figure figcaption { margin-top: 20px; }
.figure-link { display: block; position: relative; border-radius: 6px; }
.figure-link > img { width: 100%; }
.zoom-hint { position: absolute; right: 6px; bottom: 3px; display: flex; gap: 8px; align-items: center; padding: 3px 8px; background: #fff; color: var(--muted); font-size: 12px; line-height: 1.4; opacity: 0; transition: opacity .15s ease; border: 1px solid var(--line); border-radius: 4px; }
.figure-link:hover .zoom-hint, .figure-link:focus-visible .zoom-hint { opacity: 1; }
figcaption { margin-top: 15px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.section { padding-block: 76px; }
.self-section > .container > h2 { max-width: calc((100% - var(--column-gap)) / 2); }
.method-section { margin-top: 40px; padding-top: 48px; border-top: 1px solid var(--line); }
.section-intro p { margin-top: var(--section-heading-gap); color: #48545e; }
.method-layout, .results-layout, .evidence-layout, .case-intro, .case-comparison, .self-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--column-gap); align-items: end; }
.algorithm-figure { align-self: end; margin-bottom: 16px; }
.method-steps { margin: 32px 0 0; padding: 0; list-style: none; }
.method-steps li { position: relative; padding: 0 0 28px 52px; }
.method-steps li:last-child { padding-bottom: 0; }
.method-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; border-left: 1px solid #c2d4dd; }
.step-number { position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #b8cbd5; border-radius: 50%; background: var(--blue-tint); color: var(--blue-ink); font-weight: 600; font-size: 18px; }
.method-steps p { margin-top: 8px; color: var(--muted); line-height: 1.6; }
.algorithm-figure .figure-link { padding: 24px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.algorithm-figure figcaption { text-align: center; }
.method-insight { margin-top: 28px; padding: 20px 24px; border-left: 3px solid var(--blue); border-radius: 0 8px 8px 0; background: var(--blue-tint); color: #47545e; }
.results-section, .ablation-section, .self-section { background: var(--surface); }
.results-copy > h3 { margin-top: 28px; }
.results-copy > p { margin-top: 13px; }
.key-result { color: var(--blue); font-weight: 700; }
.scaling-figure { align-self: end; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px rgb(37 42 48 / 3%); }
.scaling-figure figcaption { text-align: center; }
.table-scroll { overflow-x: auto; }
.score-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; margin-top: 24px; font-size: 17px; }
.score-table caption { text-align: left; color: var(--muted); font-size: 14px; margin-bottom: 9px; }
.score-table th, .score-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.score-table th:first-child { padding-left: 0; text-align: left; }
.score-table thead th { border-top: 1px solid #9faeb8; border-bottom: 1px solid #9faeb8; font-weight: 600; font-size: 15px; }
.score-table tbody th { font-weight: 400; }
.score-table tbody tr:last-child th, .score-table tbody tr:last-child td { border-bottom: 1px solid #9faeb8; }
.scaling-table .size-four { color: var(--blue-ink); background: #e7eff3; border-top: 3px solid var(--blue); }
.scaling-table .size-eight { color: var(--purple); background: #f0e7ef; border-top: 3px solid var(--purple); }
.scaling-table tbody td:nth-child(2) { background: rgb(68 120 144 / 4%); }
.scaling-table tbody td:nth-child(3) { background: rgb(148 80 138 / 4%); }
.score-table td { white-space: nowrap; }
.gain { font-size: 12px; color: var(--green); margin-left: 3px; vertical-align: super; font-weight: 600; }
.evidence-copy, .evidence-results { min-width: 0; }
.evidence-copy > * + * { margin-top: 16px; }
.evidence-copy > h2 + * { margin-top: var(--section-heading-gap); }
.evidence-copy strong { color: var(--blue-ink); }
.ablation-variants { padding-left: 20px; margin-bottom: 0; }
.ablation-variants li + li { margin-top: 8px; }
.ablation-variants li::marker { color: var(--blue); }
.evidence-results .score-table { margin-top: 0; }
.comparison-table thead tr + tr th:first-child, .ablation-table thead tr + tr th:first-child { padding-left: 10px; text-align: center; }
.comparison-table thead th[colspan], .ablation-table thead th[colspan] { border-bottom-color: var(--line); }
.actionopd-row { background: #e7eef2; }
.score-table .actionopd-row th { padding-left: 10px; font-weight: 600; }
.case-tabs { display: flex; gap: 4px; justify-self: end; align-self: end; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.case-tabs a { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 17px; font-weight: 600; transition: background .16s ease, color .16s ease, border-color .16s ease; }
.case-tabs svg { width: 20px; height: 20px; flex-shrink: 0; }
.case-tabs a:hover { color: var(--blue-ink); background: var(--blue-tint); }
.case-tabs a[aria-selected="true"] { color: var(--blue); border-color: #b8cbd5; background: #fff; box-shadow: 0 2px 5px rgb(37 42 48 / 5%); }
.case-panel { margin-top: 32px; }
.case-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.case-heading h3 { font-size: 24px; }
.case-count { color: var(--muted); font-size: 14px; text-align: right; }
.case-count strong { display: block; color: var(--green); font-size: 27px; line-height: 1.3; white-space: nowrap; font-variant-numeric: tabular-nums; }
.case-count strong span { padding-inline: 8px; font-size: 20px; font-weight: 400; }
.case-context { margin-top: 10px; color: var(--muted); }
.case-comparison { align-items: stretch; margin-top: 24px; }
.case-run { padding: 28px; border-radius: 0 0 12px 12px; font-size: 18px; }
.base-run { background: #faf5f4; border-top: 3px solid #bd8278; }
.trained-run { background: #f0f6f3; border-top: 3px solid var(--green); }
.case-run h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.case-detail { margin-top: 14px; font-size: 15px; color: var(--muted); }
.outcome { font-size: 13px; padding: 1px 9px; border-radius: 4px; }
.failure { background: #f7e6e3; color: #9a392b; }
.success { background: #dcece1; color: var(--green); }
.self-layout { margin-top: var(--section-heading-gap); align-items: stretch; }
.self-copy { display: flex; flex-direction: column; gap: 18px; }
.self-copy > p + p { margin-top: auto; }
.self-results { display: flex; flex-direction: column; gap: 16px; }
.self-table { margin-top: auto; }
.self-table th, .self-table td { padding-block: 7px; }
.self-context { padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-align: center; }
.shared-weights { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 12px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.shared-weights > span { font-size: 14px; font-weight: 400; color: var(--muted); }
.context-branches { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.context-branches::before { content: ""; position: absolute; top: -6px; left: 25%; right: 25%; height: 6px; border: 1px solid #c4ccd5; border-bottom: 0; border-radius: 3px 3px 0 0; }
.context-branches::after { content: ""; position: absolute; top: -11px; left: 50%; height: 5px; border-left: 1px solid #c4ccd5; }
.context-role { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 6px; padding: 8px; border-radius: 6px; }
.context-role strong { font-size: 16px; line-height: 1.4; }
.context-role span { font-size: 14px; line-height: 1.5; }
.teacher-context { background: var(--purple-tint); color: #77426f; }
.student-context { background: var(--blue-tint); color: var(--blue-ink); }
.citation-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.copy-button, .dialog-close { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; background: #fff; border: 1px solid #c4d1d9; border-radius: 6px; padding: 7px 12px; font-size: 15px; color: var(--ink); cursor: pointer; }
.copy-button, .dialog-close { transition: background .16s ease, border-color .16s ease; }
.copy-button:hover, .dialog-close:hover { background: var(--surface); border-color: var(--blue); }
.copy-button .icon { width: 17px; height: 17px; }
.citation-code { overflow-x: auto; margin: var(--section-heading-gap) 0 0; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 0 10px 10px 0; padding: 24px 28px; background: var(--surface); line-height: 1.75; tab-size: 2; }
.citation-code code { font-size: 13px; }
.copy-status { min-height: 1.6em; margin-top: 6px; font-size: 14px; color: var(--green); }
.figure-dialog { max-width: min(1400px, calc(100vw - 40px)); width: max-content; max-height: calc(100dvh - 40px); padding: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.figure-dialog::backdrop { background: rgb(20 32 42 / 72%); }
.dialog-toolbar { display: flex; gap: 30px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dialog-toolbar p { font-size: 17px; font-weight: 600; }
.dialog-close { flex-shrink: 0; }
.dialog-close span { font-size: 22px; line-height: 1; }
.dialog-image-area { overflow: auto; max-height: 68dvh; }
.dialog-image-area img { width: 1100px; max-width: none; height: auto; }
.dialog-image-area img.portrait-figure { width: 700px; }
.dialog-help { margin-top: 10px; font-size: 13px; color: var(--muted); }
.modal-open { overflow: hidden; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
  .self-section > .container > h2 { max-width: 100%; }
  .nav-shell { gap: 20px; }
  .nav-links { gap: 0; }
  .method-layout, .results-layout, .evidence-layout, .case-intro, .case-comparison, .self-layout { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .scaling-figure .figure-link { max-width: 480px; margin-inline: auto; }
  .scaling-figure, .algorithm-figure { align-self: start; }
  .algorithm-figure { margin-bottom: 0; }
  .case-heading { display: block; }
  .case-tabs { justify-self: start; align-self: start; }
  .case-count { margin-top: 16px; text-align: left; }
  .case-count strong { display: inline; margin-left: 8px; font-size: 22px; }
  .case-run { padding: 20px; }
  .hero { padding-top: 38px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: var(--scroll-offset, 156px); }
  .container, .nav-shell { width: calc(100% - 36px); }
  .nav-shell { flex-direction: column; gap: 0; padding-top: 7px; min-height: auto; }
  .wordmark { font-size: 21px; }
  .nav-links { flex-wrap: wrap; justify-content: center; width: 100%; gap: 0 8px; font-size: 13px; }
  .nav-links a { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 6px; }
  body { font-size: 17px; }
  .hero h1 { font-size: 34px; }
  .authors { font-size: 16px; gap: 2px 12px; margin-top: 21px; }
  .hero-summary { font-size: 19px; }
  .resource-link { padding-inline: 6px; gap: 6px; font-size: 15px; }
  .resource-link .icon { width: 18px; height: 18px; }
  .resource-link .hf-icon { width: 22px; height: 22px; }
  .resources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .overview-figure { margin-top: 28px; }
  .overview-figure .figure-link { padding: 12px; border-radius: 12px; }
  .zoom-hint { opacity: 1; position: static; width: max-content; margin: 9px 0 0 auto; }
  .section { padding-block: 49px; }
  .method-section { margin-top: 32px; padding-top: 32px; }
  .section-intro p { font-size: 17px; }
  .method-steps li { padding-left: 44px; }
  .case-comparison { grid-template-columns: 1fr; gap: 27px; }
  .score-table { font-size: 15px; }
  .score-table th, .score-table td { padding-inline: 7px; }
  .comparison-table thead tr + tr th:first-child, .ablation-table thead tr + tr th:first-child { padding-left: 7px; }
  .comparison-table thead th, .ablation-table thead th { font-size: 13px; }
  .scaling-table thead th { font-size: 13px; }
  .scaling-table .gain { display: block; font-size: 11px; margin: 0; }
  .case-tabs { width: 100%; gap: 2px; padding: 4px; }
  .case-tabs a { flex: 1; flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 15px; }
  .case-heading h3 { font-size: 22px; }
  .case-run { padding: 20px; font-size: 17px; }
  .case-count strong { display: block; margin: 4px 0 0; }
  .self-context { padding: 16px 12px; }
  .context-branches { gap: 12px; }
  .citation-code { padding: 18px; }
  .copy-button { font-size: 13px; }
  .figure-dialog { padding: 12px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .dialog-toolbar { gap: 15px; }
  .dialog-toolbar p { font-size: 14px; }
  .site-footer { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
