/* Kickblue status page styles — dependency-free, theme-aware (#1821). */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e3e8ef;
  --text: #1b2333;
  --text-muted: #5b6472;
  --brand: #2540c0;

  --operational: #1a9f5a;
  --maintenance: #3b82f6;
  --degraded: #d9a300;
  --partial: #e8730c;
  --major: #d63838;
  --unknown: #8a93a2;

  --radius: 10px;
  --maxw: 780px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131c;
    --surface: #161d2b;
    --border: #263140;
    --text: #eef2f8;
    --text-muted: #98a2b3;
    --operational: #2ecc71;
    --maintenance: #5a9bff;
    --degraded: #f2c14e;
    --partial: #f4923b;
    --major: #ff5c5c;
    --unknown: #98a2b3;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header ------------------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--brand);
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 1rem;
}

.site-nav a:hover {
  color: var(--text);
}

/* Overall banner ----------------------------------------------------------- */
.overall {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  border-left: 6px solid var(--unknown);
}

.overall-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overall-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--unknown);
  flex-shrink: 0;
}

.overall-text {
  margin: 0;
  font-size: 1.25rem;
}

.overall-updated {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.overall-operational {
  border-left-color: var(--operational);
}
.overall-operational .overall-dot {
  background: var(--operational);
}
.overall-maintenance {
  border-left-color: var(--maintenance);
}
.overall-maintenance .overall-dot {
  background: var(--maintenance);
}
.overall-degraded {
  border-left-color: var(--degraded);
}
.overall-degraded .overall-dot {
  background: var(--degraded);
}
.overall-partial {
  border-left-color: var(--partial);
}
.overall-partial .overall-dot {
  background: var(--partial);
}
.overall-major {
  border-left-color: var(--major);
}
.overall-major .overall-dot {
  background: var(--major);
}

/* Sections ----------------------------------------------------------------- */
.section-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 1.75rem 0 0.75rem;
}

.section-footer {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.section-footer a,
.history-month a {
  color: var(--brand);
  text-decoration: none;
}

/* Components ---------------------------------------------------------------- */
.components-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.component-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.component-row:last-child {
  border-bottom: none;
}

.component-name {
  font-weight: 600;
}

/* Status pills ------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  color: #fff;
}

.pill-operational {
  background: var(--operational);
}
.pill-maintenance {
  background: var(--maintenance);
}
.pill-degraded {
  background: var(--degraded);
  color: #1b2333;
}
.pill-partial {
  background: var(--partial);
}
.pill-major {
  background: var(--major);
}
.pill-unknown {
  background: var(--unknown);
}

/* Incidents ---------------------------------------------------------------- */
.incident {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.incident-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.incident-name {
  margin: 0;
  font-size: 1.05rem;
}

.incident-affected {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.incident-timeline {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
}

.incident-update {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--border);
}

.incident-update-status {
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--brand);
}

.incident-update-body {
  grid-column: 2;
}

.incident-update-time {
  grid-column: 2;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* History ------------------------------------------------------------------ */
.history-month {
  font-size: 1rem;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .overall-text {
    font-size: 1.1rem;
  }
  .component-row {
    padding: 0.8rem 1rem;
  }
}
