:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #111418;
  --panel-strong: #171b21;
  --text: #f4f7fb;
  --muted: #9da8b6;
  --line: #28303a;
  --accent: #78c7ff;
  --accent-strong: #d7f0ff;
  --good: #43d17a;
  --warn: #d7a54b;
  --bad: #ff665d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button {
  font: inherit;
}

a {
  color: var(--accent-strong);
  font-weight: 800;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero-copy,
.status-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.hero-copy {
  min-width: 0;
  padding: 28px;
}

.brand-logo {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1014;
}

.eyebrow {
  margin: 22px 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1rem;
}

h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.lede {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-top: 24px;
}

.status-panel {
  padding: 22px;
}

.status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 5px rgb(215 165 75 / 14%);
}

.dot.online {
  background: var(--good);
  box-shadow: 0 0 0 5px rgb(67 209 122 / 14%);
}

.dot.offline {
  background: var(--bad);
  box-shadow: 0 0 0 5px rgb(255 102 93 / 14%);
}

.status-stats {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.status-stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.status-stats span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.status-stats em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 800;
}

.status-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.status-meta + .status-meta {
  margin-top: 4px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  min-width: 0;
  padding: 22px;
}

.address,
.map-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #35414d;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
}

.address {
  width: 100%;
  justify-content: space-between;
  cursor: pointer;
}

.address span:first-child {
  overflow-wrap: anywhere;
  font-weight: 900;
}

.address span:last-child,
.map-button {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.install-card,
.leaderboard-card {
  grid-column: 1 / -1;
}

.card-heading {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-heading h2,
.card-heading .motd {
  margin-bottom: 0;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.metric-list div {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-weight: 900;
}

.metric-list dd {
  font-size: 1.02rem;
}

.muted-link[aria-disabled="true"] {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.motd {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.55;
}

.players {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.players li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255 255 255 / 3%);
  color: var(--muted);
}

.leaderboard-wrap {
  overflow-x: auto;
}

.leaderboard {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  text-align: left;
}

.leaderboard th,
.leaderboard td {
  padding: 12px 10px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.leaderboard thead th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.leaderboard tbody th {
  color: var(--text);
  font-weight: 900;
}

.leaderboard tbody td {
  color: var(--muted);
  font-weight: 800;
}

.steps {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.7;
}

.steps li {
  padding-left: 4px;
}

@media (max-width: 900px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .map-button {
    width: 100%;
  }

  .card-heading {
    display: block;
  }

  .card-heading h2 {
    margin-bottom: 12px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding: 18px 0;
  }

  .hero-copy,
  .status-panel,
  .card {
    padding: 18px;
  }

  .brand-logo {
    width: 82px;
    height: 82px;
  }

  .metric-list {
    grid-template-columns: 1fr;
  }
}
