/* Clear visual separation for the decision workspace. */
:root { --canvas: #edf1f4; --line: #cbd7df; --ink: #172c3a; }
.card { border-color: #becdd7; box-shadow: 0 3px 12px #1835480d; }
.app-navigation { border-color: #c8d4dd; }
.nav-item { color: #354e5d; }
.nav-item.active { background: #d9eaf1; color: #174c63; box-shadow: inset 3px 0 #377d98; }
.timeline-step { border-color: #c3d1da; color: #425d6b; }
.timeline-step.done { background: #e8f1ec; border-color: #a5c8b5; color: #315d46; }
.timeline-step.current { background: #dbeef5; border: 2px solid #4385a1; color: #174c63; font-weight: 600; }
.timeline-step:disabled { opacity: 1; background: #f0f2f4; color: #687985; border-color: #d3dbe0; }
.briefing-document, .night-summary, .section-intro { border-top: 4px solid #417a97; }
.case-file { background: #f1f8fc; border-color: #a7c8d8; border-top: 4px solid #4f8fa9; }
.letters-panel { background: #f3f9f3; border-color: #b0cdb6; border-top: 4px solid #6b9674; }
.metrics-panel { background: #fff9ee; border-color: #ddc9a5; border-top: 4px solid #b88c4c; }
.field-invitation { background: #f3f7fa; border-color: #bcced9; }
.action-card, .decision-card { border-left: 4px solid #87a6b6; }
.metric-track { background: #d9e1df; height: 6px; }
.metric-fill { background: #568e75; }
.metric-fill.warning { background: #bc8c35; }
.metric-fill.danger { background: #bc5a50; }
.tag { background: #e2f0f3; color: #245b6b; }
.briefing-scroll { min-width: 0; }
.briefing-scroll > .reading-text { margin-top: 12px; }
.briefing-photo-details { margin-top: 14px; }
.briefing-photo-details > summary { cursor: pointer; color: #315f75; font-size: 15px; }
.case-file .section-heading { flex-wrap: wrap; }
.case-file .section-heading > div { flex: 1 1 160px; }
.case-file .section-heading h2 { white-space: nowrap; }
.decision-context summary, .decision-content summary, .action-details summary { cursor: pointer; color: #315f75; font-size: 14px; }
.decision-context details .reading-text { margin-top: 10px; }
.decision-content details p { margin: 8px 0; }
.decision-content .btn { margin-top: 10px; }
.action-details > p { margin-top: 8px; font-size: 15px; line-height: 1.7; }

/* Long reading and decision lists scroll inside their own panels; headers and actions stay visible. */
@media (min-width: 761px) and (min-height: 600px) {
  body:not(.desk-active) { height: 100dvh; overflow: hidden; }
  body:not(.desk-active) .app-layout { height: 100dvh; min-height: 0; overflow: hidden; }
  body:not(.desk-active) .app-navigation { height: 100dvh; overflow-y: auto; }
  body:not(.desk-active) .app-main { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  body:not(.desk-active) .app-topbar { height: 68px; flex: 0 0 68px; padding-top: 10px; padding-bottom: 10px; }
  body:not(.desk-active) .app-context-bar { flex: 0 0 auto; padding-top: 5px; padding-bottom: 5px; }
  body:not(.desk-active) .page-content { width: 100%; flex: 1; min-height: 0; overflow: auto; }
  body:not(.desk-active) .app-footer { display: none; }
  body.desk-active { height: 100dvh; overflow: hidden; }
  .desk-active .app-layout { height: 100dvh; min-height: 0; overflow: hidden; }
  .desk-active .app-navigation { height: 100dvh; overflow-y: auto; }
  .desk-active .app-main { height: 100dvh; min-height: 0; display: flex; flex-direction: column; }
  .desk-active .app-topbar { height: 68px; flex: 0 0 68px; padding-top: 10px; padding-bottom: 10px; }
  .desk-active .app-context-bar { flex: 0 0 auto; padding-top: 5px; padding-bottom: 5px; }
  .desk-active .page-content { width: 100%; max-width: none; flex: 1; min-height: 0; padding: 12px 22px 16px; display: flex; flex-direction: column; }
  .desk-active .app-footer { display: none; }
  .desk-active .day-heading { flex: 0 0 auto; margin: 0 0 8px; }
  .desk-active .day-heading h2 { font-size: 26px; margin-top: 1px; }
  .desk-active .day-counter strong { font-size: 28px; }
  .desk-active .timeline { flex: 0 0 auto; margin-bottom: 12px; gap: 6px; }
  .desk-active .timeline-step { min-height: 38px; padding: 5px 3px; }
  .desk-active .desk-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr) minmax(220px, .42fr); gap: 14px; align-items: stretch; }
  .desk-active .desk-main, .desk-active .desk-notes, .desk-active .desk-aside { min-height: 0; min-width: 0; overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 1px 3px 3px 1px; scrollbar-gutter: stable; }
  .desk-active .desk-main > *, .desk-active .desk-notes > *, .desk-active .desk-aside > * { flex-shrink: 0; }
  .desk-active .desk-main > .briefing-document--morning { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .desk-active .briefing-document--morning > .briefing-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding-right: 8px; }
  .desk-active .briefing-document--morning > .document-actions { flex: 0 0 auto; margin-top: 12px; padding-top: 12px; }
  .desk-active .briefing-document--morning > h2 { font-size: 22px; margin-bottom: 10px; }
  .desk-active .briefing-document--morning .reading-text { line-height: 1.7; }
  .desk-active .briefing-document--morning .briefing-photos { margin: 14px 0; gap: 12px; }
  .desk-active .briefing-document--morning .photo-button img { height: 110px; aspect-ratio: auto; }
  .desk-active .briefing-document, .desk-active .night-summary, .desk-active .case-file, .desk-active .letters-panel, .desk-active .metrics-panel { padding: 18px; }
  .desk-active .section-intro, .desk-active .action-card { padding: 14px; }
  .desk-active .action-grid { gap: 12px; }
  .desk-active .action-card { gap: 7px; }
  .desk-active .action-card h3 { font-size: 16px; line-height: 1.45; }
  .desk-active .action-card .btn { min-height: 36px; padding: 5px 12px; }
  .desk-active .decision-context .document-meta { margin-bottom: 8px; }
  .desk-active .decision-context > h2 { font-size: 20px; margin-bottom: 8px; }
  .desk-active .decision-list { gap: 10px; }
  .desk-active .decision-card { padding: 12px 14px; gap: 10px; }
  .desk-active .decision-number { font-size: 18px; }
  .desk-active .decision-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 12px; width: 100%; }
  .desk-active .decision-content h3 { font-size: 16px; line-height: 1.5; }
  .desk-active .decision-content details { grid-column: 1; }
  .desk-active .decision-content .btn { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: center; padding: 8px 10px; }
  .desk-active .metrics-panel .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 10px; }
  .desk-active .metric-label { gap: 2px 6px; margin-bottom: 5px; }
  .desk-active .metrics-panel .section-heading { margin-bottom: 12px; }
  .desk-active .metrics-panel > .caption { margin-top: 12px; }
  .desk-active .case-file .section-heading { margin-bottom: 10px; }
  .desk-active .next-step { position: sticky; bottom: 0; z-index: 3; padding: 8px 12px; box-shadow: 0 -4px 16px #18354812; }
  .desk-active .next-step > div:first-child { display: none; }
  .desk-active .next-step .button-row { width: 100%; justify-content: flex-end; }
  .desk-active .desk-main:focus-visible, .desk-active .desk-notes:focus-visible, .desk-active .desk-aside:focus-visible, .desk-active .briefing-scroll:focus-visible { outline: 2px solid #397b95; outline-offset: -2px; }
}
@media (min-width: 761px) and (max-width: 1050px) and (min-height: 600px) {
  .desk-active .desk-workspace { grid-template-columns: minmax(0, 1fr) minmax(230px, .55fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .desk-active .desk-main { grid-row: 1 / -1; }
  .desk-active .desk-notes { grid-column: 2; grid-row: 1; }
  .desk-active .desk-aside { grid-column: 2; grid-row: 2; }
}
@media (max-width: 760px), (max-height: 599px) {
  .desk-notes { display: grid; gap: 18px; min-width: 0; }
}
