.workspace-app {
  width: min(1440px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* Pilot only: persisted case links activate the shared context and staged navigation. */
.continuity-pilot { color: #182126; background: #f8f4eb; --accent: #182126; }
body:has(.continuity-pilot) { background: #f8f4eb; color: #182126; }
.continuity-pilot .workspace-sidebar { background: #182126; border-color: #182126; min-height: 0; max-height: calc(100vh - 40px); overflow-y: auto; }
.continuity-pilot .workspace-nav, .continuity-pilot .workspace-stages { display: none; }
.pilot-nav { padding: 16px 0; display: grid; gap: 14px; }
.pilot-nav[hidden], .pilot-stages[hidden] { display:none; }
.pilot-nav h3 { color: #d9bc84; font: 600 .78rem/1.5 system-ui, sans-serif; margin: 0 0 5px; }
.pilot-nav a { display:block; padding:6px 8px; color:#f8f4eb; font-size:.8rem; line-height:1.4; text-decoration:none; border-left:2px solid transparent; }
.pilot-nav a:hover, .pilot-nav a[aria-current] { border-color:#d9bc84; background:#303b42; }
.pilot-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:16px; }
.pilot-stages a { padding:14px 12px; border:1px solid #d5cdbf; border-radius:8px; text-decoration:none; color:#182126; font-size:.88rem; }
.pilot-stages a[aria-current] { background:#182126; color:#fffdf8; border-color:#182126; }
.continuity-pilot #investigation-context-host { display:contents; }
.continuity-context-bar { position:sticky; top:8px; z-index:25; display:grid; grid-template-columns:1.2fr 1fr 1.2fr; gap:18px; padding:16px 20px; margin:14px 0; border:1px solid #c5b387; border-radius:10px; background:#fffdf8; box-shadow:0 4px 20px #18212612; }
.continuity-context-bar > div { min-width:0; display:grid; gap:5px; align-content:start; }
.continuity-context-bar small { font-size:.7rem; line-height:1.4; color:#52616a; }
.continuity-context-bar strong { font-size:.92rem; line-height:1.5; overflow-wrap:anywhere; }
.continuity-pilot .continuity-context-bar select { margin:0; width:100%; font-weight:600; }
.continuity-overview { border:1px solid #d5cdbf; border-radius:10px; padding:18px; margin:16px 0; background:#fffdf8; }
.continuity-overview summary { color:#182126; font-weight:600; cursor:pointer; }
.continuity-overview p { color:#52616a; line-height:1.65; }
.continuity-overview details { margin:12px 0; }
.continuity-objectives { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:16px; }
.continuity-objectives section { border:1px solid #ded7c9; border-radius:8px; padding:16px; }
.continuity-objectives h3 { font:500 1.15rem/1.4 Georgia,serif; margin:0 0 10px; }
.continuity-objectives p { font-size:.88rem; }
.continuity-link-form { display:grid; gap:12px; padding:20px; border:1px solid #c5b387; background:#fffdf8; color:#182126; }
.continuity-pilot .panel, .continuity-pilot .auth, .continuity-pilot .case-confirmation { background:#fffdf8; color:#182126; border-color:#ded7c9; }
.continuity-pilot .panel h2, .continuity-pilot .panel h3, .continuity-pilot h1 { color:#182126; }
.continuity-pilot p, .continuity-pilot label { color:inherit; }
.continuity-pilot .muted { color:#52616a; }
.continuity-pilot button, .continuity-link-form button { background:#182126; color:#fffdf8; border:1px solid #182126; border-radius:7px; }
.continuity-pilot button:disabled { background:#e4e6e1; color:#52616a; border-color:#cfd7d6; opacity:1; }
.continuity-pilot input, .continuity-pilot select, .continuity-pilot textarea { background:#fffdf8; color:#182126; border-color:#bac7c8; }
.continuity-pilot pre, .continuity-pilot code { white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; color:#182126; background:#f0ede5; }
.continuity-pilot .workspace-content { min-width:0; }
.continuity-pilot .panel, .continuity-pilot [id^="workspace-"] { scroll-margin-top:145px; }
.continuity-pilot .step { color:#9a7437; }

.continuity-pilot :is(.workspace-brand-copy, .workspace-sidebar-footer),
.continuity-pilot .workspace-brand-copy span {
  color: #f8f4eb;
}
@media(max-width:1100px) { .continuity-context-bar { grid-template-columns:1fr 1fr; } .continuity-context-bar>div:last-child { grid-column:1/-1; } .continuity-objectives { grid-template-columns:1fr; } }
@media(max-width:760px) { .continuity-context-bar { position:static; grid-template-columns:1fr; } .pilot-stages { grid-template-columns:1fr 1fr; } .continuity-pilot .workspace-sidebar { max-height:none; } }

.workspace-sidebar {
  position: sticky;
  top: 20px;
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid #28313a;
  background: rgb(7 10 13 / 96%);
  padding: 20px 16px;
}

.workspace-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px 20px;
  border-bottom: 1px solid #28313a;
}

.workspace-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #c49a58;
  color: #c49a58;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.workspace-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.workspace-brand-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.workspace-brand-copy span,
.workspace-nav-link small,
.workspace-sidebar-footer {
  color: #8d979a;
  font-size: 0.72rem;
  line-height: 1.45;
}

.workspace-nav {
  display: grid;
  gap: 5px;
  margin: 24px 0;
}

.workspace-nav-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px;
  border-left: 1px solid transparent;
  color: #c4cbc8;
  text-decoration: none;
  line-height: 1.35;
}

.workspace-nav-link:hover,
.workspace-nav-link:focus-visible {
  border-left-color: #c49a58;
  background: #0e1317;
  color: #ece8df;
  outline: none;
}

.workspace-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 16px 2px 2px;
  border-top: 1px solid #28313a;
}

.workspace-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #82d7a0;
  box-shadow: 0 0 0 3px rgb(130 215 160 / 10%);
}

.workspace-content {
  min-width: 0;
}

.workspace-content > header {
  max-width: 900px;
  margin-bottom: 32px;
}

.workspace-content > header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  text-transform: none;
}

.workspace-content .panel {
  scroll-margin-top: 24px;
}

.workspace-content .steps {
  gap: 16px;
}

.workspace-content .steps h2,
.workspace-content .output h2 {
  letter-spacing: 0.06em;
}

.workspace-analysis-guide {
  margin-top: -8px;
  margin-bottom: 18px;
}

@media (max-width: 980px) {
  .workspace-app {
    width: min(1180px, calc(100% - 32px));
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    position: static;
    min-height: 0;
  }

  .workspace-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-sidebar-footer {
    margin-top: 0;
  }
}

@media (max-width: 620px) {
  .workspace-app {
    width: min(100% - 24px, 1180px);
  }

  .workspace-nav {
    grid-template-columns: 1fr;
  }

  .workspace-content > header h1 {
    font-size: clamp(2.3rem, 14vw, 3.5rem);
  }
}

/* Investigation is a distinct first-stage workspace, without analysis panels. */
.workspace-app.investigation-mode{display:block;width:calc(100% - 32px);max-width:1900px}
.investigation-mode>.workspace-sidebar,.investigation-mode .workspace-content>header,
.investigation-mode #workspace-first-reading,.investigation-mode #workspace-details,
.investigation-mode .workspace-content>.auth,.investigation-mode .investigation-return{display:none!important}
.workspace-help { margin: 20px 0; min-width: 0; scroll-margin-top: 24px; }
.workspace-help summary { cursor: pointer; }
.workspace-help summary:focus-visible, .workspace-help a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.workspace-help pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.investigation-banner{display:none}
.investigation-mode .investigation-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#080d11;padding:20px 28px;border-bottom:2px solid #d6b979;color:#d6b979}
.investigation-banner a{color:#d6b979;text-decoration:none}
.investigation-banner a:first-child{letter-spacing:3px;font-weight:700;color:#f0ece3}
#workspace-investigation{background:#fafbfc;color:#173b67;padding:20px;border:1px solid #dce3ec}
#workspace-investigation h2,#workspace-investigation h3,#workspace-investigation h4,#workspace-investigation p{color:#173b67}
#workspace-investigation .investigation-dossiers{background:white;border:1px solid #dce3ec;padding:16px;margin-bottom:16px}
#workspace-investigation summary{color:#173b67}
#workspace-investigation input,#workspace-investigation select,#workspace-investigation textarea{background:white;color:#173b67;border:1px solid #bacbde;border-radius:6px;padding:9px;max-width:100%}
#workspace-investigation button{background:white;color:#173b67;border:1px solid #bacbde;border-radius:6px;padding:9px;cursor:pointer}
#workspace-investigation button:disabled{opacity:.5;cursor:default}
#workspace-investigation .panel{background:white;color:#173b67}
#workspace-investigation .investigation-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:16px}
#workspace-investigation .investigation-controls>p{flex-basis:100%;margin:5px 0}
#workspace-investigation .cv-app header p{color:#657e9f}
#workspace-investigation .cv-app main{max-width:none;width:auto;margin:0}
#workspace-investigation .cv-app .cv-grid{grid-template-columns:230px minmax(340px,1fr) 340px}
#workspace-investigation .cv-app .cv-global-nav button[aria-pressed=true]{background:#8d173f;color:white;border-color:#8d173f}
#workspace-investigation .cv-editor{padding:18px;background:#f1f5fa;border:1px solid #c9d5e2;border-radius:8px;margin-bottom:16px}
#workspace-investigation .cv-editor input:not([type=checkbox]){display:block;width:100%}
#workspace-investigation .cv-editor fieldset{border:1px solid #c9d5e2}
.investigation-return{display:block;margin:12px 0;color:#d6b979}
.workspace-stages{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px;background:#f6f1e8;border:1px solid #dfd4bf;margin:0 0 16px}
.workspace-stages a{display:block;text-decoration:none;color:#173b67;background:#fffdf9;border:1px solid #d8cbb4;border-radius:8px;padding:13px 16px}
.workspace-stages small,.workspace-stages strong,.workspace-stages span{display:block}.workspace-stages small{font-size:11px;letter-spacing:1px}.workspace-stages strong{font:700 18px Georgia,serif;margin:5px 0}.workspace-stages span{font-size:12px}
.workspace-stages a[aria-current=step]{border-left:4px solid #8d173f;background:#fff}.workspace-stages a:focus-visible{outline:2px solid #173b67;outline-offset:3px}
@media(max-width:620px){.workspace-stages{grid-template-columns:1fr}}
@media(max-width:1100px){#workspace-investigation .cv-app .cv-grid{grid-template-columns:180px minmax(260px,1fr) 260px}}
@media(max-width:800px){#workspace-investigation .cv-app .cv-grid{display:block}.investigation-mode .investigation-banner{flex-wrap:wrap}#workspace-investigation{padding:8px}}


#workspace-investigation .cv-app.cv-expanded .cv-grid{grid-template-columns:1fr;grid-template-areas:'main' 'time'}
#workspace-investigation .cv-app header h2{color:#103566}
#workspace-investigation .cv-empty{padding:60px 24px;min-height:340px;border:1px dashed #ccd8e8;border-radius:12px;color:#506c8c}

#workspace-investigation .cv-results{overflow-x:auto}
#workspace-investigation .cv-map{min-width:570px}
#workspace-investigation .cv-app .cv-node{width:160px}
#workspace-investigation .cv-app .cv-node.cv-center{width:180px}
#workspace-investigation .cv-wires [role=button]:focus{stroke-width:5;outline:none}

/* Keep the pilot navigation visible on the shared map as on all later stages. */
.workspace-app.continuity-pilot.investigation-mode { display:grid; grid-template-columns:250px minmax(0,1fr); width:min(1600px,calc(100% - 32px)); }
.continuity-pilot.investigation-mode>.workspace-sidebar { display:flex!important; }
.continuity-pilot .investigation-banner { background:#182126; border-color:#c5b387; }
.continuity-pilot #workspace-investigation { background:#f8f4eb; color:#182126; border-color:#ded7c9; }
.continuity-pilot #workspace-investigation h2,.continuity-pilot #workspace-investigation h3,.continuity-pilot #workspace-investigation h4,.continuity-pilot #workspace-investigation p,.continuity-pilot #workspace-investigation summary { color:#182126; }
.continuity-pilot #workspace-investigation button { background:#fffdf8; color:#182126; border-color:#bac7c8; }
.continuity-pilot #workspace-investigation .cv-app .cv-global-nav button[aria-pressed=true] { background:#182126; color:#fffdf8; border-color:#182126; }
.continuity-pilot #workspace-investigation .cv-editor { background:#f3eee2; border-color:#d5cdbf; }
.continuity-pilot #workspace-investigation .cv-app header h2 { color:#182126; }
@media(max-width:900px) { .workspace-app.continuity-pilot.investigation-mode { grid-template-columns:1fr; } .continuity-pilot .workspace-sidebar { position:static; max-height:none; } .pilot-nav { grid-template-columns:1fr 1fr; } }

/* Authenticated shell uses the public charter; case state colours stay semantic. */
body:has(.workspace-app){background:#f7f5ef;color:#182126}
.workspace-app{--workspace-night:#101d30;color-scheme:light;color:#182126;--accent:#182126;background:#f7f5ef}
.workspace-app .workspace-sidebar{background:var(--workspace-night);border-color:#30363a;color:#f7f5ef;border-radius:3px}
.workspace-app .workspace-brand-copy,.workspace-app .workspace-brand-copy span,.workspace-app .workspace-sidebar-footer{color:#e2e0d9}
.workspace-app .workspace-brand,.workspace-app .workspace-sidebar-footer{border-color:#d6b97930}
.workspace-app .pilot-nav a:hover,.workspace-app .pilot-nav a[aria-current],.workspace-app .workspace-nav-link:hover{background:#d9a8ae12;border-left-color:#d9a8ae}
.workspace-app .pilot-nav a,.workspace-app .workspace-nav-link{color:#f7f5ef}
.workspace-app .workspace-nav-link small{color:#b6bdbe}
.workspace-app .continuity-context-bar{background:#fffdf8;border:1px solid #ddd6c8;border-left:3px solid #d9a8ae;border-radius:3px;box-shadow:0 5px 18px #18212606}
.workspace-app .continuity-context-bar strong{color:#182126}
.workspace-app :is(.continuity-context-bar small,.continuity-overview p,.muted,header>p:last-child){color:#52616a}
.workspace-app :is(.continuity-overview,.continuity-objectives section,.continuity-link-form,.panel,.auth){background:#fffdf8;color:#182126;border-color:#ddd6c8;border-radius:3px}
.workspace-app :is(.continuity-overview summary,.panel h2,.panel h3,.workspace-content>header h1){color:#182126}
.workspace-app .workspace-stages{background:#f7f5ef;border-color:#ddd6c8}
.workspace-app :is(.pilot-stages a,.workspace-stages a){color:#182126;background:#fffdf8;border-color:#ddd6c8;border-radius:3px}
.workspace-app .pilot-stages a[aria-current]{background:var(--workspace-night);color:#fffdf8;border-color:#b39a66}
.workspace-app .workspace-stages a[aria-current=step]{background:#f8eef0;border-left-color:#b77c88}
.workspace-app :is(.continuity-link-form button,.auth-actions>button,.first-reading-panel>button){background:var(--workspace-night);color:#fffdf8;border:1px solid #182126;border-radius:3px}
.workspace-app :is(input,select,textarea){color-scheme:light;background:#fffdf8;color:#182126;border-color:#c8c3b8;border-radius:3px}
.workspace-app :is(.continuity-context-bar,.continuity-link-form,.first-reading-panel)>select{color:#182126;background:#fffdf8}
.workspace-app .field{color:#52616a}
.workspace-app .investigation-banner{background:var(--workspace-night);border-color:#b39a66}
.workspace-app #workspace-investigation{background:#f7f5ef;color:#182126;border-color:#ddd6c8}
.workspace-app #workspace-investigation :is(h2,h3,h4,p,summary){color:#182126}
.workspace-app #workspace-investigation :is(.investigation-dossiers,.panel){background:#fffdf8;border-color:#ddd6c8;color:#182126}
.workspace-app #workspace-investigation :is(button,input,select,textarea){background:#fffdf8;color:#182126;border-color:#c8c3b8;border-radius:3px}
.workspace-app #workspace-investigation .cv-editor{background:#f7f5ef;border-color:#ddd6c8}
.workspace-app #workspace-investigation .cv-app .cv-global-nav button[aria-pressed=true]{background:var(--workspace-night);color:#fffdf8;border-color:#b39a66}
.workspace-app #workspace-investigation .cv-app header h2{color:#182126}
.workspace-app .continuity-overview a,.workspace-app .first-reading a{color:#806432}
.workspace-app :focus-visible{outline:2px solid #806432;outline-offset:4px}
.workspace-app .workspace-sidebar :focus-visible{outline-color:#d6b979}
/* Keep the existing technical/status insets legible on light outer panels. */
.workspace-app .first-reading-panel>p,.workspace-app .first-reading summary{color:#52616a}
.workspace-app .first-stage-entries button{background:#fffdf8;color:#182126;border-color:#ddd6c8;border-radius:3px}
.workspace-app .first-stage-entries [aria-selected=true]{background:var(--workspace-night);color:#fffdf8;border-color:#b39a66}
.workspace-app .first-reading :is(blockquote,pre){background:#fffdf8;color:#182126;border-color:#b39a66}
.workspace-app .first-reading blockquote :is(p,strong,small){color:#182126}
.workspace-app .continuity-link-form button:disabled{background:#ebe8e0;color:#647078;border-color:#d5cfc3}



.workspace-app #workspace-investigation .cv-app{background:#f7f5ef;color:#182126;border-color:#ddd6c8;border-radius:3px}
.workspace-app #workspace-investigation .cv-app :is(header,aside,.cv-global-nav,.cv-time,.cv-global-panel){background:#fffdf8;border-color:#ddd6c8;color:#182126}
.workspace-app #workspace-investigation .cv-app header{border-bottom:1px solid #b39a66}
.workspace-app #workspace-investigation .cv-app header h2{font:400 28px/1.2 Georgia,serif;text-transform:none;letter-spacing:0;color:#182126}
.workspace-app #workspace-investigation .cv-app :is(h3,h4,summary){color:#182126}
.workspace-app #workspace-investigation .cv-app :is(.cv-subtitle,.cv-meta,.cv-crumb,.cv-overview-actor small,.cv-node small){color:#52616a}
.workspace-app #workspace-investigation .cv-app :is(.cv-overview-map,.cv-active-context){background:#f7f5ef;color:#52616a;border-color:#ddd6c8}
.workspace-app #workspace-investigation .cv-app .cv-active-context{border-left:2px solid #d9a8ae}
.workspace-app #workspace-investigation .cv-app .cv-map{background:radial-gradient(ellipse at 50% 45%,#d9a8ae0d,transparent 55%),#fffdf8;border-color:#ddd6c8;box-shadow:none;border-radius:3px}
.workspace-app #workspace-investigation .cv-app :is(button,.cv-node,.cv-overview-actor,.cv-proof-card){background:#fffdf8;color:#182126;border-color:#cfc5b1;border-radius:3px;box-shadow:0 3px 10px #18212608}
.workspace-app #workspace-investigation .cv-app .cv-proof-card{border-top:2px solid #b39a66}
.workspace-app #workspace-investigation .cv-app .cv-node.cv-center,.workspace-app #workspace-investigation .cv-app button[aria-pressed=true],.workspace-app #workspace-investigation .cv-app .cv-years button[aria-pressed=true]{background:var(--workspace-night);color:#fffdf8;border-color:#b39a66;box-shadow:0 3px 12px #18212616}
.workspace-app #workspace-investigation .cv-app .cv-node.cv-center small{color:#e2e0d9}
.workspace-app #workspace-investigation .cv-app .cv-avatar{background:#f8eef0;color:#79535c}
.workspace-app #workspace-investigation .cv-app .cv-center .cv-avatar{background:#303b42;color:#e6d3a8}
.workspace-app #workspace-investigation .cv-app .cv-node.cv-center:hover{box-shadow:0 5px 16px #18212620}
.workspace-app #workspace-investigation .cv-app footer{background:#f7f5ef;color:#52616a;border-color:#ddd6c8}
.workspace-app #workspace-investigation .cv-app :is(button,a,summary):focus-visible{outline:2px solid #806432;outline-offset:4px}


/* State colours are retained with readable contrast on the ivory working surface. */
.workspace-app .workspace-content .status-feedback.is-error,.workspace-app .workspace-content .decision-state.is-error{color:#a12d43}
.workspace-app .workspace-content .decision-state.is-complete{color:#286044}
.workspace-app .case-confirmation{background:#edf5ef;border-color:#5b8269;color:#286044}
.workspace-app .case-confirmation :is(strong,p,span,code){color:#286044;background:transparent}
.workspace-app #workspace-investigation .cv-app .cv-guide-start{background:var(--workspace-night)!important;color:#fffdf8!important;border-color:#b39a66!important}


/* Quiet depth: navigation and actor selection guide the eye without moving content. */
.workspace-app .workspace-sidebar{background:linear-gradient(145deg,#1b2b42 0%,#101d30 62%);border:1px solid #b39a6659;box-shadow:inset 0 1px 0 #fffdf81a,0 12px 28px #101d3012;border-radius:5px}
.workspace-app .pilot-nav a,.workspace-app .workspace-nav-link{border-radius:0 3px 3px 0;transition:background-color .16s ease,border-color .16s ease}
.workspace-app .pilot-nav a[aria-current],.workspace-app .workspace-nav-link[aria-current=page]{background:#d6b97914;border-left-color:#d6b979;box-shadow:inset 0 1px 0 #fffdf80b}
.workspace-app .pilot-nav h3{color:#dfc68f;letter-spacing:.015em}

/* Previously dark technical insets now belong to the ivory working surface. */
.workspace-app :is(.notice,.scope-guardrail,.safe-aggregate,.p0-locked,.p0-banner,.p0-card,.p0-definitions--meta,.p0-journey,.p0-journey blockquote){background:#f2eee4;color:#182126;border-color:#c5b58f;color-scheme:light;border-radius:4px}
.workspace-app :is(.notice,.scope-guardrail,.safe-aggregate,.p0-locked,.p0-banner,.p0-card,.p0-definitions--meta,.p0-journey) :is(p,label,strong,small,h2,h3,h4,dt,dd,li,.muted){color:#182126}
.workspace-app :is(.notice,.scope-guardrail,.safe-aggregate,.p0-locked,.p0-banner,.p0-card,.p0-journey) a{color:#765b2e}
.workspace-app :is(.notice,.scope-guardrail,.p0-banner){border-left:3px solid #b39a66}
.workspace-app :is(.safe-aggregate dt,.p0-definitions dt,.p0-list,.p0-option-selector,.p0-counsel-check,.p0-bands span){color:#52616a}
.workspace-app :is(.p0-definitions dd,.p0-card p,.p0-layer h3){color:#182126}
.workspace-app :is(.p0-mode,.p0-review-status){color:#286044}
.workspace-app .p0-gate{background:#f8eef0;color:#87344a;border:1px solid #c99aa6;border-left-width:3px;border-radius:4px}
.workspace-app .p0-gate :is(strong,p){color:#87344a}
.workspace-app .p0-gate.is-candidate{background:#f5edda;border-color:#b39a66}
.workspace-app .p0-gate.is-candidate :is(strong,p){color:#765b2e}
.workspace-app .p0-gate.is-ready{background:#edf5ef;border-color:#5b8269}
.workspace-app .p0-gate.is-ready :is(strong,p){color:#286044}
.workspace-app .workspace-content :is(.panel,.auth,.p0-journey) button:not(.cv-app button,.first-stage-entries button){background:#101d30;color:#fffdf8;border:1px solid #34465e;border-radius:4px;box-shadow:inset 0 1px 0 #fffdf812;transition:background-color .16s ease,border-color .16s ease}
.workspace-app .workspace-content :is(.panel,.auth,.p0-journey) button:not(.cv-app button):disabled{background:#ebe8e0;color:#647078;border-color:#d5cfc3;box-shadow:none;opacity:1;cursor:not-allowed}
.workspace-app .workspace-content :is(.p0-journey input,.p0-journey select,.p0-journey textarea,.field input,.field textarea,.review-item textarea,#stage-data){background:#fffdf8;color:#182126;color-scheme:light;border-color:#c8c3b8}
.workspace-app .workspace-content :is(.output pre,#dashboard-out){background:#f0ede5;color:#182126;border:1px solid #ddd6c8;border-radius:4px}
.workspace-app #purge{background:#fffdf8;color:#87344a;border-color:#c99aa6}

/* Shared actor rail for the pilot, customer workspace and embedded public map. */
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors{background:linear-gradient(150deg,#f5f0e4,#f9f7f1 70%);border-right:1px solid #d2c5ab;box-shadow:inset -1px 0 0 #fffdf8;padding:20px 14px}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors h3{color:#765b2e;font-size:12px;letter-spacing:.12em;margin-bottom:16px}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actor-list{padding:2px 3px 10px}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button{background:#fffdf8;color:#182126;border:1px solid #d8cebc;border-radius:5px;padding:11px 10px;margin:8px 0;line-height:1.45;box-shadow:0 2px 5px #101d3007;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease;transform:none;translate:none}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button .cv-pictogram{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:28px;height:28px;margin-right:8px;border:1px solid #ddcfae;border-radius:50%;background:#f3eddf;color:#806432}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button[aria-pressed=true]{background:#101d30;color:#fffdf8;border-color:#b39a66;box-shadow:inset 3px 0 0 #d6b979,0 4px 10px #101d301c}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button[aria-pressed=true] .cv-pictogram{background:#26374c;color:#e6d3a8;border-color:#b39a6666}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app :is(.cv-overview-actor,.cv-node){box-shadow:0 3px 9px #101d300b,0 1px 2px #101d3008}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-overview-actor{border-top:2px solid #c7b482}
:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-overview-actor .cv-pictogram{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;background:#f3eddf;border:1px solid #ddcfae;border-radius:50%;color:#806432}
@media(hover:hover){
 .workspace-app .workspace-content :is(.panel,.auth,.p0-journey) button:not(.cv-app button,.first-stage-entries button):not(:disabled):hover{background:#233750;border-color:#b39a66}
 :is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button:not([aria-pressed=true]):hover{background:#f6efdf;border-color:#b39a66;box-shadow:0 3px 8px #101d3010;transform:none;translate:none}
 :is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors button[aria-pressed=true]:hover{background:#233750;transform:none;translate:none}
}
@media(max-width:720px){:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actors{border-right:0;border-bottom:1px solid #d2c5ab;padding:16px 12px}:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actor-list{gap:6px}:is(.workspace-app #workspace-investigation,.customer-card,.op-entry) .cv-app .cv-actor-list button{margin:3px 0;max-width:100%}}
@media(prefers-reduced-motion:reduce){.workspace-app :is(button,.pilot-nav a,.workspace-nav-link),.customer-card .cv-app .cv-actors button{transition:none}}

/* Give each stage its own quiet card, with all subcategories directly visible. */
.workspace-app .pilot-nav {
  gap: 20px;
  padding: 22px 0;
  align-items: start;
}
.workspace-app .pilot-nav > a {
  grid-column: 1 / -1;
  padding: 10px 12px;
}
.workspace-app .pilot-nav > section {
  min-width: 0;
  padding: 14px 9px 10px;
  border: 1px solid #d6b97930;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff09, #ffffff03);
  box-shadow: inset 0 1px 0 #fffdf80a, 0 5px 12px #07111e1a;
}
.workspace-app .pilot-nav > section:has(a[aria-current]) {
  border-color: #d6b97980;
  background: linear-gradient(145deg, #d6b97912, #ffffff04);
}
.workspace-app .pilot-nav h3 {
  margin: 0 3px 10px;
  padding: 0 0 11px;
  border-bottom: 1px solid #d6b97926;
  font-size: .8rem;
  line-height: 1.55;
}
.workspace-app .pilot-nav > section > a {
  min-height: 40px;
  display: flex;
  align-items: center;
  margin-top: 3px;
  padding: 8px 8px 8px 12px;
  font-size: .8rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.workspace-app .pilot-nav a:focus-visible {
  outline: 2px solid #e6d3a8;
  outline-offset: 2px;
}
@media (max-width: 900px) {
  .workspace-app .pilot-nav { gap: 18px; }
}
@media (max-width: 560px) {
  .workspace-app .pilot-nav { grid-template-columns: 1fr; }
  .workspace-app .pilot-nav > section { padding: 16px 12px 12px; }
  .workspace-app .pilot-nav > section > a { min-height: 44px; }
}
.investigation-reading { margin: 24px 0; padding: 24px; border: 1px solid #d8cdb8; background: #fffefa; border-radius: 8px; }
.investigation-reading label { display: block; margin: 10px 0; }
.investigation-reading input:not([type=checkbox]), .investigation-reading select, .investigation-reading textarea { display: block; width: 100%; max-width: 100%; margin: 6px 0; }
.investigation-reading input[type=checkbox] { width: auto; margin-left: 10px; }
.investigation-reading-entries { max-height: 280px; overflow: auto; border: 1px solid #d8cdb8; padding: 12px; }
.investigation-reading fieldset, .investigation-reading-card { min-width: 0; padding: 16px; margin: 16px 0; border: 1px solid #d8cdb8; border-radius: 6px; }
.investigation-reading legend, .investigation-reading p { overflow-wrap: anywhere; }
.investigation-reading blockquote { white-space: pre-wrap; overflow-wrap: anywhere; border-left: 3px solid #ab9258; padding: 12px; margin: 12px 0; background: #f5f2eb; }
@media (max-width: 560px) { .investigation-reading { padding: 12px; } }
