:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f5f4;
  color: #182028;
  --palette-ink: #182028;
  --palette-muted: #607470;
  --palette-border: #cfe0dc;
  --palette-panel: #ffffff;
  --palette-panel-soft: #f8fbfa;
  --palette-active: #31b6a5;
  --palette-active-strong: #0e645c;
  --palette-action: #d85f45;
  --palette-action-soft: #fff1ec;
  --palette-info: #3f7fb8;
  --palette-info-soft: #edf5ff;
  --palette-watch: #b8892f;
  --palette-watch-soft: #fff7e4;
  --palette-govern: #7957a8;
  --palette-govern-soft: #f5f0fb;
  --palette-shadow: 0 12px 28px rgba(16, 37, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
}

.runtime-boundary {
  width: min(680px, calc(100% - 40px));
  margin: 12vh auto 0;
  padding: 36px;
  border: 1px solid var(--palette-border);
  border-radius: 14px;
  background: var(--palette-panel);
  box-shadow: var(--palette-shadow);
}

.runtime-boundary .brand {
  color: var(--palette-ink);
  margin-bottom: 36px;
}

.runtime-boundary .brand p,
.runtime-boundary > p {
  color: var(--palette-muted);
}

.runtime-boundary h2 {
  max-width: 560px;
  margin: 8px 0 14px;
}

.api-analytics-workspace {
  width: min(1180px, calc(100% - 40px));
  margin: 32px auto;
}

.api-analytics-header,
.api-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.api-analytics-header {
  align-items: center;
  margin-bottom: 24px;
}

.api-analytics-header .brand {
  color: var(--palette-ink);
  margin: 0;
}

.api-analytics-header > div:last-child {
  justify-self: end;
  display: grid;
  gap: 4px;
  text-align: right;
}

.api-analytics-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.api-analytics-list li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--palette-border);
}

.api-analytics-list span {
  color: var(--palette-muted);
  text-align: right;
}

.action-recommendation-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--palette-border);
  border-radius: 10px;
  background: var(--palette-info-soft);
}

.action-persistence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.action-persistence-grid label {
  display: grid;
  gap: 5px;
  color: var(--palette-muted);
  font-size: 12px;
  font-weight: 800;
}

.action-persistence-grid input,
.action-persistence-grid select,
.action-persistence-grid textarea {
  width: 100%;
  border: 1px solid var(--palette-border);
  border-radius: 7px;
  background: var(--palette-panel);
  color: var(--palette-ink);
  padding: 8px;
}

.action-note-field {
  grid-column: 1 / -1;
}

.action-note-field textarea {
  min-height: 68px;
  resize: vertical;
}

.action-history {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.action-history li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 14px;
  padding: 10px;
  border-left: 3px solid var(--palette-active);
  background: var(--palette-panel-soft);
}

.action-history p {
  grid-column: 1 / -1;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #10252a;
  color: #f8fbfb;
  min-width: 0;
  padding: 24px 18px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #31b6a5;
  color: #082023;
  font-weight: 800;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
}

.brand p,
.eyebrow {
  color: #6f8680;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-nav {
  display: grid;
  gap: 6px;
  align-items: start;
}

.primary-nav ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav li {
  min-width: 0;
}

nav a {
  color: #dce7e7;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

nav a:hover {
  background: #1f3a40;
}

[hidden] {
  display: none !important;
}

.module-tab {
  display: flex;
  align-items: center;
  min-height: 40px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dce7e7;
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.module-tab span {
  display: block;
  min-width: 0;
}

.module-tab:hover,
.module-tab[aria-current="page"] {
  background: #1f3a40;
  color: #ffffff;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px 20px 24px;
}

.workspace section[id],
.workspace details[id] {
  scroll-margin-top: 98px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -16px -20px 0;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #dce5e2;
  background: rgba(243, 245, 244, 0.96);
  backdrop-filter: blur(10px);
}

.topbar h2 {
  margin-top: 3px;
  font-size: 24px;
  line-height: 1.15;
}

.topbar h2:focus-visible {
  outline: 3px solid #1d7f76;
  outline-offset: 4px;
}

.governance-strip {
  border: 1px solid #c9d7d2;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
  color: #465a58;
  font-size: 13px;
  white-space: nowrap;
}

.account-scope {
  display: grid;
  grid-template-columns: max-content minmax(160px, 1fr) minmax(190px, 1fr);
  align-items: end;
  gap: 8px;
  max-width: 640px;
}

.scope-row {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scope-row span,
.scope-row label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.scope-row strong {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  padding: 8px 10px;
}

.scope-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  padding: 8px 10px;
}

.account-scope .governance-strip {
  grid-column: 1 / -1;
  text-align: right;
}

.context-bar,
.filter-panel,
.saved-view-grid,
.kpis,
.buyer-readiness-strip,
.readiness-rescue-panel,
.command-center,
.cockpit-grid,
.issue-list,
.queue-list,
.queue-buckets,
.narrative-grid,
.taxonomy-list,
.taxonomy-form,
.trend-controls,
.trend-chart-grid,
.role-mode-grid,
.executive-analytics,
.decision-grid,
.trust-grid,
.workspace-grid {
  display: grid;
  gap: 12px;
}

.saved-view-panel {
  border-color: #b9d7d1;
}

.saved-view-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saved-view-summary {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.saved-view-summary span,
.saved-view-audit-strip span {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.saved-view-summary strong {
  color: #1d2d2b;
  line-height: 1.25;
}

.saved-view-summary p {
  color: #405452;
  font-size: 13px;
  line-height: 1.4;
}

.saved-view-controls {
  display: grid;
  grid-template-columns: max-content minmax(180px, 1fr) repeat(4, max-content);
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.saved-view-controls label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.saved-view-controls input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  padding: 8px 10px;
}

.saved-view-controls button {
  min-height: 38px;
  border: 1px solid #bfd0cb;
  border-radius: 8px;
  background: #ffffff;
  color: #263534;
  cursor: pointer;
  font-size: 13px;
  padding: 8px 10px;
}

.saved-view-controls button:hover,
.saved-view-controls button:focus-visible {
  border-color: #31b6a5;
  background: #f2fbf8;
}

.segmentation-confidence-panel {
  grid-column: 1 / -1;
}

.segment-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.segment-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.segment-card > div:first-child {
  display: grid;
  gap: 4px;
}

.segment-card span,
.segment-card small,
.segment-safety-strip span {
  color: #687c78;
  font-size: 12px;
  font-weight: 800;
}

.segment-card strong {
  color: #263534;
  line-height: 1.25;
}

.segment-card p {
  color: #394c49;
  font-size: 13px;
  line-height: 1.4;
}

.segment-metrics,
.segment-safety-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment-metrics span {
  border: 1px solid #dce5e2;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 8px;
}

.segment-safety-strip {
  margin-top: 12px;
}

.segment-safety-strip > div {
  display: grid;
  gap: 4px;
  flex: 1 1 220px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.export-confidence-panel {
  grid-column: 1 / -1;
}

.export-evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.export-evidence-card {
  display: grid;
  gap: 8px;
  min-height: 164px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.export-evidence-card span,
.export-lockout-strip span {
  color: #687c78;
  font-size: 12px;
  font-weight: 800;
}

.export-evidence-card strong {
  color: #263534;
  line-height: 1.25;
}

.export-evidence-card p {
  color: #394c49;
  font-size: 13px;
  line-height: 1.4;
}

.export-state-strip,
.export-lockout-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.export-state-strip span {
  border: 1px solid #dce5e2;
  border-radius: 999px;
  background: #ffffff;
  color: #405452;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
}

.export-lockout-strip > div {
  display: grid;
  gap: 4px;
  flex: 1 1 240px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.saved-view-audit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.saved-view-audit-strip strong {
  border: 1px solid #dce5e2;
  border-radius: 999px;
  background: #f8fbfb;
  color: #405452;
  font-size: 12px;
  padding: 7px 9px;
}

.command-center {
  grid-template-columns: 1fr;
}

.command-evidence-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #b9d7d1;
  border-radius: 8px;
  background: #eff8f6;
  padding: 12px 14px;
}

.command-evidence-status > div {
  display: grid;
  gap: 3px;
}

.command-evidence-status span {
  color: #526965;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.command-evidence-status strong {
  color: #1d2d2b;
  font-size: 14px;
  line-height: 1.35;
}

.command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.45fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
}

.command-hero h3 {
  margin-top: 4px;
  color: #1d2d2b;
  font-size: 22px;
  line-height: 1.2;
}

.workflow-card {
  display: grid;
  gap: 6px;
  border-left: 4px solid #d85f45;
  background: #fff7f4;
  color: #263534;
  padding: 12px;
}

.workflow-card span,
.evidence-summary-strip span {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.workflow-card strong {
  font-size: 15px;
  line-height: 1.3;
}

.workflow-spine-panel,
.current-workaround-panel {
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.workflow-spine-panel .panel-head,
.current-workaround-panel .panel-head {
  margin-bottom: 12px;
}

.workflow-spine,
.workaround-grid {
  display: grid;
  gap: 10px;
}

.workflow-spine {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workaround-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-spine article,
.workaround-grid article {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.workflow-spine span {
  width: fit-content;
  border: 1px solid #b9d9d2;
  border-radius: 999px;
  background: #effaf7;
  color: #0e645c;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 7px;
}

.workflow-spine strong,
.workaround-grid strong {
  color: #1d2d2b;
  line-height: 1.25;
}

.workflow-spine p,
.workaround-grid p {
  color: #405452;
  font-size: 13px;
  line-height: 1.4;
}

.command-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.command-metrics article {
  align-content: start;
  gap: 6px;
  min-height: 118px;
  border-color: #d7e1de;
  box-shadow: 0 10px 24px rgba(16, 37, 42, 0.05);
}

.command-metrics span {
  font-size: 30px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.replacement-evaluation-panel {
  border-color: #c9d8d4;
  background: #f8fbfb;
  padding: 0;
}

.replacement-evaluation-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
}

.replacement-evaluation-panel summary::-webkit-details-marker {
  display: none;
}

.replacement-evaluation-panel summary strong {
  display: block;
  margin-top: 3px;
  color: #1d2d2b;
  font-size: 15px;
  line-height: 1.25;
}

.replacement-evaluation-panel summary::after {
  content: "+";
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #bfd0cb;
  border-radius: 8px;
  background: #ffffff;
  color: #263534;
  font-weight: 800;
}

.replacement-evaluation-panel[open] summary::after {
  content: "-";
}

.replacement-governance {
  margin-left: auto;
  color: #465a58;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: right;
}

.replacement-evaluation-body,
.replacement-evaluation-copy {
  display: grid;
  gap: 10px;
}

.replacement-evaluation-body {
  border-top: 1px solid #dce5e2;
  padding: 14px;
}

.replacement-evaluation-copy p {
  max-width: 760px;
  color: #394c49;
  font-size: 14px;
  line-height: 1.45;
}

.replacement-evaluation-cta {
  width: fit-content;
}

.replacement-evaluation-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.replacement-evaluation-lists div {
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.replacement-evaluation-lists h4 {
  color: #263534;
  font-size: 13px;
}

.replacement-evaluation-lists ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 18px;
  color: #405452;
  font-size: 14px;
  line-height: 1.35;
}

.cockpit-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
}

.hotspot-panel {
  grid-row: span 2;
}

.command-heatmap,
.operating-heatmap {
  grid-template-columns: minmax(190px, 1.25fr) repeat(5, minmax(82px, 0.75fr));
}

.command-heatmap .heatmap-header,
.command-heatmap .topic,
.command-heatmap .cell {
  padding: 9px 8px;
  font-size: 11px;
}

.heatmap-scope-note,
.evidence-scope-callout {
  border: 1px solid #d5e2df;
  border-radius: 8px;
  background: #f7faf9;
  color: #405452;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

.heatmap-scope-note {
  margin-top: 12px;
}

.evidence-scope-callout {
  display: grid;
  gap: 4px;
  margin: 12px 0;
}

.evidence-scope-callout strong {
  color: #22302f;
  font-size: 12px;
  text-transform: uppercase;
}

.issue-card,
.queue-item,
.queue-preview-item,
.evidence-sample {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.issue-card > div,
.queue-item > div:first-child,
.queue-preview-item > div:first-child,
.queue-bucket > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-card p,
.queue-item p,
.queue-preview-item p,
.evidence-sample p {
  color: #394c49;
  font-size: 14px;
  line-height: 1.4;
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-investigation-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  color: #405452;
  line-height: 1.4;
  padding: 8px 10px;
  border: 1px solid #dce5e2;
  border-radius: 6px;
  background: #ffffff;
}

.queue-investigation-chain strong {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 100%;
  color: #152524;
  overflow-wrap: anywhere;
}

.queue-investigation-chain span {
  flex: 1 1 13rem;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.queue-investigation-chain .status-badge {
  flex: 0 1 auto;
  margin-block: 1px;
  white-space: normal;
}

.compact-queue {
  align-content: start;
}

.queue-preview-item {
  display: grid;
  gap: 8px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.queue-preview-item p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.queue-preview-item small {
  display: grid;
  gap: 3px;
  border-top: 1px solid #e4ebe9;
  color: #405452;
  line-height: 1.35;
  padding-top: 8px;
}

.queue-preview-item small strong {
  color: #1d2d2b;
}

.queue-buckets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.queue-bucket {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.queue-bucket h4 {
  font-size: 15px;
}

.queue-bucket > div:first-child span {
  color: #607470;
  font-size: 12px;
  font-weight: 800;
}

.role-mode-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-card {
  min-height: 184px;
}

.role-card h3 {
  font-size: 17px;
  line-height: 1.3;
}

.role-card strong {
  display: block;
  margin: 12px 0 6px;
  color: #315f9b;
  font-size: 30px;
}

.role-card span {
  color: #405452;
  line-height: 1.4;
}

.evidence-sample-list {
  display: grid;
  gap: 10px;
}

.evidence-sample span {
  color: #687c78;
  font-size: 12px;
  font-weight: 800;
}

.evidence-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.evidence-tabs button {
  border: 1px solid #bfd0cb;
  border-radius: 8px;
  background: #ffffff;
  color: #263534;
  cursor: pointer;
  font-size: 13px;
  padding: 7px 9px;
}

.queue-bucket-toggle {
  min-height: 44px;
  border: 1px solid #b9d7d1;
  border-radius: 8px;
  background: #eff8f6;
  color: #185b55;
  font-weight: 800;
  cursor: pointer;
}

.queue-bucket-toggle:hover,
.queue-bucket-toggle:focus-visible {
  border-color: #1d7f76;
  background: #e2f2ef;
}

.evidence-tabs button[aria-selected="true"] {
  border-color: #31b6a5;
  background: #eaf8f5;
  color: #0e645c;
  font-weight: 800;
}

.evidence-tabs button:focus-visible {
  outline: 3px solid rgba(49, 182, 165, 0.32);
  outline-offset: 2px;
}

.evidence-tab-panel {
  display: grid;
  gap: 12px;
}

.evidence-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.source-record-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-record-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px;
}

.source-record-grid span,
.source-record-grid small {
  color: #607470;
  overflow-wrap: anywhere;
}

.evidence-summary-strip > div {
  display: grid;
  gap: 4px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px;
}

.evidence-summary-strip strong {
  color: #263534;
}

.readiness-rescue-panel {
  grid-template-columns: minmax(260px, 1.05fr) minmax(340px, 1fr) max-content;
  align-items: center;
  border: 1px solid #b9d7d1;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.readiness-rescue-panel h3 {
  margin-top: 3px;
  color: #1d2d2b;
  font-size: 18px;
  line-height: 1.25;
}

.readiness-evidence-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
  padding-left: 18px;
  color: #405452;
  font-size: 13px;
  line-height: 1.3;
}

.context-bar {
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
}

.scope-governance {
  border-color: #9accc4;
  background: #effaf7;
  color: #164b45;
}

.buyer-readiness-strip {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.buyer-readiness-strip > div {
  min-width: 0;
  border: 1px solid #d4e0dd;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.buyer-readiness-strip span {
  color: #687c78;
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.buyer-readiness-strip strong {
  color: #1b2d2c;
  display: block;
  font-size: 18px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.buyer-readiness-strip p {
  color: #405452;
  font-size: 13px;
  line-height: 1.35;
}

.filter-panel {
  grid-template-columns: 1.1fr 1fr 1fr 1fr 1fr auto;
  align-items: end;
  padding-top: 12px;
}

.filter-drawer {
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 14px 14px;
}

.filter-drawer summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  padding: 12px 0 0;
  color: #263534;
  font-weight: 800;
}

.filter-drawer summary strong {
  color: #607470;
  font-size: 12px;
}

.filter-drawer:not([open]) {
  padding-bottom: 12px;
}

.filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-field label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-field select {
  width: 100%;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #fbfcfc;
  color: #22302f;
  min-height: 38px;
  padding: 8px 10px;
}

.filter-dropdown {
  position: relative;
}

.sentiment-filter-dropdown {
  min-width: 152px;
}

.native-filter-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.filter-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #fbfcfc;
  color: #22302f;
  cursor: pointer;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.filter-select-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sentiment-filter-dropdown .filter-select-button span:first-child {
  overflow: visible;
  text-overflow: clip;
}

.filter-select-button:focus-visible,
.filter-option:focus-visible {
  outline: 3px solid rgba(49, 182, 165, 0.32);
  outline-offset: 2px;
}

.filter-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(16, 37, 42, 0.16);
  padding: 6px;
}

.sentiment-filter-dropdown .filter-options {
  min-width: 170px;
}

.filter-option {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #22302f;
  cursor: pointer;
  padding: 8px 9px;
  text-align: left;
}

.filter-option:hover,
.filter-option[aria-selected="true"] {
  background: #e5f5f1;
  color: #0e645c;
}

.compact-field {
  min-width: 180px;
}

.scope-chip,
.kpis article,
.panel {
  background: #ffffff;
  border: 1px solid #dce5e2;
  border-radius: 8px;
}

.scope-chip {
  min-height: 66px;
  padding: 12px;
  color: #22302f;
  font-weight: 700;
}

.scope-chip span {
  display: block;
  margin-bottom: 6px;
  color: #687c78;
  font-size: 11px;
  text-transform: uppercase;
}

.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpis.command-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpis.command-metrics article {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 118px;
  border-color: #d7e1de;
  box-shadow: 0 10px 24px rgba(16, 37, 42, 0.05);
}

.kpis article,
.panel {
  padding: 16px;
  min-width: 0;
}

.kpis span {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: #0e645c;
}

.kpis.command-metrics span {
  font-size: 30px;
  line-height: 1.05;
}

.kpis p {
  color: #22302f;
  font-weight: 700;
  margin-top: 2px;
}

.kpis small,
.recommendation small,
.trend-day small {
  color: #647873;
}

.kpis small {
  display: block;
  margin-top: 8px;
  border-top: 0;
  line-height: 1.4;
}

.decision-grid,
.ops-grid,
.trust-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
}

.above-fold-story {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
}

.executive-analytics {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.chart-panel {
  min-height: 0;
  max-height: 320px;
  overflow: auto;
}

.chart-panel.featured {
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  box-shadow: 0 12px 28px rgba(16, 37, 42, 0.07);
}

.executive-trend-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(48px, 1fr));
  gap: 9px;
  align-items: end;
  min-height: 96px;
  max-height: 160px;
  overflow-x: auto;
  padding-top: 6px;
}

.executive-trend-day {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #536764;
  font-size: 12px;
}

.executive-mix,
.comparison-bars {
  display: grid;
  gap: 14px;
}

.executive-mix-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
}

.executive-mix-row span,
.comparison-bar-row strong {
  color: #263534;
  font-weight: 800;
}

.executive-mix-row strong {
  color: #607470;
  text-align: right;
}

.comparison-bar-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.comparison-bar-row small {
  display: block;
  color: #687c78;
  font-size: 12px;
  margin-top: 2px;
}

.comparison-bar {
  height: 10px;
  overflow: hidden;
  border: 1px solid #d7e1de;
  border-radius: 999px;
  background: #e6ecea;
}

.comparison-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.comparison-bar i.source {
  background: #31b6a5;
}

.comparison-bar i.survey {
  background: #3f7fb8;
}

.compact-action {
  margin-top: 0;
  white-space: nowrap;
}

.executive-heatmap {
  grid-template-columns: minmax(172px, 1.2fr) repeat(5, minmax(70px, 0.8fr));
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
}

.panel-head > div,
.panel-head .toolbar {
  min-width: 0;
}

.panel-head > .action-link {
  align-self: flex-start;
  flex: 0 0 auto;
  margin-top: 0;
}

#analyst-workspace .panel-head {
  align-items: center;
  flex-wrap: wrap;
}

#analyst-workspace .panel-head .toolbar {
  justify-content: flex-end;
}

.panel-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.panel-head h3 {
  margin-top: 3px;
  font-size: 18px;
}

.panel-head > span,
.rec-meta span,
.rec-meta strong {
  color: #607470;
  font-size: 12px;
}

.recommendations {
  display: grid;
  gap: 10px;
}

.compact-recommendations {
  max-height: 168px;
  overflow: auto;
  padding-right: 4px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.narrative-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.narrative-card {
  min-height: 152px;
  align-content: start;
}

.narrative-citations small {
  color: #607470;
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.story-card,
.report-card {
  display: grid;
  gap: 8px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.story-card span,
.report-card > div > span {
  color: #607470;
  font-size: 12px;
  font-weight: 800;
}

.story-card p,
.report-card p {
  color: #394c49;
  font-size: 14px;
  line-height: 1.45;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.report-card h4 {
  font-size: 16px;
}

.report-context {
  border: 1px solid #dce5e2;
  border-radius: 6px;
  background: #ffffff;
  color: #35504c;
  font-size: 12px;
  font-weight: 800;
  padding: 8px;
}

.report-surface-panel {
  grid-column: 1 / -1;
}

.recommendation {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
}

.rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0bd4f;
  color: #1e2927;
  font-weight: 800;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.recommendation h4 {
  font-size: 16px;
}

.recommendation p {
  color: #485b58;
  line-height: 1.45;
  margin: 6px 0;
}

.sentiment-stack {
  display: grid;
  gap: 12px;
}

.sentiment-row {
  display: grid;
  grid-template-columns: 96px minmax(80px, 1fr) 28px;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ecea;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.praise {
  background: #279c72;
}

.problem {
  background: #c95f48;
}

.suggestion {
  background: #3f7fb8;
}

.question {
  background: #b8892f;
}

.ratio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #dce5e2;
}

.ratio strong {
  font-size: 22px;
  color: #0e645c;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 142px;
  overflow-x: auto;
}

.trend-day {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #536764;
  font-size: 12px;
}

.trend-bar {
  width: 100%;
  max-width: 52px;
  border-radius: 6px 6px 0 0;
  background: #31b6a5;
}

.positive {
  color: #0e645c;
}

.negative {
  color: #a74734;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar button,
.action-link,
.topic-tags button {
  border: 1px solid #bfd0cb;
  border-radius: 8px;
  background: #ffffff;
  color: #263534;
  cursor: pointer;
  font-size: 13px;
  padding: 8px 10px;
}

.action-link:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary-action {
  border-color: #31b6a5;
  background: #eaf8f5;
  color: #0e645c;
  font-weight: 800;
}

.toolbar button:hover,
.action-link:hover,
.topic-tags button:hover {
  background: #f2f7f6;
}

.persisted-controls {
  min-width: 198px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-align: left;
}

.evidence-panel {
  border-color: #b9d7d1;
}

.evidence-list {
  display: grid;
  gap: 10px;
}

.artifact-list,
.source-health-list,
.admin-section-list {
  display: grid;
  gap: 10px;
}

.evidence-record,
.artifact-row,
.source-health-row,
.admin-section-row {
  display: grid;
  gap: 8px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.evidence-record div:first-child,
.artifact-row div,
.source-health-row div,
.admin-section-row div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evidence-record span,
.artifact-row span,
.source-health-row span,
.admin-section-row span {
  color: #607470;
  font-size: 12px;
}

.evidence-record p {
  color: #485b58;
  line-height: 1.45;
}

.evidence-record-limit-note {
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #f6faf9;
  color: #485b58;
  font-size: 13px;
  line-height: 1.45;
  margin: 10px 0 0;
  padding: 10px 12px;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-tags button {
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 9px;
}

.topic-tags .primary-match {
  border-color: #31b6a5;
  background: #eaf8f5;
  color: #0e645c;
  font-weight: 800;
}

.topic-tags .primary-match span,
.secondary-tag-label {
  color: #607470;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topic-tags .primary-match span {
  margin-right: 6px;
}

.secondary-tag-label {
  align-self: center;
}

.topic-tags .secondary-match {
  color: #485b58;
}

.operation-note {
  border-top: 1px solid #dce5e2;
  color: #485b58;
  line-height: 1.45;
  margin-top: 12px;
  padding-top: 12px;
}

.helper-text {
  color: #485b58;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.export-controls {
  display: grid;
  grid-template-columns: max-content minmax(100px, 140px) max-content minmax(160px, 220px) minmax(220px, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  margin-bottom: 12px;
  padding: 10px;
}

.export-controls label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.export-controls select {
  min-height: 36px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  padding: 7px 10px;
}

.scope-confirmation {
  color: #164b45;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.admin-import-panel {
  grid-column: 1 / -1;
}

.import-scope-grid,
.validation-grid,
.import-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.import-scope-grid div,
.validation-grid div,
.import-status-strip div,
.import-success {
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px;
}

.import-success {
  display: grid;
  gap: 6px;
  border-color: #9accc4;
  background: #effaf7;
  color: #164b45;
}

.import-success span {
  color: #4f6863;
  font-size: 12px;
  font-weight: 800;
}

.import-scope-grid span,
.validation-grid span,
.import-status-strip span {
  display: block;
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.import-form {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(180px, 1fr);
  gap: 10px 12px;
  align-items: center;
}

.import-form label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-form select,
.import-form input,
.import-form textarea,
.taxonomy-form input,
.trend-controls select {
  min-height: 38px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  font: inherit;
  padding: 8px 10px;
}

.import-form textarea {
  min-height: 150px;
  resize: vertical;
  white-space: pre;
}

.taxonomy-form {
  grid-template-columns: max-content minmax(140px, 1fr) max-content minmax(180px, 1fr) max-content;
  align-items: center;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  margin-bottom: 12px;
  padding: 10px;
}

.taxonomy-form label,
.trend-controls label {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.taxonomy-list {
  gap: 8px;
}

.taxonomy-row {
  border-left: 4px solid #31b6a5;
}

.trend-controls {
  grid-template-columns: max-content minmax(160px, 1fr) max-content minmax(160px, 1fr) max-content minmax(160px, 1fr);
  align-items: center;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  margin-bottom: 12px;
  padding: 10px;
}

.trend-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-chart-grid article {
  min-width: 0;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.trend-chart-grid h4 {
  margin-bottom: 10px;
}

.compact-trend {
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  min-height: 128px;
}

.trend-bar.theme {
  background: #3f7fb8;
}

.trend-bar.action {
  background: #d85f45;
}

.import-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.validation-errors {
  display: grid;
  gap: 8px;
}

.validation-errors p,
.error-state {
  border: 1px solid #e3b7aa;
  border-radius: 8px;
  background: #fff8f5;
  color: #8d3528;
  margin: 0;
  padding: 10px;
}

.comparison-table {
  display: grid;
  grid-template-columns: minmax(150px, 1.3fr) 84px 92px 88px minmax(180px, 1.7fr);
  gap: 6px;
  overflow-x: auto;
}

.comparison-header,
.comparison-cell {
  min-height: 42px;
  border: 1px solid #d7e1de;
  border-radius: 6px;
  background: #f8fbfb;
  padding: 10px;
}

.comparison-header {
  color: #61736f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-cell {
  color: #263534;
  line-height: 1.35;
}

.comparison-cell small {
  display: block;
  color: #687c78;
  font-size: 12px;
  margin-top: 3px;
}

.transition-list {
  margin: 0;
  padding-left: 20px;
  color: #485b58;
  line-height: 1.55;
}

.row-action {
  justify-self: start;
  border: 1px solid #cbd8d4;
  border-radius: 6px;
  background: #ffffff;
  color: #0e645c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
}

.row-action:hover,
.row-action:focus-visible {
  border-color: #31b6a5;
  background: #f2fbf8;
}

.row-detail {
  grid-column: 1 / -1;
  border-top: 1px solid #dce5e2;
  color: #485b58;
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0 0;
  padding-top: 8px;
}

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

.import-status-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-status-strip strong {
  color: #1d2d2b;
  font-size: 13px;
  line-height: 1.35;
}

.analyst-review-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 12px;
}

.workspace-grid h4 {
  margin-bottom: 8px;
}

.layout-edit-affordance {
  border: 1px solid #b9d9d2;
  border-radius: 8px;
  background: #effaf7;
  color: #164b45;
  font-size: 13px;
  font-weight: 800;
  margin: 12px 0 0;
  padding: 9px 10px;
}

.workspace-editable {
  position: relative;
  border: 1px dashed #31b6a5;
  border-radius: 8px;
  padding: 12px;
}

.layout-drag-handle {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #9accc4;
  border-radius: 6px;
  background: #e5f5f1;
  color: #0e645c;
  cursor: grab;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
  padding: 4px 7px;
  text-transform: uppercase;
}

.comment {
  border-left: 3px solid #31b6a5;
  color: #485b58;
  display: block;
  width: 100%;
  line-height: 1.45;
  margin-bottom: 8px;
  padding-left: 10px;
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  color: #485b58;
  line-height: 1.55;
}

.heatmap {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(5, minmax(84px, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.heatmap-header,
.topic,
.cell {
  min-height: 42px;
  border: 1px solid #d7e1de;
  border-radius: 6px;
  padding: 10px;
  text-align: left;
  background: #f8fbfb;
}

.heatmap-header {
  font-size: 12px;
  text-transform: uppercase;
  color: #61736f;
  font-weight: 700;
}

.topic {
  font-weight: 700;
}

button.topic {
  color: #22302f;
  cursor: pointer;
}

.cell {
  display: grid;
  place-items: center;
  gap: 3px;
  cursor: pointer;
  text-align: center;
  font-weight: 800;
}

.intensity-0 {
  color: #78908b;
}

.zero-cell {
  cursor: default;
  color: #687c78;
  font-size: 12px;
  font-weight: 700;
  background: #eef3f1;
}

.intensity-1 {
  background: #dff3ef;
  color: #0e645c;
}

.intensity-2 {
  background: #96ddd2;
  color: #083b38;
}

.hotspot-cell {
  border-color: #0c7f73;
  box-shadow: inset 0 0 0 1px rgba(12, 127, 115, 0.18);
}

.hotspot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
  color: #09534d;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.matrix {
  display: grid;
  gap: 8px;
}

.matrix div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #edf2f0;
  padding: 8px 0;
}

.trust-grid .matrix div,
.gate-list span {
  cursor: default;
}

.matrix strong {
  color: #0e645c;
  font-size: 12px;
  text-align: right;
}

.gate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-list span {
  border: 1px solid #cbd8d4;
  border-radius: 999px;
  color: #2c3b39;
  font-size: 13px;
  padding: 8px 10px;
  user-select: none;
}

.empty-state {
  color: #687c78;
  font-size: 14px;
  line-height: 1.45;
}

.focus-helper {
  flex-basis: 100%;
  color: #607470;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.toast-region {
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast-region:empty {
  display: none;
}

.toast-region p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #b9d9d2;
  border-radius: 8px;
  background: #effaf7;
  color: #164b45;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
}

.toast-region button {
  border: 1px solid #8fc2b7;
  border-radius: 6px;
  background: #ffffff;
  color: #164b45;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 6px 8px;
}

.inline-confirmation {
  border: 1px solid #b9d9d2;
  border-radius: 6px;
  background: #f4fbf9;
  color: #164b45;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin: 10px 0 0;
  padding: 8px 10px;
}

.status-badge {
  display: inline-block;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  padding: 5px 7px;
  text-transform: uppercase;
}

.status-badge.available,
.status-badge.seed {
  background: #e5f5f1;
  color: #0e645c;
}

.status-badge.applied {
  background: #dbeafe;
  color: #1e3a8a;
}

.status-badge.planned {
  background: #f3ead7;
  color: #79591e;
}

.status-badge.urgent {
  background: #fde8e1;
  color: #a74734;
}

.status-badge.watch {
  background: #fff2d8;
  color: #8a5f13;
}

.saved-view-list {
  display: grid;
  gap: 10px;
}

.saved-view-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #fbfcfc;
  color: #22302f;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.saved-view-card:hover,
.saved-view-inline:hover {
  border-color: #31b6a5;
  background: #f2fbf8;
}

.saved-view-card:focus-visible,
.saved-view-inline:focus-visible {
  outline: 3px solid rgba(49, 182, 165, 0.32);
  outline-offset: 2px;
}

.saved-view-card span {
  display: block;
  color: #607470;
  font-size: 13px;
  margin-top: 4px;
}

.saved-view-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #0e645c;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 4px 6px;
  text-align: left;
}

[data-layout="edit"][aria-pressed="true"] {
  border-color: #31b6a5;
  background: #e5f5f1;
  color: #0e645c;
}

.planned-card {
  background: #f7f5ef;
}

#narrative-summary,
#heat-map,
#action-queue,
#evidence-drilldown,
#analyst-workspace,
#operations,
#reports .panel,
#sources .panel,
#trust-controls .panel,
#admin-imports .panel,
#admin .panel,
#topic-taxonomy .panel,
#trend-charts .panel,
#role-views .role-card {
  position: relative;
  overflow: hidden;
  border-color: var(--palette-border);
  background: linear-gradient(180deg, var(--palette-panel), var(--palette-panel-soft));
  box-shadow: var(--palette-shadow);
}

#narrative-summary::before,
#heat-map::before,
#action-queue::before,
#evidence-drilldown::before,
#analyst-workspace::before,
#operations::before,
#reports .panel::before,
#sources .panel::before,
#trust-controls .panel::before,
#admin-imports .panel::before,
#admin .panel::before,
#topic-taxonomy .panel::before,
#trend-charts .panel::before,
#role-views .role-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--palette-active);
}

#narrative-summary::before,
#reports .panel::before {
  background: linear-gradient(90deg, var(--palette-active), var(--palette-info));
}

#topic-taxonomy .panel::before,
#analyst-workspace::before,
#trust-controls .panel::before,
#admin .panel::before {
  background: linear-gradient(90deg, var(--palette-govern), var(--palette-active));
}

#trend-charts .panel::before,
#heat-map::before,
#action-queue::before {
  background: linear-gradient(90deg, var(--palette-action), var(--palette-watch), var(--palette-active));
}

#operations::before,
#sources .panel::before,
#admin-imports .panel::before {
  background: linear-gradient(90deg, var(--palette-info), var(--palette-active));
}

#narrative-summary .narrative-card,
#topic-taxonomy .taxonomy-row,
#trend-charts .trend-chart-grid article,
#action-queue .queue-bucket,
#action-queue .queue-item,
#evidence-drilldown .evidence-record,
#evidence-drilldown .source-record-grid > div,
#role-views .role-card,
#analyst-workspace .analyst-review-card,
#operations .source-health-row,
#sources .source-health-row,
#reports .report-card,
#trust-controls .matrix div,
#admin-imports .import-scope-grid div,
#admin-imports .validation-grid div,
#admin-imports .import-status-strip div,
#admin .admin-section-row {
  border-color: var(--palette-border);
  background: rgba(255, 255, 255, 0.78);
}

#narrative-summary .narrative-card,
#reports .report-card {
  border-top: 3px solid var(--palette-info);
}

#topic-taxonomy .taxonomy-row,
#analyst-workspace .analyst-review-card,
#trust-controls .matrix div,
#admin .admin-section-row {
  border-left-color: var(--palette-govern);
}

#action-queue .queue-bucket,
#action-queue .queue-item {
  border-left: 4px solid var(--palette-action);
}

#evidence-drilldown .evidence-scope-callout,
#evidence-drilldown .evidence-summary-strip > div,
#heat-map .heatmap-scope-note {
  border-color: #b9d9d2;
  background: #effaf7;
}

#role-views .role-card:nth-child(1)::before {
  background: var(--palette-info);
}

#role-views .role-card:nth-child(2)::before {
  background: var(--palette-action);
}

#role-views .role-card:nth-child(3)::before {
  background: var(--palette-govern);
}

#role-views .role-card strong {
  color: var(--palette-active-strong);
}

#trust-controls .gate-list span {
  border-color: #b9d9d2;
  background: #effaf7;
  color: var(--palette-active-strong);
}

#admin-imports .admin-import-panel,
#operations,
#sources .panel {
  background: linear-gradient(180deg, #ffffff, var(--palette-info-soft));
}

#admin .panel,
#trust-controls .panel {
  background: linear-gradient(180deg, #ffffff, var(--palette-govern-soft));
}

#trend-charts .trend-controls,
#topic-taxonomy .taxonomy-form {
  border-color: #b9d9d2;
  background: #effaf7;
}

.trend-bar.theme,
.trend-bar.action,
.trend-bar.sentiment,
.trend-bar.positive,
.trend-bar.negative {
  box-shadow: inset 0 -10px 18px rgba(8, 32, 35, 0.1);
}

.trend-bar.theme {
  background: var(--palette-info);
}

.trend-bar.sentiment.positive,
.trend-bar.positive {
  background: var(--palette-active);
}

.trend-bar.sentiment.negative,
.trend-bar.negative,
.trend-bar.action {
  background: var(--palette-action);
}

.cell.sentiment-praise {
  background: #dff3e9;
  color: #0b5d43;
}

.cell.sentiment-problem {
  background: #fde8e1;
  color: #8d3528;
}

.cell.sentiment-suggestion {
  background: #e4f0fb;
  color: #234e7a;
}

.cell.sentiment-question {
  background: var(--palette-watch-soft);
  color: #79591e;
}

.cell.sentiment-neutral {
  background: #edf2f0;
  color: #4f6863;
}

.cell.sentiment-problem.hotspot-cell,
.cell.sentiment-suggestion.hotspot-cell,
.cell.sentiment-question.hotspot-cell {
  border-color: var(--palette-action);
  box-shadow: inset 0 0 0 1px rgba(216, 95, 69, 0.28), 0 0 0 3px rgba(216, 95, 69, 0.1);
}

.zero-cell.sentiment-praise,
.zero-cell.sentiment-problem,
.zero-cell.sentiment-suggestion,
.zero-cell.sentiment-question,
.zero-cell.sentiment-neutral {
  background: #eef3f1;
  color: #687c78;
  box-shadow: none;
}

@media (max-width: 1080px) {
  .context-bar,
  .filter-panel,
  .saved-view-grid,
  .kpis,
  .command-metrics,
  .cockpit-grid,
  .replacement-evaluation-lists,
  .queue-buckets,
  .narrative-grid,
  .trend-chart-grid,
  .role-mode-grid,
  .evidence-summary-strip,
  .segment-evidence-grid,
  .export-evidence-grid,
  .buyer-readiness-strip,
    .readiness-rescue-panel,
    .story-grid,
    .report-grid,
    .workflow-spine,
    .workaround-grid,
    .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid,
  .above-fold-story,
  .executive-analytics,
  .ops-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .account-scope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .export-controls {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .saved-view-controls {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .import-scope-grid,
  .validation-grid,
  .taxonomy-form,
  .trend-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scope-confirmation {
    grid-column: 1 / -1;
    text-align: left;
  }

  .kpis.command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-spine article,
  .workaround-grid article {
    min-height: 132px;
  }
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .primary-nav ul {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .primary-nav li {
    flex: 0 0 auto;
  }

  .module-tab {
    flex: 0 0 auto;
    min-width: max-content;
    width: auto;
    white-space: nowrap;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .panel-head {
    display: block;
  }

  .command-evidence-status {
    align-items: stretch;
    flex-direction: column;
  }

  .command-evidence-status .action-link {
    width: 100%;
  }

  .topbar h2 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .governance-strip {
    margin-top: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .account-scope {
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .account-scope .governance-strip {
    text-align: left;
  }

  .context-bar,
  .kpis,
  .command-metrics,
  .saved-view-grid,
  .cockpit-grid,
  .queue-buckets,
  .replacement-evaluation-lists,
  .narrative-grid,
  .trend-chart-grid,
  .role-mode-grid,
  .evidence-summary-strip,
  .segment-evidence-grid,
  .export-evidence-grid,
  .command-hero,
  .buyer-readiness-strip,
  .readiness-rescue-panel,
  .executive-analytics,
  .story-grid,
  .report-grid,
  .workflow-spine,
  .workaround-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .workflow-spine article,
  .workaround-grid article {
    min-height: 0;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .saved-view-controls {
    grid-template-columns: 1fr;
  }

  .import-scope-grid,
  .validation-grid,
  .import-form,
  .taxonomy-form,
  .trend-controls {
    grid-template-columns: 1fr;
  }

  .import-actions {
    grid-column: 1;
  }

  .executive-mix-row,
  .comparison-bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .executive-mix-row strong {
    text-align: left;
  }

  .toolbar {
    margin-top: 12px;
  }

  .filter-options {
    position: fixed;
    top: 96px;
    right: 18px;
    bottom: 18px;
    left: 18px;
    max-height: none;
  }

  .kpis.command-metrics {
    grid-template-columns: 1fr;
  }
}

/* Analyst Review: bounded, task-led investigation workflow */
.analyst-review { overflow: hidden; }

.analyst-review-intro,
.analyst-card-heading,
.analyst-section-heading,
.analyst-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.analyst-review-intro {
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid #dce5e2;
}

.analyst-review-intro h3,
.analyst-section-heading h4,
.analyst-signal-card h4,
.analyst-trend-card h4,
.analyst-finding-layout h4 { margin: 3px 0 6px; }

.analyst-review-intro p:not(.eyebrow),
.analyst-section-heading p:not(.eyebrow),
.analyst-signal-card > p,
.analyst-comparison-grid p {
  color: #536764;
  margin: 0;
  line-height: 1.5;
}

.analyst-scope-summary {
  min-width: 220px;
  border: 1px solid #cfe0dc;
  border-radius: 10px;
  background: #f4faf8;
  padding: 10px 12px;
}

.analyst-scope-summary span,
.analyst-scope-summary strong,
.analyst-scope-summary small { display: block; }
.analyst-scope-summary span,
.analyst-scope-summary small { color: #60746f; font-size: 12px; }
.analyst-scope-summary strong { color: #173f3b; margin: 3px 0; }

.analyst-step-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 5px;
  border: 1px solid #dce5e2;
  border-radius: 10px;
  background: #f5f8f7;
}

.analyst-step-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536764;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.analyst-step-tabs button[aria-selected="true"] {
  background: #ffffff;
  color: #0e645c;
  box-shadow: 0 3px 12px rgba(16, 37, 42, 0.08);
}

.analyst-step-tabs button:focus-visible,
.analyst-evidence-list button:focus-visible {
  outline: 3px solid rgba(49, 182, 165, 0.35);
  outline-offset: 2px;
}

.analyst-step-panel { min-height: 410px; outline: none; }

.analyst-signal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 12px;
}

.analyst-signal-card,
.analyst-trend-card,
.analyst-driver-card,
.analyst-comparison-grid article,
.analyst-evidence-detail,
.analyst-finding-citations {
  border: 1px solid #dce5e2;
  border-radius: 10px;
  background: #fbfcfc;
  padding: 16px;
}

.analyst-signal-card { border-top: 3px solid #d85f45; }
.analyst-trend-card { border-top: 3px solid #31b6a5; }

.analyst-driver-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
}

.analyst-driver-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analyst-driver-card li,
.analyst-evidence-policy {
  border-radius: 999px;
  background: #e8f6f2;
  color: #0e645c;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.analyst-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.analyst-metric-strip > div {
  border: 1px solid #e2e9e7;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.analyst-metric-strip span,
.analyst-metric-strip small { display: block; color: #687c78; font-size: 11px; }
.analyst-metric-strip strong { display: block; color: #173f3b; font-size: 22px; margin: 3px 0; }

.analyst-mini-trend {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 142px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.analyst-mini-trend li {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 3px;
  min-width: 0;
  color: #60746f;
  font-size: 11px;
}

.analyst-trend-value { font-weight: 800; color: #22302f; }
.analyst-trend-bar {
  display: block;
  width: min(32px, 80%);
  max-height: 88px;
  border-radius: 5px 5px 0 0;
  background: #31b6a5;
}
.analyst-trend-bar.negative { background: #d85f45; }
.analyst-trend-sentiment { font-weight: 800; }

.analyst-section-heading { align-items: flex-end; margin-bottom: 14px; }
.analyst-dimension-control {
  display: grid;
  gap: 5px;
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.analyst-dimension-control select {
  min-width: 170px;
  min-height: 38px;
  border: 1px solid #cbd8d4;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  font: inherit;
  padding: 8px 10px;
  text-transform: none;
}

.analyst-comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.analyst-comparison-grid article { min-width: 0; }
.analyst-comparison-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 8px;
  color: #536764;
  font-size: 13px;
}
.analyst-comparison-metrics strong { color: #173f3b; font-size: 18px; }

.analyst-step-actions {
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e1e8e6;
}

.primary-action,
.secondary-action {
  min-height: 38px;
  border-radius: 8px;
  padding: 8px 13px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.primary-action { border: 1px solid #0e645c; background: #0e645c; color: #ffffff; }
.secondary-action { border: 1px solid #cbd8d4; background: #ffffff; color: #173f3b; }

.analyst-evidence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 12px;
  align-items: start;
}
.analyst-evidence-list { display: grid; gap: 7px; }
.analyst-evidence-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border: 1px solid #dce5e2;
  border-radius: 8px;
  background: #ffffff;
  color: #22302f;
  padding: 10px;
  text-align: left;
  cursor: pointer;
}
.analyst-evidence-list button[aria-pressed="true"] {
  border-color: #31b6a5;
  background: #f2fbf8;
  box-shadow: inset 3px 0 #31b6a5;
}
.analyst-evidence-list button > span:first-child { color: #0e645c; font-weight: 900; }
.analyst-evidence-list strong,
.analyst-evidence-list small { display: block; }
.analyst-evidence-list strong { font-size: 13px; line-height: 1.4; }
.analyst-evidence-list small { color: #687c78; margin-top: 4px; }

.analyst-evidence-detail { position: sticky; top: 108px; }
.analyst-evidence-detail blockquote {
  margin: 12px 0;
  border-left: 3px solid #31b6a5;
  padding-left: 12px;
  color: #354946;
  line-height: 1.55;
}
.analyst-evidence-detail dl,
.analyst-finding-citations dl { display: grid; gap: 9px; margin: 0; }
.analyst-evidence-detail dl div,
.analyst-finding-citations dl div {
  display: grid;
  gap: 2px;
  border-top: 1px solid #e1e8e6;
  padding-top: 8px;
}
.analyst-evidence-detail dt,
.analyst-finding-citations dt {
  color: #687c78;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.analyst-evidence-detail dd,
.analyst-finding-citations dd { margin: 0; color: #22302f; font-weight: 700; }

.analyst-finding-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.5fr);
  gap: 14px;
}
.analyst-finding-layout label { display: block; margin: 16px 0 6px; color: #536764; font-weight: 800; }
.analyst-finding-layout textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid #cbd8d4;
  border-radius: 9px;
  background: #ffffff;
  color: #22302f;
  font: inherit;
  line-height: 1.5;
  padding: 12px;
}
.analyst-finding-actions { display: flex; }

.admin-user-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid #dce5e2;
  border-radius: 9px;
  background: #ffffff;
  padding: 12px;
}
.admin-user-row > div { align-self: center; }
.admin-user-row strong,
.admin-user-row span { display: block; }
.admin-user-row span { color: #687c78; font-size: 12px; margin-top: 3px; }
.admin-user-row label { color: #536764; font-size: 12px; font-weight: 800; }
.admin-user-row input { width: 100%; margin-top: 5px; }

@media (max-width: 980px) {
  .analyst-signal-layout,
  .analyst-evidence-layout,
  .analyst-finding-layout { grid-template-columns: 1fr; }
  .admin-user-row { grid-template-columns: 1fr 1fr; }
  .analyst-comparison-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analyst-driver-card { grid-template-columns: 1fr; }
  .analyst-evidence-detail { position: static; }
}

@media (max-width: 700px) {
  .action-recommendation-strip { align-items: stretch; flex-direction: column; }
  .action-persistence-grid { grid-template-columns: 1fr; }
  .action-history li { grid-template-columns: 1fr; }
  .api-analytics-header,
  .api-analytics-grid { grid-template-columns: 1fr; }
  .api-analytics-header > div:last-child { justify-self: start; text-align: left; }
  .api-analytics-list li { align-items: flex-start; flex-direction: column; }
  .api-analytics-list span { text-align: left; }
  .analyst-review-intro,
  .analyst-section-heading,
  .analyst-step-actions { align-items: stretch; flex-direction: column; }
  .analyst-scope-summary { min-width: 0; }
  .analyst-step-tabs,
  .analyst-metric-strip,
  .analyst-comparison-grid { grid-template-columns: 1fr; }
  .analyst-step-tabs button { text-align: left; }
  .analyst-mini-trend { overflow-x: auto; grid-template-columns: repeat(7, minmax(56px, 1fr)); }
  .admin-user-row { grid-template-columns: 1fr; }
}
