/* OX status page (ADR-0053). No external fonts or assets: system fonts only. */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --text: #13212c;
  --muted: #5b6b78;
  --border: #dde3e8;
  --brand: #0f2a3d;
  --ok: #2e9e74;
  --partial: #d9a21b;
  --bad: #d1453b;
  --maintenance: #3a78c9;
  --none: #c9d1d8;
  --notice: #fff4d6;
  --notice-text: #5c4300;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d151c;
    --surface: #15212b;
    --text: #e6edf2;
    --muted: #9aabb8;
    --border: #263644;
    --brand: #0a1f2e;
    --ok: #3fb68b;
    --partial: #e3b341;
    --bad: #ef6a5f;
    --maintenance: #5b97e0;
    --none: #34444f;
    --notice: #3a2f10;
    --notice-text: #f3dc9a;
  }
}

* { box-sizing: border-box; }

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

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  background: var(--brand);
  color: #fff;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
}

.site { color: #cfe0ec; font-size: 0.9rem; }

h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 0; }

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

a.inherit { color: inherit; }

.notice {
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: var(--notice);
  color: var(--notice-text);
}

.summary {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  color: #fff;
  background: var(--muted);
}

.summary h1 { margin: 0; font-size: 1.35rem; }
.summary p { margin: 0.35rem 0 0; }
.summary p:empty { display: none; }
.summary.ok { background: var(--ok); }
.summary.partial { background: var(--partial); color: #2b2000; }
.summary.bad { background: var(--bad); }
.summary.maintenance { background: var(--maintenance); }
.summary.stale { outline: 3px dashed var(--partial); outline-offset: 3px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.legend .day { width: 10px; height: 10px; flex: none; }

.group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.group h3 {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.component { padding: 0.9rem 1rem; }
.component + .component { border-top: 1px solid var(--border); }

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

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

.pill {
  flex: none;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--muted);
}

.pill.up { background: var(--ok); }
.pill.down, .pill.major { background: var(--bad); }
.pill.partial, .pill.degraded { background: var(--partial); color: #2b2000; }
.pill.maintenance { background: var(--maintenance); }
.pill.unknown { background: var(--none); color: var(--text); }

.bars {
  display: flex;
  gap: 2px;
  height: 32px;
  margin-top: 0.6rem;
}

.day {
  display: inline-block;
  flex: 1 1 0;
  min-width: 1px;
  border-radius: 2px;
  background: var(--none);
}

.day.ok { background: var(--ok); }
.day.partial { background: var(--partial); }
.day.bad { background: var(--bad); }

.component-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.incident {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.incident.major { border-left-color: var(--bad); }
.incident.partial, .incident.degraded { border-left-color: var(--partial); }
.incident.maintenance { border-left-color: var(--maintenance); }
.incident > p { margin: 0.35rem 0 0; font-size: 0.9rem; }

.updates {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.updates li { padding: 0.5rem 0; border-top: 1px solid var(--border); }
.updates p { margin: 0.15rem 0; }

.foot {
  margin-top: 2.5rem;
  padding-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 560px) {
  .bars { gap: 1px; height: 28px; }
  .summary { padding: 1rem; }
}
