:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #0b0f14;
  color: #eef4f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 30rem),
    linear-gradient(135deg, #0b0f14 0%, #111820 48%, #141b17 100%);
}

a {
  color: inherit;
}

button,
a {
  font: inherit;
}

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

.status-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(12, 18, 24, 0.86);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(28px, 5vw, 58px);
}

.eyebrow {
  margin: 0;
  color: #82d4b8;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.92;
}

.lede {
  max-width: 34rem;
  color: #b8c5cb;
  font-size: 1.05rem;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.actions button,
.actions a {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #eef4f8;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.actions button {
  background: #26a56f;
  border-color: #35c486;
  color: #06120d;
  font-weight: 800;
}

#edgeCanvas {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  background: #071117;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.metrics article,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(10, 16, 22, 0.78);
}

.metrics article {
  min-height: 108px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metrics span,
.panel-heading span {
  color: #8fa0aa;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metrics strong {
  font-size: clamp(1.35rem, 3vw, 2rem);
  overflow-wrap: anywhere;
}

.metrics strong.online {
  color: #64e5aa;
}

.metrics strong.offline {
  color: #ff8f70;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.panel {
  min-height: 260px;
  padding: 20px;
}

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

h2 {
  font-size: 1.05rem;
}

pre {
  min-height: 170px;
  margin: 0;
  padding: 16px;
  border-radius: 6px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.06);
  color: #d9e7ec;
  line-height: 1.55;
  white-space: pre-wrap;
}

.sparkline {
  display: grid;
  grid-template-columns: repeat(24, minmax(4px, 1fr));
  align-items: end;
  gap: 5px;
  height: 180px;
  padding-top: 18px;
}

.sparkline span {
  min-height: 10px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #7ce8c0, #237e62);
}

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

  .status-band,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .status-band {
    min-height: 0;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  #edgeCanvas {
    min-height: 260px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .actions a,
  .actions button {
    width: 100%;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
