:root {
  --ink: #162330;
  --muted: #64717d;
  --line: #d9e0e5;
  --surface: #ffffff;
  --canvas: #f5f7f8;
  --navy: #183b56;
  --teal: #0f8b8d;
  --gold: #d69e2e;
  --red: #c84b45;
  --x: #2563a6;
  --y: #d4771d;
  --z: #27835a;
  --magnitude: #20262c;
}

.network-vote-summary { display:flex; justify-content:space-between; gap:18px; align-items:center; padding:14px 16px; margin:14px 0; border:1px solid #cdd9df; background:#f4f8f8; }
.network-vote-summary strong, .network-vote-summary span { display:block; }
.network-vote-summary span { color:#61717e; font-size:.9rem; }
.network-vote-summary[data-state="candidate"] { border-color:#d13b2d; background:#fff1ef; }
.network-vote-summary[data-state="candidate"] strong { color:#b62e24; }
.network-vote-summary[data-state="normal"] { border-color:#43a08a; background:#eef8f5; }
.seedlink-station-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.seedlink-station-card { min-width:0; border:1px solid #d4dee3; background:#fff; padding:12px; }
.seedlink-station-card[data-triggered="true"] { border-color:#d13b2d; box-shadow:inset 4px 0 #d13b2d; }
.station-card-heading { display:flex; justify-content:space-between; gap:12px; }
.station-card-heading strong, .station-card-heading span { display:block; }
.station-card-heading div > span { color:#667784; font-size:.82rem; margin-top:3px; }
.station-live { font-size:.78rem; color:#b84031; font-weight:700; }
.station-live[data-online="true"] { color:#16856b; }
.station-card-actions { display:flex; align-items:flex-end; flex-direction:column; gap:7px; }
.station-events-button { border:1px solid #b9cbd2; border-radius:4px; background:#fff; color:#087f83; font:600 .75rem inherit; padding:6px 9px; cursor:pointer; white-space:nowrap; }
.station-events-button:hover { border-color:#168f92; background:#eef8f8; }
.seedlink-station-card canvas { width:100%; height:150px; display:block; margin:8px 0; }
.station-metrics { display:flex; flex-wrap:wrap; gap:8px 16px; color:#566875; font-size:.78rem; }
.station-events-panel { border-left:4px solid #168f92; }
.station-events-note { color:#637481; font-size:.82rem; margin:13px 0 0; }
.active-event-badge { display:inline-block; margin-left:6px; padding:2px 6px; border-radius:10px; background:#fff0ed; color:#b42f25; font-size:.7rem; font-weight:700; }

@media (max-width:850px) {
  .seedlink-station-grid { grid-template-columns:1fr; }
  .network-vote-summary { align-items:flex-start; flex-direction:column; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button, input, select { font: inherit; }

.app-header {
  min-height: 86px;
  padding: 18px 32px;
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 4px solid var(--gold);
}

h1, h2, p { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; }
h2 { font-size: 16px; line-height: 1.35; }
.eyebrow { font-size: 10px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.app-header .eyebrow { color: #8bd6d1; }

.connection {
  min-width: 124px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 600;
}

.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #94a3ad; }
.connection[data-state="online"] .status-dot { background: #55c48c; }
.connection[data-state="offline"] .status-dot { background: #ef7b72; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 28px 36px; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
}

.metric { padding: 17px 20px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.metric strong { font-size: 25px; font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); margin-left: 4px; }
.metric.magnitude { background: #f1f7f6; }

.warning-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(190px, 1fr) 120px 72px minmax(190px, 0.9fr);
  gap: 20px;
  align-items: center;
  margin-top: 20px;
  padding: 17px 20px;
  min-height: 106px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #94a3ad;
}
.warning-panel[data-state="calibrating"] { border-left-color: var(--gold); background: #fffaf0; }
.warning-panel[data-state="armed"] { border-left-color: #27835a; background: #f2f8f5; }
.warning-panel[data-state="event"] { border-color: var(--red); border-left-width: 7px; background: #fff1f0; }
.warning-title-row { display: flex; align-items: center; gap: 8px; }
.warning-title-row h2 { font-size: 19px; }
.warning-indicator { width: 10px; height: 10px; border-radius: 50%; background: #94a3ad; }
.warning-panel[data-state="calibrating"] .warning-indicator { background: var(--gold); }
.warning-panel[data-state="armed"] .warning-indicator { background: #27835a; }
.warning-panel[data-state="event"] .warning-indicator { background: var(--red); box-shadow: 0 0 0 4px rgba(200, 75, 69, 0.16); }
.warning-panel[data-state="event"] .warning-title-row h2 { color: var(--red); }
.warning-detail { min-height: 32px; margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.warning-progress-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.warning-progress-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-track { height: 8px; margin-top: 8px; overflow: hidden; background: #e4e9ec; border-radius: 4px; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width 220ms linear; }
.warning-panel[data-state="armed"] .progress-track span { background: #27835a; }
.warning-panel[data-state="event"] .progress-track span { background: var(--red); }
.warning-metric span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.warning-metric strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.warning-actions { display: grid; grid-template-columns: 1fr 70px; gap: 7px; }
.warning-actions .text-button { grid-column: 1 / -1; width: 100%; }

.health-panel {
  margin-top: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.health-updated { color: var(--muted); font-size: 11px; }
.health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.health-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfcfc;
}
.health-card span,
.health-card small {
  display: block;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.health-card span { margin-bottom: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.health-card strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.health-card small { margin-top: 5px; font-size: 10px; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 20px; }
.chart-panel, .control-panel, .recordings-panel, .recording-plot-panel { background: var(--surface); border: 1px solid var(--line); }
.chart-panel { padding: 20px; min-width: 0; }
.control-panel > section { padding: 20px; border-bottom: 1px solid var(--line); }
.control-panel > section:last-child { border-bottom: 0; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading.compact { margin-bottom: 13px; }
.legend { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 17px; height: 3px; display: inline-block; }
.x-line { background: var(--x); }
.y-line { background: var(--y); }
.z-line { background: var(--z); }
.magnitude-line { background: var(--magnitude); }
.sta-line { background: #e11d48; }

.canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 460px; }
.plotly-live-wrap { aspect-ratio: auto; height: 610px; min-height: 610px; }
.plotly-live-chart { width: 100%; height: 100%; }

.chart-hover-tooltip {
  position: absolute;
  z-index: 20;
  width: max-content;
  max-width: 280px;
  padding: 9px 11px;
  color: white;
  background: rgba(16, 42, 67, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.22);
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.chart-hover-tooltip[hidden] { display: none; }
.chart-hover-tooltip strong,
.chart-hover-tooltip span { display: block; }
.chart-hover-tooltip strong { margin-bottom: 4px; color: white; }
canvas { display: block; width: 100%; height: 100%; }
.seedlink-panel { border-left: 4px solid var(--teal); }
.seedlink-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
  min-height: 220px;
}
.seedlink-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f4;
  font-size: 11px;
  font-weight: 700;
}
.seedlink-status[data-state="online"] { color: #176b47; background: #e5f5ed; }
.seedlink-status[data-state="offline"] { color: #a43a32; background: #faeceb; }
.seedlink-detail { margin: -7px 0 12px; color: var(--muted); font-size: 12px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.chart-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding-top: 8px; }

label { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin: 12px 0 6px; }
input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #b9c4cc;
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: 8px 10px;
}

.button-row { display: grid; grid-template-columns: 1fr 82px; gap: 8px; margin-top: 16px; }
button { min-height: 40px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; font-weight: 650; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
.primary { color: white; background: var(--teal); }
.primary:hover { background: #0b7779; }
.secondary { color: var(--ink); background: white; border-color: #aeb9c1; }
.text-button { min-height: 32px; padding: 4px 10px; color: var(--teal); background: white; border-color: var(--line); }
.record-state { color: var(--muted); font-size: 12px; }
.record-state.active { color: var(--red); font-weight: 700; }
.record-detail { min-height: 30px; margin-top: 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
input[type="range"] { padding: 0; border: 0; accent-color: var(--teal); }
output { text-align: right; font-variant-numeric: tabular-nums; }

.recordings-panel { margin-top: 20px; padding: 20px; }
.header-link {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  padding: 9px 13px;
  text-decoration: none;
  font-weight: 650;
}
.header-nav { display: flex; align-items: center; gap: 8px; }
.ai-page { max-width: 980px; margin: 0 auto; }
.ai-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.ai-intro { margin: 6px 0 0; color: var(--muted); }
.ai-status { color: var(--teal); font-weight: 700; }
.ai-messages {
  height: min(52vh, 520px);
  min-height: 320px;
  margin: 20px 0 12px;
  padding: 16px;
  overflow-y: auto;
  background: #f4f7f8;
  border: 1px solid var(--line);
}
.ai-message { max-width: 82%; margin-bottom: 12px; padding: 12px 14px; border-radius: 8px; }
.ai-message strong { display: block; margin-bottom: 5px; font-size: 12px; }
.ai-message p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.ai-message.assistant { background: white; border-left: 4px solid var(--teal); }
.ai-message.user { margin-left: auto; color: white; background: var(--navy); }
.ai-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ai-examples button { min-height: 32px; padding: 5px 10px; color: var(--teal); background: white; border-color: var(--line); }
.ai-form label { margin-top: 0; }
.ai-input-row { display: grid; grid-template-columns: 1fr 100px; gap: 10px; align-items: stretch; }
.ai-input-row textarea { width: 100%; resize: vertical; }
.ai-input-row button { height: auto; }
.voice-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #f6faf9;
}
.voice-controls p { max-width: 620px; margin: 4px 0 0; color: var(--muted); }
.voice-controls button { min-width: 210px; }

.memory-panel {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.memory-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.memory-heading h2 { margin: 3px 0 4px; }
.memory-heading p { margin: 0; color: var(--muted); }
.memory-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}
.memory-files {
  display: grid;
  gap: 10px;
}
.memory-file {
  border: 1px solid var(--line);
  background: var(--surface-soft);
}
.memory-file summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.memory-file summary span { color: var(--muted); font-size: 0.88rem; }
.memory-file pre {
  margin: 0;
  padding: 16px;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 0.9rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--ink);
}
.memory-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.earthquake-panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.earthquake-heading { align-items: end; }
.earthquake-controls { display: flex; align-items: end; gap: 8px; }
.earthquake-controls label { margin: 0; }
.earthquake-controls select { min-width: 130px; }
.earthquake-controls button { padding: 8px 18px; }
.source-note, .scientific-note { color: var(--muted); font-size: 12px; }
.catalog-summary { margin: 18px 0 10px; font-weight: 700; }
.scientific-note { margin-top: 16px; }
.comparison-panel {
  margin-top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  scroll-margin-top: 16px;
}
.comparison-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 360px;
}
.comparison-canvas-wrap[hidden] {
  display: none;
}
.comparison-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.comparison-metrics div {
  border: 1px solid var(--line);
  padding: 10px;
}
.comparison-metrics strong,
.comparison-metrics span {
  display: block;
}
.comparison-metrics strong { color: var(--muted); font-size: 11px; }
.comparison-metrics span { margin-top: 4px; font-variant-numeric: tabular-nums; }
.injection-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.injection-actions[hidden], .injection-results[hidden] { display: none; }
.injection-results {
  margin-top: 14px;
  border: 1px solid var(--line);
  padding: 14px;
}
.injection-results h3 { margin: 0 0 8px; font-size: 15px; }
.injection-results td:first-child { width: auto; font-family: inherit; }
.injection-results td:last-child { text-align: left; }
.test-pass { color: #16734b; font-weight: 700; }
.test-no { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 12px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
td:first-child { width: 55%; font-family: Consolas, monospace; }
td:last-child { text-align: right; }
.download-link { color: var(--teal); font-weight: 650; text-decoration: none; }
.recording-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.recording-actions .text-button { min-height: 30px; }
.recording-actions .delete-button { color: var(--red); }
.recording-actions .delete-button:hover { border-color: var(--red); background: #fff5f5; }
.empty-row { color: var(--muted); text-align: center !important; font-family: inherit !important; }

.recording-plot-panel { margin-top: 20px; padding: 20px; scroll-margin-top: 16px; }
.recording-plot-heading { align-items: flex-start; }
.plot-summary { margin-top: 5px; color: var(--muted); font-size: 12px; }
.plot-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.plot-actions button { min-width: 104px; padding: 7px 12px; }
.plot-zoom-actions { display: flex; gap: 5px; }
.plot-actions .icon-button {
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}
.recording-legend { display: flex; align-items: center; justify-content: flex-end; gap: 15px; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.recording-legend span { display: flex; align-items: center; gap: 5px; }
.recording-legend i { width: 17px; height: 3px; display: inline-block; }
.recording-canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 360px; }
.phase-evidence {
  margin-top: 16px;
  padding: 16px;
  border-left: 4px solid var(--teal);
  background: #f4faf9;
}
.phase-evidence-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}
.phase-evidence-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  background: white;
}
.phase-evidence-grid span,
.phase-evidence-grid small { display: block; color: var(--muted); font-size: 10px; }
.phase-evidence-grid strong { display: block; margin: 4px 0; font-size: 17px; }

footer {
  min-height: 42px;
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  background: white;
  border-top: 1px solid var(--line);
  font-size: 11px;
}

#continuousText { font-variant-numeric: tabular-nums; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 58px;
  max-width: 360px;
  padding: 11px 14px;
  color: white;
  background: var(--navy);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(22, 35, 48, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.toast.show { opacity: 1; }

@media (max-width: 820px) {
  .app-header { padding: 16px 18px; }
  main { padding: 18px 14px 28px; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .warning-panel { grid-template-columns: 1fr 1fr; }
  .warning-status, .warning-actions { grid-column: 1 / -1; }
  .warning-actions { grid-template-columns: 1fr 90px 110px; }
  .warning-actions .text-button { grid-column: auto; }
  .canvas-wrap { min-height: 480px; aspect-ratio: 4 / 5; }
  .plotly-live-wrap { height: 610px; min-height: 610px; aspect-ratio: auto; }
  footer { padding: 12px 16px; }
}

@media (max-width: 480px) {
  h1 { font-size: 20px; }
  .connection { min-width: auto; }
  .connection span:last-child { display: none; }
  .metric { padding: 14px; }
  .metric strong { font-size: 21px; }
  .warning-panel { grid-template-columns: 1fr; padding: 15px; }
  .warning-status, .warning-actions { grid-column: auto; }
  .warning-actions { grid-template-columns: 1fr 74px; }
  .warning-actions .text-button { grid-column: 1 / -1; }
  .health-grid { grid-template-columns: 1fr; }
  .chart-panel, .control-panel > section, .recordings-panel, .recording-plot-panel { padding: 15px; }
  .section-heading { align-items: flex-start; }
  .recording-plot-heading { flex-direction: column; }
  .plot-actions { width: 100%; }
  .plot-actions button { flex: 1; min-width: 0; }
  .plot-zoom-actions { flex: 0 0 auto; }
  .plot-actions .icon-button { flex: 0 0 38px; }
  .recording-canvas-wrap { min-height: 300px; aspect-ratio: 4 / 5; }
  .phase-evidence-grid { grid-template-columns: 1fr; }
  .header-nav { gap: 4px; }
  .header-link { padding: 7px 8px; font-size: 12px; }
  .ai-panel { padding: 15px; }
  .ai-message { max-width: 94%; }
  .ai-input-row { grid-template-columns: 1fr; }
  .voice-controls { align-items: stretch; flex-direction: column; }
  .memory-heading, .memory-summary, .memory-file summary {
    flex-direction: column;
  }
}
.replay-chart { height: 430px; margin-top: 18px; }
.replay-chart canvas { width: 100%; height: 100%; display: block; }

.audit-page { max-width: 1450px; margin: 0 auto; }
.audit-hero { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 24px; background: white; border: 1px solid var(--line); }
.audit-hero p:last-child { max-width: 850px; color: var(--muted); }
.audit-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border: 1px solid var(--line); background: white; }
.audit-summary article { padding: 18px 20px; border-right: 1px solid var(--line); }
.audit-summary article:last-child { border-right: 0; }
.audit-summary span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.audit-summary strong { display: block; margin-top: 5px; font-size: 23px; }
.audit-controls { display: grid; grid-template-columns: 180px 180px 1fr; gap: 14px; margin-top: 18px; padding: 18px; background: white; border: 1px solid var(--line); }
.audit-controls label { color: var(--muted); font-size: 12px; font-weight: 700; }
.audit-controls select, .audit-controls input { width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); background: white; }
.audit-list { margin-top: 18px; }
.audit-entry { margin-bottom: 10px; border: 1px solid var(--line); border-left: 5px solid var(--teal); background: white; }
.audit-entry.error { border-left-color: #d64545; }
.audit-entry summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 16px 18px; cursor: pointer; }
.audit-entry summary > div { min-width: 0; }
.audit-entry summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-meta { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.audit-badge { flex: 0 0 auto; padding: 5px 9px; color: #08776f; background: #e8f7f4; border-radius: 99px; font-size: 12px; font-weight: 700; }
.audit-entry.error .audit-badge { color: #a32626; background: #fdecec; }
.audit-details { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.audit-detail-row { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-detail-row strong { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.empty-state { padding: 30px; text-align: center; color: var(--muted); background: white; border: 1px solid var(--line); }
.error-text { color: #a32626; }

@media (max-width: 820px) {
  .audit-summary { grid-template-columns: repeat(2, 1fr); }
  .audit-summary article:nth-child(2) { border-right: 0; }
  .audit-controls { grid-template-columns: 1fr 1fr; }
  .audit-search { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .audit-hero { flex-direction: column; }
  .audit-summary, .audit-controls { grid-template-columns: 1fr; }
  .audit-summary article { border-right: 0; border-bottom: 1px solid var(--line); }
  .audit-detail-row { grid-template-columns: 1fr; gap: 4px; }
}
