/* Bundle the variable font so type stays consistent without external requests. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #303735;
  --muted: #66706c;
  --green: #587b50;
  --blue: #42789c;
  --line: #e2e7e2;
  --soft: #f6f8f5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Inter, Arial, sans-serif; font-size: 17px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button { font: inherit; }
button, a, [tabindex], video { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
figure, p { margin: 0; }
p + p { margin-top: 18px; }
strong { font-weight: 600; }
.container { width: min(1040px, calc(100% - 48px)); margin-inline: auto; }
.prose { width: min(820px, 100%); margin-inline: auto; }
.recap { color: var(--green); font-weight: 650; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 8px 16px; background: #fff; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

/* Keep the opening close to an academic paper, with the video directly below. */
.paper-header { padding-top: 48px; text-align: center; }
h1 { margin: 0; color: #303432; font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; line-height: 1.24; letter-spacing: -.035em; }
.institution-logos { display: flex; justify-content: center; align-items: center; gap: 30px; margin: 24px 0 20px; height: 55px; }
.eth-logo { width: 184px; }
.epfl-logo { width: 114px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 25px; font-size: 19px; line-height: 1.5; }
.authors > span { white-space: nowrap; }
sup { margin-left: 2px; font-size: .64em; vertical-align: super; line-height: 0; }
.affiliations { margin-top: 14px; color: #535c57; font-size: 14px; line-height: 1.7; }
.affiliations p + p { margin-top: 3px; }
.affiliations sup { margin-right: 4px; }
.author-note { margin-top: 8px; color: var(--muted); font-size: 13px; }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 23px; }
.resource { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 41px; padding: 7px 17px; border: 1px solid #d5d9d1; border-radius: 25px; color: #5c6258; background: #e9ebe8; font-size: 14px; line-height: 1.4; }
.resource svg { width: 18px; height: 18px; flex-shrink: 0; fill: #70766c; }
.resource:hover { text-decoration: none; background: #dfe3db; border-color: #c7cec0; }
.video-length { font-size: 12px; color: #747a70; }
.overview { max-width: 900px; padding-top: 40px; padding-bottom: 46px; }
video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #fcfcfa; border: 1px solid #e7ebe4; border-radius: 6px; }
.takeaway { margin-top: 27px; text-align: center; font-size: 24px; font-weight: 450; line-height: 1.5; letter-spacing: -.02em; }

/* Long-form sections share one readable column; figures can use the full width. */
h2 { margin: 0 0 30px; text-align: center; font-size: 30px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
h3 { margin: 0 0 14px; font-size: 21px; line-height: 1.4; font-weight: 550; letter-spacing: -.02em; }
h4 { margin: 0; font-size: 20px; font-weight: 550; line-height: 1.4; }
.abstract-section { background: var(--soft); padding: 44px 24px 48px; }
.paper-section { padding-top: 50px; padding-bottom: 50px; }
.method-figure { margin: 32px 0 38px; }
figcaption { max-width: 820px; margin: 18px auto 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
figcaption a { white-space: nowrap; }

/* Bundle a TeX math font for consistent, selectable native MathML. */
@font-face {
  font-family: "Latin Modern Math";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/latinmodern-math.otf") format("opentype");
}
math { font-family: "Latin Modern Math", math; font-size: 1em; font-weight: 400; }
.equation { margin: 22px 0 27px; padding: 5px 0; text-align: center; }
.equation math { font-size: 22px; }
.decomposition { margin-bottom: 0; }
.summary-term, .summary-signal .signal-symbol { color: var(--green); }
.action-term, .action-signal .signal-symbol { color: var(--blue); }
.signal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 24px; }
.signal { border-top: 2px solid #a0b397; padding-top: 19px; }
.signal h3 { display: flex; align-items: baseline; gap: 12px; font-size: 19px; margin-bottom: 10px; }
.signal p { font-size: 16px; line-height: 1.75; }
.signal-symbol { flex-shrink: 0; font-size: 20px; letter-spacing: normal; }
.action-signal { border-top-color: #99b4c8; }
.joint-training { margin-top: 30px; }
.results-section { border-top: 1px solid var(--line); }
.result-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; max-width: 880px; margin: 32px auto 0; }
.result-charts figure { text-align: center; }
.result-gain { margin-top: 8px; color: var(--green); font-size: 24px; font-weight: 550; font-variant-numeric: tabular-nums; }
.result-gain span { font-size: 13px; font-weight: 400; }
.result-charts img { margin-top: 0; width: 100%; }
.result-detail { margin-top: 42px; }
.table-scroll { overflow-x: auto; margin-top: 24px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; text-align: center; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 0 0 12px; font-size: 13px; color: var(--muted); }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; }
thead { border-top: 2px solid #7a887d; border-bottom: 1px solid #aeb8ae; }
thead th { font-size: 13px; color: #4c5850; }
th:first-child { text-align: left; padding-left: 14px; }
.highlight-row { background: #eff5eb; color: #405b3b; }
.reference-row { color: #66706c; }
.scaling-figure { max-width: 880px; margin: 28px auto 0; }
.scaling-figure img { width: 100%; }

/* Citation remains selectable without JavaScript or clipboard access. */
.citation-section { padding: 46px 24px 35px; background: var(--soft); }
.citation-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.citation-heading h2 { margin: 0; text-align: left; font-size: 26px; }
#copy-citation { padding: 7px 13px; border: 1px solid #cbd5c7; border-radius: 5px; color: #44653e; background: #fff; cursor: pointer; font-size: 13px; }
#copy-citation:hover { background: #edf3e9; }
pre { margin: 0; padding: 22px 25px; overflow-x: auto; border: 1px solid #e2e7dd; border-radius: 4px; background: #fff; font-size: 14px; line-height: 1.7; tab-size: 2; }
code { font-family: Consolas, "Liberation Mono", monospace; }
.citation-note { margin-top: 12px; font-size: 12px; color: var(--muted); }
.copy-status { min-height: 20px; margin-top: 5px; color: var(--green); font-size: 13px; }
footer { padding: 35px 0 38px; text-align: center; color: var(--muted); font-size: 15px; }
footer .site-credit { margin-top: 5px; font-size: 12px; }

@media (max-width: 700px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 36px); }
  .paper-header { padding-top: 32px; }
  h1 { font-size: 30px; letter-spacing: -.035em; line-height: 1.28; }
  .desktop-break { display: none; }
  .institution-logos { gap: 24px; margin: 19px 0; }
  .eth-logo { width: 155px; }
  .epfl-logo { width: 96px; }
  .authors { font-size: 16px; gap: 7px 17px; }
  .affiliations { font-size: 13px; }
  .resource-links { gap: 8px; }
  .resource { padding: 8px 7px; font-size: 13px; gap: 5px; }
  .overview { padding-top: 32px; padding-bottom: 37px; }
  .takeaway { margin-top: 23px; font-size: 21px; }
  .abstract-section { padding: 35px 18px 39px; }
  .paper-section { padding-top: 38px; padding-bottom: 37px; }
  h2 { font-size: 27px; margin-bottom: 24px; }
  h3 { font-size: 20px; }
  .method-figure { margin: 25px 0 30px; }
  figcaption { font-size: 13px; }
  .equation math { font-size: 21px; }
  .signal-columns { grid-template-columns: 1fr; gap: 25px; margin-top: 27px; }
  .signal p { font-size: 16px; }
  .result-charts { gap: 22px; grid-template-columns: 1fr; max-width: 430px; }
  .result-gain { margin-top: 3px; }
  .result-detail { margin-top: 37px; }
  .citation-section { padding: 34px 18px 24px; }
  pre { padding: 16px; font-size: 12px; }
}

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