:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #5d6872;
  --line: #d8dee5;
  --ok: #167347;
  --ok-bg: #e5f4ec;
  --warn: #9a6500;
  --warn-bg: #fff2cc;
  --fail: #b42318;
  --fail-bg: #fde7e5;
  --unknown: #59636e;
  --unknown-bg: #e9edf1;
  --link: #075985;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

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

.tab {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab.is-active {
  border-color: var(--link);
  color: var(--link);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.card,
.content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  padding: 14px;
  min-height: 104px;
}

.content-panel {
  padding: 16px;
}

.card h3,
.section-title {
  margin: 0 0 8px;
  font-size: 16px;
}

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

.small {
  font-size: 12px;
  line-height: 1.35;
  margin-top: 4px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 800;
  font-size: 13px;
}

.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); }
.status-fail { background: var(--fail-bg); color: var(--fail); }
.status-unknown { background: var(--unknown-bg); color: var(--unknown); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

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

.row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.incident-row {
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 2fr) auto auto;
}

.evidence-card {
  margin-top: 12px;
}

.evidence-row {
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 2fr) auto auto;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.small-button {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--link);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

a.small-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.small-button:disabled {
  cursor: default;
  opacity: 0.55;
}

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

a.button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--link);
  text-decoration: none;
  font-weight: 700;
  background: #fff;
}

pre {
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  font-size: 12px;
}

@media (max-width: 640px) {
  .shell { padding: 14px; }
  .topbar { flex-direction: column; }
  h1 { font-size: 24px; }
  .row { grid-template-columns: 1fr; }
  .incident-row { grid-template-columns: 1fr; }
  .evidence-row { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
}
