:root {
  color-scheme: dark;
  --bg: #07090d;
  --surface: rgba(15, 21, 31, 0.92);
  --surface-soft: rgba(23, 31, 44, 0.96);
  --text: #e8edf4;
  --muted: #9aa8b8;
  --line: rgba(137, 154, 178, 0.2);
  --line-strong: rgba(126, 224, 203, 0.36);
  --accent: #7ee0cb;
  --accent-alt: #89b4ff;
  --ok: #3ddc84;
  --info: #7cc7ff;
  --warning: #f8c35c;
  --critical: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 213, 181, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(137, 180, 255, 0.13), transparent 34rem),
    linear-gradient(180deg, #080b11 0%, #07090d 44%, #090d13 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

.topbar,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 24px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: 36px;
  font-weight: 850;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

.actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 21, 31, 0.76);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.actions a:hover {
  border-color: var(--line-strong);
  background: rgba(23, 31, 44, 0.9);
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 21, 31, 0.96), rgba(12, 17, 24, 0.88));
  box-shadow: var(--shadow);
}

.summary h2 {
  font-size: 30px;
}

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

.status {
  min-width: 118px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #07100e;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.status-loading {
  background: #91a0b2;
}

.status-ok {
  background: var(--ok);
}

.status-info {
  background: var(--info);
}

.status-warning {
  background: var(--warning);
}

.status-critical {
  background: var(--critical);
}

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

.metric {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 22px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.report,
.sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.18);
}

.report {
  min-width: 0;
  padding: 28px;
}

.sidebar {
  padding: 22px;
}

.sidebar h2 {
  font-size: 20px;
}

.archives {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.archives a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.archives a:hover {
  border-color: var(--line-strong);
}

.markdown {
  min-height: 220px;
}

.markdown h1 {
  margin-bottom: 18px;
  font-size: 30px;
}

.markdown h2 {
  margin: 28px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 23px;
}

.markdown h3 {
  margin: 22px 0 10px;
  color: var(--accent-alt);
  font-size: 18px;
}

.markdown p,
.markdown ul,
.markdown ol,
.markdown table {
  margin: 0 0 16px;
}

.markdown table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: anywhere;
}

.markdown th,
.markdown td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown th,
.markdown td:first-child {
  background: rgba(126, 224, 203, 0.06);
}

.markdown code {
  padding: 2px 5px;
  border: 1px solid rgba(126, 224, 203, 0.18);
  border-radius: 4px;
  background: rgba(126, 224, 203, 0.08);
  color: var(--accent);
}

.markdown pre {
  overflow-x: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #05070a;
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 107, 0.42);
  border-radius: 6px;
  background: rgba(255, 107, 107, 0.12);
  color: #ffc9c9;
}

.hidden {
  display: none;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 36px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 900px) {
  .topbar,
  .summary,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .layout {
    grid-template-columns: 1fr;
  }

  .summary h2 {
    font-size: 25px;
  }
}

@media (max-width: 560px) {
  .topbar,
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

  .summary,
  .report,
  .sidebar,
  .metric {
    padding: 16px;
  }

  h1 {
    font-size: 29px;
  }
}
