:root { --ds-ink: #edf3f8; --ds-muted: #b1c1d0; --ds-surface: #111f2c; --ds-line: #344b5e; --ds-accent: #ed7886; --ds-evidence: #9ed4dc; --ds-radius: 8px; --ds-ease: cubic-bezier(.2,.7,.3,1); }
@media screen {
  body.casework :is(.section-head,.p2-section-head,.room-section-head,.la-card header) { max-width: 76ch; }
  body.casework :is(.section-head h2,.p2-section h2,.room-section h2,.la-card h2) { text-wrap: balance; }
  body.casework :is(.lede,.hero-sub,.lead,.tl-lead,.p2-deck) { max-width: 72ch; font-size: clamp(15px,1.2vw,18px); line-height: 1.75; color: var(--ds-muted); }
  body.casework :is(.archive-hero,.room-hero,.tl-hero,.p2-hero,.la-hero,.hero) h1 { text-wrap: balance; letter-spacing: -.045em; }
  body.casework :is(.casework-panel,.archive-chart,.room-section,.la-card,.p2-case,.tl-entry) { border-radius: var(--ds-radius); }
  body.casework :is(.entry,.p2-case,.tl-entry,.la-card) { transition: border-color .2s ease, background-color .2s ease; }
  body.casework :is(.entry,.p2-case,.tl-entry,.la-card):focus-within { border-color: #8cafc4; }
  body.casework :is(.evidence-caption,.p2-fine,.muted,.room-note,.tl-note) { font-size: 12.0px; line-height: 1.75; }
  body.casework :is(input,select,button) { accent-color: var(--ds-accent); }
  body.casework :is(.graph-button,.filter-btn,.tl-filters button,.archive-toolbar button) { min-height: 44px; }
  body.casework details > summary { cursor: pointer; min-height: 44px; padding-block: 12px; text-wrap: pretty; }
  body.casework details[open] > summary { color: var(--ds-evidence); }
  body.casework .chapter-context { margin-top: 14px; border-left: 2px solid #40586c; padding-left: 16px; }
  body.casework .chapter-context summary { color: #9ed4dc; font-size: 12.0px; }
  body.casework .chapter-context-text { font-size: 14.0px; line-height: 1.8; color: var(--ds-muted); margin: 8px 0 16px; }
  body.casework :is(.graph-controls,.archive-toolbar,.tl-filters) { border: 1px solid var(--ds-line); border-radius: var(--ds-radius); padding: 16px; background: #0d1925; }
  body.casework .story-scene { border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); overflow: hidden; margin-block: 24px; }
  body.casework .story-scene-header { display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--ds-line); }
  body.casework .story-scene-header strong { font-size: 17.0px; color: var(--ds-ink); }
  body.casework .story-scene-header span { font: 11.0px/1.7 var(--cw-mono,monospace); color: var(--ds-muted); }
  body.casework .story-lane { padding: 24px; }
  body.casework .story-lane + .story-lane { border-top: 1px solid var(--ds-line); }
  body.casework .story-lane-label { display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px; font: 600 11px/1.6 var(--cw-mono,monospace); letter-spacing: .08em; color: var(--ds-muted); }
  body.casework .story-lane-label b { color: var(--ds-accent); font-size: 16.0px; }
  body.casework .story-route { display: grid; grid-template-columns: repeat(var(--story-columns,3),minmax(0,1fr)); gap: 24px; }
  body.casework .story-node { position: relative; min-width: 0; padding: 18px; border: 1px solid #40586c; border-radius: 6px; background: #142738; color: var(--ds-ink); transition: border-color .3s ease, background-color .3s ease, box-shadow .3s ease; }
  body.casework .story-node:not(:last-child)::after { content: '→'; position: absolute; left: calc(100% + 5px); top: 36%; color: #8eaec5; font-size: 20.0px; }
  body.casework .story-node small { display: block; font: 11.0px/1.6 var(--cw-mono,monospace); color: var(--ds-muted); margin-bottom: 10px; letter-spacing: .08em; }
  body.casework .story-node strong { display: block; font: 700 clamp(16px,1.6vw,23px)/1.25 Inter,Arial,sans-serif; overflow-wrap: anywhere; }
  body.casework .story-node span { display: block; font: 12.0px/1.6 Inter,Arial,sans-serif; color: var(--ds-muted); margin-top: 9px; }
  body.casework .story-node.is-blocked { border-color: #ab5263; background: #311f2c; }
  body.casework .story-node.is-current { border-color: var(--ds-evidence); background: #203e50; box-shadow: 0 0 0 2px #9ed4dc20; animation: story-arrive .4s var(--ds-ease) both; }
  body.casework .story-node.is-reached::after { color: var(--ds-evidence); }
  body.casework .story-node.is-current.is-blocked { border-color: var(--ds-accent); background: #492636; }
  body.casework .story-node.is-upcoming { background: #101c27; border-color: #2b3d4d; }
  body.casework .story-caption { padding: 20px 24px; background: #091520; border-top: 1px solid var(--ds-line); min-height: 100px; }
  body.casework .story-caption p { margin: 0; font: 15.0px/1.7 Inter,Arial,sans-serif; color: #d6e2ec; max-width: 80ch; }
  body.casework .story-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--ds-line); }
  body.casework .story-controls[hidden] { display: none; }
  body.casework .story-controls button { min-height: 44px; border: 1px solid #577386; border-radius: 4px; padding: 10px 16px; background: #1b3042; color: var(--ds-ink); cursor: pointer; font: 600 12px/1.5 Inter,Arial,sans-serif; }
  body.casework .story-controls button:hover { background: #28465b; }
  body.casework .story-controls [role=status] { margin-left: auto; font: 11.0px/1.6 var(--cw-mono,monospace); color: var(--ds-muted); }
  body.casework .story-step-nav { display: flex; gap: 6px; }
  body.casework .story-step-nav button { min-width: 38px; padding: 8px; font-family: var(--cw-mono,monospace); }
  body.casework .story-step-nav button[aria-pressed=true] { border-color: var(--ds-accent); color: #fff; background: #673541; }
  body.casework .chapter-continuation { display: flex; align-items: center; gap: 24px; padding: 20px 4px 0; margin-top: 28px; border-top: 1px solid var(--ds-line); }
  body.casework .chapter-continuation > span { color: #88a4b8; font: 11.0px/1.5 var(--cw-mono,monospace); white-space: nowrap; }
  body.casework .chapter-continuation a { display: grid; grid-template-columns: 1fr auto; gap: 5px 16px; flex: 1; color: #d6e6ef; text-decoration: none; padding: 9px 12px; border-radius: 4px; }
  body.casework .chapter-continuation a:hover { background: #9ed4dc0a; }
  body.casework .chapter-continuation small { grid-column: 1; color: #8ca8bb; font: 11.0px/1.5 var(--cw-mono,monospace); letter-spacing: .1em; }
  body.casework .chapter-continuation strong { grid-column: 1; font: 600 14px/1.6 Inter,Arial,sans-serif; }
  body.casework .chapter-continuation a > span { grid-column: 2; grid-row: 1/3; align-self: center; color: var(--ds-accent); font-size: 20.0px; }
  body.casework .dossier-table-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #0b1722; border: 1px solid var(--ds-line); font: 11.0px/1.7 var(--cw-mono,monospace); color: #b1c8d7; }
  body.casework .dossier-table-hint button { flex-shrink: 0; min-height: 40px; padding: 8px 12px; background: #1c3344; border: 1px solid #4d687b; border-radius: 4px; color: #edf3f8; cursor: pointer; font: 600 11px/1.5 Inter,Arial,sans-serif; }
  body.casework .dossier-table-viewport { max-height: min(68vh,640px); overflow: auto; scrollbar-width: thin; scrollbar-color: #617e92 #101d29; border: 1px solid var(--ds-line); }
  body.casework .dossier-table-viewport.is-expanded { max-height: none; }
  body.casework .dossier-table-viewport thead th { position: sticky; top: 0; z-index: 2; }
  body.casework .part-divider { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 0 18px !important; }
  body.casework .part-divider .part-label { margin: 0; }
  body.casework.dossier-report main :is(.text-\[11px\],.text-xs) > p:not(.kicker),
  body.casework.dossier-report main p.text-\[11px\] { font-size: 13.0px !important; line-height: 1.8 !important; }
  body.casework .story-evidence { margin-top: 20px; padding: 0 20px 16px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); }
  body.casework .story-evidence > summary { color: var(--ds-evidence); font: 600 13px/1.7 Inter,Arial,sans-serif; }
  body.casework .graph-explorer { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; padding: 18px; border: 1px solid var(--ds-line); border-radius: 6px; }
  body.casework .graph-explorer label { display: grid; gap: 8px; color: var(--ds-muted); font-size: 12.0px; }
  body.casework .graph-explorer select { min-width: 0; width: 100%; min-height: 44px; padding: 8px; background: #0c1925; color: var(--ds-ink); border: 1px solid #40586c; border-radius: 4px; }
  body.casework .graph-explorer p { grid-column: 1/-1; margin: 0; font-size: 13.0px; line-height: 1.7; color: var(--ds-muted); }
  body.casework .graph-explorer button { justify-self: start; }
  body.casework #graph-container .nodes > g { cursor: pointer; }
}
@keyframes story-arrive {
  from { transform: translateY(5px); }
  to { transform: translateY(0); }
}
@media screen and (max-width: 700px) {
  body.casework .story-scene-header { flex-direction: column; gap: 6px; }
  body.casework .story-route { grid-template-columns: minmax(0,1fr); gap: 24px; }
  body.casework .story-node:not(:last-child)::after { content: '↓'; top: 100%; left: 50%; }
  body.casework :is(.story-lane,.story-scene-header,.story-caption,.story-controls) { padding: 18px; }
  body.casework .story-node { padding: 14px 16px; }
  body.casework .story-node small { margin-bottom: 4px; }
  body.casework .graph-explorer { grid-template-columns: minmax(0,1fr); }
  body.casework .story-step-nav { width: 100%; }
  body.casework .story-step-nav button { flex: 1; }
  body.casework .story-controls [role=status] { width: 100%; margin: 0; }
  body.casework .chapter-continuation { gap: 8px; }
  body.casework .dossier-table-hint { font-size: 11.0px; }
}
@media (prefers-reduced-motion: reduce) {
  body.casework *, body.casework *::before, body.casework *::after { animation: none !important; transition: none !important; }
}
@media print {
  .story-controls { display: none !important; }
  .story-caption [hidden] { display: block !important; }
  .story-node { break-inside: avoid; border: 1px solid #777; padding: 10px; }
  .dossier-table-viewport { max-height: none !important; overflow: visible !important; }
}
@media screen {
  body.casework[data-case-page="home"] > .pd-intel-bar { display: none !important; }
  body.casework.dossier-report .dossier-cover[data-edition="home"] h1 { font-size: clamp(38px,4.45vw,64px) !important; }
  body.casework.dossier-report .dossier-cover[data-edition="home"] h1 em { white-space: nowrap; }
  body.casework .case-contrast { border: 1px solid #3b5267; border-radius: 8px; overflow: hidden; background: #101e2b; }
  body.casework .case-contrast-heading { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; font: 11.0px/1.5 var(--cw-mono, monospace); letter-spacing: .12em; color: #b1c3d3; border-bottom: 1px solid #3b5267; }
  body.casework .case-contrast-step { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 14px; padding: 23px 22px; text-decoration: none; border-bottom: 1px solid #2c4255; transition: background-color .18s ease; }
  body.casework .case-contrast-step:last-child { border-bottom: 0; }
  body.casework .case-contrast-step:hover, body.casework .case-contrast-step:focus-visible { background: #ffffff07; }
  body.casework .case-contrast-step:focus-visible { outline-offset: -4px !important; }
  body.casework .case-contrast-number { font: 500 15px/1.5 var(--cw-mono, monospace); color: #7f9bae; }
  body.casework .case-contrast-label { display: block; font: 600 11px/1.5 var(--cw-mono, monospace); letter-spacing: .12em; color: #a6c4d4; margin-bottom: 8px; }
  body.casework .case-contrast-step h2 { font: 750 clamp(20px,2vw,27px)/1.12 Inter,Arial,sans-serif !important; letter-spacing: -.035em !important; color: #edf3f9; margin: 0 0 10px !important; }
  body.casework .case-contrast-step p { font: 13.0px/1.7 Inter,Arial,sans-serif; color: #afc0d0; margin: 0 0 12px; }
  body.casework .case-contrast-source { font: 600 11px/1.6 Inter,Arial,sans-serif; color: #c7dce6; text-decoration: underline; text-underline-offset: 4px; }
  body.casework .case-contrast-question { background: #e8777f0a; box-shadow: inset 3px 0 #e8777f; }
  body.casework .case-contrast-question :is(.case-contrast-label,.case-contrast-number) { color: #f0959e; }
}
@media screen and (max-width: 600px) {
  body.casework .case-contrast-step { padding: 20px 16px; gap: 10px; grid-template-columns: 25px minmax(0,1fr); }
}
@media screen {
  body.casework :is(.evidence-caption,.case-map-foot,.route-registration-foot) { font-size: 12.0px !important; line-height: 1.7 !important; color: #aebfd0; }
  body.casework .dossier-entry-points strong { font-size: 13.0px; line-height: 1.6; }
  body.casework .dossier-entry-points a { min-height: 88px; }
}
a[href], button, summary { min-height: 24px; display: inline-flex; align-items: center; }
@media (pointer: coarse) {
  a[href], button, summary { min-height: 44px; }
}
