@keyframes pd-mf-scan {
  0%, 100% { opacity: .35; transform: translateX(-8px); }
  50% { opacity: 1; transform: translateX(8px); }
}
@media screen {
  body.casework .dossier-countdown-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; padding: 7px 10px; color: #b6c4d2; background: transparent; border: 1px solid #34414f; border-radius: 5px; box-shadow: none; white-space: nowrap; }
  body.casework .dossier-countdown-badge { display: inline-flex; align-items: center; gap: 6px; padding: 0 !important; color: #9fbacb !important; background: transparent !important; border: 0; border-radius: 0; font: 600 10px/1.4 Inter,sans-serif !important; letter-spacing: .03em; text-transform: none; }
  body.casework .dossier-countdown-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #9fbacb; }
  body.casework .dossier-countdown-time { font: 400 10px/1.4 'JetBrains Mono',monospace; color: #8c9dae; }
  body.casework .dossier-edition-date { font: 400 10px/1.4 'JetBrains Mono',monospace; color: #8c9dae; }
  body.casework #pd-mf::before { content: ''; animation: pd-mf-scan 2.6s ease-in-out infinite; }
  body.casework #pd-mf { background: #101820; border-color: #2e3c49; }
  body.casework #pd-mf summary { padding-block: 10px; }
  body.casework #pd-mf summary > :first-child { border-radius: 4px; box-shadow: none; }
  body.casework #pd-mf > summary .pd-mf-badge { display: inline-flex; align-items: center; gap: 7px; border: 0 !important; padding: 0 !important; color: #9fbacb !important; background: transparent; font: 600 11px/1.4 Inter,sans-serif !important; letter-spacing: .02em !important; }
  body.casework #pd-mf > summary .pd-mf-badge::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
  .dossier-language-control { position: relative; flex: 0 0 auto; }
  .dossier-language-button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 11px; border: 1px solid #405163; border-radius: 5px; color: #e0eaf2; background: #101b27; font: 600 11px/1.4 Inter,sans-serif; cursor: pointer; white-space: nowrap; }
  .dossier-language-button:hover,.dossier-language-button[aria-expanded="true"] { border-color: #8caebe; background: #172635; }
  .dossier-language-button svg { width: 15px; height: 15px; flex-shrink: 0; }
  .dossier-language-code { font: 700 11px/1.3 'JetBrains Mono',monospace; }
  .dossier-language-menu { position: fixed; inset-inline: auto; left: var(--language-menu-left,12px); top: var(--language-menu-top,110px); width: min(270px,calc(100vw - 28px)); max-height: min(460px,var(--language-menu-height,65dvh)); overflow-y: auto; z-index: 10000; padding: 8px; border: 1px solid #43576b; border-radius: 8px; background: #101b27; box-shadow: 0 18px 48px #0007; }
  .dossier-language-menu[hidden] { display: none !important; }
  .dossier-language-menu p { padding: 8px 10px; margin: 0 0 4px; color: #9fb2c5; font: 400 11px/1.6 Inter,sans-serif; }
  .dossier-language-menu a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; padding: 9px 10px; color: #d6e2ee; border-radius: 4px; font: 500 13px/1.4 Inter,sans-serif; text-decoration: none; }
  .dossier-language-menu a:hover,.dossier-language-menu a:focus-visible { background: #213448; }
  .dossier-language-menu a[aria-current="true"] { background: #293b48; color: #fff; }
  .dossier-language-menu a small { color: #8da8bb; font: 500 10px/1.4 'JetBrains Mono',monospace; }
  .dossier-language-button:focus-visible { outline: 2px solid #91d5e5; outline-offset: 3px; }
  body.casework .dossier-header-actions .dossier-language-button { font-size: 11px !important; }
  body.casework .dossier-header-actions .dossier-language-button::after { content: none !important; }
  body.casework .dossier-header-actions .dossier-language-code { display: inline !important; font: 700 11px/1.3 'JetBrains Mono',monospace !important; }
  @media (max-width: 1279px) {
    .dossier-language-name { display: none; }
  }
  @media (max-width: 600px) {
    body.casework.dossier-report .dossier-header-inner { grid-template-columns: 40px minmax(0,1fr) auto !important; }
    body.casework.dossier-report .dossier-breadcrumb { display: none; }
    body.casework.dossier-report .dossier-header-actions { grid-column: 2 / -1 !important; justify-content: flex-end; gap: 7px; }
    body.casework.dossier-report .dossier-language-control { margin-inline-end: auto; }
    .dossier-language-button { min-height: 40px; padding: 8px 10px; }
    .dossier-language-menu { inset-inline: auto; }
  }
}
.dossier-navigation-dialog:not([open]),
.contents-dialog:not([open]) {
  display: none !important;
}

@media screen and (max-width: 600px) {
  body.casework .dossier-report-header .dossier-header-inner { display: grid !important; grid-template-columns: 40px minmax(0,1fr) !important; gap: 8px !important; }
  body.casework .dossier-report-header .dossier-header-actions { grid-column: 2 !important; flex-wrap: nowrap !important; gap: 6px !important; }
  body.casework .dossier-report-header .dossier-breadcrumb,
  body.casework .dossier-report-header .dossier-draft-dot,
  body.casework .dossier-report-header .dossier-header-actions > a.dossier-action-btn { display: none !important; }
  body.casework .dossier-report-header .dossier-header-actions :is(button,a) { min-height: 40px; }
  body.casework .dossier-cover-title { hyphens: auto; word-break: normal; }
}
@media screen and (max-width: 359px) {
  body.casework .dossier-report-header .dossier-progress-chip { display: none !important; }
  body.casework .dossier-report-header .dossier-contents-button { padding-inline: 7px; }
}

@media screen and (max-width: 767px) {
  html body.casework .dossier-report-header .dossier-header-inner { display: grid !important; grid-template-columns: 42px minmax(0,1fr) !important; }
  html body.casework .dossier-report-header .dossier-header-left { display: none !important; }
  html body.casework .dossier-report-header .hud-mobile-toggle { grid-column: 1 !important; grid-row: 1 !important; }
  html body.casework .dossier-report-header .dossier-header-actions { grid-column: 2 !important; grid-row: 1 !important; flex-wrap: nowrap !important; }
}

/* Shared drawer: navigation and chapter links use the existing dossier palette. */
@media screen {
  body.casework .dossier-navigation-dialog { inset: 0 auto 0 0; box-sizing: border-box; height: 100dvh; max-height: 100dvh; width: min(360px, calc(100vw - 24px)); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  body.casework .dossier-navigation-dialog .dossier-nav-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: #101b27; border-bottom: 1px solid #34414f; }
  body.casework .dossier-nav-title { color: #e0eaf2; font: 600 13px/1.5 Inter,sans-serif; }
  body.casework .dossier-navigation-dialog .dossier-nav-close { position: static; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0; border: 1px solid #344b62; border-radius: 5px; background: #101b27; color: #e0eaf2; }
  body.casework .dossier-navigation-dialog .dossier-nav-content { padding: 16px 20px 28px; }
  body.casework .dossier-navigation-dialog .contents-sheet-actions { flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  body.casework .dossier-navigation-dialog .contents-sheet-manifesto-btn { white-space: normal; overflow-wrap: anywhere; }
  body.casework .dossier-navigation-dialog .hud-link { min-height: 44px; }
  body.casework .dossier-page-sections { margin: 0 0 16px; border-bottom: 1px solid #34414f; }
  body.casework .dossier-page-sections > summary { padding: 14px 4px; color: #c6d1dd; font: 600 12px/1.5 Inter,sans-serif; cursor: pointer; }
  body.casework .dossier-page-sections > nav { display: grid; gap: 4px; padding-bottom: 12px; }
  body.casework .dossier-section-link { display: block; padding: 12px 10px; border-radius: 4px; color: #b6c4d2; font: 400 12px/1.6 Inter,sans-serif; text-decoration: none; overflow-wrap: anywhere; }
  body.casework .dossier-section-link:hover { color: #eef3f8; background: #213448; }
  body.casework :is(.hud-mobile-toggle,.dossier-nav-close,.dossier-section-link,.dossier-page-sections > summary):focus-visible { outline: 2px solid #91d5e5; outline-offset: 2px; }
  body.casework :is(.contents-item,.contents-group,.contents-empty)[hidden] { display: none !important; }
  body.casework .contents-list { min-height: 0; }
  body.casework .contents-search input { font-size: 16px; }
}
@media screen and (max-width: 1279px) {
  html body.casework .hud-mobile-toggle { min-width: 44px; min-height: 44px; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  body.casework .dossier-navigation-dialog[open] { animation: dossier-drawer-enter .22s cubic-bezier(.2,.75,.3,1); }
  body.casework :is(.hud-mobile-toggle,.dossier-nav-close,.dossier-section-link) { transition: background-color .18s ease, border-color .18s ease; }
  body.casework :is(.hud-mobile-toggle,.dossier-nav-close):active { transform: translateY(1px); }
}
@keyframes dossier-drawer-enter { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* Editorial finish: shared navigation, reading controls and page introductions. */
@media screen {
  body.casework { --editor-line: #293746; --editor-surface: #101a25; --editor-muted: #a7b6c6; --editor-accent: #ef8190; }
  html body.casework .dossier-hud-panel,
  html body.casework .dossier-navigation-dialog { background: #0c131c; border-color: var(--editor-line); }
  html body.casework .dossier-nav-content { padding-inline: 18px; }
  html body.casework .dossier-brand { gap: 12px; }
  html body.casework .dossier-brand > span { color: #edf2f7; font-size: 16px; letter-spacing: -.025em; }
  html body.casework .dossier-brand small { margin-top: 6px; font: 400 10px/1.6 Inter,sans-serif; color: #96a6b8; letter-spacing: .025em; }
  html body.casework .dossier-nav-edition { padding-bottom: 18px; margin: 20px 0 10px; border-color: var(--editor-line); font-size: 9px; letter-spacing: .08em; }
  html body.casework .dossier-nav-label { margin: 0 10px 8px; font: 600 10px/1.5 Inter,sans-serif; color: #91a2b5; letter-spacing: .09em; }
  html body.casework .dossier-nav-group + .dossier-nav-group { margin-top: 24px; }
  html body.casework .hud-link { padding: 11px 10px; border-radius: 7px; color: #b7c4d2; font-size: 12px; line-height: 1.5; box-shadow: none !important; }
  html body.casework .hud-link svg { color: #8096ab; width: 16px; height: 16px; }
  html body.casework .hud-link.is-active { background: #ed78860d !important; border: 1px solid #ed78862b !important; color: #f0a5ae !important; box-shadow: none !important; }
  html body.casework .hud-link.is-active svg { color: #ef9ba7; }
  html body.casework .hud-link::before { box-shadow: none !important; }
  html body.casework .hud-link:hover { background: #172330 !important; color: #f1f5f9 !important; }
  html body.casework .hud-live-tag { color: #d89da5 !important; background: transparent !important; border-color: #724650 !important; border-radius: 4px !important; font-size: 8px !important; }
  html body.casework .dossier-nav-foot { padding: 26px 10px 0; }
  html body.casework .dossier-nav-foot p { font: 500 13px/1.6 Inter,sans-serif; color: #b8c7d7; }
  html body.casework .dossier-nav-foot > span:last-of-type { font: 400 9px/1.8 Inter,sans-serif; letter-spacing: .045em; color: #91a2b5; }
  html body.casework .dossier-page-sections > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 10px; list-style: none; font-size: 12px; }
  html body.casework .dossier-page-sections > summary::-webkit-details-marker { display: none; }
  html body.casework .dossier-page-sections > summary::after { content: ''; position: static; width: 6px; height: 6px; flex: 0 0 6px; border: solid #91a2b5; border-width: 0 1px 1px 0; transform: rotate(45deg); background: none; }
  html body.casework .dossier-page-sections[open] > summary::after { transform: rotate(225deg); }
  html body.casework .dossier-section-link { border-inline-start: 1px solid #293746; border-radius: 0 5px 5px 0; margin-inline-start: 10px; padding: 10px 12px; line-height: 1.65; }
  html body.casework .dossier-nav-head { background: #101a25; border-color: var(--editor-line); }
  html body.casework :is(.dossier-nav-close,.hud-mobile-toggle,.dossier-language-button,.dossier-print,.dossier-action-btn,.dossier-contents-button) { border-color: #344352 !important; border-radius: 6px !important; background: #14202d !important; color: #d5e0ec !important; box-shadow: none !important; text-shadow: none !important; }
  html body.casework .dossier-report-header { border-bottom-color: var(--editor-line) !important; background: #0c1621f5 !important; }
  html body.casework .dossier-breadcrumb { letter-spacing: .07em; }
  html body.casework .dossier-header-actions :is(button,a) { font-weight: 500; }
  html body.casework .contents-dialog { border-color: #364555 !important; background: #0e1823 !important; box-shadow: 0 24px 80px #02070d80 !important; }
  html body.casework .contents-head { background: #14202d !important; border-color: var(--editor-line) !important; padding: 22px 24px !important; }
  html body.casework .contents-head h2 { font-size: 24px !important; font-weight: 650 !important; letter-spacing: -.035em !important; }
  html body.casework .contents-eyebrow { color: #b5c7d8 !important; font-size: 9px !important; letter-spacing: .1em !important; }
  html body.casework .contents-group-header { padding: 12px 22px !important; background: #101a25 !important; color: #9dafc1 !important; border-color: var(--editor-line) !important; font: 600 10px/1.5 Inter,sans-serif !important; letter-spacing: .065em !important; }
  html body.casework .contents-group-list { padding: 6px 12px !important; }
  html body.casework .contents-item { padding: 13px 12px !important; border: 1px solid transparent !important; border-radius: 7px !important; background: transparent; box-shadow: none !important; }
  html body.casework .contents-item:hover { background: #1a2837 !important; border-color: #344352 !important; }
  html body.casework .contents-label { font-size: 13px !important; line-height: 1.5 !important; font-weight: 550 !important; }
  html body.casework .contents-description { margin-top: 2px; color: #9fafc0 !important; font-size: 11px !important; line-height: 1.6 !important; }
  html body.casework .contents-foot { background: #101a25 !important; border-color: var(--editor-line) !important; }
  html body.casework .contents-search { background: #0c151f !important; border-color: var(--editor-line) !important; }
  html body.casework.dossier-report .dossier-cover-title { font-weight: 700 !important; text-transform: none !important; letter-spacing: -.055em !important; line-height: 1.06 !important; text-shadow: none !important; }
  html body.casework.dossier-report .dossier-cover-title em { color: var(--editor-accent) !important; }
  html body.casework.dossier-report .dossier-cover-meta { border-color: var(--editor-line); }
  html body.casework.dossier-report .dossier-cover-copy p.dossier-cover-lead { font-weight: 550 !important; line-height: 1.55 !important; }
  html body.casework.dossier-report .dossier-start { background: #ad344f !important; border: 1px solid #d25d76 !important; border-radius: 6px !important; box-shadow: 0 4px 14px #060c1430 !important; font-weight: 600 !important; letter-spacing: .01em !important; text-transform: none !important; }
  html body.casework.dossier-report .casework-source-link { border-color: #3d5265 !important; background: transparent !important; border-radius: 6px !important; }
  html body.casework.dossier-report .case-contrast { border-color: #344352 !important; background: #101a25 !important; border-radius: 9px; overflow: hidden; }
  html body.casework.dossier-report .case-contrast-heading { background: #0e1721; color: #a4b6c7; border-color: var(--editor-line); }
  html body.casework.dossier-report .case-contrast-step { display: flex !important; flex-direction: column; align-items: stretch; }
  html body.casework.dossier-report .case-contrast-top { flex-direction: row !important; height: auto !important; justify-content: flex-start !important; align-items: baseline !important; gap: 12px; margin-bottom: 18px !important; }
  html body.casework.dossier-report .case-contrast-foot { flex: 0 0 auto !important; height: auto !important; margin-top: auto; }
  html body.casework.dossier-report .case-contrast-body { height: auto !important; gap: 0 !important; }
  html body.casework.dossier-report .case-contrast-number { position: static !important; margin: 0 !important; color: #d68a99 !important; font-size: 11px !important; }
  html body.casework.dossier-report .case-contrast-label { padding: 0; margin: 0; color: #a5b7c8; letter-spacing: .08em; }
  html body.casework.dossier-report .case-contrast-step h2 { margin-block: 12px 10px !important; font-size: 20px !important; font-weight: 650 !important; letter-spacing: -.025em !important; line-height: 1.35 !important; }
  html body.casework.dossier-report .case-contrast-step p { line-height: 1.8; color: #acbac9; }
  html body.casework.dossier-report .case-contrast-source { display: inline-flex; align-self: flex-start; margin-top: 24px !important; padding-top: 0 !important; border: 0 !important; padding-inline: 0 !important; background: none !important; color: #a6ccda !important; font-size: 11px !important; text-align: start; }
  html body.casework.dossier-report .dossier-entry-points > a { border-color: var(--editor-line) !important; border-radius: 7px !important; background: #101a2580 !important; }
  html body.casework :is(.casework-page-hero,.p2-hero,.tl-hero) h1 { letter-spacing: -.04em !important; line-height: 1.13 !important; text-wrap: balance; text-shadow: none !important; }
  html body.casework :is(.section-head,.p2-section-head) h2 { text-wrap: balance; letter-spacing: -.03em; }
  html body.casework .p2-start-reading { background: #ad344f !important; border-color: #d25d76 !important; box-shadow: 0 4px 14px #060c1430 !important; border-radius: 6px !important; }
  html body.casework :is(.hero-thesis,.p2-deck) { color: #e59aa7 !important; line-height: 1.65; }
}
@media screen and (min-width: 900px) {
  html body.casework.dossier-report .dossier-cover-grid { margin-top: 38px !important; gap: 36px !important; }
  html body.casework.dossier-report .case-contrast-step { padding: 26px !important; }
  html body.casework.dossier-report .case-contrast-step h2 { min-height: 2.7em; }
}
@media screen and (max-width: 600px) {
  html body.casework .dossier-navigation-dialog .dossier-nav-content { padding: 20px 18px 28px; }
  html body.casework .contents-head { padding: 20px !important; }
  html body.casework .contents-head h2 { font-size: 22px !important; }
  html body.casework.dossier-report .dossier-cover-title { font-size: clamp(42px,10.5vw,60px) !important; }
  html body.casework.dossier-report .case-contrast-step { padding: 22px !important; }
  html body.casework.dossier-report .case-contrast-step h2 { font-size: 21px !important; }
}
@media screen and (prefers-reduced-motion: no-preference) {
  html body.casework :is(.hud-link,.dossier-section-link,.contents-item,.dossier-nav-close,.dossier-language-button,.dossier-print,.dossier-action-btn,.dossier-contents-button) { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
  html body.casework .dossier-page-sections > summary::after { transition: transform .2s ease; }
}
@media screen and (hover: hover) {
  html body.casework :is(.dossier-nav-close,.hud-mobile-toggle,.dossier-language-button,.dossier-print,.dossier-action-btn,.dossier-contents-button):hover { background: #203143 !important; border-color: #668093 !important; }
  html body.casework.dossier-report .dossier-start:hover { background: #bf405d !important; }
}
