:root {
  --bg0: #0e1210;
  --bg1: #161c18;
  --bg2: #1e2820;
  --line: #2a3830;
  --ink: #e6efe6;
  --muted: #8fa396;
  --accent: #c6f135;
  --accent-dim: #7a9428;
  --warn: #e8b15a;
  --down: #d4675a;
  --up: #6dcc8a;
  --mono: "IBM Plex Mono", "JetBrains Mono", "Cascadia Code", ui-monospace, monospace;
  --sans: "IBM Plex Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1a2a18 0%, transparent 55%),
    linear-gradient(180deg, var(--bg0), #0a0d0b 100%);
  color: var(--ink);
  font-family: var(--sans);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    #000 2px,
    #000 3px
  );
}

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
}

.brand h1 {
  margin: 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand h1 span {
  color: var(--accent);
}

.brand p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 36rem;
  font-size: 0.98rem;
}

.meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: right;
}

.meta strong {
  color: var(--accent);
  font-weight: 500;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

input[type="search"] {
  flex: 1 1 220px;
  background: var(--bg1);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--accent-dim);
}

.chip {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  padding: 0.65rem 0.8rem;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  color: var(--bg0);
  background: var(--accent);
  border-color: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  border: 1px solid var(--line);
  padding: 1rem 1rem 0.9rem;
  text-decoration: none;
  color: inherit;
  min-height: 148px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: start;
}

.card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge.up { color: var(--up); border-color: #2f5a3e; }
.badge.down { color: var(--down); border-color: #5a2f2f; }
.badge.partial { color: var(--warn); border-color: #5a4a2f; }
.badge.unknown { color: var(--warn); border-color: #5a4a2f; }

.meta .up { color: var(--up); }
.meta .down { color: var(--down); }

.embedded {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.embedded li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.embedded .dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--down);
  flex: 0 0 auto;
}

.embedded li.up .dot { background: var(--up); }
.embedded li.up { color: var(--ink); }
.embedded li.unknown .dot { background: var(--warn); }

.embedded.checks {
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--line);
}

.card footer .detail {
  flex-basis: 100%;
  color: var(--down);
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  flex: 1;
}

.card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-dim);
}

.card footer .port {
  color: var(--ink);
}

.empty {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.note code {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.card {
  animation: fade-in 280ms ease both;
}

.card:nth-child(2) { animation-delay: 40ms; }
.card:nth-child(3) { animation-delay: 80ms; }
.card:nth-child(4) { animation-delay: 120ms; }
.card:nth-child(5) { animation-delay: 160ms; }
