/* Framed-only Layered Route / Lesion Map family: M06, M08, M17. */
body.study-framed-page .route-lab {
  --route-stage: var(--stage-panel);
  --route-structure: var(--text-muted);
  --route-flow: var(--accent);
  --route-sensory: var(--warn);
  --route-injury: var(--bad);
  --route-safe: var(--good);
  --route-soft-accent: color-mix(in srgb, var(--accent) 14%, transparent);
  --route-soft-warn: color-mix(in srgb, var(--warn) 15%, transparent);
  --route-soft-bad: color-mix(in srgb, var(--bad) 17%, transparent);
  --route-soft-good: color-mix(in srgb, var(--good) 14%, transparent);
}

body.study-framed-page .route-lab .route-workbench {
  height: 394px;
  grid-template-columns: minmax(0, 1.58fr) minmax(268px, .92fr);
}

body.study-framed-page .route-stage { background: var(--route-stage); }
body.study-framed-page .route-scene { width: 100%; height: 100%; min-width: 0; }
body.study-framed-page .route-scene[hidden] { display: none; }
body.study-framed-page .route-scene svg { display: block; width: 100%; height: 100%; }
body.study-framed-page .route-side { grid-template-rows: 1fr; overflow: auto; scrollbar-width: thin; }
body.study-framed-page .route-side > section { min-width: 0; display: grid; align-content: start; gap: 8px; }
body.study-framed-page .route-side > section[hidden] { display: none; }

body.study-framed-page .route-prompt {
  margin: 0;
  color: var(--text-dim);
  font-size: 10.5px;
  line-height: 1.45;
}

body.study-framed-page .route-mission.is-done::after { content: " ✓"; color: var(--good); }
body.study-framed-page .route-mission:disabled { opacity: .42; cursor: not-allowed; }

body.study-framed-page .route-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

body.study-framed-page .route-metric {
  min-width: 0;
  min-height: 47px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 7px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
}

body.study-framed-page .route-metric span {
  color: var(--text-muted);
  font: 700 8.5px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body.study-framed-page .route-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

body.study-framed-page .route-checks { display: flex; flex-wrap: wrap; gap: 4px; }
body.study-framed-page .route-checks span {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 99px;
  font: 700 8.5px/1.2 "SFMono-Regular", Consolas, monospace;
}
body.study-framed-page .route-checks i { width: 7px; height: 7px; border: 1px solid var(--text-muted); border-radius: 50%; }
body.study-framed-page .route-checks span.is-done { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
body.study-framed-page .route-checks span.is-done i { background: var(--good); border-color: var(--good); }

body.study-framed-page .route-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
body.study-framed-page .route-tool-token {
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 5px 7px;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  cursor: grab;
  text-align: left;
  touch-action: none;
}
body.study-framed-page .route-tool-token:hover { border-color: var(--border-strong); transform: translateY(-1px); }
body.study-framed-page .route-tool-token:active { cursor: grabbing; transform: translateY(0); }
body.study-framed-page .route-tool-token.is-selected { color: var(--accent-bright); background: var(--route-soft-accent); border-color: var(--accent); }
body.study-framed-page .route-tool-token strong { min-width: 0; font-size: 10px; line-height: 1.25; overflow-wrap: anywhere; }
body.study-framed-page .route-tool-token span { color: var(--text-muted); font: 650 8px/1.2 "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }

.route-drag-ghost {
  position: fixed;
  z-index: 2147482000;
  transform: translate(-50%, -125%);
  max-width: 160px;
  padding: 7px 10px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--accent);
  border-radius: 8px;
  font: 700 11px/1.25 -apple-system, "PingFang TC", sans-serif;
  pointer-events: none;
}

body.study-framed-page .route-svg-kicker {
  fill: var(--accent);
  font: 750 9.5px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .1em;
}
body.study-framed-page .route-svg-label {
  fill: var(--text-dim);
  font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace;
  letter-spacing: .05em;
}
body.study-framed-page .route-svg-note {
  fill: var(--text-muted);
  font: 650 9.5px/1.2 "SFMono-Regular", Consolas, monospace;
}
body.study-framed-page .route-node-label {
  fill: var(--text);
  font: 750 10px/1.2 "SFMono-Regular", Consolas, monospace;
  text-anchor: middle;
}

body.study-framed-page .route-hit { fill: transparent !important; stroke: none !important; pointer-events: all; }
body.study-framed-page .route-drag-handle { cursor: grab; touch-action: none; }
body.study-framed-page .route-drag-handle:active { cursor: grabbing; }
body.study-framed-page .route-drag-handle:focus-visible { outline: none; filter: drop-shadow(0 0 4px var(--accent)); }

/* M06 spinal cord + body projection */
body.study-framed-page .route-cord > ellipse { fill: color-mix(in srgb, var(--route-structure) 8%, var(--route-stage)); stroke: var(--route-structure); stroke-width: 2; }
body.study-framed-page .route-butterfly { fill: color-mix(in srgb, var(--route-structure) 20%, transparent); stroke: var(--text-muted); stroke-width: 1.4; }
body.study-framed-page .route-midline { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 4 4; }
body.study-framed-page .route-tract circle { fill: var(--route-soft-accent); stroke: var(--border-strong); stroke-width: 1.5; }
body.study-framed-page .route-tract text { fill: var(--text-dim); font: 750 8.5px/1 "SFMono-Regular", Consolas, monospace; text-anchor: middle; }
body.study-framed-page .route-tract.route-horn circle { fill: color-mix(in srgb, var(--warn) 10%, transparent); }
body.study-framed-page .route-tract.is-hit circle { fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 3; }
body.study-framed-page .route-tract.is-hit text { fill: var(--text); }
body.study-framed-page .route-crossing { fill: none; stroke: var(--route-sensory); stroke-width: 2; stroke-dasharray: 6 5; marker-end: none; }
body.study-framed-page .route-body-outline { fill: color-mix(in srgb, var(--text-muted) 9%, transparent); stroke: var(--text-muted); stroke-width: 1.7; }
body.study-framed-page .route-body-mid { stroke: var(--border-strong); stroke-width: 1; }
body.study-framed-page .route-body-deficit { opacity: 0; pointer-events: none; }
body.study-framed-page .route-body-deficit.is-active { opacity: .82; }
body.study-framed-page .route-body-motor { fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 1.4; }
body.study-framed-page .route-body-dc { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 3; }
body.study-framed-page .route-body-pain { fill: var(--route-soft-warn); stroke: var(--warn); stroke-width: 1.4; stroke-dasharray: 2 3; }
body.study-framed-page .route-body-horn { fill: var(--bad); stroke: var(--text); stroke-width: 1; }
body.study-framed-page .route-level-rail line { stroke: var(--border-strong); stroke-width: 1.2; }
body.study-framed-page .route-level-rail text { fill: var(--text-muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; }
body.study-framed-page .route-level-handle path,
body.study-framed-page .route-radius-handle circle:not(.route-hit) { fill: var(--accent); stroke: var(--route-stage); stroke-width: 2; }
body.study-framed-page .route-lesion-ring { fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 2; stroke-dasharray: 4 3; pointer-events: none; }
body.study-framed-page .route-lesion-core { fill: var(--bad); stroke: var(--route-stage); stroke-width: 2; }
body.study-framed-page .route-lesion path { stroke: var(--route-stage); stroke-width: 2; }

/* M06 nerve cable transfer */
body.study-framed-page .route-cable { fill: none; stroke: var(--route-flow); stroke-width: 7; stroke-linecap: round; opacity: .65; }
body.study-framed-page .route-cable.is-cut { stroke: var(--bad); stroke-dasharray: 13 9; opacity: 1; }
body.study-framed-page .route-node { fill: var(--panel-2); stroke: var(--accent); stroke-width: 2; }
body.study-framed-page .route-zone { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
body.study-framed-page .route-limb-outline { fill: color-mix(in srgb, var(--route-structure) 10%, transparent); stroke: var(--route-structure); stroke-width: 2; }
body.study-framed-page .route-pelvis-line { fill: none; stroke: var(--route-structure); stroke-width: 3; }
body.study-framed-page .route-cut circle:not(.route-hit) { fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 2; }
body.study-framed-page .route-cut path { stroke: var(--bad); stroke-width: 3; }

/* M08 territories and corridors */
body.study-framed-page .route-aorta { fill: none; stroke: var(--bad); stroke-width: 12; stroke-linecap: round; opacity: .7; }
body.study-framed-page .route-artery { fill: none; stroke: var(--bad); stroke-width: 7; stroke-linecap: round; }
body.study-framed-page .route-artery.is-clamped { stroke-dasharray: 9 8; opacity: .38; }
body.study-framed-page .route-gut-territory > *:first-child { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 1.5; }
body.study-framed-page .route-gut-territory text { fill: var(--text-dim); font: 700 9px/1.2 "SFMono-Regular", Consolas, monospace; text-anchor: middle; }
body.study-framed-page .route-gut-territory.is-ischemic > *:first-child { fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 3; }
body.study-framed-page .route-gut-territory.is-ischemic text { fill: var(--text); }
body.study-framed-page .route-flow-dots circle { fill: var(--good); }
body.study-framed-page .route-clamp circle:not(.route-hit),
body.study-framed-page .route-tool circle:not(.route-hit) { fill: var(--panel-2); stroke: var(--warn); stroke-width: 2; }
body.study-framed-page .route-clamp path,
body.study-framed-page .route-tool path { stroke: var(--warn); stroke-width: 4; }
body.study-framed-page .route-abdominal-wall,
body.study-framed-page .route-inguinal-floor { fill: none; stroke: var(--route-structure); stroke-width: 8; stroke-linecap: round; }
body.study-framed-page .route-epigastric { stroke: var(--bad); stroke-width: 3; stroke-dasharray: 6 4; }
body.study-framed-page .route-corridor { fill: none; stroke-width: 18; stroke-linecap: round; opacity: .24; }
body.study-framed-page .route-corridor-indirect { stroke: var(--accent); }
body.study-framed-page .route-corridor-direct { stroke: var(--warn); }
body.study-framed-page .route-landmark { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 3; }
body.study-framed-page path.route-landmark { fill: var(--route-soft-warn); stroke: var(--warn); }
body.study-framed-page .route-trail { fill: none; stroke: var(--text); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
body.study-framed-page .route-sac path { fill: var(--warn); stroke: var(--route-stage); stroke-width: 2; }
body.study-framed-page .route-pelvis-frame { fill: color-mix(in srgb, var(--route-structure) 7%, transparent); stroke: var(--route-structure); stroke-width: 2; }
body.study-framed-page .route-uterine-artery { fill: none; stroke: var(--bad); stroke-width: 9; stroke-linecap: round; }
body.study-framed-page .route-ureter { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; }
body.study-framed-page .route-ureter.is-collided { stroke: var(--bad); stroke-dasharray: 8 7; }
body.study-framed-page .route-crossing-node { fill: var(--route-soft-warn); stroke: var(--warn); stroke-width: 2; stroke-dasharray: 4 3; }
body.study-framed-page .route-urine-dots circle { fill: var(--accent); }
body.study-framed-page .route-urine-dots.is-blocked circle:nth-child(n+3) { opacity: .08; }

/* M17 organ-specific constrained evidence board */
body.study-framed-page .route-drop-zone { cursor: crosshair; }
body.study-framed-page .route-drop-zone > circle,
body.study-framed-page .route-drop-zone > rect { fill: transparent; stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 6 5; }
body.study-framed-page .route-drop-zone > text { fill: var(--text-muted); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; text-anchor: middle; }
body.study-framed-page .route-drop-ring > circle:not(.route-zone-hit) { pointer-events: none; }
body.study-framed-page .route-drop-zone > .route-zone-hit {
  fill: none !important;
  stroke: transparent !important;
  stroke-width: 32 !important;
  pointer-events: stroke;
}
body.study-framed-page .route-drop-zone:hover > circle,
body.study-framed-page .route-drop-zone:hover > rect,
body.study-framed-page .route-drop-zone:focus-visible > circle,
body.study-framed-page .route-drop-zone:focus-visible > rect { stroke: var(--accent); stroke-width: 3; }
body.study-framed-page .route-drop-zone:focus-visible { outline: none; filter: drop-shadow(0 0 4px var(--accent)); }
body.study-framed-page .route-drop-ring > circle { stroke: var(--warn); }

body.study-framed-page .route-nephron { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; opacity: .45; }
body.study-framed-page .route-glomerulus { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 2; }
body.study-framed-page .route-if-ring { fill: none; stroke: var(--border-strong); stroke-width: 5; }
body.study-framed-page .route-if-ring.is-pauci { stroke: var(--text-muted); stroke-width: 2; stroke-dasharray: 3 8; }
body.study-framed-page .route-crescent,
body.study-framed-page .route-linear-if,
body.study-framed-page .route-granules,
body.study-framed-page .route-foot-process,
body.study-framed-page .route-casts,
body.study-framed-page .route-leak,
body.study-framed-page .route-fibrosis,
body.study-framed-page .route-bridging-scar { opacity: 0; }
body.study-framed-page .route-crescent.is-visible { opacity: .82; fill: var(--route-soft-bad); stroke: var(--bad); stroke-width: 2; }
body.study-framed-page .route-linear-if.is-visible { opacity: 1; fill: none; stroke: var(--good); stroke-width: 7; }
body.study-framed-page .route-granules.is-visible { opacity: 1; }
body.study-framed-page .route-granules circle { fill: var(--warn); stroke: var(--route-stage); stroke-width: 1; }
body.study-framed-page .route-foot-process.is-visible { opacity: 1; }
body.study-framed-page .route-foot-process path { fill: none; stroke: var(--bad); stroke-width: 7; stroke-linejoin: round; }
body.study-framed-page .route-casts.is-visible { opacity: 1; }
body.study-framed-page .route-casts rect { fill: var(--warn); }
body.study-framed-page .route-leak.is-visible { opacity: 1; }
body.study-framed-page .route-leak circle { fill: var(--bad); }
body.study-framed-page .route-protein-leak circle { fill: var(--warn); }

body.study-framed-page .route-plot { fill: color-mix(in srgb, var(--route-structure) 5%, transparent); stroke: var(--border-strong); stroke-width: 1; }
body.study-framed-page .route-axis { stroke: var(--text-muted); stroke-width: 1.5; }
body.study-framed-page .route-loop-ghost { fill: none; stroke: var(--text-muted); stroke-width: 2; stroke-dasharray: 5 5; opacity: .55; }
body.study-framed-page .route-loop-current { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 3; }
body.study-framed-page .route-lung-outline { fill: color-mix(in srgb, var(--route-structure) 8%, transparent); stroke: var(--route-structure); stroke-width: 2; }
body.study-framed-page .route-airway { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; }
body.study-framed-page .route-airway.is-narrow { stroke-width: 5; stroke: var(--warn); }
body.study-framed-page .route-alveoli circle { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 1.5; }
body.study-framed-page .route-alveoli.is-lost circle:nth-child(2n) { opacity: .10; }
body.study-framed-page .route-alveoli.is-lost circle:nth-child(3n) { r: 8; }
body.study-framed-page .route-diffusion circle { fill: var(--good); }
body.study-framed-page .route-diffusion.is-reduced circle:nth-child(n+2) { opacity: .08; }
body.study-framed-page .route-pulmonary-vessel { fill: none; stroke: var(--bad); stroke-width: 8; stroke-linecap: round; }
body.study-framed-page .route-pulmonary-vessel.is-blocked { stroke-dasharray: 9 8; opacity: .45; }
body.study-framed-page .route-fibrosis.is-visible { opacity: .8; fill: none; stroke: var(--warn); stroke-width: 6; }

body.study-framed-page .route-lobule { fill: var(--route-soft-accent); stroke: var(--accent); stroke-width: 2; }
body.study-framed-page .route-central-vein { fill: var(--panel-2); stroke: var(--accent); stroke-width: 2; }
body.study-framed-page .route-hepatocyte-plates path { stroke: var(--text-dim); stroke-width: 7; stroke-linecap: round; }
body.study-framed-page .route-hepatocyte-plates.is-injured path { stroke: var(--bad); stroke-dasharray: 11 7; }
body.study-framed-page .route-canaliculus { fill: none; stroke: var(--good); stroke-width: 7; stroke-linecap: round; }
body.study-framed-page .route-canaliculus.is-blocked { stroke: var(--warn); stroke-dasharray: 7 9; }
body.study-framed-page .route-bile-dots circle { fill: var(--good); }
body.study-framed-page .route-bile-dots.is-blocked circle:nth-child(n+2) { opacity: .08; }
body.study-framed-page .route-portal-vessel { fill: none; stroke: var(--bad); stroke-width: 9; stroke-linecap: round; opacity: .65; }
body.study-framed-page .route-portal-vessel.is-pressurized { stroke-width: 16; opacity: 1; }
body.study-framed-page .route-bridging-scar.is-visible { opacity: .86; fill: none; stroke: var(--warn); stroke-width: 10; }
body.study-framed-page .route-synthesis path { stroke: var(--good); stroke-width: 5; marker-end: none; }
body.study-framed-page .route-synthesis text { fill: var(--text-dim); font: 700 8.5px/1 "SFMono-Regular", Consolas, monospace; }
body.study-framed-page .route-synthesis.is-failing path { stroke: var(--bad); stroke-dasharray: 6 7; opacity: .38; }

/* M17 v2.1 perceptual-delta overlays: baseline ghost + deformation + leak +
   resistance + particle flow. Each direct drop completes in 140ms. */
body.study-framed-page .route-m17 .route-compartment-ghost {
  fill:none; stroke:var(--border-strong); stroke-width:2; stroke-dasharray:6 6; opacity:.68;
}
body.study-framed-page .route-m17 .route-nephron.route-compartment-ghost { stroke-width:8; opacity:.38; }
body.study-framed-page .route-m17 [data-kidney-structure],
body.study-framed-page .route-m17 [data-lung-compartment],
body.study-framed-page .route-m17 [data-liver-compartment] {
  transition:transform .14s ease-out;
  transform-box:fill-box;
  transform-origin:center;
}
body.study-framed-page .route-m17 [data-kidney-resistance] { transform:translateY(64px); }
body.study-framed-page .route-capillary-loops path { fill:none; stroke:var(--accent-bright); stroke-width:3; opacity:.72; }
body.study-framed-page .route-kidney-flow circle { fill:var(--good); stroke:var(--route-stage); stroke-width:2; animation:route-kidney-flow .14s ease-out both; }
body.study-framed-page .route-kidney-flow.is-resisted circle { fill:var(--warn); }
body.study-framed-page .route-kidney-flow.is-resisted circle:nth-child(n+2) { opacity:.16; }
body.study-framed-page .route-kidney-flow.is-leaking circle:first-child { fill:var(--bad); }
@keyframes route-kidney-flow { from{transform:translate(-36px,-18px);opacity:.22} to{transform:translate(0,0);opacity:1} }
body.study-framed-page .route-leak.is-visible circle { animation:route-kidney-leak .14s ease-out both; }
@keyframes route-kidney-leak { from{transform:translate(-32px,-18px);opacity:.18} to{transform:translate(0,0);opacity:1} }

body.study-framed-page .route-resistance-overlay text { fill:var(--text-muted); font:700 8px/1 monospace; letter-spacing:.05em; }
body.study-framed-page .route-resistance-base,
body.study-framed-page .route-resistance-live { fill:none; stroke-width:8; stroke-linecap:round; }
body.study-framed-page .route-resistance-base { stroke:var(--border-strong); stroke-dasharray:none; }
body.study-framed-page .route-resistance-live { stroke:var(--bad); animation:route-resistance-fill .14s ease-out both; }
@keyframes route-resistance-fill { from{stroke-dashoffset:120} to{stroke-dashoffset:0} }

body.study-framed-page .route-schema-reject { opacity:0; pointer-events:none; }
body.study-framed-page .route-schema-reject path { fill:none; stroke:var(--bad); stroke-width:6; stroke-linecap:round; }
body.study-framed-page .route-schema-reject rect { fill:var(--route-soft-bad); stroke:var(--bad); stroke-width:2; }
body.study-framed-page .route-schema-reject text { fill:var(--bad); font:750 8.5px/1 monospace; letter-spacing:.04em; }
body.study-framed-page .route-schema-reject.is-visible { opacity:1; animation:route-reject-impact .14s ease-out both; }
@keyframes route-reject-impact { from{opacity:.2;transform:translateX(-28px)} to{opacity:1;transform:translateX(0)} }

body.study-framed-page .route-air-particles circle { fill:var(--good); stroke:var(--route-stage); stroke-width:2; animation:route-air-flow .14s ease-out both; }
body.study-framed-page .route-air-particles.is-slow circle { fill:var(--warn); }
body.study-framed-page .route-air-particles.is-slow circle:nth-child(n+2) { opacity:.14; }
@keyframes route-air-flow { from{transform:translateY(-30px);opacity:.18} to{transform:translateY(0);opacity:1} }
body.study-framed-page .route-alveoli.is-hyperinflated circle { transform-box:fill-box; transform-origin:center; }
body.study-framed-page .route-alveoli.is-hyperinflated circle:nth-child(odd) { transform:translate(-14px,-8px) scale(1.42); }
body.study-framed-page .route-alveoli.is-hyperinflated circle:nth-child(even) { transform:translate(14px,8px) scale(1.42); }
body.study-framed-page .route-alveolar-leak { opacity:0; }
body.study-framed-page .route-alveolar-leak.is-visible { opacity:1; }
body.study-framed-page .route-alveolar-leak circle { fill:var(--bad); animation:route-alveolar-leak .14s ease-out both; }
@keyframes route-alveolar-leak { from{transform:translateY(-28px);opacity:.15} to{transform:translateY(0);opacity:1} }
body.study-framed-page .route-perfusion-particles circle { fill:var(--bad); stroke:var(--route-stage); stroke-width:2; animation:route-perfusion-flow .14s ease-out both; }
body.study-framed-page .route-perfusion-particles.is-blocked circle:nth-child(n+2) { opacity:.10; }
@keyframes route-perfusion-flow { from{transform:translateX(-34px);opacity:.2} to{transform:translateX(0);opacity:1} }

body.study-framed-page .route-cell-leak { opacity:0; }
body.study-framed-page .route-cell-leak.is-visible { opacity:1; }
body.study-framed-page .route-cell-leak circle { fill:var(--bad); animation:route-cell-leak .14s ease-out both; }
body.study-framed-page .route-cell-leak circle:nth-child(2) { animation-delay:.02s; }
body.study-framed-page .route-cell-leak circle:nth-child(3) { animation-delay:.04s; }
@keyframes route-cell-leak { from{transform:translate(0,0);opacity:.2} to{transform:translate(30px,-24px);opacity:1} }
body.study-framed-page .route-bile-dots.is-blocked circle:first-child { animation:route-bile-bounce .14s ease-out both; }
@keyframes route-bile-bounce { from{transform:translateX(0)} to{transform:translateX(-28px)} }
body.study-framed-page .route-portal-particles circle { fill:var(--good); stroke:var(--route-stage); stroke-width:2; animation:route-portal-flow .14s ease-out both; }
body.study-framed-page .route-portal-particles.is-slow circle { fill:var(--warn); }
body.study-framed-page .route-portal-particles.is-slow circle:nth-child(n+2) { opacity:.12; }
@keyframes route-portal-flow { from{transform:translateX(-32px);opacity:.2} to{transform:translateX(0);opacity:1} }

@media (max-width: 760px), (pointer: coarse) {
  body.study-framed-page .route-lab .route-workbench { height: auto; grid-template-columns: 1fr; }
  body.study-framed-page .route-lab .route-side { order: -1; max-height: none; overflow: visible; }
  body.study-framed-page .route-lab .route-stage { height: clamp(206px, 53vw, 300px); }
  body.study-framed-page .route-lab .route-hit { r: 40px; }
  body.study-framed-page .route-prompt,
  body.study-framed-page .route-metric strong { font-size: 11px; }
  body.study-framed-page .route-metric span,
  body.study-framed-page .route-checks span,
  body.study-framed-page .route-tool-token span { font-size: 10px; }
  body.study-framed-page .route-tool-token { min-height: 44px; }
  body.study-framed-page .route-checks span { min-height: 32px; }
}

@media (max-width: 430px) {
  body.study-framed-page .route-lab .route-stage { height: 206px; }
  body.study-framed-page .route-tools { grid-template-columns: 1fr 1fr; }
  body.study-framed-page .route-metrics { grid-template-columns: 1fr 1fr; }
  body.study-framed-page .route-metric { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  body.study-framed-page .route-lab * { animation:none !important; transition: none !important; }
}

@media print {
  body.study-framed-page .route-lab .route-tools,
  body.study-framed-page .route-lab .route-checks { display: none; }
}
