/* The original light palette, with one progressive opening scene. */
:root {
  --paper: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #65656d;
  --faint: #85858d;
  --line: #dcdce1;
  --line-strong: #c6c6cd;
  --gutter: clamp(18px, 2vw, 48px);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
.shell { width: calc(100% - var(--gutter) * 2); }
body { font-size: 18px; }
.eyebrow { font-family: var(--mono); font-size: 14px; letter-spacing: .1em; }
.button { min-height: 44px; border-radius: 7px; font-size: 15px; }
.nav-links { gap: 24px; }
.nav-links a { font-size: 15px; }
.nav-toggle { font-size: 14px; }
code { font-family: var(--mono); font-size: .95em; overflow-wrap: anywhere; }
.live-label { font-size: 14px; }
.video-status { font-size: 16px; }
.hero {
  --hero-travel: 360px;
  --hero-reveal-travel: 640px;
  --hero-progress: 0;
  --hero-title-opacity: 1;
  --hero-veil-opacity: 1;
  padding: 16px 0 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
}
.hero::before { display: none; }
.hero-scene { width: 100%; min-width: 0; scroll-margin-top: calc(var(--nav-height) + 16px); }
.hero-media {
  position: relative;
  display: grid;
  grid-template-areas: "title" "video";
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}
.hero-heading {
  grid-area: title;
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 42px 24px 34px;
  text-align: center;
}
.hero .eyebrow { margin: 0; max-width: none; color: var(--orange-dark); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(46px, 5.8vw, 76px);
  line-height: 1.06;
  letter-spacing: -.055em;
  font-weight: 650;
}
.hero-brand { display: block; }
.hero .accent { color: var(--orange); }
.hero-description { margin: 23px auto 0; color: var(--muted); font-size: 19px; line-height: 1.55; }
.hero-description strong { color: var(--ink); font-weight: 500; }
#hero-media-panel { grid-area: video; min-width: 0; border-radius: 0; overflow: hidden; background: #151517; }
#hero-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: var(--video-ratio, 2786 / 1452);
  object-fit: contain;
  background: #151517;
}
.hero-veil { display: none; }
.hero-controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 0 var(--gutter) 14px; background: var(--paper); }
.hero-tabs { width: auto; flex-wrap: wrap; gap: 5px; }
.hero-tabs button { min-height: 44px; padding: 9px 14px; font-size: 15px; }
.hero-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hero-tools .button { min-height: 44px; padding: 9px 15px; font-size: 15px; white-space: nowrap; }
.hero-tools .button-secondary { background: #fff; }
.hero.has-scene .hero-fallback { display: none; }
.hero .media-caption { padding: 12px var(--gutter) 0; gap: 16px; font-size: 16px; line-height: 1.5; }
.hero .media-caption p { max-width: 850px; }
.hero .media-caption a { flex-shrink: 0; font-weight: 600; color: var(--orange-dark); text-decoration: none; padding-block: 6px; }
.hero .media-caption a:hover { text-decoration: underline; }
.hero .hero-caption { justify-content: space-between; flex-wrap: wrap; }
.hero-view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.hero .hero-view-controls button { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.hero #hero-watch { border-color: var(--orange); background: var(--orange); color: #fff; }
.hero #hero-watch:hover { border-color: var(--orange-dark); background: var(--orange-dark); }
.hero-scroll-hint { display: none; color: var(--muted); font-size: 13px; }
.hero.is-enhanced:not(.is-video-revealed) .hero-scroll-hint { display: inline; }
@media (pointer: coarse), (max-width: 760px) {
  .hero.is-enhanced:not(.is-video-revealed) .hero-scroll-hint { display: none; }
}

/* Enabled only after the scene controller has initialized successfully.
   The original document layout remains the fallback, including without JavaScript. */
.hero.is-enhanced .hero-scroll { height: auto; }
.hero.is-enhanced .hero-scene {
  height: auto;
  display: flex;
  flex-direction: column;
}
.hero.is-enhanced.is-pinned .hero-scroll { padding-bottom: var(--hero-travel); }
.hero.is-enhanced.is-pinned .hero-scene { position: sticky; top: calc(var(--nav-height) + 16px); }
.hero.is-enhanced .hero-controls { position: sticky; top: calc(var(--nav-height) + 16px); z-index: 4; }
.hero.is-enhanced.is-pinned .hero-controls { position: static; }
.hero.is-enhanced .hero-media {
  display: block;
  flex: 0 0 auto;
  min-height: clamp(280px, 42svh, 420px);
  width: 100%;
  aspect-ratio: var(--video-ratio, 2786 / 1452);
  border-radius: 0;
}
.hero.is-enhanced #hero-media-panel { position: absolute; inset: 0; border-radius: inherit; }
.hero.is-enhanced #hero-video { height: 100%; aspect-ratio: auto; }
.hero.is-enhanced #hero-media-panel, .hero.is-enhanced #hero-video { background: var(--paper); }
.hero.is-enhanced .hero-veil {
  display: block;
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: var(--hero-veil-opacity);
  background: linear-gradient(
    180deg,
    rgb(245 245 247 / 84%) 0%,
    rgb(245 245 247 / 95%) 26%,
    rgb(245 245 247 / 94%) 68%,
    rgb(245 245 247 / 72%) calc(100% - 54px),
    transparent calc(100% - 16px)
  );
}
.hero.is-enhanced .hero-heading {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: 50%;
  width: 96%;
  padding: 0 24px;
  transform: translate(-50%, calc(-50% - var(--hero-progress) * 28px));
  opacity: var(--hero-title-opacity);
  pointer-events: none;
}
.hero.is-enhanced .hero-controls, .hero.is-enhanced .media-caption { flex: 0 0 auto; }
/* The same video lifts within its original scene; the outer layout stays stable. */
.hero.is-enhanced #hero-media-panel {
  height: 100%;
  transition: top 360ms ease, left 360ms ease, right 360ms ease,
    height 360ms ease, border-radius 360ms ease, box-shadow 360ms ease;
}
.hero.is-enhanced .hero-caption { position: relative; z-index: 3; transition: transform 360ms ease; }
.hero.is-enhanced.is-inline-playing .hero-media { overflow: visible; }
.hero.is-enhanced.is-inline-playing #hero-media-panel {
  top: 8px;
  right: var(--hero-inline-inset, var(--gutter));
  bottom: auto;
  left: var(--hero-inline-inset, var(--gutter));
  height: var(--hero-inline-height, 100%);
  border-radius: 16px;
  box-shadow: 0 22px 56px rgb(29 29 31 / 20%), 0 3px 12px rgb(29 29 31 / 9%);
  animation: hero-inline-lift 420ms cubic-bezier(.2, .75, .25, 1) both;
}
.hero.is-enhanced.is-inline-playing #hero-video { border-radius: inherit; }
.hero.is-enhanced.is-inline-playing .hero-caption {
  transform: translateY(var(--hero-inline-controls-offset, 0px));
}
@keyframes hero-inline-lift {
  from { transform: translateY(10px) scale(.97); }
  to { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero.is-enhanced #hero-media-panel,
  .hero.is-enhanced.is-inline-playing #hero-media-panel,
  .hero.is-enhanced .hero-caption { transition: none; animation: none; }
}
.hero-footer { padding-top: 32px; }
.hero-meta { max-width: none; margin: 0; grid-template-columns: .75fr .85fr 1.4fr; }
.meta-item { align-items: flex-start; padding-inline: 28px; }
.meta-item:first-child { padding-left: 0; }
.meta-item:last-child { padding-right: 0; }
.meta-item strong { font-size: 23px; font-weight: 550; }
.meta-item:last-child strong { font-size: 20px; }
.meta-item span { margin-top: 5px; font-size: 15px; }
.hero-reading-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.hero-reading-links a { padding-block: 6px; color: var(--muted); text-decoration: none; }
.hero-reading-links a:hover { color: var(--orange-dark); }

/* A concise research summary, with direct paths into the evidence. */
.key-features { padding-block: 74px 70px; scroll-margin-top: calc(var(--nav-height) + 20px); }
.features-heading { margin-bottom: 30px; }
.features-heading h2 { margin-top: 9px; font-size: 36px; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; }
.features-heading > p:last-child { margin-top: 12px; font-size: 18px; color: var(--muted); }
.feature-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px; margin: 0; padding: 0; list-style: none; }
.feature-list > li { display: flex; flex-direction: column; min-width: 0; padding-top: 17px; border-top: 1px solid var(--line-strong); }
.feature-visual { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.feature-icon { display: block; flex: 0 0 48px; width: 48px; height: 48px; color: var(--orange); }
.feature-icon .icon-tint { fill: var(--orange-soft); stroke: none; }
.feature-icon .icon-solid { fill: currentColor; stroke: none; }
.feature-number { color: var(--orange-dark); font: 14px/1.5 var(--mono); }
.feature-list h3 { margin-top: 16px; font-size: 19px; line-height: 1.35; letter-spacing: -.025em; font-weight: 650; }
.feature-list p { margin-top: 12px; font-size: 17px; line-height: 1.75; color: var(--muted); }
.feature-list h3 { max-width: 24ch; }
.feature-list p { max-width: 44ch; }
.feature-list a { width: fit-content; margin-top: auto; padding-top: 18px; color: var(--orange-dark); font-size: 15px; font-weight: 550; text-decoration: none; }
.feature-list a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 14px; }
  .hero h1 { font-size: clamp(43px, 6.8vw, 64px); }
  .hero-description { font-size: 17px; }
  .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
}
@media (max-width: 760px) {
  :root { --gutter: 22px; }
  .hero { --hero-travel: 240px; }
  .hero-heading { padding: 30px 12px; }
  .hero h1 { font-size: clamp(37px, 7.1vw, 52px); }
  body { font-size: 16px; }
  .hero-description { font-size: 17px; margin-top: 20px; }
  .hero-controls { gap: 8px; padding-top: 12px; }
  .hero-tabs { width: 100%; }
  .hero-tabs button { flex: 1 1 auto; }
  .hero-tools { width: 100%; }
  .hero-tools .button { flex: 1 1 auto; min-height: 42px; }
  .hero .media-caption { align-items: flex-start; padding-top: 9px; font-size: 14px; }
  .hero .media-caption p { flex: 1 1 auto; }
  .hero .media-caption a { white-space: nowrap; font-size: 14px; }
  .hero-footer { padding-top: 27px; }
  .meta-item { padding-inline: 18px; }
  .meta-item strong { font-size: 22px; }
  .meta-item:last-child strong { font-size: 16px; }
  .meta-item span { font-size: 14px; }
  .feature-list p { font-size: 16px; }
  .key-features { padding-block: 55px; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
  .feature-list > li:last-child { grid-column: 1 / -1; }
  .feature-list > li:last-child p { max-width: 62ch; }
}
@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .hero .eyebrow { font-size: 13px; letter-spacing: .05em; }
  .hero h1 { font-size: clamp(30px, 8.8vw, 41px); margin-top: 17px; }
  .hero-description { font-size: 16px; margin-top: 18px; }
  .hero.is-enhanced .hero-heading { padding-inline: 8px; }
  .hero-tabs button { min-height: 44px; padding-inline: 8px; font-size: 14px; }
  .hero-tools .button { padding-inline: 11px; font-size: 14px; }
  .hero .media-caption { gap: 6px; flex-wrap: wrap; }
  .hero .media-caption p { flex-basis: 100%; }
  .hero-meta { margin: 0; grid-template-columns: .7fr .8fr 1.35fr; }
  .meta-item { padding-inline: 11px; }
  .meta-item strong { font-size: 21px; }
  .meta-item:last-child strong { font-size: 14px; }
  .meta-item span { font-size: 14px; }
  .features-heading h2 { font-size: 31px; }
  .features-heading > p:last-child { font-size: 16px; }
  .feature-list { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .feature-list h3 { margin-top: 9px; font-size: 20px; }
  .feature-list p { margin-top: 8px; font-size: 16px; }
  .feature-list a { padding-top: 12px; }
}
@media print {
  :root { --gutter: 0; }
  .shell { width: 100%; }
  .hero { padding: 0; }
  .hero.is-enhanced .hero-scroll, .hero.is-enhanced .hero-scene { height: auto; }
  .hero.is-enhanced.is-pinned .hero-scroll { padding: 0; }
  .hero.is-enhanced.is-pinned .hero-scene, .hero.is-enhanced .hero-scene { position: static; display: block; }
  .hero.is-enhanced .hero-media { display: grid; min-height: 0; max-height: none; aspect-ratio: auto; }
  .hero.is-enhanced .hero-heading { position: static; width: 100%; padding: 20px 0; opacity: 1; transform: none; }
  .hero.is-enhanced #hero-media-panel,
  .hero.is-enhanced.is-inline-playing #hero-media-panel {
    position: static; inset: auto; height: auto; transform: none;
    border-radius: 0; box-shadow: none; animation: none; transition: none;
  }
  .hero.is-enhanced.is-inline-playing .hero-caption { transform: none; }
  .hero.is-enhanced #hero-video { height: auto; aspect-ratio: var(--video-ratio, 2786 / 1452); }
  .hero.is-enhanced .hero-veil, .hero-controls, .hero-reading-links, .hero-view-controls { display: none; }
  .key-features { padding-block: 24px; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-list > li { break-inside: avoid; }
}

/* Light research sections; loaded after styles.css and motion.css. */
main > .section.shell,
main > .closing.shell,
.site-footer > .footer-inner.shell { width: min(1440px, 90%); }
.section { padding-block: 96px; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr);
  align-items: end;
  align-items: last baseline;
  gap: 19px 56px;
  max-width: none;
  margin-bottom: 42px;
}
.section-heading > .eyebrow { grid-column: 1 / -1; font-size: 14px; letter-spacing: .12em; }
.section-heading h2 { margin: 0; font-size: clamp(36px, 3.9vw, 52px); line-height: 1.1; letter-spacing: -.045em; }
.section-heading .section-intro { margin: 0; max-width: 440px; font-size: 18px; line-height: 1.65; }
.section h3 { font-size: 26px; line-height: 1.25; }
.section h4 { font-size: 22px; }
.section .tab-list { gap: 9px; }
.section .tab-button { min-height: 45px; padding: 11px 17px; font-size: 15px; }

/* The output is the main surface; metadata follows it in the document. */
.demo-browser > .tab-list { margin-bottom: 28px; }
#demo-panel { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.demo-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 16px 48px; margin-bottom: 24px; }
.demo-heading h3 { max-width: none; font-size: 28px; }
.demo-heading p { max-width: 560px; font-size: 17px; line-height: 1.6; }
.video-stage { border-radius: 10px; }
.video-stage video { height: auto; max-height: none; }
@media (min-width: 641px) {
  .image-dialog, .video-dialog { width: calc(100vw - 48px); }
}
.demo-toolbar { margin-top: 16px; gap: 10px; }
.demo-toolbar button { min-height: 42px; padding: 8px 12px; font-size: 15px; }
.clip-counter { font-size: 15px; }
#demo-caption { max-width: 960px; margin-top: 14px; font-size: 16px; line-height: 1.65; }
.demo-facts { gap: 48px; margin-block: 24px 18px; padding-block: 20px; border-color: var(--line); font-size: 17px; }
.demo-facts p { max-width: 72ch; }
.fact-label { margin-bottom: 6px; font-size: 14px; letter-spacing: .08em; }
.clip-list { gap: 13px; margin-top: 16px; padding-top: 5px; }
.clip-card { flex-basis: 200px; border-radius: 8px; }
.clip-card span { padding: 11px 12px; font-size: 15px; }
.media-footnote { margin-top: 14px; font-size: 15px; }

/* Figures sit within a narrower reading column; zoom preserves access to detail. */
.approach-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
.figure-card { border-radius: 12px; }
.section .figure-card { width: 100%; max-width: 1200px; margin-inline: auto; }
.figure-button { padding: 24px; }
.figure-card figcaption { padding: 16px 24px; font-size: 16px; line-height: 1.6; }
.figure-card figcaption .figure-hint { display: inline; margin-left: 12px; font-size: 15px; white-space: nowrap; }
.figure-zoom { right: 12px; bottom: 12px; width: 32px; height: 32px; }
.principle-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.principle, .principle + .principle { padding: 36px 0 0; border-top: 1px solid var(--line); }
.principle:last-child { padding-bottom: 0; }
.principle-number, .principle + .principle .principle-number { top: 9px; left: 0; font-size: 14px; line-height: 1.5; }
.principle h3 { font-size: 21px; }
.principle p { max-width: 64ch; margin-top: 12px; font-size: 17px; line-height: 1.7; }
.training-module { margin-top: 52px; padding-top: 36px; }
.module-heading { gap: 28px; margin-bottom: 24px; }
.module-heading > p { flex-shrink: 1; font-size: 16px; }
.training-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.training-stages > .stage-panel { display: flex; flex-direction: column; min-width: 0; margin-top: 0; padding: 28px; border-radius: 10px; }
.stage-number { font-size: 14px; }
.stage-panel p { max-width: 78ch; margin-top: 14px; font-size: 18px; line-height: 1.7; }
.stage-tags { gap: 8px; margin-top: 20px; }
.training-stages .stage-tags { margin-top: auto; padding-top: 20px; }
.stage-tags span { padding: 5px 9px; font-size: 14px; }

/* Result categories are anchors into one continuous, fully visible report. */
.evidence-index { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; margin-bottom: 36px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.evidence-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--orange-dark); font-size: 15px; line-height: 1.5; font-weight: 600; text-decoration: underline; text-decoration-color: #e6bda3; text-underline-offset: 5px; }
.evidence-link:hover { text-decoration-color: currentColor; }
.evidence-panel { min-width: 0; scroll-margin-top: 20px; }
.evidence-panel + .evidence-panel { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.section .evidence-group-title { margin-bottom: 26px; font-size: 26px; line-height: 1.3; }

/* Metrics are an open row, separated by rules instead of nested cards. */
.metric-grid { gap: 0; padding-block: 27px; border-block: 1px solid var(--line); }
.metric-card { display: block; padding: 0 30px; border: 0; border-radius: 0; background: transparent; }
.metric-card:first-child { padding-left: 0; }
.metric-card + .metric-card { border-left: 1px solid var(--line); }
.metric-value { font-size: clamp(32px, 3.9vw, 52px); line-height: 1.12; letter-spacing: -.05em; overflow-wrap: anywhere; }
.metric-label { margin-top: 17px; font-size: 16px; line-height: 1.45; }
.metric-card p { margin-top: 9px; font-size: 17px; line-height: 1.6; }
.metric-card .metric-context { margin-top: 10px; padding-top: 0; border: 0; font-size: 16px; line-height: 1.6; }
.evidence-note { max-width: 1120px; margin-top: 20px; font-size: 16px; line-height: 1.7; }
.benchmark-card { margin-top: 34px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.benchmark-card h4 { font-size: 20px; line-height: 1.25; letter-spacing: -.015em; }
.benchmark-card > .table-wrap { margin-top: 17px; border: 1px solid var(--line); border-radius: 9px; }
.benchmark-card > p { max-width: 1120px; font-size: 17px; line-height: 1.7; }
.comparison-meta { font-size: 16px; }
.table-wrap { border-radius: 9px; }
.report-table { font-size: 15px; line-height: 1.55; }
.report-table th, .report-table td { padding: 15px 17px; border-bottom-color: #e3e7ed; }
.report-table thead th { background: #edf0f4; color: #45515f; font-size: 14px; }
.report-table caption { font-size: 16px; }
.capability-table { min-width: 1110px; }
.capability-table thead th:first-child { background: #edf0f4; }
.capability-table th, .capability-table td { padding: 16px 14px; }
.table-note { font-size: 15px; }
.research-block { min-width: 0; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.section .research-block-title { margin: 0 0 16px; color: var(--ink); font-size: 20px; line-height: 1.4; }
.research-body { min-width: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.research-body > :first-child { margin-top: 0; }
.research-body p + p { margin-top: 12px; }
.research-body > .table-wrap + p { margin-top: 15px; }
.research-body > .table-wrap + .table-wrap { margin-top: 18px; }
.detail-columns h4 { font-size: 17px; }
.detail-columns p { max-width: 74ch; }

/* The corpus overview uses the section width; the pipeline follows the figure width. */
.data-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
.data-overview { display: grid; grid-template-columns: minmax(200px, .78fr) minmax(0, 2.22fr); gap: 36px; align-items: start; }
.data-total { padding-top: 9px; }
.data-total strong { font-size: clamp(58px, 6vw, 78px); line-height: 1; }
.data-total > span { max-width: 215px; margin-top: 15px; font-size: 17px; line-height: 1.65; }
.data-overview > p { font-size: 17px; }
.data-source-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 22px; margin-top: 0; }
.data-source-list .data-source { margin-top: 0; padding-top: 18px; }
.data-source-list .research-block-title { margin-bottom: 14px; font-size: 17px; line-height: 1.5; letter-spacing: normal; }
.data-source-list .research-block-title strong { color: var(--orange-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
.data-source-list .summary-meta { display: block; margin-top: 7px; text-align: left; font-size: 15px; line-height: 1.6; }
.data-layout + .research-block { margin-top: 32px; }
.figure-grid { gap: 24px; margin-top: 20px; }

/* Equal distribution cards keep both rows aligned without cropping the charts. */
.data-distribution-grid {
  --distribution-inset: 24px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.data-distribution-grid > .figure-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.data-distribution-grid .figure-button {
  flex: 0 0 auto;
  min-height: 0;
  aspect-ratio: 3 / 2;
  padding: 0;
}
.data-distribution-grid .figure-button img {
  position: absolute;
  inset: var(--distribution-inset);
  width: calc(100% - var(--distribution-inset) - var(--distribution-inset));
  height: calc(100% - var(--distribution-inset) - var(--distribution-inset));
  object-fit: contain;
}
.data-distribution-grid > .figure-card figcaption {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}
.data-distribution-grid > .figure-card figcaption .figure-hint {
  display: block;
  margin: 0;
}


/* Supporting controls and notes use the same readable scale as the report. */
.closing p { font-size: 18px; }
.closing > .eyebrow { font-size: 14px; }
.footer-inner { font-size: 15px; }
#back-to-top { font-size: 14px; }
.dialog-topbar p, .dialog-topbar span { font-size: 16px; }
.dialog-topbar button, .image-controls button, .image-controls a, .media-caption button { min-height: 42px; font-size: 15px; }
.dialog-hint { font-size: 15px; line-height: 1.6; }

@media (min-width: 1600px) {
  .hero h1 { font-size: clamp(76px, 4.6vw, 104px); }
  .hero-heading { max-width: 1200px; }
  .hero-description { font-size: 21px; }
  .feature-list { gap: 34px; }
  .feature-list h3 { font-size: 22px; }
  .feature-list p { font-size: 18px; }
}

@media (max-width: 1000px) {
  main > .section.shell,
  main > .closing.shell,
  .site-footer > .footer-inner.shell { width: calc(100% - var(--gutter) * 2); }
  .section { padding-block: 78px; }
  .section-heading { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 17px 32px; }
  .section-heading h2 { font-size: 40px; }
  .section-heading .section-intro { font-size: 17px; }
  .demo-heading { gap: 24px; }
  .principle-list { gap: 24px; }
  .principle h3 { font-size: 19px; }
  .principle p { font-size: 17px; }
  .training-stages { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .metric-card { padding-inline: 22px; }
  .metric-value { font-size: 38px; }
  .data-overview { grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
  .data-source-list { gap: 18px; }
  .data-source-list .research-block-title { font-size: 16px; }
}

@media (max-width: 760px) {
  .button, .hero-tabs button, .hero-tools .button, .section .tab-button { font-size: 14px; }
  .eyebrow, .section-heading > .eyebrow, .closing > .eyebrow { font-size: 13px; }
  .feature-number { font-size: 13px; }
  .features-heading > p:last-child { font-size: 16px; }
  .feature-list a, .hero-reading-links { font-size: 14px; }
  .media-footnote, .comparison-meta, .table-note, .report-table caption,
  .demo-toolbar button, .clip-counter, #demo-caption, .clip-card span,
  .figure-card figcaption .figure-hint, .module-heading > p,
  .footer-inner, #back-to-top, .dialog-hint, .video-status { font-size: 14px; }
  .fact-label, .stage-number, .stage-tags span { font-size: 13px; }
  .closing p, .data-overview > p, .data-total > span { font-size: 16px; }
  .data-source-list .summary-meta { font-size: 14px; }
  .research-body { font-size: 16px; }
  .research-block { margin-top: 28px; padding-top: 22px; }
  .section .research-block-title { font-size: 18px; }
  .data-source-list .research-block-title { font-size: 16px; }
  .evidence-index { gap: 4px 20px; margin-bottom: 28px; }
  .evidence-link { font-size: 14px; }
  .evidence-panel + .evidence-panel { margin-top: 54px; padding-top: 36px; }
  .section .evidence-group-title { margin-bottom: 22px; font-size: 24px; }
  .metric-card p, .benchmark-card > p { font-size: 16px; }
  .evidence-note { font-size: 14px; }
  .report-table, .report-table thead th { font-size: 14px; }
  .dialog-topbar p, .dialog-topbar span { font-size: 14px; }
  .dialog-topbar button, .image-controls button, .image-controls a, .media-caption button { font-size: 14px; }
  .section { padding-block: 64px; }
  .section-heading { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: 32px; }
  .section-heading h2 { font-size: 38px; }
  .section-heading .section-intro { max-width: 600px; font-size: 16px; }
  .demo-heading { grid-template-columns: minmax(0, 1fr); gap: 11px; margin-bottom: 20px; }
  .demo-heading h3 { font-size: 25px; }
  .demo-heading p { max-width: 600px; font-size: 16px; }
  .demo-facts { gap: 28px; font-size: 16px; }
  .clip-card { flex-basis: 180px; }
  .figure-button { padding: 18px; }
  .data-distribution-grid { --distribution-inset: 18px; }
  .figure-card figcaption { padding: 14px 18px; font-size: 14px; }
  .principle-list { gap: 22px; }
  .principle h3 { font-size: 18px; }
  .principle p { font-size: 16px; }
  .training-module { margin-top: 38px; padding-top: 28px; }
  .module-heading { display: block; }
  .module-heading > p { margin-top: 9px; }
  .training-stages > .stage-panel { padding: 25px; }
  .stage-panel p { font-size: 16px; }
  .metric-card { padding-inline: 18px; }
  .metric-value { font-size: 31px; }
  .metric-label { font-size: 14px; }
  .metric-card .metric-context { font-size: 14px; }
  .data-overview { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .data-total > span { max-width: none; }
  .data-source-list { gap: 22px; }
}

@media (max-width: 640px) {
  .section { padding-block: 52px; }
  .section-heading { margin-bottom: 28px; }
  .section-heading h2 { font-size: clamp(30px, 7vw, 37px); }
  .section-heading .section-intro { font-size: 16px; }
  .section .tab-list { gap: 7px; }
  .section .tab-button { padding: 10px 12px; min-height: 44px; font-size: 14px; }
  .demo-browser > .tab-list { margin-bottom: 24px; }
  .demo-heading h3 { font-size: 24px; }
  .video-stage { border-radius: 9px; }
  .demo-facts { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-block: 20px 14px; }
  .demo-toolbar button { padding-inline: 9px; font-size: 14px; }
  .clip-navigation { flex-wrap: wrap; }
  .clip-counter { font-size: 14px; }
  #demo-caption { font-size: 14px; }
  .clip-card { flex-basis: 165px; }
  .clip-card span { font-size: 14px; }
  .figure-button { padding: 13px; }
  .data-distribution-grid { --distribution-inset: 13px; }
  .figure-card figcaption { padding: 13px; }
  .figure-card figcaption .figure-hint { display: block; margin: 6px 0 0; }
  .principle-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .principle, .principle + .principle { padding: 34px 0 0; }
  .principle h3 { font-size: 20px; }
  .principle p { margin-top: 9px; font-size: 16px; }
  .training-stages > .stage-panel { padding: 23px 19px; }
  .stage-panel p { font-size: 16px; }
  .evidence-panel + .evidence-panel { margin-top: 44px; padding-top: 30px; }
  .section .evidence-group-title { font-size: 22px; }
  .metric-grid, .metric-grid-two { grid-template-columns: minmax(0, 1fr); padding-block: 0; }
  .metric-card, .metric-card:first-child { padding: 24px 0; }
  .metric-card + .metric-card { border-left: 0; border-top: 1px solid var(--line); }
  .metric-value { font-size: 42px; }
  .metric-label { margin-top: 12px; font-size: 15px; }
  .metric-card .metric-context { font-size: 14px; }
  .evidence-note { font-size: 14px; }
  .benchmark-card > p { font-size: 16px; }
  .report-table { font-size: 14px; }
  .report-table th, .report-table td { padding: 13px 14px; }
  .report-table thead th { font-size: 14px; }
  .report-table thead th:first-child { background: #edf0f4; }
  .detail-columns { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .data-total strong { font-size: 64px; }
  .data-source-list { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .data-source-list .summary-meta { margin-top: 4px; font-size: 14px; }
  .figure-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer-inner { padding-right: 76px; }
}

@media print {
  body { font-size: 11pt; }
  main > .section.shell,
  main > .closing.shell,
  .site-footer > .footer-inner.shell { width: 100%; }
  .section .figure-card { max-width: none; }
  .section { padding-block: 26px; }
  .section-heading { display: block; margin-bottom: 20px; }
  .section-heading h2 { margin-top: 8px; font-size: 25pt; }
  .section-heading .section-intro { max-width: none; margin-top: 10px; font-size: 11pt; }
  .evidence-index { display: none; }
  .training-stages { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .training-stages > .stage-panel { padding: 18px; break-inside: avoid; }
  .evidence-panel + .evidence-panel { margin-top: 28px; padding-top: 24px; }
  .section .evidence-group-title, .section .research-block-title { break-after: avoid; }
  .research-block { margin-top: 22px; padding-top: 18px; }
  .metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid #ccc; }
  .metric-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card, .metric-card:first-child { padding: 14px; }
  .metric-card + .metric-card { border-top: 0; border-left: 1px solid #ccc; }
  .metric-value { font-size: 26pt; }
  .principle-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .data-overview { display: block; }
  .data-source-list { display: block; margin-top: 18px; }
  .data-source-list .data-source + .data-source { margin-top: 18px; }
  .table-wrap { overflow: visible; }
  .capability-table { min-width: 0; }
  .report-table { font-size: 8pt; }
  .report-table thead th { font-size: 8pt; }
  .report-table th, .report-table td { padding: 7px; white-space: normal; }
  .report-table th:first-child, .report-table td:first-child { position: static; min-width: 0; box-shadow: none; }
  .capability-table td:nth-child(4), .capability-table td:nth-child(6) { min-width: 0; max-width: none; }
}

/* Single-clip categories (e.g. Physical interactions): drop empty navigation. */
.demo-player.is-single .clip-list,
.demo-player.is-single .clip-counter,
.demo-player.is-single #prev-clip,
.demo-player.is-single #next-clip { display: none; }
.demo-player.is-single .demo-toolbar { margin-top: 12px; }
.demo-player.is-single .video-stage video { max-height: none; }

/* Single-clip video: a clean, framed presentation surface. */
.demo-player.is-single .video-stage { border-radius: 14px; background: #0f0f11; box-shadow: 0 18px 48px rgb(29 29 31 / 16%), 0 2px 6px rgb(29 29 31 / 8%); }
.demo-player.is-single .video-stage video { display: block; width: 100%; background: #0f0f11; }
.demo-player.is-single .demo-toolbar { justify-content: flex-end; }
.demo-player.is-single #demo-caption { margin-top: 12px; }
@media (max-width: 640px) {
  .demo-player.is-single .video-stage { border-radius: 10px; box-shadow: 0 10px 28px rgb(29 29 31 / 14%); }
}

/* Key figures sit beside the Key features heading as one block. */
.features-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: 28px 64px; margin-bottom: 38px; }
.features-top .features-heading { margin-bottom: 0; }
.features-stats { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
.features-stats .hero-meta { width: 100%; padding-bottom: 18px; border-bottom: 1px solid var(--line); grid-template-columns: .75fr .85fr 1.4fr; }
.features-stats .meta-item strong { font-size: 30px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
.features-stats .meta-item:last-child strong { font-size: 20px; line-height: 1.5; }
.features-stats .meta-item span { font-size: 15px; }
.features-stats .text-link { font-size: 15px; color: var(--muted); text-decoration: none; }
.features-stats .text-link:hover { color: var(--orange-dark); }
@media (max-width: 900px) {
  .features-top { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-bottom: 30px; }
}
@media (max-width: 560px) {
  .features-stats .hero-meta { grid-template-columns: .7fr .8fr 1.35fr; }
  .features-stats .meta-item { padding-inline: 10px; }
  .features-stats .meta-item strong { font-size: 22px; }
  .features-stats .meta-item:last-child strong { font-size: 14px; }
  .features-stats .meta-item span { font-size: 13px; }
}

/* Data foundation: the curation pipeline and the four distribution charts share one row. */
.data-figure-row {
  --row-title-offset: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 32px;
}
.data-figure-row > .research-block { margin-top: 0; padding-top: 0; border-top: 0; }
/* Both blocks start at the same top edge. */
.data-figure-row > .figure-card { display: flex; flex-direction: column; margin-top: var(--row-title-offset); }
.data-figure-row > .figure-card .figure-button { display: flex; flex: 1; align-items: center; justify-content: center; }
.data-figure-row > .figure-card .figure-button img { height: auto; }
.data-figure-row .data-distribution-grid { --distribution-inset: 14px; gap: 14px; margin-top: 0; }
.data-figure-row .data-distribution-grid > .figure-card figcaption { padding: 12px 14px; font-size: 14px; line-height: 1.45; }
.data-figure-row .data-distribution-grid > .figure-card figcaption .figure-hint { font-size: 13px; }
.data-figure-row + .research-block { margin-top: 32px; }
@media (max-width: 1000px) {
  .data-figure-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .data-figure-row > .figure-card { margin-top: 0; }
}

/* Closed-loop policy comparisons: each pair is stacked so the two outcomes can be read against each other. */
.demo-pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 0; }
.demo-pairs[hidden] { display: none !important; }
.pair-card { min-width: 0; padding: 20px 24px 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.pair-card h4 { margin: 0 0 14px; font-size: 18px; line-height: 1.35; letter-spacing: -.02em; }
.pair-videos { display: grid; gap: 14px; }
.pair-clip { margin: 0; min-width: 0; }
.pair-clip figcaption { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--muted); font-size: 14px; line-height: 1.4; font-weight: 600; }
.pair-clip video { display: block; width: 100%; height: auto; border-radius: 8px; background: #141416; object-fit: contain; }
@media (max-width: 640px) {
  .pair-card { padding: 14px 14px 16px; }
  .pair-card h4 { font-size: 16px; }
  .pair-clip figcaption { font-size: 13px; }
}

.pair-card[hidden] { display: none; }
.demo-pairs > .demo-toolbar { margin-top: 0; }
.demo-pairs > .clip-list { margin-top: 0; }

/* Two independent clips side by side. */
.pair-videos.is-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 640px) {
  .pair-videos.is-row { grid-template-columns: minmax(0, 1fr); }
}

/* "Enlarge figure" is signalled by the corner icon and the zoom cursor. */
.figure-card figcaption .figure-hint { display: none !important; }

/* Short sub-labels under the data-source titles repeat what the sentence below already says. */
.data-source .summary-meta { display: none; }

/* Citation panel under the closing actions. */
.citation-panel { width: min(760px, 100%); margin: 28px auto 0; text-align: left; }
.citation-panel[hidden] { display: none; }
.closing .citation-panel .citation-intro { max-width: none; margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.citation-code { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.citation-code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font-size: 14px; line-height: 1.7; color: var(--ink); tab-size: 2; }
.citation-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.citation-code pre:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; border-radius: 12px; }
.citation-copy { position: absolute; top: 10px; right: 10px; min-height: 34px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--white); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.citation-copy:hover { border-color: var(--orange); color: var(--orange-dark); }
.citation-code pre { padding-right: 86px; }
.citation-toggle[aria-expanded="true"] { border-color: var(--orange); color: var(--orange-dark); }
@media (max-width: 640px) {
  .citation-code pre { padding: 46px 14px 14px; font-size: 12px; }
}
@media print { .citation-toggle, .citation-panel { display: none !important; } }

/* Demo categories: one row that scales with the available width (scrolls sideways only on very narrow screens). */
#demo-tabs {
  container-type: inline-size;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 0.4em;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  font-size: 12px;
}
#demo-tabs::-webkit-scrollbar { display: none; }
#demo-tabs > .tab-button {
  flex: 0 0 auto;
  padding-inline: 0.9em;
  font-size: 12px;
  font-size: clamp(11px, calc(1cqw - 0.3px), 15px);
  white-space: nowrap;
  text-align: center;
}

/* Clip counter and arrows share the heading row, at its right edge. */
.demo-heading:has(> .demo-toolbar:not([hidden])) { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) auto; column-gap: 40px; }
/* The description takes the whole middle column, so a one-sentence line stays on one line where there is room. */
.demo-heading:has(> .demo-toolbar:not([hidden])) > p { max-width: none; }
.demo-heading > .demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0;
}
.demo-heading > .demo-toolbar[hidden] { display: none !important; }
.demo-heading > .demo-toolbar .clip-navigation { gap: 8px; }
.demo-heading > .demo-toolbar .clip-counter { margin: 0; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.demo-heading > .demo-toolbar button { min-width: 42px; min-height: 42px; padding: 0 12px; font-size: 16px; }
@media (max-width: 900px) {
  .demo-heading:has(> .demo-toolbar:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .demo-heading > .demo-toolbar { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .demo-heading > .demo-toolbar button { min-width: 38px; min-height: 38px; }
  .demo-heading > .demo-toolbar .clip-counter { font-size: 13px; }
}

.demo-heading > .demo-toolbar button:disabled { opacity: .4; cursor: default; }

/* Brand logo (mi_logo.png) replaces the small orange square in the navigation bar. */
img.brand-mark { display: block; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 0; background: none; object-fit: contain; }
@media (max-width: 480px) { img.brand-mark { width: 26px; height: 26px; } }

/* Key figures: centred under their own column. */
.features-stats { align-items: center; }
.features-stats .meta-item { align-items: center; text-align: center; padding-inline: 20px; }
.features-stats .meta-item:first-child { padding-left: 20px; }
.features-stats .meta-item:last-child { padding-right: 20px; }
.features-stats .hero-meta { text-align: center; }

/* The three key figures share one size; columns follow their content. */
.features-stats .meta-item strong,
.features-stats .meta-item:last-child strong { font-size: 26px; line-height: 1.25; }
.features-stats .hero-meta { grid-template-columns: repeat(3, auto); justify-content: space-between; }
@media (max-width: 560px) {
  .features-stats .meta-item strong,
  .features-stats .meta-item:last-child strong { font-size: 18px; }
  .features-stats .hero-meta { grid-template-columns: repeat(3, auto); }
  .features-stats .meta-item { padding-inline: 8px; }
}

/* Optical balance: the third figure is lowercase text rather than digits, so it is nudged up a little
   and given normal tracking to read at the same visual size as "1–7" and "12.6M". */
.features-stats .meta-item:last-child strong { font-size: 28px; letter-spacing: -.01em; }
@media (max-width: 560px) {
  .features-stats .meta-item:last-child strong { font-size: 19px; }
}

/* Same ink height for all three figures: digits and capitals share one height (no lowercase body, no descender). */
.features-stats .meta-item strong,
.features-stats .meta-item:last-child strong { font-size: 24px; line-height: 1.25; }
.features-stats .meta-item:last-child strong { text-transform: uppercase; letter-spacing: .02em; }
html[data-lang="zh"] .features-stats .meta-item:last-child strong { text-transform: none; }
@media (max-width: 560px) {
  .features-stats .meta-item strong,
  .features-stats .meta-item:last-child strong { font-size: 17px; }
}

/* Key figures: left-aligned with the heading column. */
.features-stats { align-items: flex-start; }
.features-stats .hero-meta { text-align: left; justify-content: start; }
.features-stats .meta-item { align-items: flex-start; text-align: left; padding-inline: 28px; }
.features-stats .meta-item:first-child { padding-left: 0; }
.features-stats .meta-item:last-child { padding-right: 0; }
@media (max-width: 560px) {
  .features-stats .meta-item { padding-inline: 12px; }
  .features-stats .meta-item:first-child { padding-left: 0; }
  .features-stats .meta-item:last-child { padding-right: 0; }
}
