/* CHICS brand tokens (CHICSMarketing/brand/build_cch.py, read off the live site). */
:root {
  --navy: #0d1620;
  --cyan: #40bdd2;
  --bg: #f4f7fa;
  --card: #ffffff;
  --ink: #0d1620;
  --muted: #55677a;
  --line: #dbe2e9;
  --ok: #1f8a4c;
  --warn: #b7791f;
  --bad: #c53030;
  --maint: #2b6cb0;
  --none: #cfd8e1;
  --ok-soft: #e6f4ec;
  --warn-soft: #fdf3e2;
  --bad-soft: #fde8e8;
  --maint-soft: #e6effa;
  --font: "Helvetica Neue", Helvetica, "Arial Nova", Arial, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1620;
    --card: #16212d;
    --ink: #e8eef4;
    --muted: #8fa3b8;
    --line: #22303e;
    --ok: #3fbf74;
    --warn: #e0a83e;
    --bad: #ef6b6b;
    --maint: #63a4f0;
    --none: #2e3d4c;
    --ok-soft: #133024;
    --warn-soft: #33270f;
    --bad-soft: #3a1a1c;
    --maint-soft: #13283f;
  }
  .logo-light { display: none; }
  .logo-dark { display: inline; }
}
@media (prefers-color-scheme: light), (prefers-color-scheme: no-preference) {
  .logo-dark { display: none; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--card); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { height: 25px; width: auto; }
.brand-sub { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }
nav { display: flex; gap: 18px; font-size: 14px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); text-decoration: underline; }

main { padding-top: 28px; padding-bottom: 40px; min-height: 60vh; }
h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0 0 6px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 36px 0 12px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.loading, .notice { color: var(--muted); }

.banner { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-radius: 12px; font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.banner .meta { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.banner.operational { background: var(--ok-soft); }
.banner.degraded { background: var(--warn-soft); }
.banner.outage { background: var(--bad-soft); }
.banner.maintenance { background: var(--maint-soft); }
.icon { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; }
.icon.operational { background: var(--ok); }
.icon.degraded { background: var(--warn); }
.icon.outage { background: var(--bad); }
.icon.maintenance { background: var(--maint); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.card + .card { margin-top: 12px; }
.components .row { padding: 16px 20px; border-top: 1px solid var(--line); }
.components .row:first-child { border-top: 0; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.row-name { font-weight: 700; }
.state { font-size: 14px; font-weight: 700; white-space: nowrap; }
.state.operational { color: var(--ok); }
.state.degraded_performance, .state.partial_outage { color: var(--warn); }
.state.major_outage { color: var(--bad); }
.state.under_maintenance { color: var(--maint); }

.bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; margin-top: 10px; }
.bars span { height: 30px; border-radius: 2px; background: var(--none); }
.bars .up { background: var(--ok); }
.bars .partial { background: var(--warn); }
.bars .down { background: var(--bad); }
.bars .maintenance { background: var(--maint); }
.bars span:hover { opacity: 0.75; }
.bars-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 560px) {
  .bars { grid-template-columns: repeat(45, minmax(0, 1fr)); }
  .bars span:nth-child(-n+45) { display: none; }
  .bars-legend .full { display: none; }
  .bars-legend .short { display: inline; }
  .banner { font-size: 18px; flex-wrap: wrap; }
  .banner .meta { margin-left: 40px; width: 100%; }
}
.bars-legend .short { display: none; }

.incident { padding: 18px 20px; }
.incident h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.incident h3 a { text-decoration: none; }
.incident h3 a:hover { text-decoration: underline; }
.incident.major { border-left: 4px solid var(--bad); }
.incident.minor { border-left: 4px solid var(--warn); }
.incident.resolved { border-left: 4px solid var(--ok); }
.incident.maint { border-left: 4px solid var(--maint); }
.timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.timeline li { padding: 8px 0; border-top: 1px dashed var(--line); }
.timeline li:first-child { border-top: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 8px; }
.tag.investigating, .tag.identified { color: var(--bad); }
.tag.monitoring { color: var(--warn); }
.tag.resolved { color: var(--ok); }
.tag.scheduled, .tag.in_progress { color: var(--maint); }
.uptime { margin-top: 12px; font-size: 14px; color: var(--muted); }
.uptime b { color: var(--ink); font-size: 18px; }
.month { margin-top: 28px; }
.back { display: inline-block; margin-bottom: 16px; font-size: 14px; color: var(--muted); }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0 32px; }
footer.site p { margin: 4px 0; }
