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

.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}
.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}
@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}
