/* 03 / Latest paper: RON → TREX1 scroll scene (SVG camera) + paper card. Holo-lab look, color = meaning. */

#trex1.panel { padding: 0 0 clamp(72px, 11vh, 132px); }

/* ---------- Stage + HTML overlays ---------- */
#trex1 .t1-stage { isolation: isolate; }
#trex1 .t1-svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: hidden; will-change: transform; }
#trex1 .t1-scrim {
  position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 94%, transparent) 0%, color-mix(in srgb, var(--bg) 78%, transparent) 62%, transparent 100%);
}
#trex1 .t1-scrim-b {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none;
  background: linear-gradient(0deg, color-mix(in srgb, var(--bg-2) 95%, transparent) 0%, color-mix(in srgb, var(--bg-2) 80%, transparent) 60%, transparent 100%);
}
#trex1 .t1-head {
  position: absolute; left: 50%; transform: translateX(-50%); top: calc(60px + clamp(6px, 2.2vh, 26px));
  width: min(1080px, calc(100% - 2 * var(--gutter))); text-align: center;
}
#trex1 .t1-eyebrow { justify-content: center; margin: 0 0 clamp(8px, 1.4vh, 14px); }
#trex1 .t1-title { font-size: clamp(16px, 2.2vw, 30px); letter-spacing: 0.1em; line-height: 1.22; margin: 0; }
#trex1 .t1-title .t1-ron { color: var(--accent); }
#trex1 .t1-title.is-done .k-ch { will-change: auto; }

#trex1 .t1-caps {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(14px, 4.6vh, 46px);
  width: min(860px, calc(100% - 2 * var(--gutter)));
}
#trex1 .t1-cap { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; }
#trex1 .t1-cap-t { margin: 0; font-size: clamp(13px, 1.42vw, 19px); letter-spacing: 0.16em; line-height: 1.45; }
#trex1 .t1-cap-t .k-word { display: inline-block; white-space: nowrap; }
#trex1 .t1-cap:first-child .t1-cap-t { text-wrap: balance; } /* no lone "cytosol" on a second line */
#trex1 .t1-cap-t .k-ch { display: inline-block; }
/* word spaces as real, collapsible spaces so no line starts with a gap */
#trex1 .t1-title .k-sp, #trex1 .t1-cap-t .k-sp { display: inline; width: auto; }
#trex1 .t1-title .k-sp::before, #trex1 .t1-cap-t .k-sp::before { content: " "; }

@media (max-height: 700px) { #trex1 .t1-eyebrow { display: none; } }
@media (max-width: 480px) {
  #trex1 .t1-title { font-size: 15.5px; letter-spacing: 0.08em; }
  #trex1 .t1-cap-t { font-size: 12.5px; letter-spacing: 0.12em; }
  #trex1 .t1-caps { width: calc(100% - 32px); }
}

/* Short landscape screens: compact type so the figure keeps most of the height */
#trex1 .t1-stage[data-mode="short"] .t1-head { top: 64px; }
#trex1 .t1-stage[data-mode="short"] .t1-eyebrow { display: none; }
#trex1 .t1-stage[data-mode="short"] .t1-title { font-size: 13.5px; letter-spacing: 0.08em; line-height: 1.25; }
#trex1 .t1-stage[data-mode="short"] .t1-caps { bottom: 8px; width: min(760px, calc(100% - 32px)); }
#trex1 .t1-stage[data-mode="short"] .t1-cap-t { font-size: 12px; letter-spacing: 0.12em; line-height: 1.35; }

/* ---------- SVG: shared ---------- */
#trex1 .t1-svg text { font-family: var(--font-display); }
#trex1 .t1-svg .g-ron *, #trex1 .t1-svg .g-dna-strand, #trex1 .t1-svg .g-dna-rung { vector-effect: non-scaling-stroke; }
#trex1 .t1-arr-ron { color: var(--accent); }
#trex1 .t1-arr-tumor { color: var(--tumor); }
#trex1 .t1-arr-heal { color: var(--heal); }

/* Cell: tumor-tinted cytosol, unlabeled nucleus for context, bilayer membrane */
#trex1 .t1-st-cyto0 { stop-color: color-mix(in srgb, var(--tumor) 3%, #fff); stop-opacity: 0.62; }
#trex1 .t1-st-cyto1 { stop-color: color-mix(in srgb, var(--tumor) 6%, #fff); stop-opacity: 0.55; }
#trex1 .t1-st-cyto2 { stop-color: color-mix(in srgb, var(--tumor) 14%, #fff); stop-opacity: 0.6; }
#trex1 .t1-nuc-fill { fill: color-mix(in srgb, var(--tumor) 4%, transparent); stroke: color-mix(in srgb, var(--tumor) 32%, transparent); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
#trex1 .t1-nuc-line { fill: none; stroke: color-mix(in srgb, var(--tumor) 18%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
#trex1 .t1-chrom { fill: none; stroke: color-mix(in srgb, var(--tumor) 22%, transparent); stroke-width: 1; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#trex1 .t1-mem-glow { fill: none; stroke: var(--tumor); stroke-opacity: 0.1; stroke-width: 10; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#trex1 .t1-mem-dot { fill: none; stroke: color-mix(in srgb, var(--tumor) 62%, #fff); stroke-width: 2.6; stroke-dasharray: 0 4.4; stroke-linecap: round; }
#trex1 .t1-mem-band { fill: color-mix(in srgb, var(--tumor) 13%, #fff); stroke: none; }
#trex1 .t1-mem-line { fill: none; stroke: color-mix(in srgb, var(--tumor) 82%, var(--text)); stroke-width: 1.4; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* RON: shared glyph, plus a soft "on" halo (gradient, no filter) */
#trex1 .t1-st-ron0 { stop-color: var(--accent); stop-opacity: 0.3; }
#trex1 .t1-st-ron1 { stop-color: var(--accent); stop-opacity: 0; }

/* DNA fragments and their breakdown */
#trex1 .t1-debris { fill: var(--dna); }
#trex1 .t1-spark { fill: none; stroke: var(--holo); stroke-width: 1.4; vector-effect: non-scaling-stroke; }

/* Labels */
#trex1 .t1-tag { font-weight: 700; letter-spacing: 0.18em; fill: var(--text); }
#trex1 .t1-tag-ron { fill: var(--accent); }
#trex1 .t1-tag-hgfl { fill: var(--ligand); }
#trex1 .t1-tag-dna { font-weight: 600; letter-spacing: 0.16em; fill: var(--muted); }
#trex1 .t1-region { font-weight: 600; letter-spacing: 0.24em; fill: var(--muted); }
@media (max-width: 400px) { #trex1 .t1-region { letter-spacing: 0.1em; } }
#trex1 .t1-cellname { fill: color-mix(in srgb, var(--tumor) 70%, var(--text)); letter-spacing: 0.2em; }
#trex1 .t1-leader { fill: none; stroke: var(--muted); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#trex1 .t1-leader-ron { stroke: var(--accent); }
#trex1 .t1-leader-hgfl { stroke: var(--ligand); }
#trex1 .t1-bar { fill: var(--text); }

/* Outcomes (tumor) */
#trex1 .t1-ic { fill: color-mix(in srgb, var(--tumor) 14%, #fff); stroke: var(--tumor); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
#trex1 .t1-ic-dot, #trex1 .t1-ic-head { fill: var(--tumor); }
#trex1 .t1-ic-line { fill: none; stroke: var(--tumor); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#trex1 .t1-out-t { font-weight: 700; letter-spacing: 0.14em; fill: color-mix(in srgb, var(--tumor) 72%, var(--text)); }
#trex1 .t1-strike { fill: none; stroke: var(--heal); stroke-linecap: round; }

/* Treatments (heal) and interferon (immune) */
#trex1 .t1-pill-bg { fill: color-mix(in srgb, var(--heal) 9%, #fff); stroke: var(--heal); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
#trex1 .t1-pill-t { font-weight: 600; letter-spacing: 0.02em; fill: color-mix(in srgb, var(--heal) 62%, var(--text)); }
#trex1 .t1-or-line { fill: none; stroke: var(--line-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
#trex1 .t1-or { font-style: italic; font-weight: 500; letter-spacing: 0.06em; fill: var(--muted); }
#trex1 .t1-ifn-dot { fill: var(--immune); }
#trex1 .t1-st-ifn0 { stop-color: var(--immune); stop-opacity: 0.34; }
#trex1 .t1-st-ifn1 { stop-color: var(--immune); stop-opacity: 0; }

/* Tumor cell death (heal = the good outcome) */
#trex1 .t1-st-heal0 { stop-color: var(--heal); stop-opacity: 0.2; }
#trex1 .t1-st-heal1 { stop-color: var(--heal); stop-opacity: 0.08; }
#trex1 .t1-st-heal2 { stop-color: var(--heal); stop-opacity: 0; }
#trex1 .t1-death-t { font-weight: 700; letter-spacing: 0.2em; fill: color-mix(in srgb, var(--heal) 78%, var(--text)); }

/* ---------- After the scene: steps (screen readers; visible for reduced motion) + paper card ---------- */
#trex1 .t1-after { padding-top: clamp(40px, 7vh, 80px); }
#trex1 .t1-steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#trex1.t1-static .t1-steps {
  position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
  max-width: 760px; margin: 0 auto clamp(32px, 5vh, 56px); padding-left: 1.4em; color: var(--muted); font-size: 17px; line-height: 1.55;
}
#trex1.t1-static .t1-steps li { margin: 0 0 0.45em; padding-left: 0.3em; }
#trex1.t1-static .t1-steps li::marker { color: var(--accent); font-weight: 700; }

#trex1 .t1-paper {
  max-width: 860px; margin: 0 auto; padding: clamp(22px, 3.4vw, 36px) clamp(20px, 3.6vw, 40px);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 50%, transparent) inset, 0 18px 40px -28px color-mix(in srgb, var(--accent) 45%, transparent);
  position: relative; overflow: hidden;
}
#trex1 .t1-paper::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--holo); box-shadow: 0 0 10px var(--holo); }
#trex1 .t1-paper-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
#trex1 .t1-status {
  font: 600 11px/1 var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--heal);
  padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--heal) 45%, transparent); border-radius: 999px;
}
#trex1 .t1-paper-title { font-size: clamp(19px, 2.1vw, 25px); font-weight: 600; line-height: 1.3; letter-spacing: 0.01em; margin: 0 0 10px; }
#trex1 .t1-paper-meta { color: var(--muted); font-size: 16px; margin: 0 0 6px; }
#trex1 .t1-paper-authors { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
#trex1 .t1-paper-sum { margin: 14px 0 0; font-size: 16.5px; line-height: 1.55; color: var(--text); max-width: 700px; }
#trex1 .t1-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
#trex1 .t1-soon { margin: 0; display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--font-display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint); }
#trex1 .t1-soon-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--holo); box-shadow: 0 0 8px var(--holo); }

/* Phones: draw on into the stage's bottom extension (base.css, --stage-ext); the bottom scrim runs to its bottom */
@media (pointer: coarse) {
  #trex1 .t1-svg { overflow: visible; }
  #trex1 .t1-scrim-b { box-sizing: content-box; padding-bottom: var(--stage-ext); bottom: calc(-1 * var(--stage-ext)); }
}
