:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f9fafb;
  --ink: #17202a;
  --muted: #687385;
  --line: #dbe1e8;
  --teal: #0f8b8d;
  --blue: #2f6fdd;
  --amber: #bc7a00;
  --red: #c3403f;
  --green: #2e7d57;
  --violet: #7357a6;
  --shadow: 0 12px 32px rgba(24, 35, 52, 0.08);
}

.muted {
  color: var(--muted);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Segoe UI",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  align-items: center;
  background: #111923;
  border: 1px solid #263340;
  border-radius: 8px;
  color: #f7fafc;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #ecf2f5, #89d0c7);
  border-radius: 6px;
  color: #111923;
  display: flex;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 700;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand h1 {
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
  overflow-wrap: anywhere;
}

.brand p {
  color: #b9c4d0;
  font-size: 13px;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.button {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: #e8f5f3;
  border: 1px solid #9acdc7;
  color: #073d40;
}

.button.secondary {
  background: #1c2733;
  border: 1px solid #344252;
  color: #f7fafc;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.dashboard-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-auto-rows: max-content;
  grid-template-columns: minmax(260px, 320px) minmax(460px, 1fr) minmax(300px, 380px);
  margin-top: 14px;
}

.game-rail,
.game-focus,
.commercial-panel,
.event-panel,
.topic-panel,
.status-panel,
.alert-panel,
.coverage-panel,
.methodology-panel,
.provider-panel,
.source-health-panel,
.source-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.game-rail {
  height: calc(100vh - 118px);
  min-height: 640px;
  overflow: hidden;
}

.rail-tools {
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.search-box {
  display: grid;
  gap: 6px;
}

.search-box span,
.eyebrow,
.count-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-box input {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  height: 38px;
  outline: none;
  padding: 0 11px;
  width: 100%;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

.segmented {
  background: #edf1f5;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
  padding: 3px;
}

.segment {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  height: 30px;
}

.segment.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(24, 35, 52, 0.12);
}

.game-list {
  height: calc(100% - 112px);
  overflow: auto;
  padding: 8px;
}

.game-row {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  margin-bottom: 6px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.game-row:hover,
.game-row.active {
  background: #f7f9fb;
  border-color: #ced8e3;
}

.game-row-main {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.game-name {
  font-size: 14px;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heat-value {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.mini-meta {
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 8px;
  min-width: 0;
}

.mini-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  background: #e8edf2;
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.bar-fill {
  background: var(--teal);
  height: 100%;
  min-width: 2px;
}

.main-column,
.side-column {
  align-content: start;
  align-items: start;
  display: grid;
  gap: 14px;
  grid-auto-rows: max-content;
  min-width: 0;
}

.side-column .alert-list,
.side-column .coverage-body {
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.diagnostics-band {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  min-width: 0;
}

.diagnostics-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
}

.diagnostics-head h2 {
  font-size: 20px;
  line-height: 1.2;
  margin: 4px 0 0;
}

.diagnostic-tabs {
  background: #e9eef3;
  border: 1px solid #d8e1ea;
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
}

.diagnostic-tab {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #526071;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  min-height: 32px;
  padding: 0 12px;
}

.diagnostic-tab.active {
  background: var(--panel);
  box-shadow: 0 1px 5px rgba(24, 35, 52, 0.12);
  color: var(--ink);
}

.diagnostic-panes {
  min-width: 0;
}

.diagnostic-pane[hidden] {
  display: none !important;
}

.diagnostics-band .source-health-body,
.diagnostics-band .source-list {
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.diagnostics-band .source-health-body {
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.diagnostics-band .source-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.diagnostics-band .source-health-grid {
  grid-column: 1 / -1;
}

.signal-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  min-width: 0;
}

.signal-workspace .commercial-panel {
  grid-column: 1 / -1;
}

.metric-strip {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-height: 92px;
  padding: 14px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  margin-top: 8px;
}

.metric-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.game-focus,
.commercial-panel,
.event-panel,
.topic-panel,
.status-panel,
.alert-panel,
.coverage-panel,
.methodology-panel,
.provider-panel,
.source-health-panel,
.source-panel {
  padding: 16px;
}

.section-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-head h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0 0;
}

.section-head.compact h2 {
  font-size: 17px;
}

.eyebrow {
  margin: 0;
}

.status-pill,
.topic-badge,
.alert-severity {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 26px;
  padding: 5px 9px;
  white-space: nowrap;
}

.status-pill {
  background: #edf4ff;
  color: var(--blue);
}

.status-risk {
  background: #fff1f0;
  color: var(--red);
}

.status-hot {
  background: #fff7e8;
  color: var(--amber);
}

.status-calm {
  background: #eef7f2;
  color: var(--green);
}

.focus-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  margin-top: 18px;
}

.index-board {
  display: grid;
  gap: 10px;
}

.index-row {
  background: var(--panel-soft);
  border: 1px solid #e5ebf1;
  border-radius: 6px;
  padding: 12px;
}

.index-row-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.index-label {
  color: #2c3643;
  font-size: 13px;
  font-weight: 700;
}

.index-score {
  font-size: 20px;
  font-weight: 800;
}

.index-row .bar-track {
  height: 8px;
  margin-top: 10px;
}

.commercial .bar-fill {
  background: var(--violet);
}

.activity .bar-fill {
  background: var(--blue);
}

.risk .bar-fill {
  background: var(--red);
}

.explain-box {
  background: #111923;
  border-radius: 8px;
  color: #edf4f8;
  padding: 14px;
}

.explain-box h3 {
  font-size: 15px;
  margin: 0 0 10px;
}

.explain-box p,
.explain-box dd,
.explain-box dt {
  font-size: 13px;
}

.explain-box p {
  color: #c5d0dc;
  line-height: 1.55;
  margin: 0 0 12px;
}

.score-breakdown {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 12px 0;
  padding: 10px 0;
}

.breakdown-grid {
  display: grid;
  gap: 6px;
}

.breakdown-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.breakdown-row span {
  color: #aab8c6;
  font-size: 12px;
}

.breakdown-row strong {
  color: #f7fafc;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.explain-box dl {
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr;
  margin: 0;
}

.explain-box dt {
  color: #91cfc7;
  font-weight: 700;
}

.explain-box dd {
  color: #f7fafc;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.topic-list,
.commercial-list,
.event-list,
.alert-list,
.coverage-body,
.source-health-body,
.source-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.event-list,
.topic-list {
  max-height: 360px;
  min-height: 230px;
  overflow: auto;
  padding-right: 2px;
}

.commercial-list {
  max-height: 190px;
  overflow: auto;
  padding-right: 2px;
}

.topic-item,
.commercial-item,
.event-item,
.alert-item,
.source-health-item,
.source-item {
  background: var(--panel-soft);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  min-width: 0;
  padding: 12px;
}

.topic-top,
.commercial-top,
.event-top,
.alert-top,
.source-health-top,
.source-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.topic-title,
.commercial-title,
.event-title,
.alert-title,
.source-health-title,
.source-title {
  font-size: 14px;
  font-weight: 800;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-summary,
.commercial-summary,
.event-summary,
.alert-reason,
.source-health-summary,
.source-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.topic-badge {
  background: #eef7f2;
  color: var(--green);
}

.commercial-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.commercial-values span {
  background: #edf4ff;
  border-radius: 6px;
  color: #244a86;
  font-size: 12px;
  font-weight: 800;
  min-height: 26px;
  padding: 5px 8px;
}

.commercial-summary-card {
  background: linear-gradient(180deg, #f9fbfd 0%, #f4f7fa 100%);
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  padding: 10px;
}

.commercial-summary-top {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.commercial-summary-top .evidence-button {
  flex: 0 0 auto;
}

.commercial-summary-top > div {
  min-width: 0;
}

.commercial-stats {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin-top: 10px;
}

.commercial-stats div {
  background: var(--panel);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  min-width: 0;
  padding: 7px 8px;
}

.commercial-stats span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.commercial-stats strong {
  display: block;
  font-size: 16px;
  margin-top: 3px;
}

.commercial-mini-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.commercial-mini-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 7px 9px;
}

.commercial-mini-row strong {
  color: #244a86;
  font-size: 12px;
}

.commercial-mini-row span {
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.commercial-detail-section {
  margin-top: 14px;
}

.commercial-detail-section h3 {
  font-size: 14px;
  margin: 0;
}

.commercial-detail-item .commercial-values span {
  font-size: 11px;
}

.event-item.high {
  border-color: #efbbb8;
}

.event-item.medium {
  border-color: #efd59d;
}

.event-meta,
.event-tags {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 6px;
  margin-top: 8px;
}

.event-tag {
  background: #edf1f5;
  border-radius: 999px;
  color: #344252;
  display: inline-flex;
  font-weight: 700;
  min-height: 22px;
  padding: 3px 8px;
}

.event-tag.risk-high {
  background: #fff1f0;
  color: var(--red);
}

.event-tag.risk-medium {
  background: #fff7e8;
  color: var(--amber);
}

.event-tag.risk-low {
  background: #edf4ff;
  color: var(--blue);
}

.event-tag.confidence-high {
  background: #eef7f2;
  color: var(--green);
}

.event-tag.confidence-medium {
  background: #fff7e8;
  color: var(--amber);
}

.event-tag.confidence-low {
  background: #edf4ff;
  color: var(--blue);
}

.topic-badge.negative,
.alert-severity.high {
  background: #fff1f0;
  color: var(--red);
}

.topic-badge.mixed,
.alert-severity.medium {
  background: #fff7e8;
  color: var(--amber);
}

.alert-severity.low {
  background: #edf4ff;
  color: var(--blue);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.source-link {
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.event-tag.source-kind {
  background: #edf1f5;
  color: #344252;
}

.evidence-source-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.coverage-block {
  display: grid;
  gap: 10px;
}

.coverage-row {
  display: grid;
  gap: 6px;
}

.coverage-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.coverage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coverage-tag {
  background: #edf1f5;
  border-radius: 999px;
  color: #344252;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 24px;
  padding: 4px 8px;
}

.coverage-tag.enabled {
  background: #eef7f2;
  color: var(--green);
}

.coverage-tag.candidate {
  background: #edf4ff;
  color: var(--blue);
}

.coverage-tag.missing {
  background: #fff1f0;
  color: var(--red);
}

.coverage-tag.type {
  background: #f3eef8;
  color: var(--violet);
}

.coverage-tag.empty-tag {
  background: #f3f5f7;
  color: var(--muted);
}

.coverage-note {
  background: #f7f9fb;
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
}

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

.source-health-stat {
  background: var(--panel-soft);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  min-width: 0;
  padding: 10px;
}

.source-health-stat span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
}

.source-health-stat strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.source-health-item.failed {
  border-color: #f1c2bf;
}

.source-health-item.skipped {
  border-color: #efd59d;
}

.source-health-item.coverage-gap {
  border-color: #d7c7eb;
}

.source-health-samples {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.evidence-button {
  background: #111923;
  border: 1px solid #263340;
  border-radius: 6px;
  color: #f7fafc;
  cursor: pointer;
  font-size: 12px;
  min-height: 26px;
  padding: 4px 9px;
}

.evidence-button:hover {
  background: #1c2733;
}

body.drawer-open {
  overflow: hidden;
}

.drawer-backdrop {
  background: rgba(17, 25, 35, 0.36);
  inset: 0;
  position: fixed;
  z-index: 30;
}

.drawer-backdrop[hidden],
.evidence-drawer[hidden],
.admin-backdrop[hidden],
.admin-panel[hidden] {
  display: none !important;
}

.admin-backdrop {
  background: rgba(17, 25, 35, 0.36);
  inset: 0;
  position: fixed;
  z-index: 30;
}

.evidence-drawer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(17, 25, 35, 0.22);
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100vh - 24px);
  max-width: calc(100vw - 24px);
  position: fixed;
  right: 12px;
  top: 12px;
  width: min(560px, calc(100vw - 24px));
  z-index: 40;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(17, 25, 35, 0.22);
  display: grid;
  grid-template-rows: auto 1fr;
  height: calc(100vh - 24px);
  left: 12px;
  max-width: calc(100vw - 24px);
  position: fixed;
  top: 12px;
  width: min(480px, calc(100vw - 24px));
  z-index: 41;
}

.drawer-head {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 16px;
}

.drawer-head h2 {
  font-size: 20px;
  line-height: 1.25;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.icon-button {
  align-items: center;
  background: #edf1f5;
  border: 1px solid #d7e0e9;
  border-radius: 999px;
  color: #2c3643;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 20px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.icon-button:hover {
  background: #e3eaf1;
}

.drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
}

.admin-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
}

.admin-section {
  background: var(--panel-soft);
  border: 1px solid #e3eaf1;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.admin-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.admin-section h3 {
  font-size: 15px;
  margin: 0;
}

.admin-field {
  display: grid;
  gap: 6px;
}

.admin-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  min-width: 0;
  outline: none;
  padding: 9px 10px;
  width: 100%;
}

.admin-field textarea {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

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

.admin-light-button {
  background: #ffffff;
  color: #2c3643;
}

.cookie-status-list {
  display: grid;
  gap: 6px;
}

.cookie-status-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  min-height: 34px;
  padding: 7px 9px;
}

.cookie-status-row span {
  font-size: 13px;
  font-weight: 800;
}

.cookie-status-row strong {
  color: var(--muted);
  font-size: 12px;
}

.cookie-status-row strong.configured {
  color: var(--green);
}

.evidence-overview {
  border-bottom: 1px solid #edf1f5;
  padding-bottom: 12px;
}

.evidence-overview p {
  color: #2c3643;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  overflow-wrap: anywhere;
}

.evidence-facts {
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr;
  margin: 12px 0 0;
}

.evidence-facts dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.evidence-facts dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.evidence-item {
  background: var(--panel-soft);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  padding: 12px;
}

.evidence-item-head {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.evidence-title-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.evidence-title-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

.evidence-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.evidence-summary {
  color: #2c3643;
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 0 0;
  max-height: 12em;
  overflow: auto;
  overflow-wrap: anywhere;
  padding-right: 2px;
}

.system-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.system-row {
  align-items: center;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  justify-content: space-between;
  min-height: 34px;
}

.system-row:last-child {
  border-bottom: 0;
}

.system-row span:first-child {
  color: var(--muted);
  font-size: 12px;
}

.system-row span:last-child {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.status-panel .system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-panel .system-row {
  align-content: start;
  background: var(--panel-soft);
  border: 1px solid #e3eaf1;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 8px;
}

.status-panel .system-row span:first-child,
.status-panel .system-row span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-panel .system-row span:last-child {
  text-align: left;
}

.health-dot {
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(46, 125, 87, 0.12);
  height: 11px;
  width: 11px;
}

.health-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(195, 64, 63, 0.12);
}

.source-item {
  display: grid;
  gap: 7px;
}

.source-item.failed {
  border-color: #f1c2bf;
}

.source-item.skipped {
  border-color: #efd59d;
}

.empty {
  align-items: center;
  border: 1px dashed #cbd5df;
  border-radius: 6px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  justify-content: center;
  min-height: 92px;
  padding: 14px;
  text-align: center;
}

.toast {
  background: #111923;
  border-radius: 8px;
  bottom: 18px;
  box-shadow: var(--shadow);
  color: #f7fafc;
  font-size: 13px;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1500px) {
  .dashboard-grid {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

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

  .diagnostics-band {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .signal-workspace {
    grid-template-columns: 1fr;
  }

  .signal-workspace .commercial-panel {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .shell {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .button {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .button.primary {
    grid-column: 1 / -1;
  }

  .dashboard-grid,
  .focus-layout,
  .signal-workspace,
  .side-column,
  .diagnostics-band,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .main-column {
    order: 1;
  }

  .game-rail {
    order: 2;
  }

  .side-column {
    order: 3;
  }

  .diagnostics-band {
    order: 4;
  }

  .diagnostics-head {
    align-items: stretch;
    flex-direction: column;
  }

  .diagnostic-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnostic-tab {
    padding: 0 8px;
  }

  .metric-strip {
    grid-auto-columns: minmax(150px, 58%);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .metric {
    min-height: 104px;
    scroll-snap-align: start;
  }

  .game-rail {
    height: auto;
    min-height: 0;
  }

  .game-list {
    max-height: 420px;
  }

  .evidence-drawer {
    border-radius: 8px 8px 0 0;
    height: calc(100vh - 10px);
    max-width: 100vw;
    right: 0;
    top: 10px;
    width: 100vw;
  }

  .admin-panel {
    border-radius: 8px 8px 0 0;
    height: calc(100vh - 10px);
    left: 0;
    max-width: 100vw;
    top: 10px;
    width: 100vw;
  }
}
