:root {
  --ground: #0e1420;
  --surface: #151d2b;
  --line: #253141;
  --line-soft: #1c2534;
  --text: #dde5f0;
  --muted: #7e8da3;
  --ok: #3fb984;
  --warn: #e0a03a;
  --down: #e05b49;
  --idle: #2c384a;
  --link: #6e9be8;
  --sans: ui-sans-serif, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --edge: 6px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  margin: 0;
  padding: 0 1.5rem 5rem;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main,
.masthead,
.footer {
  max-width: 60rem;
  margin: 0 auto;
}

a {
  color: var(--link);
  text-decoration-color: rgba(110, 155, 232, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border-radius: var(--edge);
}

/* Masthead */

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 2rem 0 1.25rem;
}

.wordmark {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 620;
  letter-spacing: 0.14em;
}

.wordmark span {
  margin-left: 0.55rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.masthead-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

/* Verdict */

.verdict {
  padding: 2.5rem 0 2.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.verdict-mark {
  margin: 0 0 1.1rem;
}

.verdict-mark .dot {
  width: 13px;
  height: 13px;
}

.verdict-text {
  margin: 0;
  font-size: clamp(1.85rem, 5.4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.12;
  max-width: 20ch;
}

.verdict-meta {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.verdict-meta time {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--text);
}

/* Status dots */

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--idle);
  vertical-align: baseline;
}

.state-up .dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(63, 185, 132, 0.16);
}

.state-degraded .dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(224, 160, 58, 0.16);
}

.state-down .dot {
  background: var(--down);
  box-shadow: 0 0 0 4px rgba(224, 91, 73, 0.18);
  animation: breathe 2.4s ease-in-out infinite;
}

.state-unknown .dot {
  background: var(--idle);
  box-shadow: 0 0 0 4px rgba(44, 56, 74, 0.35);
}

@keyframes breathe {
  50% {
    box-shadow: 0 0 0 8px rgba(224, 91, 73, 0.06);
  }
}

/* Groups and rows */

.group {
  padding: 2.75rem 0 0.5rem;
}

.group-head {
  margin-bottom: 1.25rem;
}

.group-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.group-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 56ch;
}

.row {
  padding: 1.15rem 0 1.25rem;
  border-top: 1px solid var(--line-soft);
}

.row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.row-id {
  min-width: 0;
}

.row-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 550;
}

.row-host {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.row-blurb {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 54ch;
}

.row-state {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.row-latency {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.slots {
  display: flex;
  gap: 2px;
  height: 24px;
  margin-top: 1rem;
}

.slot {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 1px;
  background: var(--idle);
}

.slot-up {
  background: var(--ok);
}

.slot-degraded {
  background: var(--warn);
}

.slot-down {
  background: var(--down);
}

.slot-unknown {
  background: var(--line-soft);
}

.row-foot span:last-child {
  margin-left: auto;
}

.row-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

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

/* Incidents */

.empty {
  margin: 0;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  max-width: 58ch;
}

.incidents {
  margin: 0;
  padding: 0;
  list-style: none;
}

.incident {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid var(--line-soft);
}

.incident .dot {
  margin-top: 0.55rem;
  flex-shrink: 0;
}

.incident-title {
  margin: 0;
  font-size: 0.95rem;
}

.incident-meta {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Agents */

.agents {
  margin-top: 3.25rem;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--edge);
}

.agents-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.agents p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
  font-size: 0.92rem;
}

.snippet {
  margin: 1.1rem 0 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
}

/* Footer */

.footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.footer p {
  margin: 0 0 0.6rem;
  max-width: 62ch;
}

.footer-meta time {
  font-family: var(--mono);
  font-size: 0.78rem;
}

@media (max-width: 34rem) {
  body {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .row-state {
    order: 3;
    width: 100%;
  }

  .row-foot span:last-child {
    margin-left: 0;
  }

  .slots {
    height: 30px;
  }

  .agents {
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
