.casework :is(.case-map-node,.p2-node,.story-route-node,.rr-download,.casework-header-link) { transition: border-color .22s ease, background-color .22s ease, box-shadow .22s ease; }
.casework .p2-map svg path.is-active { animation: none; }
.casework .case-map-path.is-traced,
.casework .p2-map-shell.motion-in-view .p2-map svg path.is-active { stroke-dasharray: 7 6; animation: dossier-trace 1.4s linear 2; filter: drop-shadow(0 0 3px #89bdcb55); }
.casework .case-map.motion-in-view .case-map-center rect { animation: dossier-signal 4s ease-in-out 2; }
.casework :is(.rr-table tr,.hud-link) { transition: background-color .18s ease; }
.casework .rr-table tbody tr:hover { background: #87b9ca0a; }
.casework .case-map-node:focus-visible { outline: 2px solid #e9b7c2; outline-offset: 3px; }
.casework .case-map-node:focus-visible rect { stroke: #eba0aa; stroke-width: 2; }
@keyframes dossier-trace {
  to { stroke-dashoffset: -26; }
}
@keyframes dossier-signal {
  0%,100% { stroke: #7d6472; }
  50% { stroke: #eba0aa; }
}
.casework .proxy-box-enforcement.motion-in-view .space-y-2 > div,
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div { animation: route-step-in .48s cubic-bezier(.2,.75,.3,1) both; }
.casework .proxy-box-enforcement.motion-in-view .space-y-2 > div:nth-child(1),
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(1) { animation-delay: .05s; }
.casework .proxy-box-enforcement.motion-in-view .space-y-2 > div:nth-child(2),
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(2) { animation-delay: .16s; }
.casework .proxy-box-enforcement.motion-in-view .space-y-2 > div:nth-child(3),
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(3) { animation-delay: .27s; }
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(4) { animation-delay: .38s; }
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(5) { animation-delay: .49s; }
.casework .proxy-box-realflow.motion-in-view .space-y-1 > div:nth-child(6) { animation-delay: .60s; }
.casework .proxy-box-enforcement.motion-in-view .text-red-400.font-bold,
.casework .proxy-box-realflow.motion-in-view .text-emerald-400.font-bold { animation: route-status-pulse 1.35s ease-in-out .55s 2; }
.casework .proxy-box-realflow.motion-in-view .space-y-1 > .pl-4 { border-left: 1px dashed #6d8794; margin-left: 4px; padding-left: 16px; }
.casework .proxy-stat-bar.motion-in-view .proxy-stat-zero { animation: route-zero-pulse 1.8s ease-in-out .2s 2; }
.casework .route-audit-exhibit.motion-in-view .route-source-strip,
.casework .route-audit-exhibit.motion-in-view + .route-falsifier,
.casework .route-registrations.motion-in-view { animation: evidence-panel-in .58s cubic-bezier(.2,.75,.3,1) both; }
.casework .route-audit-exhibit.motion-in-view .route-source-strip { animation-delay: .12s; }
.casework .route-audit-exhibit.motion-in-view + .route-falsifier { animation-delay: .24s; }
.casework .route-registrations.motion-in-view .route-registration-item { animation: route-step-in .48s cubic-bezier(.2,.75,.3,1) both; }
.casework .route-registrations.motion-in-view .route-registration-item:nth-child(1) { animation-delay: .08s; }
.casework .route-registrations.motion-in-view .route-registration-item:nth-child(2) { animation-delay: .18s; }
.casework .route-registrations.motion-in-view .route-registration-foot { animation: route-step-in .48s cubic-bezier(.2,.75,.3,1) .28s both; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > p,
.casework .valve-action-exhibit.motion-in-view .valve-action-intro,
.casework .valve-action-exhibit.motion-in-view .valve-action-table { animation: evidence-panel-in .52s cubic-bezier(.2,.75,.3,1) both; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > p:nth-child(1) { animation-delay: .06s; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > p:nth-child(2) { animation-delay: .16s; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > p:nth-child(3) { animation-delay: .26s; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > p:nth-child(4) { animation-delay: .36s; }
.casework .rotation-feasibility-panel.motion-in-view .rotation-analysis-copy > .rotation-verdict { animation-delay: .48s; }
.casework .valve-action-exhibit.motion-in-view .valve-action-intro { animation-delay: .12s; }
.casework .valve-action-exhibit.motion-in-view .valve-action-table { animation-delay: .24s; }
@keyframes route-step-in {
  from { opacity: .18; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes evidence-panel-in {
  from { opacity: .28; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes route-status-pulse {
  0%,100% { filter: brightness(1); }
  45% { filter: brightness(1.6); text-shadow: 0 0 13px currentColor; }
}
@keyframes route-zero-pulse {
  0%,100% { transform: scale(1); text-shadow: 0 0 0 transparent; }
  45% { transform: scale(1.06); text-shadow: 0 0 32px #ff336688; }
}
@media screen {
  .casework :is(.dossier-start,.dossier-entry-points a,.casework-source-link,.hud-mobile-toggle,.dossier-print) { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .casework :is(.dossier-start,.dossier-entry-points a) svg { transition: transform .2s cubic-bezier(.2,.7,.3,1); }
  .casework .dossier-entry-points a:focus-visible { outline-offset: -4px !important; background: #8dc5d014; }
  .casework :is(.dossier-start,.dossier-entry-points a):focus-visible svg { transform: translateX(3px); }
  .casework :is(.dossier-navigation-dialog,.contents-dialog)[open] { animation: evidence-panel-in .2s ease-out; }
}
@media screen and (hover: hover) and (pointer: fine) {
  .casework .dossier-entry-points a:hover { background: #8dc5d014; box-shadow: inset 0 -2px #e8777f; }
  .casework .dossier-start:hover { box-shadow: 0 6px 22px #be3f5030; }
  .casework :is(.dossier-start,.dossier-entry-points a):hover svg { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .casework *, .casework *::before, .casework *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .casework :is(.dossier-start,.dossier-entry-points a) svg { transform: none !important; }
}
@media print {
  .casework * { animation: none !important; transition: none !important; }
}

/* Responsive content and state presentation shared by every dossier page. */
@media screen {
  html body.casework .dossier-license-note { flex-wrap: wrap; }
  html body.casework .dossier-license-note > .space-y-1 { flex: 1 1 220px; min-width: 0; max-width: 100%; }
  html body.casework .dossier-license-note > .shrink-0 { max-width: 100%; }
  html body.casework .dossier-license-note :is(p,a,button,span) { overflow-wrap: anywhere; white-space: normal; }
  html body.casework .thf-case[hidden] { display: none !important; }
  html body.casework .thf-tab { background: #182537; color: #b5c4d3; border: 1px solid #344555; }
  html body.casework .thf-tab.active { background: #244559; color: #f1f5f9; border-color: #88bccb; }
  html body.casework .is-copy-success { color: #8cddbe; border-color: #67b79c; }
  html body.casework .simulation-success { color: #8cddbe; }
  html body.casework .simulation-danger { color: #f5a4af; }
  html body.casework #github-mitm-result.is-simulated-safe { background: #12392f; border-color: #67b79c; }
  html body.casework #valve-mitm-result.is-simulated-exposed { background: #3b2231; border-color: #ed8397; box-shadow: inset 3px 0 #ed8397; }
  html body.casework .blackout-payload-before.is-comparison-muted { opacity: .7; filter: grayscale(.65); }
  html body.casework .blackout-payload-after.is-comparison-highlighted { border-color: #ef91a1 !important; box-shadow: inset 0 3px #ef91a1; }
  .dossier-clipboard-helper { position: fixed; inset-inline-start: -10000px; top: 0; }
  html body.casework .market-official-note { font: 500 11px var(--mono); color: var(--muted); }
  html body.casework .market-value-missing { font: 400 11px var(--mono); color: var(--muted); }
  html body.casework .td-val.is-steam { color: var(--cyan); }
  html body.casework .bar-inner { opacity: .75; }
  html body.casework .bar-inner.bar-steam { opacity: .55; }
  html body.casework .story-node[role="button"] { cursor: pointer; touch-action: manipulation; }
  html body.casework .story-node[role="button"]:focus-visible { outline: 2px solid #abd6df; outline-offset: 4px; }
  html body.casework .story-node.is-current { border-color: #abd6df; background: #1c394b; box-shadow: inset 3px 0 #abd6df, 0 0 0 1px #abd6df44; }
  html body.casework .story-node.is-current.is-blocked { background: #3c2534; border-color: #ef91a1; box-shadow: inset 3px 0 #ef91a1; }
  html body.casework .story-node.is-upcoming { opacity: 1; }
  html body.casework .story-controls [data-story-play] { background: #244559; color: #f1f5f9; border-color: #6c9eaf; }
  html body.casework .story-step-nav button[aria-pressed="true"] { background: #244559; border-color: #abd6df; color: #fff; }
  html body.casework .story-step-nav { flex-wrap: wrap; }
  html body.casework .story-controls button { white-space: normal; text-wrap: pretty; }
  html body.casework .story-caption { line-height: 1.75; }
  html[dir="rtl"] body.casework .story-node.is-current { box-shadow: inset -3px 0 #abd6df; }
  html[dir="rtl"] body.casework .story-node.is-current.is-blocked { box-shadow: inset -3px 0 #ef91a1; }
  html:is([lang="ar"],[lang="zh"],[lang="ja"],[lang="ko"]) body.casework :is(h1,h2,h3,.story-node strong) { letter-spacing: normal; }
}
@media screen and (max-width: 767px) {
  html body.casework :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) { font-size: 16px; }
  html body.casework .story-controls { gap: 10px; }
  html body.casework .story-controls > button { flex: 1 1 120px; }
  html body.casework .story-step-nav button { min-width: 40px; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  html body.casework :is(.story-node,.blackout-payload,.thf-tab,#github-mitm-result,#valve-mitm-result) {
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .25s ease, filter .25s ease;
  }
  html body.casework :is(.dossier-entry-points > a,.dossier-signposts > a,.source-preview,.la-card,.tl-entry,.p2-node,.story-controls button,.dossier-chapter-toggle) {
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
  }
  html body.casework .story-scene[data-story-playing="true"] .story-node.is-current:not(:last-child)::before {
    animation: dossier-step-signal 1.05s ease-in-out 3;
  }
  html body.casework .story-caption > :not([hidden]) { animation: dossier-caption-in .22s ease-out; }
  @keyframes dossier-step-signal {
    0%,100% { opacity: .5; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.65); }
  }
  @keyframes dossier-caption-in { from { opacity: 1; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media screen and (hover: hover) and (pointer: fine) {
  html body.casework :is(.dossier-entry-points > a,.dossier-signposts > a,.source-preview,.la-card:has(a),.tl-entry:has(a)):hover {
    background-color: #172a3a; border-color: #7397aa; box-shadow: inset 3px 0 #91c8d6;
  }
  html body.casework .story-node[role="button"]:hover { border-color: #b5dbe4; background: #203c4e; }
  html body.casework .story-controls button:hover { border-color: #b5dbe4; background: #2b4d63; }
}


/* The route changes direction with its layout; use one connector, not rotated text arrows. */
@media screen {
  html body.casework .story-scene .story-node { --story-connection: #607c90; }
  html body.casework .story-scene .story-node.is-reached { --story-connection: #a6d4de; }
  html body.casework .story-scene .story-node:not(:last-child)::before {
    content: ''; position: absolute; left: 100%; top: 50%; width: 18px; height: 2px; margin: 0;
    background: var(--story-connection); border-radius: 0; filter: none; animation: none;
  }
  html body.casework .story-scene .story-node:not(:last-child)::after {
    content: ''; position: absolute; inset: auto; left: calc(100% + 17px); top: calc(50% - 3px);
    width: 0; height: 0; border: 4px solid transparent; border-left: 6px solid var(--story-connection);
    transform: none; animation: none;
  }
  html[dir="rtl"] body.casework .story-scene .story-node:not(:last-child)::before { left: auto; right: 100%; }
  html[dir="rtl"] body.casework .story-scene .story-node:not(:last-child)::after {
    left: auto; right: calc(100% + 17px); border-left: 0; border-right: 6px solid var(--story-connection);
  }
}
@media screen and (max-width: 767px) {
  html body.casework .story-scene .story-node:not(:last-child)::before {
    left: 50%; right: auto; top: 100%; width: 2px; height: 18px;
  }
  html body.casework .story-scene .story-node:not(:last-child)::after {
    left: calc(50% - 3px); right: auto; top: calc(100% + 17px);
    border: 4px solid transparent; border-top: 6px solid var(--story-connection);
  }
}

