/* Shared reading scale. Scientific plot lettering remains in the original assets. */
html[data-language-pending] [data-zh] { visibility: hidden; }
:root {
  --text-body: 16px;
  --text-label: 14px;
  --text-caption: 14px;
}

/* Keep the established display face when installed; otherwise use the native UI. */
:root {
  --font: "Avenir Next", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, Consolas, "Liberation Mono", monospace;
}

/* Supporting information is part of the story, rather than miniature metadata. */
:is(.case-gallery .case-choices, .method-gallery, .home-story-gallery) :is(.case-choice-description, .scale-choice-description, .home-story-tab-description) {
  font-size: var(--text-label);
  line-height: 1.65;
  color: #6b6176;
}
.case-gallery .case-choices .case-choice-method {
  font-size: var(--text-caption);
  color: #755e8d;
}
:is(.case-rail, .method-gallery-rail, .home-story-navigation) .timed-gallery-controls > span {
  font-size: var(--text-caption);
  color: #6b6176;
}
:is(.gallery-detail-points, .research-result-details) strong { font-size: 15px; }
:is(.gallery-detail-points, .research-result-details) span { font-size: var(--text-label); line-height: 1.75; }
:is(.gallery-science-figure, .data-source-picture, .training-media-pair figure, .research-study-figure) figcaption,
:is(.method-preview-caption, .mptt-viewer-caption, .visual-caption, .study-fullname, .showcase-scope, .lawave-comparison-scope, .lawave-test-direction) {
  font-size: var(--text-caption);
  line-height: 1.75;
}
body main :is(.recording-bar p, .recording-bar > a, .data-source-playback > span) {
  font-size: var(--text-caption); line-height: 1.6;
}
.data-overview.case-gallery .data-source-picture figcaption,
.platform-workflow .learning-explainer figcaption,
.inference-prediction-pair figcaption,
.design-evidence figcaption { font-size: var(--text-caption); }
.training-overview.case-gallery .training-outcome > .text-link { font-size: var(--text-label); }
.framework-process .story-decision-path p { font-size: var(--text-label); }
.data-source-caption > div > p { font-size: var(--text-caption); }

/* Body copy, with headings and data figures retaining their separate scale. */
:is(.case-content, .training-outcome, .data-source-view, .study-section, .study-overview) > p,
:is(.method-scale-step, .research-study-content, .inference-route-copy, .platform-panel-heading, .solution-copy) > p,
:is(.platform-section-heading, .study-heading, .method-family-heading) > p,
:is(.platform-validation, .platform-validation-feedback, .platform-material-brief, .development-route) p {
  font-size: var(--text-body);
  line-height: 1.85;
}
:is(.case-content, .study-section, .platform-section, .method-family) a.text-link,
:is(.method-scale-step, .scale-topic-links, .study-related) a,
:is(.method-card-action, .contact-affiliation, .contact-profile) {
  font-size: var(--text-label);
  line-height: 1.7;
}
:is(.platform-step, .section-kicker.topic-label, .research-method, .route-topic, .scale-stage-label, .training-status, .use-path-tag) {
  font-size: var(--text-caption);
}
.inference-route .direct-speedup > span,
.inference-route .correction-note,
.platform-solver-flow li > span { font-size: var(--text-caption); line-height: 1.75; }
.platform-lifecycle :is(p, small),
#mechanisms > a > p,
.platform-decision-loop p { font-size: var(--text-label); line-height: 1.75; }

/* Homepage evidence and paths remain legible without competing with the headline. */
.cover-mission .mission-link small,
.home-metric p,
.home-metric .metric-source,
.highlight-mechanism-path :is(small, .highlight-method),
.home-highlight .highlight-name,
.home-method .method-topics { font-size: var(--text-label); line-height: 1.75; }
.home-response-evidence figcaption,
.cover-scroll { font-size: var(--text-caption); }

/* Actions are readable text or a 44px icon target, never a tiny word to aim at. */
.nav-links a, .language-switch { font-size: var(--text-label); }
.scroll-chapter-nav :is(.chapter-links, .study-jumps, .method-index) > a {
  font-size: var(--text-caption);
}
.study-breadcrumb, .study-related > span { font-size: var(--text-label); }
.paper-journal, .paper-authors, .paper-link { font-size: var(--text-label); line-height: 1.7; }
.paper-year > span { font-size: var(--text-caption); }
.site-footer :is(.footer-tagline, .footer-links a, .footer-contact a) {
  font-size: var(--text-label);
  line-height: 1.8;
}
.void-legend, .void-explorer > figcaption > span, .void-time-scale {
  font-size: var(--text-caption);
}
.void-transport .button, .recording-options button { font-size: var(--text-label); }
#main-content .mptt-choice span { font-size: var(--text-label); }
#main-content .mptt-choice legend,
#main-content .void-time-ticks { font-size: var(--text-caption); }
.button { font-size: var(--text-label); }

@media (max-width: 700px) {
  :root { --text-body: 16px; --text-label: 14px; --text-caption: 14px; }
  .case-gallery .case-choices > button { padding: 15px 12px; }
  :is(.case-gallery .case-choices, .method-gallery, .home-story-gallery) :is(.case-choice-description, .scale-choice-description, .home-story-tab-description) {
    font-size: var(--text-caption);
  }
  .scroll-chapter-nav .chapter-picker-current { font-size: var(--text-label); }
  .scroll-chapter-nav .chapter-picker-option { font-size: var(--text-label); }
  .site-footer .footer-links { column-gap: 20px; }
}

@media (max-width: 420px) {
  .connected-design-visual { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .connected-design-visual > figure:nth-child(3) { grid-column: 1 / -1; }
  .connected-design-visual > figure:nth-child(3) > img { height: 160px; }
}

/* On tablets this rail is still beside the result: keep one readable label column. */
@media (min-width: 761px) and (max-width: 800px) {
  .characterization-case-layout.case-gallery .characterization-case-options {
    display: flex;
    flex-direction: column;
  }
}

/* One intentional site-wide floor outranks historical, page-specific tiny type. */
#main-content :is(figcaption, .visual-caption, .study-fullname, .showcase-scope,
  .mptt-viewer-caption, .lawave-comparison-scope, .lawave-test-direction,
  .section-kicker, .platform-step, .research-method, .method-preview-caption) {
  font-size: var(--text-caption);
  line-height: 1.75;
}
#main-content .text-link { font-size: var(--text-label); line-height: 1.75; }
#main-content .recording-bar :is(p, a) { font-size: var(--text-caption); line-height: 1.6; }
#main-content .paper-content :is(.paper-journal, .paper-authors) { font-size: var(--text-label); }
#main-content .home-metric p { font-size: var(--text-label); }
#main-content :is(.story-decision-path, .framework-scales) p { font-size: var(--text-label); }
#main-content .case-gallery .case-content > p,
#main-content .platform-panel-summary > p { font-size: var(--text-body); line-height: 1.85; }
#main-content .vacancy-scale p { font-size: var(--text-caption); }
#main-content :is(.highlight-method, .lawave-comparison-scope) { color: #6b6176; }

/* Diagram captions and secondary controls also need a readable scale on phones. */
#main-content :is(.cover-identity, .cover-down, .home-path-label,
  .highlight-mechanism-path > a > span, .solution-design-line > span,
  .acoustic-scale-path li > span, .platform-lifecycle small,
  .gpu-benchmark-scope, .data-gpu-link > span > span, .training-input-summary > span,
  .solver-loop-steps li > span, .inverse-readouts span, .mptt-opening-art > span,
  .mptt-scale-labels span, .showcase-wave-panels > div > span,
  .showcase-wave-scale span, .study-note, .void-legend span,
  .void-time-row label, .void-values dt, .media-reading-key,
  .solution-prediction-visual > p, .solution-flow-results figcaption > span,
  .gpu-benchmark-detail th) {
  font-size: var(--text-caption);
  line-height: 1.7;
}
#main-content :is(.home-path-cta, .physics-step > strong, .gpu-benchmark-stats dt,
  .framework-process .story-feedback, .data-source-caption > a,
  .method-subchoices button, .research-filters button, .research-foundations-link,
  .operator-learning p) { font-size: var(--text-label); line-height: 1.75; }
#main-content .timed-gallery-controls > span { font-size: var(--text-caption); }
#main-content .data-source-caption > div > p { font-size: var(--text-caption); }
#main-content .home-path-copy > p { font-size: var(--text-body); line-height: 1.85; }
#main-content .vacancy-scale { font-size: var(--text-caption); }

/* Respect increased browser text sizes without forcing a fixed line count. */
:is(.case-choice-description, .scale-choice-description, .gallery-result-copy, .paper-authors) {
  overflow-wrap: break-word;
}

/* Compact method selection, with the research directory immediately below. */
#material-scales.material-story-module{padding-top:24px;padding-bottom:36px}
#material-scales .method-module-heading{margin-bottom:22px;gap:40px}
#material-scales .method-module-heading h2{font-size:clamp(26px,3vw,38px);margin-bottom:0}
#material-scales .scale-route{margin-top:0;gap:28px}
#material-scales .scale-route img{height:100px;margin-bottom:14px}
#material-scales .scale-route h3{font-size:17px;margin:0}
#material-scales .scale-route>li:not(:last-child)::after{top:42px}
.prediction-image-action{position:absolute;bottom:2px;right:6px;padding:4px 7px;border-radius:6px;background:rgba(248,245,252,.92);font-size:11px;line-height:1.6;color:#6940ab}
a:has(>.prediction-image-action){position:relative}
.characterization-applicability{max-width:72ch;margin:26px 0 0;font-size:14px;line-height:1.85;color:#655d70}
.application-contact-context{margin-top:12px;font-size:14px;color:#655d70;line-height:1.8}
.lawave-workflow-comparison{margin-top:24px;border-top:1px solid #ded7e8;padding-top:16px}
.lawave-workflow-comparison summary{cursor:pointer;color:#6940ab;font-size:14px;line-height:1.8;min-height:36px;list-style-position:inside}
.lawave-workflow-comparison .lawave-story-outcomes{border-top:0;padding-top:18px}
.lawave-workflow-comparison .lawave-story-outcomes strong{font-size:15px}
.lawave-workflow-comparison .lawave-story-outcomes span{font-size:14px!important;color:#655d70!important}
@media(max-width:800px){#material-scales .method-module-heading{gap:18px}#material-scales .scale-route img{height:86px}#material-scales .scale-route>li:not(:last-child)::after{top:33px}}
@media(max-width:520px){#material-scales .scale-route h3{font-size:15px}#material-scales .method-module-heading h2{font-size:27px}.characterization-applicability{font-size:14px}}

/* Long chapter lists share a second row when the return button needs space. */
@media (min-width: 801px) {
  body .study-main .scroll-chapter-nav.has-chapter-return:not(.compact-chapters) > .chapter-links {
    flex-wrap: wrap;
    row-gap: 0;
  }
}
