/* Kamal status page — brand palette pulled from kamal.ai
   navy #002d50 · green #00aa6e · light #f5f5f5 · font DM Sans */
:root {
  --navy: #002d50;
  --green: #00aa6e;
  --accent: #00aa6e;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --border: #e2e6ea;
  --text: #002d50;
  --text-dim: #5b6b7b;
  --ok: #00aa6e;
  --degraded: #e8912d;
  --down: #d94a4a;
  --maint: #2f6fed;
  --radius: 14px;
  --maxw: 860px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.loading { text-align: center; padding: 4rem 1rem; color: var(--text-dim); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 1.75rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand img { height: 30px; width: auto; display: block; }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.header-links { display: flex; gap: 1.5rem; font-size: 0.92rem; align-items: center; }
.header-links a { color: var(--text-dim); text-decoration: none; font-weight: 500; }
.header-links a:hover { color: var(--green); }

/* Overall banner */
.overall {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 45, 80, 0.05);
}
.overall .dot { width: 15px; height: 15px; flex: 0 0 15px; }
.overall-text { font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.overall-sub { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.1rem; }
.overall.operational { border-left: 4px solid var(--ok); }
.overall.degraded { border-left: 4px solid var(--degraded); }
.overall.partial_outage,
.overall.major_outage { border-left: 4px solid var(--down); }

.checked-at { color: var(--text-dim); font-size: 0.8rem; margin: 0.75rem 0 2rem; }

/* Status dot */
.dot { border-radius: 50%; display: inline-block; }
.status-operational { background: var(--ok); }
.status-degraded { background: var(--degraded); }
.status-down,
.status-major_outage,
.status-partial_outage { background: var(--down); }
.status-unknown { background: var(--text-dim); }

/* Section */
section { margin-bottom: 2.5rem; }
h2 {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); font-weight: 700; margin: 0 0 0.9rem;
}

/* Components */
.components {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 45, 80, 0.05);
}
.component {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.component:last-child { border-bottom: none; }
.component-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.component-name { font-weight: 600; color: var(--navy); }
.component-desc { color: var(--text-dim); font-size: 0.82rem; margin-top: 0.15rem; }
.component-status {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9rem; white-space: nowrap; font-weight: 500;
}
.component-status .dot { width: 10px; height: 10px; }

/* Uptime bars (90-day) */
.uptime {
  display: flex; gap: 2px; margin-top: 0.95rem; height: 36px; align-items: stretch;
}
.uptime .bar {
  flex: 1; border-radius: 3px; min-width: 2px; background: var(--surface-2);
  transition: opacity 0.15s;
}
.uptime .bar:hover { opacity: 0.7; }
.uptime .bar.up { background: var(--ok); }
.uptime .bar.degraded { background: var(--degraded); }
.uptime .bar.down { background: var(--down); }
.uptime-legend {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--text-dim); margin-top: 0.45rem;
}

/* Incidents / maintenance */
.incident, .maint {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 1.2rem 1.4rem; margin-bottom: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 45, 80, 0.05);
}
.incident-title {
  font-weight: 700; color: var(--navy);
  display: flex; align-items: center; gap: 0.6rem;
}
.badge {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 700;
  border: 1px solid currentColor;
}
.badge.resolved { color: var(--ok); }
.badge.investigating, .badge.identified, .badge.monitoring { color: var(--degraded); }
.badge.maintenance { color: var(--maint); }
.incident-affected { color: var(--text-dim); font-size: 0.8rem; margin-top: 0.25rem; }
.update {
  border-left: 2px solid var(--border); padding: 0.5rem 0 0.5rem 0.9rem;
  margin-top: 0.8rem;
}
.update-status { font-weight: 700; font-size: 0.85rem; text-transform: capitalize; color: var(--navy); }
.update-time { color: var(--text-dim); font-size: 0.75rem; margin-left: 0.4rem; }
.update-body { font-size: 0.9rem; margin-top: 0.2rem; }
.empty { color: var(--text-dim); font-size: 0.9rem; padding: 0.5rem 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem;
  color: var(--text-dim); font-size: 0.85rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--green); }
.subscribe a { color: var(--green); font-weight: 700; }
