:root {
  --sans: 'Helvetica Neue', Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --mono: 'SFMono-Regular', 'Roboto Mono', 'Cascadia Code', Consolas, monospace;
  --page: #f6f7f9;
  --surface: #f7f8fa;
  --surface-raised: #ffffff;
  --ink: #262626;
  --secondary: #626770;
  --muted: #777d86;
  --line: #e7e9ed;
  --accent: #6350d5;
  --accent-soft: #f3f1fc;
  --track: #f0f2f5;
  --bar: #c9cfd9;
  --author: #000;
  --success: #467664;
  --failure: #876a70;
  --max: 1000px;
  --teal: #009da6;
  --purple: #6350d5;
  color-scheme: light;
  font-family: var(--sans);
  font-synthesis: none;
  background: var(--page);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 26px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; -webkit-font-smoothing: antialiased; }

button, a, video { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, video:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: #b8d9f259; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 100; padding: 12px 18px; background: var(--surface-raised); }
.skip-link:focus { top: 12px; }
.wrap { width: min(var(--max), calc(100% - 144px)); margin-inline: auto; }

.topbar { border-bottom: 1px solid var(--line); background: #ffffffb8; }
.topbar-inner { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: 19px; font-weight: 500; letter-spacing: -.6px; }
.brand img { width: 38px; height: auto; }
.topnav { display: flex; gap: 29px; align-items: center; }
.topnav a { font: 11px/1.5 var(--mono); letter-spacing: .8px; color: var(--secondary); text-transform: uppercase; transition: color .18s; }
.topnav a:hover { color: var(--ink); }

.hero { padding-top: 72px; text-align: center; }
.hero h1 { display: flex; justify-content: center; align-items: center; gap: 20px; font: 600 clamp(72px, 7vw, 94px)/1.05 var(--sans); letter-spacing: -.055em; margin: 0 0 25px; }
.hero h1 img { width: 122px; height: auto; flex-shrink: 0; }
.loop-word { color: var(--teal); }
.wam-word { color: var(--purple); }
.subtitle { max-width: 860px; font: 400 clamp(26px, 2.7vw, 34px)/1.3 var(--sans); letter-spacing: -.025em; margin: 0 auto 30px; text-wrap: balance; }
.authors { max-width: 970px; margin-inline: auto; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 19px; color: var(--author); font-size: 16px; line-height: 1.45; }
.authors > span { white-space: nowrap; }
.author-marker { font-size: .72em; line-height: 0; margin-left: 2px; }
.author-marker.corresponding-marker { font-size: .62em; }
.author-notes .author-marker.corresponding-marker { font-size: .75em; margin-left: 0; }
.author-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px 24px; color: var(--muted); font-size: 13px; line-height: 1.5; margin: 17px 0 0; }
.affiliations { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 30px; font-size: 17px; margin-top: 27px; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 30px 0 56px; }
.resource-button { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 50px; padding: 12px 20px; background: var(--surface-raised); color: var(--ink); font-size: 14px; cursor: default; opacity: 1; }
.resource-button svg { width: 17px; height: 17px; flex-shrink: 0; }
a.resource-button { cursor: pointer; text-decoration: none; }
a.resource-button:hover { border-color: var(--purple); }
.hero-film { text-align: left; overflow: hidden; background: #07090a; border: 1px solid var(--line); border-radius: 10px; }
.hero-film video { width: 100%; aspect-ratio: 16/9; object-fit: contain; }

.section { padding: 86px 0 0; }
.section-heading { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 0 36px; }
.section-number { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 32px; border: 1px solid #e3e0ee; border-radius: 8px; color: var(--purple); background: #eeecf5; font: 12px/1 var(--mono); letter-spacing: 1px; margin-bottom: 20px; }
.section-symbol { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 40px; margin-bottom: 20px; border: 1px solid; border-radius: 12px; }
.section-symbol svg { display: block; width: 25px; height: 25px; }
.section-symbol--loop { color: var(--teal); background: #e9f5f5; border-color: #d6ebeb; }
.section-symbol--method { color: var(--purple); background: #eeecf8; border-color: #e2ddf2; }

.section-heading h2 { font: 500 clamp(30px, 3vw, 38px)/1.18 var(--sans); letter-spacing: -.035em; margin: 0 0 20px; text-wrap: balance; }
.section-heading p { max-width: 800px; margin: 0 auto; color: var(--secondary); font-size: 17px; line-height: 1.7; }
.teaser-figure, .method-figure { margin: 0; overflow: hidden; border-radius: 8px; background: #fff; }
.teaser-figure img, .method-figure img { width: 100%; height: auto; }
.method-section .section-heading { margin-bottom: 35px; }
.method-section .section-heading h2 { margin-bottom: 0; }
.method-panel { margin: 0; }
.method-figure { padding: 22px; background: transparent; }
.techniques { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; margin-top: 34px; }
.technique { padding-top: 23px; border-top: 1px solid var(--line); }
.technique h3 { font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: -.45px; margin: 0 0 14px; }
.technique p { font-size: 16px; color: var(--secondary); line-height: 1.6; margin: 0; }

.metrics { text-align: center; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; margin: 38px 0; }
.metric { padding: 0 0 0 26px; border-left: 1px solid var(--line); }
.metric:first-child { padding-left: 0; border-left: 0; }
.metric b { display: block; font: 400 clamp(38px, 4vw, 52px)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.055em; color: var(--ink); margin: 0 0 20px; }
.metric b small { font-size: .48em; margin-left: 3px; letter-spacing: -.02em; }
.metric h3 { font-size: 16px; font-weight: 500; line-height: 1.4; margin: 0 0 8px; }
.metric p { font-size: 14px; line-height: 1.5; color: var(--muted); margin: 0; }
.benchmark-box { border: 0; background: transparent; padding: 0; }
.tabs { display: flex; justify-content: center; gap: 32px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: none; font-size: 15px; padding: 22px 0 20px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--purple); border-bottom-color: var(--accent); font-weight: 500; }
.bench-content { padding-top: 28px; }
.bench-title { color: var(--muted); text-align: right; font-size: 13px; margin-bottom: 24px; }
.bar-chart { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 67px; align-items: center; gap: 22px; font-size: 14px; line-height: 1.35; color: var(--secondary); }
.bar-track { height: 25px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; width: var(--value); min-width: 2px; background: var(--bar); border-radius: 3px; }
.bar-row.ours { color: var(--ink); font-weight: 500; }
.bar-row.ours .bar-fill { background: var(--teal); }
.bar-score { text-align: right; font-variant-numeric: tabular-nums; }
.bench-detail { margin-top: 28px; padding-top: 21px; border-top: 1px solid var(--line); }
.bench-detail summary { color: var(--secondary); font-size: 14px; cursor: pointer; }
.bench-detail[open] summary { margin-bottom: 20px; }
.detail-note { margin: 0 0 20px; font-size: 14px; line-height: 1.7; color: var(--muted); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
th, td { padding: 11px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
th { font-weight: 400; color: var(--secondary); }
tr.ours { background: var(--accent-soft); color: var(--ink); }
tr.ours th { color: var(--ink); font-weight: 500; }

.overview-video { overflow: hidden; border-radius: 8px; background: #090d10; border: 1px solid var(--line); }
.overview-video video { width: 100%; aspect-ratio: 1948/1344; object-fit: contain; }
.media-caption { text-align: center; color: var(--muted); margin: 15px 0 0; font-size: 14px; line-height: 1.5; }
.progress-strip { text-align: center; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; padding: 25px 0; border-block: 1px solid var(--line); }
.progress-step { min-width: 0; padding: 0 25px; border-left: 1px solid var(--line); }
.progress-step:first-child { padding-left: 0; border: 0; }
.progress-step b { display: block; font: 400 38px/1.2 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.045em; color: var(--ink); margin-bottom: 11px; }
.progress-step b small { font-size: .55em; margin-left: 2px; }
.progress-step span { display: block; font-size: 15px; color: var(--secondary); }
.metric-caption { text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; margin: 17px 0 0; }
.gallery-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin: 57px 0 0; }
.gallery-toolbar h3 { font: 400 29px/1.25 var(--sans); letter-spacing: -.035em; margin: 0; }
.gallery-speed-note { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.autoplay-toggle { display: inline-flex; gap: 8px; align-items: center; background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 10px 14px; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.autoplay-dot { height: 5px; width: 5px; background: var(--accent); border-radius: 50%; }
.autoplay-toggle[aria-pressed="false"] .autoplay-dot { background: var(--muted); }
.gallery-group { margin-top: 36px; }
.gallery-row-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 17px; }
.gallery-row-head h4 { font-size: 20px; font-weight: 500; letter-spacing: -.4px; margin: 0; }
.carousel-controls { display: flex; gap: 9px; flex-shrink: 0; }
.carousel-controls button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 20px; padding: 0 0 3px; }
.carousel-controls button:disabled { opacity: .3; cursor: default; }
.carousel-controls button:hover:enabled { background: var(--accent-soft); border-color: var(--accent); }
.carousel { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.video-card { margin: 0; flex: 0 0 46%; min-width: 0; scroll-snap-align: start; }
.video-frame { border-radius: 6px; overflow: hidden; position: relative; background: #07090a; }
.video-frame video { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #07090a; }
.video-card figcaption { font-size: 15px; color: var(--secondary); line-height: 1.45; margin: 12px 0 0; }
.folding-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.folding-summary .progress-step b { font-size: 44px; }
.stage { margin-top: 40px; }
.stage-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.stage-title h3 { font-size: 23px; font-weight: 400; letter-spacing: -.6px; margin: 0 0 9px; }
.stage-title p { font-size: 15px; line-height: 1.6; color: var(--secondary); max-width: 680px; margin: 0; }
.stage-navigation { width: 100%; justify-content: space-between; display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.stage-navigation > span { color: var(--muted); font-size: 13px; }
.stage .video-frame video { aspect-ratio: 16/9; }
.result-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.result-label::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.result-label.success { color: var(--success); }
.result-label.failure { color: var(--failure); }
.generation-task { margin-top: 32px; }
.generation-task h3 { font-size: 23px; font-weight: 400; letter-spacing: -.5px; margin: 0 0 18px; }
.generation-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.generation-pair video { aspect-ratio: 27/16; }
.generation-pair figcaption { text-align: center; }
.footer { margin-top: 95px; border-top: 1px solid var(--line); padding-block: 31px; }
.footer-inner { display: flex; align-items: center; justify-content: center; }
.footer .brand { color: var(--secondary); font-size: 16px; }
.footer .brand img { width: 32px; }
.no-js-note { color: var(--secondary); text-align: center; padding: 20px; }
.media-error { font-size: 13px; line-height: 1.5; color: var(--secondary); background: var(--surface); padding: 12px; }
.media-error a { text-decoration: underline; }

/* Chapter cards and the persistent chapter index. */
.research-layout { width: min(1120px, calc(100% - 144px)); margin: 86px auto 0; display: grid; grid-template-columns: 166px minmax(0, 1fr); gap: 28px; align-items: start; }
.chapter-sidebar { position: sticky; top: 36px; }
.chapter-nav { display: flex; flex-direction: column; gap: 8px; }
.chapter-link { display: flex; align-items: center; gap: 13px; min-height: 76px; padding: 15px 13px; border-left: 2px solid transparent; border-radius: 0 10px 10px 0; color: var(--secondary); transition: background .18s, color .18s, border-color .18s; }
.chapter-index { font: 11px/1.4 var(--mono); color: var(--muted); }
.chapter-label { font-size: 15px; line-height: 1.4; font-weight: 500; }
.chapter-link:hover { background: #ffffff8c; color: var(--ink); }
.chapter-link[aria-current="location"] { background: #fff; color: var(--ink); border-left-color: var(--purple); box-shadow: 0 4px 20px #2f388c05; }
.chapter-link[aria-current="location"] .chapter-index { color: var(--purple); }
.chapter-content { display: grid; gap: 32px; min-width: 0; }
.chapter-card.section { width: 100%; margin: 0; padding: 42px 38px; background: #fff; border-radius: 14px; box-shadow: 0 12px 36px #2f388c08; min-width: 0; scroll-margin-top: 28px; }
.chapter-card > .wrap { width: 100%; margin: 0; }
.chapter-card .section-number { background: #f5f4fa; border-color: #ece9f4; }
.chapter-card .section-heading h2 { font-size: 34px; }
.chapter-card .section-heading p { font-size: 16px; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 112px); }
  .topnav { gap: 20px; }
  .topnav a { font-size: 10px; }
  .hero h1 { font-size: 80px; }
  .hero h1 img { width: 104px; }
  .subtitle { font-size: 31px; }
  .authors { font-size: 15px; }
  .research-layout { width: calc(100% - 96px); grid-template-columns: 144px minmax(0, 1fr); gap: 22px; }
  .chapter-link { padding-inline: 10px; gap: 10px; }
  .chapter-label { font-size: 14px; }
  .chapter-card.section { padding: 36px 28px; }
  .chapter-card .section-heading h2 { font-size: 31px; }
  .metrics { gap: 16px; }
  .metric { padding-left: 16px; }
  .metric b { font-size: 39px; }
  .metric h3 { font-size: 14px; }
  .bar-row { grid-template-columns: 165px minmax(0, 1fr) 58px; gap: 14px; font-size: 13px; }
  .progress-step { padding-inline: 14px; }
  .progress-step b { font-size: 31px; }
  .progress-step span { font-size: 13px; }
  .folding-summary .progress-step b { font-size: 37px; }
}
@media (max-width: 900px) {
  .wrap { width: calc(100% - 88px); }
  .research-layout { width: calc(100% - 88px); display: block; }
  .chapter-sidebar { z-index: 15; top: 0; margin: 0 -2px 22px; padding-block: 10px; background: #f6f7f9f2; backdrop-filter: blur(12px); }
  .chapter-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .chapter-link { flex-direction: column; justify-content: center; gap: 5px; text-align: center; padding: 10px 5px; min-height: 69px; border-left: 0; border-bottom: 2px solid transparent; border-radius: 8px; }
  .chapter-link[aria-current="location"] { border-bottom-color: var(--purple); }
  .chapter-card.section { scroll-margin-top: 104px; padding: 36px 32px; }
  .chapter-label { font-size: 12px; }
  .chapter-index { font-size: 10px; }
  .topnav a:first-child, .topnav a:last-child { display: none; }
  .section-heading h2 { font-size: 34px; }
  .section-heading p { font-size: 16px; }
  .techniques { gap: 24px; }
  .technique h3 { font-size: 18px; }
  .technique p { font-size: 15px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 48px); }
  .topbar-inner { min-height: 66px; }
  .topnav { gap: 17px; }
  .topnav a[href="#method"] { display: none; }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: clamp(43px, 12vw, 69px); gap: 13px; margin-bottom: 24px; }
  .hero h1 img { width: clamp(56px, 16vw, 90px); }
  .subtitle { font-size: clamp(23px, 5vw, 29px); line-height: 1.3; margin-bottom: 28px; }
  .desktop-break { display: none; }
  .authors { font-size: 14px; gap: 9px 15px; }
  .author-notes { font-size: 12px; gap: 7px 18px; }
  .affiliations { font-size: 15px; gap: 18px; margin-top: 23px; }
  .actions { gap: 9px; margin: 26px 0 36px; }
  .resource-button { padding: 11px 13px; font-size: 12px; gap: 7px; white-space: nowrap; }
  .resource-button svg { width: 15px; height: 15px; }
  .hero-film { border-radius: 8px; }
  .section { padding-top: 65px; }
  .section-heading { margin-bottom: 27px; }
  .section-heading h2 { font-size: 29px; margin-bottom: 17px; }
  .section-heading p { font-size: 16px; line-height: 1.65; }
  .section-number, .section-symbol { margin-bottom: 17px; }
  .method-figure { padding: 12px; }
  .techniques { grid-template-columns: 1fr; gap: 0; margin-top: 18px; }
  .technique { padding-block: 20px; }
  .technique h3 { font-size: 19px; margin-bottom: 9px; }
  .research-layout { width: calc(100% - 32px); margin-top: 60px; }
  .chapter-content { gap: 22px; }
  .chapter-card.section { padding: 29px 22px; border-radius: 12px; }
  .chapter-card .section-heading h2 { font-size: 28px; line-height: 1.2; }
  .chapter-card .section-heading p { font-size: 15px; }
  .chapter-label { font-size: 11px; }
  .metrics { grid-template-columns: 1fr; text-align: left; margin: 24px 0 28px; gap: 0; }
  .metric { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; align-items: center; border-left: 0; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .metric b { font-size: 38px; grid-row: span 2; margin-bottom: 0; }
  .metric h3 { font-size: 14px; margin-bottom: 5px; }
  .metric p { font-size: 12px; }
  .tabs { justify-content: space-between; gap: 10px; }
  .tabs button { font-size: 12px; padding: 17px 0 15px; }
  .bench-title { font-size: 12px; margin-bottom: 20px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 48px; font-size: 11px; gap: 9px; }
  .bar-track { height: 23px; }
  .bench-detail summary { font-size: 13px; line-height: 1.5; }
  .detail-note { font-size: 13px; }
  .media-caption, .metric-caption { font-size: 12px; }
  .progress-strip { margin-top: 26px; padding-block: 21px; }
  .progress-strip:not(.folding-summary) { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .progress-strip:not(.folding-summary) .progress-step:nth-child(odd) { border-left: 0; padding-left: 0; }
  .progress-step { padding-inline: 8px; }
  .progress-step b { font-size: 25px; margin-bottom: 9px; }
  .progress-step span { font-size: 11px; }
  .gallery-toolbar { margin-top: 37px; gap: 12px; }
  .gallery-toolbar h3 { font-size: 23px; }
  .autoplay-toggle { font-size: 11px; padding: 9px 10px; }
  .gallery-group { margin-top: 28px; }
  .carousel { gap: 15px; }
  .video-card { flex-basis: 89%; }
  .carousel-controls { gap: 7px; }
  .carousel-controls button { width: 34px; height: 34px; }
  .video-card figcaption { font-size: 14px; }
  .folding-summary { margin-top: 0; }
  .folding-summary .progress-step b { font-size: 30px; }
  .stage { margin-top: 30px; }
  .stage-title h3 { font-size: 21px; }
  .stage-title p { font-size: 14px; }
  .stage-header { gap: 16px; }
  .stage-navigation > span { font-size: 12px; }
  .generation-task { margin-top: 28px; }
  .generation-task h3 { font-size: 20px; margin-bottom: 15px; }
  .generation-pair { gap: 10px; }
  .footer { margin-top: 60px; padding-block: 28px; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 36px); }
  .hero h1 { font-size: 42px; gap: 9px; }
  .hero h1 img { width: 54px; }
  .authors { font-size: 13px; }
  .affiliations { font-size: 14px; gap: 15px; }
  .resource-button { font-size: 11px; padding: 10px; gap: 5px; }
  .chapter-card.section { padding-inline: 16px; }
  .chapter-card .section-heading h2 { font-size: 26px; }
  .chapter-label { font-size: 10px; }
  .tabs button { font-size: 10.5px; }
  .tabs { gap: 8px; }
  .bar-row { grid-template-columns: 85px minmax(0, 1fr) 43px; font-size: 10.5px; gap: 8px; }
  .progress-step { padding-inline: 6px; }
  .progress-step b { font-size: 22px; }
  .folding-summary .progress-step b { font-size: 24px; }
  .gallery-toolbar h3 { font-size: 20px; }
  .metric { grid-template-columns: 99px minmax(0, 1fr); gap: 10px; }
  .metric b { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Deployment trajectories, animated once on entry and replayable by the reader. */
.evolution {
  --evo: #009da6; --evo-ink: #087d87; --evo-soft: #e7f6f5; --evo-line: #c9e7e5;
  margin-top: 32px; padding: 25px 24px 22px; border: 1px solid var(--evo-line); border-radius: 15px;
  background: radial-gradient(ellipse at 8% 80%, #009da610, transparent 58%), linear-gradient(130deg, #fff, #f8fcfc);
  color: var(--evo); overflow: hidden;
}
.evolution--steps {
  --evo: #7252d6; --evo-ink: #6245bb; --evo-soft: #eee9fb; --evo-line: #e1d9f5;
  margin-top: 0; background: radial-gradient(ellipse at 8% 80%, #7252d610, transparent 58%), linear-gradient(130deg, #fff, #faf8ff);
}
.evolution-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.evolution-heading h3 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 500; letter-spacing: -.2px; }
.evolution-toggle { color: var(--evo-ink); background: #ffffffc9; border: 1px solid var(--evo-line); border-radius: 30px; padding: 8px 14px; font-size: 12px; min-width: 70px; flex-shrink: 0; }
.evolution-toggle:hover { background: var(--evo-soft); }
.evolution-display { display: grid; grid-template-columns: 133px minmax(0, 1fr); align-items: center; gap: 19px; margin-top: 22px; }
.evolution-readout { display: flex; align-items: flex-start; flex-direction: column; padding-bottom: 38px; }
.evolution-score { font-size: 44px; line-height: 1.12; letter-spacing: -2px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--evo-ink); }
.evolution-score small { font-size: 18px; margin-left: 3px; letter-spacing: -.5px; }
.evolution-current { font-size: 14px; line-height: 1.4; color: var(--secondary); margin-top: 10px; }
.evolution-gain { display: inline-flex; font-size: 12px; line-height: 1.3; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .1px; background: var(--evo-soft); border: 1px solid var(--evo-line); border-radius: 7px; padding: 6px 9px; margin-top: 19px; color: var(--evo-ink); }
.evolution-chart { min-width: 0; }
.evolution-plot { height: 205px; width: 100%; position: relative; }
.evolution-plot svg { width: 100%; height: 100%; overflow: visible; }
.evolution-grid { fill: none; stroke: var(--evo-line); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; opacity: .75; }
.evolution-axis { position: absolute; left: -3px; font: 10px/1 var(--sans); color: #939ba3; transform: translateY(-50%); }
.evolution-axis.axis-high { top: 15.2%; }
.evolution-axis.axis-mid { top: 51.2%; }
.evolution-axis.axis-low { top: 87.2%; }
.evolution-line-ghost { stroke: var(--evo-line); fill: none; stroke-width: 2; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.evolution-line { stroke: var(--evo); fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.evolution-node { fill: #fff; stroke: var(--evo-line); stroke-width: 2; }
.evolution-node.is-reached { fill: var(--evo); stroke: #fff; }
.evolution-node circle { vector-effect: non-scaling-stroke; }
.evolution-cursor { color: var(--evo); }
.evolution-dot { fill: currentColor; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.evolution-halo { fill: currentColor; opacity: .13; transform-box: fill-box; transform-origin: center; }
.evolution.is-playing .evolution-halo { animation: evolution-pulse 1.7s ease-in-out infinite; }
.evolution-bar-ghost { fill: var(--evo-soft); }
.evolution--steps .evolution-area { display: none; }
.evolution--steps .evolution-line { stroke-width: 2; }
.evolution-stages { display: grid; grid-template-columns: repeat(var(--stage-count), minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.evolution-stage { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 7px; min-width: 0; min-height: 72px; padding: 9px 2px; color: #747e89; border: 1px solid transparent; background: transparent; border-radius: 9px; transition: background .2s, border-color .2s, color .2s; }
.evolution-stage:hover { background: #ffffffb0; }
.evolution-stage.is-current { background: #fff; border-color: var(--evo-line); box-shadow: 0 4px 14px #26364b05; color: var(--evo-ink); }
.evolution-stage.is-reached .evolution-stage-value { color: var(--evo-ink); }
.evolution-stage-name { font-size: 12px; line-height: 1.25; white-space: normal; }
.evolution-stage-value { color: #939ba3; font-size: 20px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.evolution-stage-value small { font-size: 10px; margin-left: 2px; letter-spacing: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes evolution-pulse { 0%,100% { transform: scale(.8); opacity: .1; } 50% { transform: scale(1.15); opacity: .2; } }
@media (max-width: 1100px) and (min-width: 901px) {
  .evolution { padding-inline: 18px; }
  .evolution-display { grid-template-columns: 1fr; gap: 6px; }
  .evolution-readout { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 0; }
  .evolution-score { font-size: 40px; }
  .evolution-current, .evolution-gain { margin: 0; }
  .evolution-plot { height: 180px; }
}
@media (max-width: 640px) {
  .evolution { padding: 19px 12px 15px; margin-top: 27px; border-radius: 12px; }
  .evolution--steps { margin-top: 0; }
  .evolution-heading { gap: 10px; }
  .evolution-heading h3 { font-size: 14px; line-height: 1.4; }
  .evolution-toggle { font-size: 11px; padding: 7px 10px; min-width: 62px; }
  .evolution-display { grid-template-columns: 1fr; gap: 8px; margin-top: 21px; }
  .evolution-readout { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 0 3px; }
  .evolution-score { font-size: 42px; grid-row: span 2; align-self: center; }
  .evolution-current { text-align: right; margin: 0; font-size: 12px; }
  .evolution-gain { margin: 0; justify-self: end; padding: 5px 7px; font-size: 10px; }
  .evolution-plot { height: 154px; }
  .evolution-axis { left: -2px; font-size: 9px; }
  .evolution-stages { gap: 3px; margin-top: 5px; }
  .evolution-stage { min-height: 69px; padding: 8px 2px; gap: 7px; }
  .evolution-stage-name { font-size: 10px; min-height: 25px; display: flex; align-items: center; }
  .evolution-stage-value { font-size: 17px; letter-spacing: -.5px; }
  .evolution-stage-value small { font-size: 8px; margin-left: 1px; }
  .evolution--steps .evolution-stage-name { min-height: 0; }
}
@media (max-width: 380px) {
  .evolution { padding-inline: 10px; }
  .evolution-heading h3 { font-size: 13px; }
  .evolution-score { font-size: 35px; letter-spacing: -1.5px; }
  .evolution-score small { font-size: 15px; }
  .evolution-stage-value { font-size: 15px; }
  .evolution-stage-name { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .evolution *, .evolution *::before, .evolution *::after { animation: none !important; transition: none !important; }
}

.evolution.is-ready .evolution-bar:not(.is-reached):not(.is-current) { opacity: 0; }

/* Keep plot markers circular when the responsive chart changes aspect ratio. */
.evolution-node circle { r: .1; stroke-width: 6; }
.evolution-node.is-reached { stroke: var(--evo); }
.evolution-dot { r: .1; stroke: currentColor; stroke-width: 8; }
.evolution-halo { r: .1; fill: none; stroke: currentColor; stroke-width: 25; vector-effect: non-scaling-stroke; }
