@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("./fonts/source-serif-4-latin.woff2") format("woff2");
}

@font-face {
  font-family: "UniKey Demo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/dejavu-sans-bold.woff2") format("woff2");
}

:root {
  font-family: Helvetica, Arial, sans-serif;
  color: #0c0c0c;
  background: #f6f6ef;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #0c0c0c;
  --muted: #65655f;
  --paper: #f6f6ef;
  --line: #0c0c0c29;
  --accent: #5b996a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 0; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
img, video { max-width: 100%; }
figure { margin: 0; }
svg { flex-shrink: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 120; padding: 10px 16px; color: var(--paper); background: var(--ink); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.scroll-progress { display: none; }

/* Full-screen opening, followed by the research article. */
.opening { height: 100svh; background: #050505; overflow: hidden; }
.opening-stage { position: relative; height: 100%; overflow: hidden; }
.opening video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.opening-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(#0000001a, #00000005 42%, #00000047); }
.scroll-cue { position: absolute; z-index: 3; bottom: 30px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 12px #000000b3; animation: scroll-cue-float 1.8s ease-in-out infinite; }
.scroll-cue::after { content: ""; display: block; width: 2px; height: 24px; margin: 10px auto 0; border-radius: 2px; background: #fff; }
@keyframes scroll-cue-float { 50% { transform: translate(-50%, 5px); } }
.hero-playback { position: absolute; right: 24px; bottom: 30px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #fff; border: 1px solid #ffffff70; border-radius: 50%; background: #00000020; }
.hero-playback:focus-visible, .scroll-cue:focus-visible { outline-color: #fff; }

.article-body { padding: 72px 48px 104px; }
.article-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: start; column-gap: clamp(28px, 3.5vw, 64px); max-width: 1440px; margin: 0 auto; }
.article-shell { min-width: 0; width: min(965px, 100%); margin: 0 auto; }
.shell { width: 100%; margin: 0; }
.article-outline { position: sticky; top: 118px; align-self: start; padding-left: 14px; border-left: 1px solid var(--line); }
.section-nav { display: grid; }
.section-nav a { position: relative; display: block; padding: 9px 0; color: #0c0c0ca8; font-size: 15px; font-weight: 400; line-height: 1.28; transition: color .16s; }
.section-nav a[data-level="2"] { padding: 5px 0 5px 12px; color: #0c0c0c80; font-size: 13px; }
.section-nav a[data-level="3"] { padding: 4px 0 4px 24px; color: #0c0c0c80; font-size: 13px; }
.section-nav a::before { content: ""; position: absolute; top: 50%; left: -15px; width: 1px; height: 0; transform: translateY(-50%); background: var(--ink); transition: height .16s; }
.section-nav a:hover, .section-nav a[aria-current], .section-nav a:focus-visible { color: var(--ink); }
.section-nav a:hover::before, .section-nav a[aria-current]::before { height: 20px; }

.article-header { container-type: inline-size; margin: 0 0 72px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
h1 { margin: 0; font-size: clamp(28px, 3.9cqi, 40px); font-weight: 700; line-height: 1.08; letter-spacing: -.02em; text-align: center; text-wrap: balance; }
h1 > span { display: block; }
.title-brand { color: var(--accent); }
.author-institutions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; text-align: center; }
.author-details { min-width: 0; }
.authors { margin: 0; color: var(--ink); font-size: 18px; font-weight: 400; line-height: 1.6; }
.authors span { white-space: nowrap; }
.authors a { text-decoration: underline; text-decoration-color: #0c0c0c70; text-underline-offset: .2em; }
.authors a:hover { text-decoration-color: currentColor; }
.affiliations { display: flex; justify-content: center; gap: 20px; margin: 8px 0 0; color: var(--muted); font-size: 15px; font-weight: 400; line-height: 1.5; }
.affiliations span { white-space: nowrap; }
.authors sup, .affiliations sup { font-size: .7em; line-height: 0; }
.institution-logos { display: flex; align-items: center; justify-content: center; gap: 24px; max-width: 100%; }
.institution-logos img { display: block; height: auto; object-fit: contain; }
.columbia-logo { width: 200px; max-width: 48%; }
.tri-logo { width: 160px; max-width: 40%; }
.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-keypoint-video { width: 100%; margin: 34px auto 0; }
.hero-keypoint-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.elapsed-rollout-link { display: inline-block; margin-top: 8px; font-size: 14px; text-decoration: underline; text-underline-offset: .16em; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 14px; border: 1px solid #0c0c0c38; border-radius: 8px; font-size: 16px; line-height: 1.4; background: transparent; transition: border-color .16s, background .16s; }
.button svg { width: 16px; height: 16px; }
.button:hover { border-color: #0c0c0c99; background: #0c0c0c05; }

.section { margin: 0; padding: 0; }
.section + .section { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-head { margin: 0 0 30px; }
h2 { margin: 0; font-size: 27px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.pipeline-copy, .capability-list, .technical-steps { margin: 19px 0 0; font-size: 17px; font-weight: 400; line-height: 1.55; letter-spacing: 0; }
.pipeline-copy strong, .technical-steps strong { font-weight: 600; }
.pipeline-copy strong.emphasis-black { color: var(--ink); font-weight: 700; }
.introduction { margin: 0; }
.capability-list, .technical-steps { padding-left: 30px; }
.capability-list li + li { margin-top: 8px; }
.capability-list a, .paper-reference a { text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
.capability-list a { font-weight: 600; }
.subsection-head { margin: 0 0 20px; }
.subsection-head h3, .domain-randomization-block h3, .technical-subsection > h3 { margin: 0 0 20px; font-size: 20px; line-height: 1.2; font-weight: 700; letter-spacing: -.005em; }
.subsection-head h4 { margin: 0; font-size: 20px; line-height: 1.4; font-weight: 500; }
.realworld-block, .domain-randomization-block { margin-top: 40px; }
.realworld-rollouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; margin-top: 28px; }
.realworld-rollouts article { display: flex; flex-direction: column; min-width: 0; }
.realworld-rollouts h4 { margin: 0 0 12px; font-size: 19px; font-weight: 500; line-height: 1.6; }
.realworld-rollouts video { display: block; width: 100%; height: auto; margin-top: auto; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 6px; background: #111; }
.media-caption, .paper-figure figcaption { margin: 16px 0 0; color: #0c0c0cb8; font-size: 14px; line-height: 1.5; }
.technical-subsection + .technical-subsection { margin-top: 48px; }
.technical-steps li + li { margin-top: 14px; }
.technical-results { margin-top: 40px; }
.paper-figure { margin-top: 28px; }
.figure-link { display: block; }
.paper-figure img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.paper-figure figcaption a { text-decoration: underline; text-underline-offset: .16em; }
.anchor-target { display: block; }

.qa-list { border-top: 1px solid var(--line); }
.qa-list details { border-bottom: 1px solid var(--line); }
.qa-list summary { position: relative; padding: 18px 36px 18px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; line-height: 1.45; }
.qa-list summary::-webkit-details-marker { display: none; }
.qa-list summary::after { content: "+"; position: absolute; top: 17px; right: 4px; font-size: 24px; line-height: 1.2; font-weight: 400; }
.qa-list details[open] summary::after { content: "−"; }
.qa-list p { margin: 0 36px 20px 0; font-size: 17px; line-height: 1.55; }

/* Restrained controls and media frames match the reference article. */
.task-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
.task-picker button { min-width: 0; min-height: 42px; padding: 8px 9px; border: 1px solid #0c0c0c38; border-radius: 6px; color: #0c0c0cb8; background: transparent; font-size: 14px; line-height: 1.3; transition: border-color .16s, background .16s, color .16s; }
.task-picker button:hover, .task-picker button.active { color: var(--ink); border-color: #0c0c0ca8; background: #0c0c0c0b; }
.task-picker button.active { box-shadow: inset 0 -2px 0 var(--ink); }
.task-picker.pipeline-picker, .task-picker.detection-picker, .task-picker.iterations-picker, .task-picker.domain-randomization-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pipeline-videos, .detection-videos, .iterations-videos, .domain-randomization-videos { margin-top: 20px; }
.pipeline-video { width: 100%; margin-inline: auto; }
.pipeline-videos video, .detection-videos video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #efefe8; }
.detection-videos video { aspect-ratio: auto; }
.detection-videos + .pipeline-copy { margin-top: 24px; }
.automatic-corrections-video { width: 100%; margin: 0 auto; }
.automatic-corrections-video video, .domain-randomization-video video { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #efefe8; }
.automatic-corrections-video video { aspect-ratio: auto; }
#iterations-hang-mug video { aspect-ratio: 4 / 3; }
.round-improvement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
.round-improvement-video, .round-improvement-chart { min-width: 0; }
.round-improvement-chart { margin-top: -4.5%; }
.round-improvement-plot { display: block; width: 100%; height: auto; overflow: visible; font-family: "UniKey Demo", "DejaVu Sans", sans-serif; font-weight: 700; }
.round-chart-grid { stroke: #d9ddd7; stroke-width: .9; stroke-dasharray: 3.33 1.44; }
.round-chart-axes { fill: none; color: #545a54; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }
.round-chart-tick-marks { fill: none; stroke: #545a54; stroke-width: 1.3; }
.round-chart-ticks { fill: #545a54; font-size: var(--round-chart-font-size, 19.2px); }
.round-chart-axis-title { fill: #303630; font-size: var(--round-chart-font-size, 19.2px); }
.round-chart-uncertainty { fill: currentColor; fill-opacity: .1; stroke: currentColor; stroke-opacity: .1; stroke-width: .8; }
.round-chart-line { fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: round; }
.round-chart-point { fill: currentColor; stroke: none; }
.round-chart-best { fill: #e5c878; stroke: none; }
.round-chart-label { fill: currentColor; font-size: var(--round-chart-font-size, 19.2px); font-weight: 700; }
.round-chart-note { fill: #737773; font-size: var(--round-chart-font-size, 19.2px); }
.task-list { margin-top: 22px; }
.task-card { min-width: 0; }
.task-card + .task-card { margin-top: 28px; }
.task-card[hidden] + .task-card { margin-top: 0; }
.media-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 18px; }
.video-wrap, .figure-wrap { min-width: 0; overflow: hidden; border-radius: 6px; }
.video-wrap { aspect-ratio: 4 / 3; }
.video-wrap video { display: block; width: 100%; height: 100%; object-fit: contain; background: #111; }
.figure-wrap { display: block; }
.figure-wrap img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
#robotwin .media-grid { align-items: start; }
#robotwin .figure-wrap { aspect-ratio: 1; margin-top: -4.5%; }
#robotwin .figure-wrap img { width: 100%; height: 100%; object-fit: contain; }

.video-player { width: 100%; min-width: 0; }
.realworld-rollouts .video-player { margin-top: auto; }
.video-controls { display: flex; align-items: center; gap: 10px; min-height: 34px; padding-top: 7px; color: #0c0c0cc7; }
.video-controls button { display: grid; place-items: center; flex-shrink: 0; min-width: 28px; height: 28px; padding: 0; border: 1px solid #0c0c0c38; border-radius: 6px; background: transparent; }
.video-controls button:hover { border-color: #0c0c0c99; }
.video-controls .video-speed { min-width: 32px; border: 0; font-size: 14px; }
.video-duration { flex-shrink: 0; min-width: 3ch; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.video-controls input { --progress: 0%; appearance: none; flex: 1; min-width: 0; height: 3px; margin: 0 3px; border-radius: 0; background: linear-gradient(to right, #3b3d39 var(--progress), #3b3d3957 var(--progress)); cursor: pointer; }
.video-controls input:disabled { cursor: default; }
.video-controls input::-webkit-slider-thumb { appearance: none; width: 7px; height: 7px; border: 0; border-radius: 50%; background: #3b3d39; }
.video-controls input::-moz-range-thumb { width: 7px; height: 7px; border: 0; border-radius: 50%; background: #3b3d39; }
.video-wrap:has(.video-player) { aspect-ratio: auto; overflow: visible; }
.video-wrap .video-player video { height: auto; aspect-ratio: 4 / 3; border-radius: 6px; }
.media-grid:has(.video-player) { align-items: start; }
.video-player:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 24px; background: var(--paper); }
.video-player:fullscreen video { flex: 1; min-height: 0; width: 100%; height: calc(100dvh - 90px); object-fit: contain; aspect-ratio: auto; border: 0; }
.video-player:fullscreen .video-controls { width: min(965px, 100%); margin-inline: auto; }
[data-correction-loop]:fullscreen { display: grid; place-items: center; padding: 24px; overflow: auto; background: var(--paper); }
[data-correction-loop]:fullscreen .round-improvement-grid { width: min(100%, 1320px); }

/* On small screens, contents move into a native modal drawer. */
.contents-trigger { display: none; }
#contents-dialog { position: fixed; inset: 0 0 0 auto; width: min(82vw, 320px); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; color: var(--ink); background: var(--paper); border: 0; border-left: 1px solid var(--line); }
#contents-dialog::backdrop { background: #00000080; }
.contents-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px 14px; border-bottom: 1px solid #0c0c0c1a; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.contents-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; }
.contents-links { display: flex; flex-direction: column; padding: 8px 0 24px; }
.contents-links a { padding: 11px 18px; color: #0c0c0cbd; font-size: 16px; line-height: 1.3; }
.contents-links a[data-level="2"] { padding-left: 34px; font-size: 15px; }
.contents-links a[data-level="3"] { padding-left: 50px; font-size: 14px; }
.contents-links a[aria-current] { color: var(--ink); box-shadow: inset 3px 0 var(--accent); }

@media (min-width: 1240px) {
  .article-layout { max-width: 1720px; grid-template-columns: minmax(320px, 1fr) minmax(0, min(965px, calc(100% - 640px))) minmax(320px, 1fr); column-gap: 0; }
  .article-outline { grid-column: 1; width: 176px; }
  .article-shell { grid-column: 2; }
}

@media (max-width: 1050px) and (min-width: 821px) {
  .task-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .task-picker.pipeline-picker, .task-picker.detection-picker, .task-picker.iterations-picker, .task-picker.domain-randomization-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .opening { height: auto; background: transparent; }
  .opening-stage { height: auto; max-width: 965px; margin: 0 auto; padding: 64px 20px 8px; overflow: visible; }
  .opening video { position: static; display: block; width: 100%; height: auto; object-fit: contain; border-radius: 6px; }
  .opening-stage::after { inset: 64px 20px 8px; border-radius: 6px; }
  .scroll-cue { display: none; }
  .hero-playback { right: 30px; bottom: 18px; width: 30px; height: 30px; }
  .article-body { padding: 46px 20px 76px; }
  .article-layout { display: block; }
  .article-outline { display: none; }
  .article-shell { width: 100%; }
  .article-header { margin-bottom: 54px; }
  .affiliations { gap: 12px; font-size: clamp(13px, 4vw, 15px); }
  .pipeline-copy, .capability-list, .technical-steps { font-size: 17px; line-height: 1.55; }
  .qa-list summary, .qa-list p { font-size: 17px; }
  .section + .section { margin-top: 54px; }
  .task-picker { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contents-trigger { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; color: #0c0c0ce6; background: #f6f6efeb; border: 1px solid #0c0c0c1f; border-radius: 999px; box-shadow: 0 8px 24px #0c0c0c24; backdrop-filter: blur(10px); font-size: 14px; }
}

@media (max-width: 580px) {
  .realworld-rollouts, .media-grid, .round-improvement-grid { grid-template-columns: minmax(0, 1fr); }
  .task-picker, .task-picker.pipeline-picker, .task-picker.detection-picker, .task-picker.iterations-picker, .task-picker.domain-randomization-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-picker button { font-size: 14px; min-height: 44px; }
}

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