:root {
  color-scheme: light;
  --paper: #eef2ef;
  --panel: #ffffff;
  --ink: #17241f;
  --muted: #64736c;
  --line: #d7dfda;
  --green: #23734f;
  --green-soft: #e2f1e8;
  --blue: #287c85;
  --blue-soft: #e3f1f1;
  --orange: #bf603d;
  --orange-soft: #f7e9e2;
  --red: #b63d36;
  --red-soft: #f8e6e3;
  --shadow: 0 16px 42px rgba(27, 47, 38, 0.06);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(40, 73, 56, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 73, 56, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 14px;
}

button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.page-shell {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 36, 31, 0.18);
}

.wordmark, .topbar-meta, .live-indicator { display: flex; align-items: center; }
.wordmark { gap: 11px; font-size: 12px; font-weight: 750; }
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 6px 6px 6px 1px;
  font-family: Georgia, serif;
  font-size: 17px;
}
.brand-divider { padding: 0 4px; color: var(--orange); }
.topbar-meta { gap: 20px; color: var(--muted); font-size: 12px; }
.live-indicator { gap: 7px; color: var(--green); font-size: 10px; font-weight: 800; }
.live-indicator span, .status-light, .service-row::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.live-indicator span { background: #42a76d; box-shadow: 0 0 0 4px rgba(66, 167, 109, 0.12); }

main { padding: 44px 0 30px; }
.overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 32px;
  animation: arrive 420ms ease-out both;
}
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; line-height: 1.1; font-weight: 700; }
h2 { margin: 0; font-size: 21px; line-height: 1.2; }
h3 { margin: 0 0 5px; font-size: 14px; font-weight: 700; }
.overall-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 700;
}
.overall-status[data-state="online"] { color: var(--green); border-color: #b7d9c4; background: var(--green-soft); }
.overall-status[data-state="unavailable"] { color: var(--red); border-color: #e5bfbb; background: var(--red-soft); }
.status-light { background: currentColor; }

.status-section { margin: 0 0 30px; animation: arrive 500ms ease-out both; }
.game-section { animation-delay: 80ms; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 13px;
  border-bottom: 1px solid var(--ink);
}
.section-note { color: var(--muted); font-size: 11px; }
.service-list { background: var(--panel); box-shadow: var(--shadow); }
.minecraft-endpoints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.minecraft-endpoint {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
}
.minecraft-endpoint + .minecraft-endpoint { border-left: 1px solid var(--line); }
.endpoint-name { overflow: hidden; }
.endpoint-name p { overflow-wrap: anywhere; }
.endpoint-result { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.endpoint-players { color: var(--muted); font-size: 11px; white-space: nowrap; }
.endpoint-players b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.service-row {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.service-name p { margin: 0; color: var(--muted); font-size: 11px; }
.service-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}
.edge { color: var(--green); background: var(--green-soft); }
.dns { color: var(--blue); background: var(--blue-soft); }
.backend { color: #6b5c29; background: #f2eedc; }
.proxy { color: var(--orange); background: var(--orange-soft); }
.service-result { min-width: 180px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.state-pill {
  min-width: 78px;
  padding: 5px 8px;
  border-radius: 3px;
  color: var(--muted);
  background: #edf0ee;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}
.state-pill[data-state="online"] { color: var(--green); background: var(--green-soft); }
.state-pill[data-state="unavailable"] { color: var(--red); background: var(--red-soft); }
.service-detail { color: var(--muted); font-size: 11px; }
.host-label { white-space: nowrap; }

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 2px 10px;
  color: var(--muted);
  font-size: 10px;
}
.page-footer > span:first-child { color: var(--ink); font-weight: 800; }
.page-footer button {
  padding: 8px 11px;
  border: 1px solid #aebbb3;
  border-radius: 3px;
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
}
.page-footer button:hover { border-color: var(--green); color: var(--green); }
.page-footer button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; scroll-behavior: auto !important; } }

@media (max-width: 640px) {
  .page-shell { width: min(100% - 28px, 520px); }
  .topbar { min-height: 64px; }
  .topbar-meta { align-items: flex-end; flex-direction: column; gap: 5px; font-size: 10px; }
  .wordmark { gap: 8px; font-size: 10px; }
  .brand-mark { width: 27px; height: 27px; }
  main { padding-top: 34px; }
  .overview { align-items: flex-start; flex-direction: column; padding-bottom: 26px; }
  h1 { font-size: 30px; }
  .service-row { min-height: 76px; padding: 13px 12px; gap: 10px; }
  .minecraft-endpoints { grid-template-columns: 1fr; }
  .minecraft-endpoint { padding: 13px 12px; }
  .minecraft-endpoint + .minecraft-endpoint { border-top: 1px solid var(--line); border-left: 0; }
  .service-name { gap: 10px; }
  .service-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .service-result { min-width: 110px; }
  .service-detail { font-size: 10px; }
  .page-footer { flex-wrap: wrap; }
}

@media (max-width: 390px) {
  .service-row { align-items: flex-start; flex-direction: column; }
  .minecraft-endpoint { align-items: flex-start; flex-direction: column; }
  .endpoint-result { width: 100%; padding-left: 44px; align-items: flex-start; flex-direction: row; justify-content: space-between; }
  .service-result { width: 100%; padding-left: 44px; align-items: flex-start; }
  .service-result:has(.metrics) { flex-direction: row; align-items: center; justify-content: space-between; padding-left: 44px; }
  .section-note { font-size: 10px; text-align: right; }
}