:root {
  /* Brand tokens pulled from taifamobile.co.ke */
  --accent: #008C95;
  --accent-dark: #00666C;
  --accent-orange: #E97525;
  --ink: #221E1E;
  --ink-soft: #5E706F;
  --muted: #91A2A1;
  --faint: #B7C3C2;
  --border: #E2E8EC;
  --bg: #F8F9FA;
  --surface: #FFFFFF;

  --ok-fg: #067647;
  --ok-bg: #ECFDF3;
  --ok-border: #ABEFC6;
  --ok-dot: #12B76A;

  --warn-fg: #B54708;
  --warn-bg: #FFFAEB;
  --warn-border: #FEDF89;
  --warn-dot: #F79009;

  --down-fg: #B42318;
  --down-bg: #FEF3F2;
  --down-border: #FECDCA;
  --down-dot: #F04438;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Instrument Sans', Montserrat, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--ink-soft); text-decoration: none; }
a:hover { color: var(--ink); }

.status-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.status-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.status-logo { display: flex; align-items: center; gap: 12px; }
.status-logo__mark { height: 30px; width: auto; flex-shrink: 0; }
.status-logo__sub {
  font-size: 14px; color: var(--muted); margin-left: 2px;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.status-nav { display: flex; align-items: center; gap: 28px; }
.status-nav a { font-size: 14px; font-weight: 500; }
.status-nav a:hover { color: var(--accent); }
.status-subscribe {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  text-decoration: none;
}
.status-subscribe:hover { border-color: var(--accent); color: var(--accent); }

.status-main {
  max-width: 900px; margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex; flex-direction: column; gap: 40px;
}

.status-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 26px; border-radius: 12px;
  border: 1px solid var(--border);
}
.status-banner--operational { background: var(--ok-bg); border-color: var(--ok-border); }
.status-banner--degraded,
.status-banner--partial_outage { background: var(--warn-bg); border-color: var(--warn-border); }
.status-banner--major_outage { background: var(--down-bg); border-color: var(--down-border); }
.status-banner--maintenance { background: #EFF4FF; border-color: #C7D7FE; }
.status-banner__title {
  font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 20px;
}
.status-banner--operational .status-banner__title { color: var(--ok-fg); }
.status-banner--degraded .status-banner__title,
.status-banner--partial_outage .status-banner__title { color: var(--warn-fg); }
.status-banner--major_outage .status-banner__title { color: var(--down-fg); }
.status-banner--maintenance .status-banner__title { color: #3538CD; }
.status-banner__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); margin-top: 2px;
}
.status-banner__icon { flex-shrink: 0; }
.status-banner--operational .status-banner__icon { color: var(--ok-fg); }
.status-banner--degraded .status-banner__icon,
.status-banner--partial_outage .status-banner__icon { color: var(--warn-fg); }
.status-banner--major_outage .status-banner__icon { color: var(--down-fg); }
.status-banner--maintenance .status-banner__icon { color: #3538CD; }

.status-services {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); overflow: hidden;
}
.service-row {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.service-row:last-child { border-bottom: none; }
.service-row--incident { background: #FFFDF6; }
.service-row__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.service-row__name { font-size: 15px; font-weight: 600; }

.pill {
  display: flex; align-items: center; gap: 7px;
  padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.pill__dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }
.pill--operational { background: var(--ok-bg); color: var(--ok-fg); }
.pill--operational .pill__dot { background: var(--ok-dot); }
.pill--degraded, .pill--partial_outage { background: var(--warn-bg); color: var(--warn-fg); }
.pill--degraded .pill__dot, .pill--partial_outage .pill__dot { background: var(--warn-dot); }
.pill--major_outage { background: var(--down-bg); color: var(--down-fg); }
.pill--major_outage .pill__dot { background: var(--down-dot); }
.pill--maintenance { background: #EFF4FF; color: #3538CD; }
.pill--maintenance .pill__dot { background: #6172F3; }
.pill--unknown { background: #F2F4F7; color: var(--muted); }
.pill--unknown .pill__dot { background: var(--faint); }

.uptime-bars { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.uptime-bars .bar { flex: 1 1 0; height: 100%; border-radius: 2px; min-width: 2px; }
.bar--ok { background: var(--ok-dot); }
.bar--warn { background: var(--warn-dot); }
.bar--down { background: var(--down-dot); }
.bar--empty { background: #EAECF0; }

.service-row__footer { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--faint); }

.status-section-title { font-family: 'Instrument Sans', sans-serif; font-weight: 700; font-size: 17px; }

.incident-card {
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px 26px; border-radius: 12px;
  border: 1px solid var(--warn-border); background: var(--surface);
}
.incident-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.incident-card__title { font-size: 16px; font-weight: 700; }
.incident-card__affects { font-size: 13px; color: var(--muted); }

.timeline { display: flex; flex-direction: column; margin-top: 6px; }
.timeline-item { display: flex; gap: 14px; }
.timeline-item__rail { display: flex; flex-direction: column; align-items: center; width: 12px; flex-shrink: 0; }
.timeline-item__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--warn-dot); margin-top: 4px; }
.timeline-item__line { width: 1px; flex: 1; background: var(--border); margin-top: 4px; }
.timeline-item__body { padding-bottom: 20px; display: flex; flex-direction: column; gap: 3px; }
.timeline-item:last-child .timeline-item__body { padding-bottom: 0; }
.timeline-item__meta { display: flex; align-items: center; gap: 10px; }
.timeline-item__status { font-size: 13px; font-weight: 700; }
.timeline-item__time { font-size: 12px; color: var(--faint); }
.timeline-item__text { font-size: 13px; color: var(--ink-soft); }

.past-incidents { display: flex; flex-direction: column; gap: 16px; }
.past-incident-group { display: flex; flex-direction: column; gap: 10px; }
.past-incident-group__date {
  font-size: 12px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.past-incident {
  padding: 16px 20px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); display: flex; flex-direction: column; gap: 6px;
}
.past-incident__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.past-incident__title { font-size: 14px; font-weight: 600; }
.past-incident__body { font-size: 13px; color: var(--muted); }
.resolved-badge {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 3px 9px; border-radius: 999px; background: #F2F4F7; flex-shrink: 0;
}

.status-empty { font-size: 13px; color: var(--faint); }

.status-footer {
  border-top: 1px solid var(--border);
  padding: 22px 24px; text-align: center;
}
.status-footer span { font-size: 13px; color: var(--faint); }

@media (max-width: 640px) {
  .status-header__inner { padding: 16px 18px; }
  .status-nav a:not(.status-subscribe) { display: none; }
  .status-main { padding: 28px 16px 56px; gap: 28px; }
  .service-row, .incident-card { padding: 18px; }
}
