.applications-main {
  --app-rule: color-mix(in srgb, var(--ink) 22%, var(--paper));
  --app-glass: color-mix(in srgb, var(--surface) 80%, transparent);
  --app-serif: Georgia,"Noto Serif SC","Songti SC","SimSun",serif;
  color: var(--ink);
}
.applications-main [hidden] { display: none !important; }
.applications-main :where(h1,h2,h3,h4,p,figure,dl,dd,ol,ul) { margin: 0; }
.app-mast { display: grid; grid-template-columns: 1.12fr 1fr; align-items: stretch; gap: clamp(2rem,5vw,5rem); margin-bottom: clamp(1.6rem,3vw,2.9rem); }
.app-mast-copy { align-self: center; padding-block: .65rem; }
.app-mast .page-kicker { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.15rem; }
.app-mast .page-kicker::before { content: ""; width: 1.8rem; height: 1px; background: currentColor; }
.app-mast .page-heading { margin: 0; font: 600 clamp(2.65rem,4.75vw,5.3rem)/1.17 var(--app-serif); letter-spacing: -.065em; text-wrap: balance; }
.app-mast .app-position { margin: 1.25rem 0 0; max-width: 38rem; font-size: 1rem; line-height: 1.9; color: var(--muted); }
.app-cover { position: relative; isolation: isolate; align-self: stretch; margin: 0; min-height: clamp(13rem,18vw,18rem); overflow: hidden; border-radius: .3rem; background: #101b2a; }
.app-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 48%; }
.app-cover figcaption { position: absolute; inset: auto auto 1rem 1rem; max-width: calc(100% - 2rem); padding: .3rem .65rem; background: rgb(16 27 42 / .82); color: #e3ebf4; border-left: 2px solid #8cc1ee; font-size: .78rem; }
.app-index { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: clamp(1rem,2vw,1.8rem); border-block: 1px solid var(--app-rule); }
.app-index a, .app-subnav button, .app-collab a { font: inherit; color: inherit; text-decoration: none; cursor: pointer; }
.app-index a { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(.5rem,1vw,1rem); min-height: 4.35rem; padding: .75rem .7rem; line-height: 1.35; font-weight: 600; color: var(--muted); scroll-margin-top: 6rem; }
.app-index a::before { content: ""; position: absolute; inset: 24% auto 24% 0; width: 1px; background: var(--line); }
.app-index a:first-child::before, .app-index a[aria-selected="true"]::before, .app-index a[aria-selected="true"] + a::before { visibility: hidden; }
.app-index a > svg { width: 1.9rem; height: 1.9rem; flex-shrink: 0; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.app-index a[aria-selected="true"] { box-shadow: inset 0 -3px var(--signal); color: var(--ink); background: color-mix(in srgb,var(--accent) 28%,var(--paper)); }
.app-index a[aria-selected="true"] svg { color: var(--signal); }
.app-index a:hover:not([aria-selected="true"]) { background: color-mix(in srgb,var(--signal) 7%,var(--paper)); color: var(--ink); }
.app-index a:focus-visible, .app-subnav button:focus-visible, .app-collab a:focus-visible, .app-scene:focus-visible, .drug-tabpanel:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.app-feature { display: grid; grid-template-columns: minmax(0,.87fr) minmax(0,1.13fr); overflow: hidden; border: 1px solid var(--line); border-radius: .4rem; background: var(--app-glass); }
.app-text { display: flex; flex-direction: column; align-items: start; justify-content: center; padding: clamp(1.5rem,3.3vw,3.3rem); }
.app-text .app-kind { color: var(--signal); font-size: .875rem; font-weight: 650; letter-spacing: .05em; margin: 0 0 1.1rem; }
.app-text h2 { margin: 0 0 1.25rem; font: 600 clamp(1.9rem,3.1vw,3.35rem)/1.25 var(--app-serif); letter-spacing: -.055em; text-wrap: balance; }
.app-text p, .app-collab p, .app-audience p, .app-fit p, .app-pipeline p, .app-metrics dd { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.app-text p, .app-collab p, .app-audience p { margin: 0; }
.app-figure {
  --plot:#101b2a; --plot-ink:#eff3f8; --plot-muted:#b6c2d0; --plot-grid:#39485b; --plot-mark:#8cc1ee; --plot-secondary:#96a8ba;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.15rem,2.55vw,2.55rem); margin: 0; min-width: 0;
  color: var(--plot-ink); background: var(--plot);
}
#scene-biomarkers .app-figure { --plot:#e4e8ef; --plot-ink:#18283b; --plot-muted:#465568; --plot-grid:#b8c3ce; --plot-mark:#435c85; --plot-secondary:#64748e; }
#scene-monitoring .app-figure { --plot:#101b2a; --plot-mark:#d2b496; }
#scene-validation .app-figure { --plot:#101b2a; --plot-mark:#8cc1ee; --plot-secondary:#aab7c8; --plot-grid:#39485b; }
.app-graph-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; border-bottom: 1px solid var(--plot-grid); padding-bottom: .6rem; margin-bottom: .85rem; font-size: 1.16rem; font-weight: 600; }
.app-graph-title small { color: var(--plot-muted); font-size: .8125rem; font-weight: 450; }
.app-figure > svg { display: block; width: 100%; height: auto; }
.app-figure svg text { fill: var(--plot-muted); font: 12px var(--mono,Consolas,monospace); }
.app-figure svg .affinity-label { paint-order: stroke; stroke: var(--plot); stroke-width: 4px; font-size: 11.5px; fill: var(--plot-muted); pointer-events: none; }
.app-figure figcaption { display: block; margin: .8rem 0 0; font-size: .84rem; line-height: 1.6; color: var(--plot-muted); }
.app-figure .gridline { fill: none; stroke: var(--plot-grid); stroke-width: .8; }
.app-figure .axis { fill: none; stroke: var(--plot-secondary); stroke-width: 1.1; }
.app-figure .trace { fill: none; stroke: var(--plot-mark); stroke-width: 2.4; }
.app-figure .guide { fill: none; stroke: var(--plot-secondary); stroke-width: 1.1; stroke-dasharray: 4 5; }
.app-figure .hot { fill: var(--plot-mark); }
.app-figure .dot { fill: var(--plot-secondary); }
.rate-point { cursor: pointer; }
.rate-target { fill: transparent; }
.rate-point:hover :last-child { stroke: var(--plot-ink); stroke-width: 2; }
#candidate-marker { pointer-events: none; fill: none; stroke: var(--plot-ink); stroke-width: 1.4; }
.rate-reader { padding: .85rem 0 .65rem; margin-top: .55rem; display: flex; flex-wrap: wrap; align-items: end; gap: .7rem 1.2rem; border-block: 1px solid var(--plot-grid); }
.rate-reader label { display: flex; flex-wrap: wrap; gap: .2rem .4rem; align-items: center; font-size: .82rem; color: var(--plot-muted); }
.app-select-wrap { display: inline-flex; align-items: center; position: relative; }
.app-select-wrap select { appearance: none; font: .875rem var(--mono,monospace); color: var(--plot-ink); background: #233246; border: 1px solid #728399; border-radius: .28rem; padding: .35rem 1.3rem .35rem .45rem; }
.app-select-wrap svg { width: .65rem; height: .65rem; position: absolute; right: .35rem; fill: none; stroke: var(--plot-ink); stroke-width: 1.5; pointer-events: none; }
.rate-reader dl { margin-left: auto; flex: 1 1 18.3rem; display: grid; grid-template-columns: 1.12fr 1.12fr .76fr; gap: .6rem; }
.rate-reader dl > div { min-width: 0; }
.rate-reader dt, .rate-reader dd { line-height: 1.45; }
.rate-reader dt { font-size: .82rem; color: var(--plot-muted); }
.rate-reader dt small { font-size: .74rem; }
.rate-reader dd { font: .9rem/1.5 var(--mono,monospace); color: var(--plot-ink); white-space: nowrap; }
.well-alarm { fill: none; stroke: var(--plot-mark); stroke-width: 1.45; }
.rep-spread { fill: var(--plot-mark); opacity: .23; }
.rep-selected, .rep-other { fill: none; stroke: var(--plot-secondary); stroke-width: 1.15; }
.rep-other:nth-of-type(2) { stroke: #a297b3; }
.rep-other:nth-of-type(3) { stroke: #d2b496; }
.rep-other:nth-of-type(4) { stroke: #839ab6; }
.rep-other:nth-of-type(5) { stroke: #b2a9c6; }
.rep-selected { stroke: var(--plot-mark); stroke-width: 1.8; }
.drug-detail { display: grid; grid-template-columns: minmax(10rem,.26fr) minmax(0,1fr); align-items: start; gap: clamp(1.8rem,4.3vw,4.75rem); margin-top: 2.5rem; border-block-start: 1px solid var(--app-rule); padding-top: 1.3rem; }
.app-subnav { display: flex; flex-direction: column; gap: .25rem; padding-right: 1.4rem; border-right: 1px solid var(--line); }
.app-subnav button { position: relative; background: transparent; border: 0; padding: .65rem .8rem; text-align: left; font-size: .94rem; line-height: 1.4; color: var(--muted); }
.app-subnav button[aria-selected="true"] { background: color-mix(in srgb,var(--signal) 9%,var(--paper)); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 var(--signal); }
.app-subnav button:hover:not([aria-selected="true"]) { color: var(--signal); }
.app-detail-title, .app-audience h2 { margin: 0 0 1.1rem; font: 600 clamp(1.4rem,2.2vw,2rem)/1.35 var(--app-serif); letter-spacing: -.035em; }
.app-metrics, .app-pipeline, .app-fit { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 1.8rem; padding: 0; }
.app-metrics > div, .app-pipeline li, .app-fit > div { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.app-metrics dt { display: flex; align-items: baseline; gap: .7rem; }
.app-metrics dt i { font: italic 2.1rem/1.2 Georgia,serif; color: var(--signal); }
.app-metrics dt strong, .app-pipeline h4, .app-fit h4 { font-size: 1.07rem; font-weight: 600; }
.app-metrics dd { margin: 0; }
.app-formula { display: block; margin: .55rem 0 .2rem; font: .88rem/1.45 var(--mono,monospace); color: var(--ink); }
.app-pipeline { counter-reset: stage; list-style: none; }
.app-funnel { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: center; padding: 1rem .8rem; margin-bottom: 1.1rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--app-glass); }
.app-funnel div { text-align: center; font-size: .875rem; line-height: 1.4; }
.app-funnel div + div { border-left: 1px solid var(--line); }
.app-funnel svg { display: block; width: min(100%,8rem); height: 2.6rem; margin: 0 auto .35rem; color: var(--signal); }
.app-pipeline li { counter-increment: stage; }
.app-pipeline li::before { content: counter(stage,decimal-leading-zero); display:block; margin: 0 0 .4rem; color: var(--signal); font: .875rem/1.4 "IBM Plex Mono",Consolas,monospace; }
.app-pipeline p, .app-fit p { margin: .45rem 0 0; }
.app-fit { grid-template-columns: repeat(2,minmax(0,1fr)); }
.app-collab { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 2rem; padding: 1.35rem 1.6rem; background: color-mix(in srgb,var(--signal) 9%,var(--paper)); border-block: 1px solid var(--app-rule); }
.app-collab h3 { margin: 0 0 .35rem; font-size: 1.2rem; }
.app-collab a { display: inline-flex; flex-shrink: 0; justify-content:center; gap: .4rem; align-items: center; font-weight: 600; background: var(--ink); color: var(--paper); border-radius: .4rem; padding: .75rem 1.15rem; }
.app-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; padding: 1.7rem 0 0; border-top: 1px solid var(--line); margin: 2.3rem 0 0; }
.app-audience h2 { margin: 0 0 .45rem; }
.app-audience ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: center; gap: .75rem; list-style: none; padding: 0; }
.app-audience li { font-size: .95rem; padding-left: .7rem; border-left: 2px solid var(--signal); }
html[data-lang="both"] .applications-main :is(p,h1,h2,h3,h4,figcaption,dt strong,dd,li,.app-graph-title small) > .en { display: block; }
html[data-lang="both"] .applications-main :is(p,h1,h2,h3,h4,figcaption,dt strong,dd,li,.app-graph-title small) > .zh + .en { margin-top: .38em; }
html[data-lang="both"] .applications-main :is(.app-index a,.app-subnav button) .en { display: block; margin: .15rem 0 0; font-size: .85em; font-weight: 500; }
html[data-lang="both"] .app-mast .page-heading .en { margin-inline: 0; font-size: .62em; letter-spacing: -.045em; }
html[data-lang="both"] .app-text h2 .en { margin-inline: 0; font-size: .7em; }
@media(max-width: 980px) {
  .drug-detail { grid-template-columns: minmax(0,1fr); gap: 1.2rem; }
  .app-subnav { flex-direction: row; flex-wrap: wrap; padding: 0; border: 0; }
  .app-subnav button[aria-selected="true"] { box-shadow: inset 0 -2px var(--signal); }
}
@media(max-width: 820px) {
  .app-mast { grid-template-columns: 1.15fr .85fr; gap: 1.2rem; }
  .app-mast .app-position { max-width: none; margin-top: 1rem; line-height: 1.75; }
  .app-index a { flex-direction: column; gap: .35rem; }
  .app-index a > span { text-align: center; }
  .app-text { padding: 1.4rem; }
  .app-metrics, .app-pipeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-audience { grid-template-columns: 1fr; gap: 1rem; }
}
@media(max-width: 640px) {
  .app-mast { grid-template-columns: minmax(0,1fr); gap: 1rem; margin-bottom: 1.3rem; }
  .app-mast-copy { padding: 0; }
  .app-mast .page-kicker { margin-bottom: .65rem; }
  .app-cover { min-height: clamp(9.5rem,34vw,13rem); }
  .app-cover img { object-position: 50% 49%; }
  .app-cover figcaption { inset: auto auto .6rem .65rem; }
  .app-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .app-index a { flex-direction: row; justify-content: start; min-height: 3.3rem; font-size: .91rem; padding: .45rem .55rem; }
  .app-index a > span { text-align: left; }
  .app-index a > svg { width: 1.5rem; height: 1.5rem; }
  .app-index a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .app-index a:nth-child(3)::before { visibility: hidden; }
  .app-feature { grid-template-columns: minmax(0,1fr); }
  .app-figure { padding: 1.1rem; }
  .app-figure svg text { font-size: 16px; }
  .app-figure svg .affinity-label { font-size: 14px; }
  .app-select-wrap select { min-height: 2.35rem; }
  .app-text h2 { font-size: clamp(1.8rem,7vw,2.5rem); }
  .app-subnav { gap: .3rem; }
  .app-subnav button { padding: .5rem .75rem; }
  .drug-detail { margin-top: 1.65rem; }
  .app-collab { align-items: start; flex-direction: column; padding: 1.1rem; }
}
@media(max-width: 420px) {
  .app-metrics, .app-pipeline, .app-fit { grid-template-columns: minmax(0,1fr); }
  .app-subnav button { font-size: .86rem; }
  .rate-reader dd { font-size: .78rem; }
}
