:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --border: #e3e8ee;
  --text: #1c2733;
  --muted: #6b7785;
  --brand: #2f3a8f;

  --operational: #2bac76;
  --degraded: #f0a92b;
  --partial: #f0712b;
  --major: #e0413e;

  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 30, 45, 0.08), 0 1px 2px rgba(20, 30, 45, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #4a57c4);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; letter-spacing: .5px;
}
.brand-text h1 { font-size: 18px; margin: 0; line-height: 1.2; }
.brand-text p { font-size: 13px; margin: 0; color: var(--muted); }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.header-nav a { color: var(--muted); text-decoration: none; }
.header-nav a:hover { color: var(--text); }
.subscribe-btn {
  background: var(--brand);
  color: #fff;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}
.subscribe-btn:hover { filter: brightness(1.08); }

/* Status banner */
.status-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
}
.status-banner--degraded { background: linear-gradient(135deg, #f0a92b, #f0712b); }
.status-banner-icon {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
}
.status-banner-text { flex: 1; }
.status-banner-text h2 { margin: 0; font-size: 21px; }
.status-banner-text p { margin: 3px 0 0; opacity: .92; font-size: 14px; }
.status-banner-time { text-align: right; font-size: 13px; line-height: 1.4; }
.status-banner-time .muted { color: rgba(255,255,255,0.8); display: block; }

/* Active incident */
.active-incident {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--major);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
}
.active-incident-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.active-incident-title { font-weight: 600; }
.pill {
  font-size: 12px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .4px;
  color: #fff;
}
.pill--major { background: var(--major); }
.pill--partial { background: var(--partial); }
.pill--degraded { background: var(--degraded); }
.pill--operational { background: var(--operational); }
.incident-updates { list-style: none; margin: 14px 0 0; padding: 0; }
.incident-updates li {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.update-tag { font-weight: 700; color: var(--partial); font-size: 13px; }
.update-body { font-size: 14px; }
.incident-updates time { color: var(--muted); font-size: 13px; white-space: nowrap; }

/* Legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch--operational { background: var(--operational); }
.swatch--degraded { background: var(--degraded); }
.swatch--partial { background: var(--partial); }
.swatch--major { background: var(--major); }
.legend-range { margin-left: auto; }

/* Components */
.components { display: flex; flex-direction: column; gap: 2px; }
.component {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.component:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.component:last-child { border-bottom: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.component-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.component-name { font-weight: 600; }
.component-status { font-size: 13px; font-weight: 600; }
.component-status[data-status="operational"] { color: var(--operational); }
.component-status[data-status="degraded"] { color: var(--degraded); }
.component-status[data-status="partial"] { color: var(--partial); }
.component-status[data-status="major"] { color: var(--major); }

.uptime-bar {
  display: flex;
  gap: 2px;
  align-items: stretch;
  height: 34px;
}
.uptime-day {
  flex: 1 1 0;
  border-radius: 2px;
  min-width: 2px;
  transition: transform .08s ease;
  cursor: default;
}
.uptime-day:hover { transform: scaleY(1.12); }
.uptime-day[data-status="operational"] { background: var(--operational); }
.uptime-day[data-status="degraded"] { background: var(--degraded); }
.uptime-day[data-status="partial"] { background: var(--partial); }
.uptime-day[data-status="major"] { background: var(--major); }

.component-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* History */
.history { margin: 38px 0 10px; }
.section-title { font-size: 17px; margin: 0 0 16px; }
.history-list { display: flex; flex-direction: column; gap: 22px; }
.history-day {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.history-date { font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.history-incident { margin: 0 0 14px; }
.history-incident-title {
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.history-incident-body { font-size: 14px; color: var(--text); margin: 2px 0; }
.history-incident-meta { font-size: 12px; color: var(--muted); }
.no-incidents { color: var(--muted); font-size: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0 40px;
  background: var(--surface);
}
.site-footer p { margin: 4px 0; font-size: 13px; }

@media (max-width: 600px) {
  .status-banner { flex-direction: column; align-items: flex-start; }
  .status-banner-time { text-align: left; }
  .incident-updates li { grid-template-columns: 1fr; gap: 2px; }
  .incident-updates time { white-space: normal; }
  .header-nav a { display: none; }
  .uptime-bar { height: 30px; }
}
