:root {
  color-scheme: light;
  --ink: #0b2f3d;
  --muted: #5f7882;
  --line: #dce9eb;
  --panel: rgba(255, 255, 255, .96);
  --page: #f4fafb;
  --blue: #008dc9;
  --green: #198754;
  --amber: #d68200;
  --orange: #d95f14;
  --red: #c63a3a;
  --grey: #8a9aa1;
  --shadow: 0 20px 55px rgba(13, 61, 75, .09);
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(56, 189, 248, .18), transparent 33rem),
    radial-gradient(circle at 92% 3%, rgba(45, 212, 191, .13), transparent 30rem),
    linear-gradient(180deg, #eefbfe 0, var(--page) 25rem);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--blue); text-underline-offset: .2em; }

.status-nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.status-brand img { display: block; width: 165px; max-height: 47px; object-fit: contain; object-position: left; }

.status-nav nav { display: flex; align-items: center; gap: 10px; }

.status-nav nav a {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
}

.status-nav nav a:hover { background: rgba(255,255,255,.8); }

.status-support {
  border: 1px solid rgba(0, 141, 201, .2);
  background: white;
  box-shadow: 0 8px 20px rgba(0, 109, 151, .08);
}

.status-shell { width: min(960px, calc(100% - 40px)); margin: 32px auto 90px; }

.status-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 178px;
  padding: 30px 34px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 28px;
  color: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.status-hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -100% 45%;
  height: 230px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
}

.status-hero.state-operational { background: linear-gradient(125deg, #0f8054, #20a66c); }
.status-hero.state-maintenance { background: linear-gradient(125deg, #087cad, #00a2c7); }
.status-hero.state-degraded { background: linear-gradient(125deg, #bf7000, #e89a20); }
.status-hero.state-partial_outage { background: linear-gradient(125deg, #c65b0c, #ee7f2c); }
.status-hero.state-major_outage { background: linear-gradient(125deg, #a92935, #db4852); }
.status-hero.state-unknown { background: linear-gradient(125deg, #5c7179, #84979d); }

.status-hero h1 { position: relative; margin: 3px 0 5px; font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.15; }
.status-hero p { position: relative; margin: 0; opacity: .92; }
.status-hero time { position: relative; align-self: end; white-space: nowrap; font-size: .78rem; opacity: .85; }
.status-eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .73rem; font-weight: 800; }

.status-hero-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  background: rgba(255,255,255,.15);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}

.status-hero-icon span {
  width: 20px;
  height: 20px;
  border: 5px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255,255,255,.13);
}

.status-intro { margin: 20px 4px 34px; color: var(--muted); font-size: 1.03rem; }
.status-section, .status-group { margin-top: 32px; }
.status-section > h2, .status-group > h2 { margin: 0 0 13px 4px; font-size: 1.14rem; }
.status-groups { display: grid; gap: 8px; }

.status-group, .status-incident, .status-maintenance {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(16, 65, 78, .055);
}

.status-group { padding: 22px 24px 6px; }

.status-component {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.status-component-main { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 13px; }
.status-component h3 { margin: -2px 0 2px; font-size: 1rem; }
.status-component p { margin: 1px 0; color: var(--muted); font-size: .9rem; }
.status-component-message { color: var(--ink) !important; font-weight: 650; }

.status-dot {
  width: 11px;
  height: 11px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--grey);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--grey) 14%, transparent);
}

.status-dot.state-operational, .status-day.state-operational { background: var(--green); }
.status-dot.state-maintenance, .status-day.state-maintenance { background: var(--blue); }
.status-dot.state-degraded, .status-day.state-degraded { background: var(--amber); }
.status-dot.state-partial_outage, .status-day.state-partial_outage { background: var(--orange); }
.status-dot.state-major_outage, .status-day.state-major_outage { background: var(--red); }
.status-dot.state-unknown, .status-day.state-unknown { background: var(--grey); }

.status-component-result { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; text-align: right; }
.status-component-result strong { white-space: nowrap; font-size: .9rem; }
.status-provider { color: var(--muted); font-size: .75rem; }

.status-history-bars { display: flex; gap: 2px; height: 25px; margin: 13px 0 0 24px; align-items: stretch; }
.status-day { flex: 1 1 0; min-width: 2px; border-radius: 3px; opacity: .82; transition: opacity .16s, transform .16s; }
.status-day:hover { opacity: 1; transform: scaleY(1.18); }

.status-incident, .status-maintenance { padding: 23px 25px; margin-bottom: 13px; }
.status-incident { border-left: 5px solid var(--amber); }
.status-incident.impact-critical { border-left-color: var(--red); }
.status-incident.impact-major { border-left-color: var(--orange); }
.status-incident.resolved { border-left-color: var(--green); }
.status-maintenance { border-left: 5px solid var(--blue); }

.status-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.status-card-heading h3 { margin: 3px 0; font-size: 1.05rem; }
.status-card-heading time { color: var(--muted); font-size: .79rem; white-space: nowrap; }
.status-phase { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 850; }
.status-affected { margin: 12px 0; color: var(--muted); font-size: .85rem; }

.status-updates { position: relative; margin: 20px 0 0; padding: 0; list-style: none; }
.status-updates li { position: relative; margin-left: 6px; padding: 0 0 18px 25px; border-left: 2px solid var(--line); }
.status-updates li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.status-updates li:last-child { padding-bottom: 0; }
.status-updates p { margin: 5px 0 0; color: var(--muted); }
.status-update-meta { display: flex; justify-content: space-between; gap: 15px; font-size: .82rem; }
.status-update-meta time { color: var(--muted); }
.status-postmortem { margin-top: 17px; padding: 13px 15px; border-radius: 12px; background: #f3f8f9; }
.status-postmortem summary { cursor: pointer; font-weight: 750; }

footer {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto 40px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

footer img { width: 120px; max-height: 35px; object-fit: contain; object-position: left; opacity: .78; }

@media (max-width: 720px) {
  .status-nav, .status-shell, footer { width: min(100% - 24px, 960px); }
  .status-nav { min-height: 66px; }
  .status-brand img { width: 135px; }
  .status-support { display: none; }
  .status-shell { margin-top: 16px; }
  .status-hero { grid-template-columns: auto 1fr; gap: 15px; padding: 24px 20px; border-radius: 22px; }
  .status-hero-icon { width: 48px; height: 48px; border-radius: 15px; }
  .status-hero time { grid-column: 2; align-self: auto; }
  .status-group { padding: 18px 17px 4px; border-radius: 17px; }
  .status-component-main { grid-template-columns: auto 1fr; }
  .status-component-result { grid-column: 2; align-items: flex-start; text-align: left; }
  .status-history-bars {
    width: 100%;
    min-width: 0;
    margin-left: 0;
    gap: 1px;
    overflow: hidden;
  }
  .status-day { min-width: 0; border-radius: 1px; }
  .status-card-heading { flex-direction: column; gap: 3px; }
  .status-incident, .status-maintenance { padding: 20px 18px; }
  footer { align-items: flex-start; gap: 20px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #e7f3f5;
    --muted: #9eb5bb;
    --line: #29464d;
    --panel: rgba(17, 39, 45, .96);
    --page: #0c2026;
  }
  body {
    background:
      radial-gradient(circle at 12% -8%, rgba(14, 116, 144, .24), transparent 33rem),
      radial-gradient(circle at 92% 3%, rgba(13, 148, 136, .15), transparent 30rem),
      linear-gradient(180deg, #102c34 0, var(--page) 25rem);
  }
  .status-nav nav a:hover, .status-support { background: #16333a; }
  .status-postmortem { background: #132e35; }
}
