:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-muted: #6a6a6a;
  --brand: #0066cc;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --stale: #6b7280;
  --unknown: #94a3b8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-card: #181c22;
    --border: #2a2f37;
    --text: #e9edf2;
    --text-muted: #9aa3ad;
  }
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  gap: 16px;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-logo img {
  height: 28px;
  width: 28px;
}
.topbar-title {
  font-weight: 600;
  font-size: 15px;
}
.tabs {
  display: flex;
  gap: 4px;
}
.tab {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  font-size: 13px;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--brand);
  background: rgba(0, 102, 204, 0.08);
}
.topbar-right {
  display: flex;
  gap: 12px;
}
.topbar-link {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.topbar-link:hover {
  color: var(--brand);
}

.tab-content {
  display: none;
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.tab-content.active {
  display: block;
}

.overview-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px 22px;
  margin-bottom: 18px;
}
.overview-section h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}
.overview-lede {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 13px;
}
.overview-lede code {
  font-size: 12px;
}
code {
  background: rgba(127, 127, 127, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-family:
    "SF Mono",
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 0.9em;
}

.decisions-list {
  margin: 0;
  padding-left: 1.4rem;
}
.decisions-list li {
  margin: 0.55em 0;
}
.decisions-list li.loading {
  list-style: none;
  margin-left: -1.4rem;
  color: var(--text-muted);
  font-style: italic;
}
.meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.status-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-card .status-line {
  font-size: 13px;
  color: var(--text-muted);
}
.status-card .status-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 6px;
}
.status-card a {
  color: var(--brand);
  text-decoration: none;
  font-size: 12px;
}
.status-card a:hover {
  text-decoration: underline;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.ok {
  background: var(--ok);
}
.dot.degraded {
  background: var(--warn);
}
.dot.outage {
  background: var(--err);
}
.dot.stale {
  background: var(--stale);
}
.dot.unknown {
  background: var(--unknown);
}

.catalog-pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 70vh;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.content-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.content-link {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 13px;
}
.content-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.content-view {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  max-height: 60vh;
  overflow: auto;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
