:root {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273449;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #52b2f7;
  --accent: #e95d2a;
  --ok: #16a085;
  --degraded: #f59e0b;
  --down: #ef4444;
  --unknown: #64748b;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 18px;
  letter-spacing: 0.2px;
}
.brand-tagline {
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: normal;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.overall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.overall .label {
  font-weight: 500;
  font-size: 14px;
}

/* Traffic-light dot */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.2);
  flex-shrink: 0;
}
.dot-operational { background: var(--ok);       box-shadow: 0 0 0 2px rgba(22, 160, 133, 0.25); }
.dot-degraded    { background: var(--degraded); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
.dot-down        { background: var(--down);     box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25); }
.dot-unknown     { background: var(--unknown);  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.25); }

/* Environment cards */
.envs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 32px 0;
}
@media (min-width: 720px) {
  .envs { grid-template-columns: 1fr 1fr 1fr; }
  /* The public page deliberately publishes only one tile
     (prod). If we ever expand to multiple tiles on a private
     dashboard, drop the .envs-single override below to restore
     the multi-column grid. */
  .envs-single { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

.env-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 150ms ease;
}
.env-card:hover { background: var(--bg-card-hover); }

.env-card .env-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.env-card .env-name {
  font-weight: 600;
  font-size: 16px;
}
.env-card .env-url {
  color: var(--text-muted);
  font-size: 12px;
  word-break: break-all;
}

.env-card .status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.checks .check {
  display: flex;
  align-items: center;
  gap: 6px;
}
.checks .dot {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

.env-card .latency {
  font-size: 12px;
  color: var(--text-muted);
}

/* Legend */
.legend {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}
.legend h2 {
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 600;
}
.legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 720px) {
  .legend ul { grid-template-columns: 1fr 1fr; }
}

.meta {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin: 16px 0 48px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 0 32px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}
