/* ArtzAIn status page. No inline styles anywhere: the page's CSP is
 * style-src 'self' (deploy/terraform/aws/status_page.tf). */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b6270;
  --border: #dde1e7;
  --ok: #1f8a4c;
  --minor: #c98a00;
  --major: #c62f2f;
  --none: #c9ced6;
  --accent: #3150d6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #1a1d24;
    --text: #e8eaef;
    --muted: #9aa2b1;
    --border: #2c313b;
    --ok: #3cb371;
    --minor: #e0a526;
    --major: #ef5a5a;
    --none: #3a404b;
    --accent: #8ea2ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.top, main, footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px;
}

h1 { font-size: 1.6rem; margin: 0 0 16px; }
h2 { font-size: 1.15rem; margin: 32px 0 8px; }
h3 { font-size: 1rem; margin: 0; }
a { color: var(--accent); }

.overall {
  border-radius: 10px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--none);
  font-size: 1.15rem;
  font-weight: 600;
}
.overall p { margin: 0; }
.overall[data-state="operational"] { border-left-color: var(--ok); }
.overall[data-state="degraded"] { border-left-color: var(--minor); }
.overall[data-state="outage"] { border-left-color: var(--major); }

.notice {
  margin: 16px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--minor);
  border-radius: 8px;
  background: var(--surface);
}

.legend { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }

.components, .incidents ol, .updates { list-style: none; margin: 0; padding: 0; }

.component, .incident {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.component-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pill {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.state-operational { color: var(--ok); }
.state-degraded { color: var(--minor); }
.state-outage { color: var(--major); }
.state-unknown { color: var(--muted); }

.days {
  display: flex;
  gap: 2px;
  height: 32px;
  margin: 12px 0 8px;
}
.day {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--none);
}
.day-ok { background: var(--ok); }
.day-minor { background: var(--minor); }
.day-major { background: var(--major); }

.component-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.month.below { color: var(--major); font-weight: 600; }

.incident-meta { color: var(--muted); font-size: 0.9rem; margin: 4px 0 8px; }
.incident.resolved .incident-title { color: var(--muted); }
.update { display: flex; gap: 12px; padding: 4px 0; border-top: 1px solid var(--border); }
.update-at { color: var(--muted); font-size: 0.85rem; white-space: nowrap; min-width: 9.5em; }
.update-text { overflow-wrap: anywhere; }

.target p { color: var(--muted); }

footer { color: var(--muted); font-size: 0.85rem; padding-top: 16px; padding-bottom: 32px; }

@media (max-width: 520px) {
  .days { gap: 1px; height: 28px; }
  .update { flex-direction: column; gap: 0; }
}
