/* Shared analytical-workspace foundation. All rules are scoped away from the global shell. */
.workspace-shell {
  --ws-bg: #f7f8fc;
  --ws-panel: #fff;
  --ws-line: #e2e7ef;
  --ws-text: #202938;
  --ws-muted: #647084;
  --ws-accent: #4f46e5;
  --ws-tint: #eef2ff;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  background: var(--ws-bg);
  color: var(--ws-text);
  min-height: 70vh;
}
.dark .workspace-shell {
  --ws-bg: #030712;
  --ws-panel: #0d1423;
  --ws-line: #283247;
  --ws-text: #e8ecf4;
  --ws-muted: #a2aec2;
  --ws-accent: #a5b4fc;
  --ws-tint: #1e1b4b;
}
.workspace-shell [hidden] {
  display: none !important;
}
.workspace-rail {
  min-width: 0;
  background: var(--ws-panel);
  border-right: 1px solid var(--ws-line);
  padding: 24px 10px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.workspace-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  color: var(--ws-text);
  text-decoration: none;
}
.workspace-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ws-accent);
  background: var(--ws-tint);
  font-size: 15px;
  font-weight: 750;
}
.workspace-identity strong {
  display: block;
  font-size: 14px;
}
.workspace-identity small {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--ws-muted);
}
.workspace-shell .workspace-navigation {
  display: grid;
  gap: 6px;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent;
}
.workspace-shell .workspace-navigation a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ws-muted);
  text-decoration: none;
  min-height: 42px;
}
.workspace-shell .workspace-navigation svg {
  flex-shrink: 0;
}
.workspace-shell .workspace-navigation a[aria-current="page"] {
  background: var(--ws-tint);
  color: var(--ws-accent);
}
.workspace-shell .workspace-navigation a:hover {
  border-color: var(--ws-line);
  color: var(--ws-accent);
}
.workspace-rail-footer {
  display: grid;
  gap: 12px;
  padding: 20px 8px 0;
  margin-top: auto;
  font-size: 11px;
}
.workspace-rail-footer > span {
  color: var(--ws-muted);
  font-size: 10px;
}
.workspace-rail-footer a {
  color: var(--ws-accent);
}
.workspace-main {
  min-width: 0;
  padding: 24px;
  max-width: none;
  margin: 0;
  width: 100%;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.workspace-heading h1 {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.3;
  margin: 4px 0 7px;
}
.workspace-heading p {
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.7;
}
.workspace-eyebrow {
  font-size: 10px !important;
  letter-spacing: 0.12em;
  color: var(--ws-accent) !important;
  font-weight: 700;
}
.workspace-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--ws-muted);
  padding: 6px 9px;
  border: 1px solid var(--ws-line);
  border-radius: 6px;
  background: var(--ws-panel);
}
.workspace-toolbar {
  padding: 16px;
  border: 1px solid var(--ws-line);
  border-radius: 9px;
  background: var(--ws-panel);
  margin-bottom: 18px;
}
.workspace-toolbar label:not(.sr-only) {
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 8px;
}
.workspace-toolbar .investigation-search {
  margin: 0;
  max-width: none;
}
.workspace-toolbar .platform-search {
  width: 100%;
  max-width: none;
}
.workspace-toolbar > p {
  font-size: 12px;
  color: var(--ws-muted);
  margin-top: 10px;
  line-height: 1.7;
}
.workspace-disclosure {
  font-size: 12px;
  color: var(--ws-muted);
  line-height: 1.75;
}
.workspace-disclosure summary {
  cursor: pointer;
  font-weight: 650;
  padding: 10px 0;
  min-height: 38px;
}
.workspace-disclosure p {
  padding: 3px 0 8px;
}
.workspace-shell :focus-visible {
  outline: 2px solid var(--ws-accent);
  outline-offset: 3px;
}
.workspace-shell .workspace-inspection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 16px;
  align-items: start;
}
.workspace-results-main {
  min-width: 0;
}
.workspace-inspector {
  min-width: 0;
  background: var(--ws-panel);
  border: 1px solid var(--ws-line);
  border-radius: 10px;
  padding: 18px;
  position: sticky;
  top: 84px;
}
.workspace-inspector h2 {
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.workspace-inspector h3 {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 14px;
}
.workspace-inspector p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--ws-muted);
}
.workspace-inspector .investigation-actions {
  display: grid;
  gap: 8px;
  margin: 18px 0 12px;
}
.workspace-inspector .investigation-actions > a,
.workspace-inspector .investigation-actions > button {
  width: 100%;
  text-align: center;
  font-size: 12px;
  min-height: 38px;
  padding: 9px;
  border-radius: 7px;
  border: 1px solid var(--ws-line);
  background: var(--ws-panel);
  color: var(--ws-text);
}
.workspace-shell .investigation-card {
  border-color: var(--ws-line);
  border-radius: 9px;
  background: var(--ws-panel);
  padding: 18px;
}
.workspace-shell .investigation-tabs {
  gap: 18px;
  padding: 0;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ws-line);
  display: flex;
  flex-wrap: wrap;
}
.workspace-shell .investigation-tabs button {
  padding: 12px 0;
  min-height: 42px;
  font-size: 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ws-muted);
}
.workspace-shell .investigation-tabs [aria-selected="true"] {
  color: var(--ws-accent);
  border-bottom-color: var(--ws-accent);
}
.workspace-shell .investigation-panel > h2 {
  font-size: 19px;
}
.workspace-shell .investigation-panel > p {
  font-size: 12px;
  line-height: 1.75;
}
.workspace-shell .investigation-table th {
  background: var(--ws-bg);
  font-size: 11px;
}
.workspace-shell .investigation-table td {
  font-size: 12px;
}
.workspace-shell #investigation-status {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ws-muted);
  padding: 0 2px;
}
.workspace-shell #indicator-risk {
  font-size: 11px;
}
.workspace-shell #indicator-confidence {
  margin: 12px 0 0;
}
.workspace-shell .investigation-empty-copy {
  max-width: 62ch;
  font-size: 13px;
  color: var(--ws-muted);
  line-height: 1.8;
  margin: 10px auto 0;
}
.workspace-shell #investigation-empty {
  padding: 48px 24px;
}
.workspace-shell #investigation-empty h2 {
  font-size: 21px;
}
.workspace-shell .workspace-summary-actions {
  margin-top: 20px;
  border-top: 1px solid var(--ws-line);
  padding-top: 16px;
}
.workspace-shell .workspace-summary-actions a {
  display: block;
  text-align: center;
  border: 1px solid var(--ws-line);
  border-radius: 7px;
  padding: 9px;
  color: var(--ws-accent);
  font-size: 12px;
  font-weight: 650;
}
.workspace-shell .investigation-panel .export-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  min-height: 100px;
}
.workspace-shell .investigation-timeline {
  padding-left: 0;
}
.workspace-shell #related-list,
.workspace-shell #evidence-list {
  gap: 0;
}
.workspace-shell #related-list > li,
.workspace-shell #panel-evidence #evidence-list > li {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--ws-line);
  padding: 18px 0;
  background: transparent;
}
.workspace-shell #panel-evidence #evidence-list {
  display: block;
}
.workspace-shell .workspace-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ws-line);
  border-radius: 9px;
  background: var(--ws-panel);
  margin-bottom: 16px;
  overflow: hidden;
}
.workspace-shell .workspace-stats > div {
  padding: 16px;
  border-bottom: 1px solid var(--ws-line);
  min-width: 0;
}
.workspace-shell .workspace-stats > div:nth-child(odd) {
  border-right: 1px solid var(--ws-line);
}
.workspace-shell .workspace-stats > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.workspace-stats dt {
  font-size: 11px;
  color: var(--ws-muted);
  margin-bottom: 9px;
}
.workspace-stats dd {
  font-size: 15px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
@media (max-width: 1150px) {
  .workspace-shell {
    grid-template-columns: 152px minmax(0, 1fr);
  }
  .workspace-main {
    padding: 20px 16px;
  }
  .workspace-shell .workspace-inspection {
    grid-template-columns: minmax(0, 1fr) 244px;
  }
  .workspace-inspector {
    padding: 15px;
  }
  .workspace-shell .workspace-navigation a {
    font-size: 11px;
    padding: 10px 7px;
    gap: 7px;
  }
}
@media (max-width: 900px) {
  .workspace-shell .workspace-inspection {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace-inspector {
    position: static;
    grid-row: 1;
  }
  .workspace-inspector .investigation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workspace-inspector #indicator-value {
    font-size: 16px;
  }
  .workspace-inspector .workspace-disclosure {
    margin-top: 8px;
  }
}
@media (max-width: 700px) {
  .workspace-shell {
    display: block;
  }
  .workspace-rail {
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ws-line);
    gap: 0;
  }
  .workspace-identity,
  .workspace-rail-footer {
    display: none;
  }
  .workspace-shell .workspace-navigation {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    justify-content: flex-start;
  }
  .workspace-shell .workspace-navigation a {
    font-size: 11px;
    padding: 8px;
    min-height: 40px;
    gap: 6px;
  }
  .workspace-shell .workspace-navigation svg {
    width: 15px;
    height: 15px;
  }
  .workspace-main {
    padding: 20px 12px;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
  }
  .workspace-heading h1 {
    font-size: 25px;
  }
  .workspace-heading p {
    font-size: 12px;
  }
  .workspace-toolbar {
    padding: 12px;
  }
  .workspace-shell .workspace-stats > div {
    padding: 13px;
  }
  .workspace-shell .investigation-tabs {
    gap: 14px;
  }
  .workspace-shell .investigation-tabs button {
    font-size: 11px;
  }
  .workspace-shell .investigation-card {
    padding: 15px;
  }
  .workspace-shell .workspace-inspector .investigation-actions {
    grid-template-columns: 1fr 1fr;
  }
  .workspace-shell #investigation-empty {
    padding: 34px 16px;
  }
}
@media (max-width: 360px) {
  .workspace-shell .workspace-navigation a {
    font-size: 10px;
    padding: 7px 5px;
  }
  .workspace-shell .workspace-navigation svg {
    width: 13px;
    height: 13px;
  }
  .workspace-shell .workspace-navigation {
    gap: 2px;
  }
}
@media print {
  .workspace-rail,
  .workspace-toolbar,
  .workspace-summary-actions,
  .workspace-disclosure,
  .workspace-inspector .investigation-actions {
    display: none !important;
  }
  .workspace-shell,
  .workspace-shell .workspace-inspection {
    display: block;
  }
  .workspace-main {
    padding: 0;
  }
  .workspace-inspector {
    position: static;
    border: 0;
    padding: 0 0 18px;
  }
  .workspace-shell {
    background: #fff;
    color: #111;
  }
  .workspace-shell .investigation-card,
  .workspace-shell .workspace-stats {
    background: #fff;
    color: #111;
    border-color: #ccc;
  }
  .workspace-inspector h2,
  .workspace-inspector p {
    color: #111 !important;
  }
}
.workspace-research-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.workspace-research-content > nav {
  grid-column: 1/-1;
  line-height: 1.8;
  font-size: 12px;
}
.workspace-research-content > section {
  min-width: 0;
}
.workspace-research-content > section:first-of-type {
  grid-column: 1/-1;
}
.workspace-research-content > section h2 {
  font-size: 16px;
}
.workspace-research-content > section p,
.workspace-research-content > section li {
  font-size: 13px;
  line-height: 1.85;
}
.workspace-research-content ul {
  margin-top: 12px;
}
.workspace-research-content li + li {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .workspace-research-content {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Analytical toolbars use their available width, overriding legacy 720px form caps. */
.workspace-toolbar .investigation-search .platform-search {
  width: 100%;
  max-width: none;
  border-radius: 8px;
  box-shadow: none;
}
.workspace-toolbar
  .investigation-search
  .platform-search
  .platform-search-action {
  border-radius: 7px;
}
@media print {
  .workspace-shell .workspace-inspection {
    display: flex !important;
    flex-direction: column;
  }
  .workspace-inspector {
    order: -1;
    width: 100%;
  }
  .workspace-results-main {
    width: 100%;
  }
}

.workspace-inspector .workspace-context-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ws-text);
  margin-bottom: 14px;
}
@media print {
  .workspace-shell,
  .dark .workspace-shell {
    --ws-bg: #fff;
    --ws-panel: #fff;
    --ws-line: #ccc;
    --ws-text: #111;
    --ws-muted: #444;
    --ws-accent: #111;
    --ws-tint: #fff;
  }
}
