:root {
  --bg: #f4f6f9;
  --panel: #fff;
  --line: #e5e8ec;
  --text: #1f2733;
  --muted: #6b7683;
  --gold: #e0a516;
  --green: #17b26a;
  --amber: #f79009;
  --red: #f04438;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  /* app shell: fixed header, only the main area scrolls (100dvh for mobile) */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.brand b {
  color: var(--muted);
  font-weight: 600;
}
.homelink {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.homelink:hover {
  color: var(--text);
}
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 16px 60px;
}

/* overall banner */
.overall {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #fff;
  box-shadow: var(--shadow);
}
.overall .odot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}
.overall.ok {
  background: linear-gradient(180deg, #22b26e, #17a262);
}
.overall.degraded {
  background: linear-gradient(180deg, #f79009, #e07d04);
}
.overall.outage {
  background: linear-gradient(180deg, #f04438, #d92d20);
}
.overall.checking {
  background: #98a2b3;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-top: 18px;
}
.cardhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.card h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin: 0 0 4px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}

/* service rows */
.components {
  margin-top: 8px;
}
.crow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.crow:first-child {
  border-top: 0;
}
.cname {
  font-size: 14.5px;
  font-weight: 500;
}
.cname small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-top: 1px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.pill.operational {
  color: #067647;
}
.pill.operational .dot {
  background: var(--green);
}
.pill.degraded {
  color: #b54708;
}
.pill.degraded .dot {
  background: var(--amber);
}
.pill.outage {
  color: #b42318;
}
.pill.outage .dot {
  background: var(--red);
}
.pill.checking {
  color: var(--muted);
}
.pill.checking .dot {
  background: #98a2b3;
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* incidents */
.incident {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 12px;
}
.incident:first-child {
  margin-top: 0;
}
.incident.critical {
  border-color: #fecdca;
  background: #fffbfa;
}
.incident.major {
  border-color: #fde3b3;
  background: #fffcf5;
}
.ihead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ihead .ititle {
  font-size: 15px;
  font-weight: 700;
}
.sev {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 20px;
}
.sev.critical {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
}
.sev.major {
  color: #b54708;
  background: #fffaeb;
  border: 1px solid #fde3b3;
}
.sev.minor {
  color: #475467;
  background: #f2f4f7;
  border: 1px solid #e5e8ec;
}
.icomp {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.timeline {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.tl {
  display: flex;
  gap: 10px;
  padding: 6px 0;
}
.tl .tlstatus {
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  min-width: 92px;
  color: var(--text);
}
.tl .tlmsg {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.tl .tltime {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.past {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.past:first-child {
  border-top: 0;
}
.past .pdate {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.foot {
  text-align: center;
  margin-top: 26px;
}

@media (max-width: 520px) {
  .overall {
    font-size: 17px;
    padding: 18px;
  }
  .crow {
    align-items: flex-start;
  }
  .tl {
    flex-direction: column;
    gap: 2px;
  }
  .tl .tlstatus {
    min-width: 0;
  }
}
