:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #182b37;
  background: #eef3f6;
  --muted: #4a606e;
  --border: #cbd7dd;
  --action: #175a67;
  --danger: #8e3036;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem max(1rem, calc((100% - 70rem) / 2)); background: #163848; color: #fff;
}
.topbar strong { display: inline-block; margin-right: 0.75rem; font-size: 1.25rem; }
.topbar span { color: #d9e8ee; }
h1, h2, h3, p { margin: 0 0 0.75rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.45rem, 4vw, 2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
button, input, select, textarea { font: inherit; }
button {
  min-height: 2.75rem; padding: 0.45rem 0.8rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--action); border-radius: 0.4rem; background: var(--action); color: #fff;
}
button:hover:not(:disabled) { filter: brightness(0.93); }
button:disabled { cursor: default; opacity: 0.6; }
button.secondary { background: #fff; color: var(--action); border-color: var(--border); }
button.danger { background: #fff; color: var(--danger); border-color: #b77579; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #007e9b; outline-offset: 2px;
}
input, select, textarea {
  min-width: 0; min-height: 2.75rem; padding: 0.5rem; color: inherit;
  background: #fff; border: 1px solid #9aaeb8; border-radius: 0.35rem;
}
textarea { width: 100%; resize: vertical; }
label { display: grid; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.panel { padding: 1rem; border: 1px solid var(--border); border-radius: 0.55rem; background: #fff; min-width: 0; }
.panel + .panel { margin-top: 1rem; }
.login { max-width: 26rem; margin: 6vh auto; }
.login .message:empty { display: none; }
.stack { display: grid; gap: 0.85rem; }
.section-head, .row { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.section-head { justify-content: space-between; margin-bottom: 0.85rem; }
.section-head h1 { margin-bottom: 0; }
.navigation { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.navigation button { flex: 1 0 8rem; background: #fff; color: var(--action); border-color: var(--border); }
.navigation button[aria-current="page"] { color: #fff; background: var(--action); border-color: var(--action); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 0.65rem; margin-bottom: 0.8rem; }
.filters label { flex: 1 1 8rem; }
.filters label.search { flex-basis: 15rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0.75rem; }
.metric strong { display: block; font-size: 1.6rem; }
.message { padding: 0.75rem; border-radius: 0.4rem; background: #e0eef2; margin: 0.75rem 0; }
.message.error { background: #fbe9ea; color: #76272d; }
.muted { color: var(--muted); }
.healthy { color: #1c6a47; }
.unhealthy { color: var(--danger); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; margin-bottom: 0.75rem; }
th, td { text-align: left; padding: 0.55rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 0.875rem; color: var(--muted); }
td { overflow-wrap: anywhere; }
td:first-child { max-width: 20rem; }
td button { margin: 0.1rem; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.45rem 0.75rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
pre {
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 33rem; overflow: auto;
  padding: 0.75rem; background: #edf2f5; border-radius: 0.35rem; font-size: 0.875rem;
}
code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  main { padding-top: 0.95rem; }
  .topbar span { display: block; font-size: 0.875rem; }
  .mobile-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-table, .mobile-table tbody, .mobile-table tr { display: block; }
  .mobile-table tr { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
  .mobile-table td { display: grid; grid-template-columns: minmax(5.5rem, 1fr) 1.6fr; gap: 0.5rem; border: 0; max-width: none; }
  .mobile-table td::before { content: attr(data-label); color: var(--muted); font-size: 0.875rem; }
}
