:root {
  --ink: #2c3e50;
  --muted: #6b7c8a;
  --line: #d9e2ec;
  --bg: #ffffff;
  --accent: #1f6f8b;
  --ok: #2f9e44;
  --err: #e03131;
  --card: #f8fafb;
  --link: #1f6f8b;
  --edge-tint: rgba(31, 111, 139, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef2;
    --muted: #9aabb6;
    --line: #2a3a45;
    --bg: #121a20;
    --accent: #3d9fbd;
    --ok: #51cf66;
    --err: #ff6b6b;
    --card: #1a242c;
    --link: #5eb8d4;
    --edge-tint: rgba(61, 159, 189, 0.14);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--link);
}

.wrap {
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.brand {
  display: block;
  width: min(11rem, 55vw);
  height: auto;
  margin: 0 0 1.75rem;
}

.header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.error-code,
.host,
.timestamp,
.edge-note {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.edge-note {
  margin-bottom: 1.75rem;
  font-size: 0.85rem;
}

.status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0 0 2rem;
  border: 1px solid var(--line);
  background: var(--card);
}

.status-item {
  position: relative;
  padding: 1.1rem 1rem 1.15rem;
  text-align: center;
}

.status-item + .status-item {
  border-left: 1px solid var(--line);
}

.status-item + .status-item::before {
  content: "";
  position: absolute;
  left: -0.7rem;
  top: 50%;
  width: 1.35rem;
  height: 3px;
  background: var(--accent);
  opacity: 0.35;
  transform: translateY(-50%);
  z-index: 1;
}

.status-item + .status-item::after {
  content: "";
  position: absolute;
  left: -0.2rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  opacity: 0.45;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 2;
}

.status-item-edge {
  background: var(--edge-tint);
}

.who {
  display: block;
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.label {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge img {
  width: 0.85rem;
  height: 0.85rem;
}

.badge-ok {
  color: var(--ok);
  background: rgba(47, 158, 68, 0.12);
}

.badge-accent {
  color: var(--accent);
  background: rgba(31, 111, 139, 0.14);
}

.badge-err {
  color: var(--err);
  background: rgba(224, 49, 49, 0.12);
}

.section {
  margin: 0 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.section p {
  margin: 0 0 0.65rem;
  color: var(--ink);
  max-width: 42rem;
}

.section p:last-child {
  margin-bottom: 0;
}

.primary-action {
  font-size: 1.02rem;
  font-weight: 500;
}

.owner {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.owner summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
}

.owner p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

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

.footer .sep {
  margin: 0 0.35rem;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .status {
    grid-template-columns: 1fr;
  }

  .status-item + .status-item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .status-item + .status-item::before,
  .status-item + .status-item::after {
    display: none;
  }
}
