:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #e7eaf0;
  --green: #20d28a;
  --green-dark: #0a9b63;
  --green-soft: #e8fbf3;
  --amber: #f5a623;
  --amber-soft: #fff6df;
  --red: #ef4e5b;
  --red-soft: #ffeaec;
  --blue: #2563eb;
  --gray-bar: #e9edf2;
  --shadow: 0 16px 50px rgba(20, 30, 55, 0.07);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(37, 99, 235, 0.07), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, a { font: inherit; }

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1677ff, #20d28a);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
  color: white;
  font-size: 13px;
  letter-spacing: -0.04em;
}

.brand-name { font-size: 18px; }

.updates-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9dee7;
  border-radius: 12px;
  padding: 0 18px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(16, 24, 40, 0.04);
}

.updates-button:hover { border-color: #b8c0ce; transform: translateY(-1px); }
.is-hidden { display: none !important; }

.summary {
  display: flex;
  min-height: 132px;
  align-items: center;
  gap: 20px;
  border-radius: 20px;
  padding: 28px 34px;
  color: white;
  box-shadow: var(--shadow);
  transition: background 180ms ease;
}

.summary.operational { background: linear-gradient(115deg, #20d28a, #1fcf98); }
.summary.degraded { background: linear-gradient(115deg, #f5a623, #f7bd42); }
.summary.outage { background: linear-gradient(115deg, #ef4e5b, #f16d76); }
.summary.unknown { background: linear-gradient(115deg, #64748b, #8793a6); }

.summary-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  font-size: 25px;
  font-weight: 800;
}

.summary h1 { margin: 0; font-size: clamp(22px, 4vw, 30px); letter-spacing: -0.025em; }
.summary p { margin: 4px 0 0; color: rgba(255,255,255,0.9); }

.services, .notices {
  margin-top: 60px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  padding: 30px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: -0.025em; }
.last-checked { margin: 0; color: var(--muted); font-size: 13px; }

.services-list { display: grid; gap: 30px; }
.service { min-width: 0; }

.service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.service-title-wrap { min-width: 0; }
.service-title-line { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 17px; height: 17px; border-radius: 50%; position: relative; flex: 0 0 17px; }
.status-dot::after { content: "✓"; position: absolute; inset: -2px 0 0; display: grid; place-items: center; color: white; font-size: 11px; font-weight: 900; }
.status-dot.operational { background: var(--green); }
.status-dot.degraded { background: var(--amber); }
.status-dot.degraded::after { content: "!"; }
.status-dot.outage { background: var(--red); }
.status-dot.outage::after { content: "×"; }
.status-dot.unknown { background: #94a3b8; }
.status-dot.unknown::after { content: "?"; }

.service-name { margin: 0; font-size: 16px; font-weight: 760; }
.service-description { margin: 2px 0 0 26px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uptime { white-space: nowrap; color: var(--green-dark); font-weight: 760; font-size: 14px; }
.uptime.degraded { color: #b56c00; }
.uptime.outage { color: #c92f3d; }
.uptime.unknown { color: var(--muted); }

.bar-grid {
  display: grid;
  grid-template-columns: repeat(90, minmax(2px, 1fr));
  gap: 2px;
  height: 38px;
}

.day-bar {
  min-width: 2px;
  border-radius: 2px;
  background: var(--gray-bar);
  transition: transform 120ms ease, opacity 120ms ease;
}
.day-bar:hover { transform: scaleY(1.12); opacity: 0.82; }
.day-bar.up { background: var(--green); }
.day-bar.warn { background: var(--amber); }
.day-bar.down { background: var(--red); }

.range {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.child-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.child-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}
.child-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.child-pill.up::before { background: var(--green); }
.child-pill.down::before { background: var(--red); }

.notices-list { border-top: 1px solid var(--line); }
.notice-empty { display: flex; align-items: center; gap: 12px; padding: 28px 0 4px; color: #344054; }
.notice-check { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 900; }

.incident { padding: 22px 0; border-bottom: 1px solid var(--line); }
.incident:last-child { border-bottom: 0; }
.incident-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.incident h3 { margin: 0; font-size: 16px; }
.incident-status { border-radius: 999px; padding: 4px 9px; background: var(--amber-soft); color: #9a5b00; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.incident-status.resolved { background: var(--green-soft); color: var(--green-dark); }
.incident-time { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.incident-update { margin-top: 14px; color: #344054; }
.incident-update strong { text-transform: capitalize; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px 4px 0; color: var(--muted); font-size: 12px; }

.skeleton { animation: pulse 1.5s ease-in-out infinite; background: #eef1f5; border-radius: 8px; min-height: 74px; }
@keyframes pulse { 50% { opacity: 0.58; } }

@media (max-width: 700px) {
  .shell { width: min(100% - 20px, 1040px); padding-top: 22px; }
  .topbar { margin-bottom: 28px; }
  .brand-name { display: none; }
  .summary { min-height: 116px; padding: 24px 20px; border-radius: 17px; }
  .services, .notices { margin-top: 28px; padding: 21px 16px; border-radius: 17px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .service-header { align-items: flex-start; }
  .service-description { white-space: normal; }
  .bar-grid { gap: 1px; height: 34px; }
  footer { flex-direction: column; gap: 4px; }
}
