:root {
  color-scheme: light;
  --navy-950: #07192d;
  --navy-900: #0b233f;
  --navy-800: #12385f;
  --blue-600: #1769e0;
  --blue-100: #e9f2ff;
  --ink-900: #10253a;
  --ink-700: #3c5266;
  --ink-500: #6b7f91;
  --surface: #ffffff;
  --surface-soft: #f5f8fb;
  --border: #dce5ec;
  --green-700: #137052;
  --green-500: #29a975;
  --green-100: #e5f7ef;
  --amber-700: #8a5a00;
  --amber-500: #d99716;
  --amber-100: #fff4d8;
  --red-700: #a33a44;
  --red-500: #d84f5d;
  --red-100: #fdebee;
  --gray-500: #8495a4;
  --gray-100: #edf2f5;
  --shadow: 0 18px 45px rgba(15, 39, 65, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface-soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 15% -10%, rgba(23, 105, 224, 0.09), transparent 35rem),
    var(--surface-soft);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 2rem, 70rem);
  margin-inline: auto;
}

.site-header {
  color: #fff;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-900));
  border-bottom: 3px solid var(--blue-600);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  color: var(--navy-900);
  background: #fff;
  border-radius: 0.65rem;
  font-size: 1.18rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.brand-name {
  font-size: 1.28rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.page-name {
  color: #b9cbe0;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro {
  display: flex;
  gap: 2rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: 4.5rem 0 2rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.45rem;
  color: var(--blue-600);
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.7rem;
  color: var(--navy-900);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--ink-700);
  font-size: 1.05rem;
}

.environment-badge {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  color: var(--navy-800);
  background: var(--blue-100);
  border: 1px solid #c9defd;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.overall-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 7.6rem;
  padding: 1.5rem 1.65rem;
  margin-bottom: 1.25rem;
  color: var(--green-700);
  background: linear-gradient(135deg, #f6fdf9, var(--green-100));
  border: 1px solid #bde7d5;
  border-radius: 1.15rem;
  box-shadow: var(--shadow);
}

.overall-card.status-degraded {
  color: var(--amber-700);
  background: linear-gradient(135deg, #fffdf7, var(--amber-100));
  border-color: #efda9b;
}

.overall-card.status-major_outage {
  color: var(--red-700);
  background: linear-gradient(135deg, #fff9fa, var(--red-100));
  border-color: #f2c5cb;
}

.overall-card.status-unknown {
  color: var(--ink-700);
  background: linear-gradient(135deg, #fbfcfd, var(--gray-100));
  border-color: var(--border);
}

.overall-icon {
  display: grid;
  width: 3.35rem;
  height: 3.35rem;
  place-items: center;
  color: #fff;
  background: var(--green-500);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(41, 169, 117, 0.22);
}

.status-degraded .overall-icon {
  background: var(--amber-500);
  box-shadow: 0 8px 20px rgba(217, 151, 22, 0.2);
}

.status-major_outage .overall-icon {
  background: var(--red-500);
  box-shadow: 0 8px 20px rgba(216, 79, 93, 0.2);
}

.status-unknown .overall-icon {
  background: var(--gray-500);
  box-shadow: none;
}

.overall-icon svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.status-icon-alert,
.status-degraded .status-icon-check,
.status-major_outage .status-icon-check,
.status-unknown .status-icon-check {
  display: none;
}

.status-degraded .status-icon-alert,
.status-major_outage .status-icon-alert,
.status-unknown .status-icon-alert {
  display: initial;
}

.overall-label {
  margin-bottom: 0.2rem;
  font-size: clamp(1.18rem, 3vw, 1.52rem);
  font-weight: 780;
  letter-spacing: -0.025em;
}

.overall-detail {
  margin-bottom: 0;
  color: var(--ink-700);
  font-size: 0.9rem;
}

.live-indicator {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-self: end;
  color: var(--ink-700);
  font-size: 0.78rem;
  font-weight: 650;
}

.live-dot {
  position: relative;
  width: 0.56rem;
  height: 0.56rem;
  background: currentColor;
  border-radius: 50%;
}

.status-operational .live-dot::after {
  position: absolute;
  inset: -0.28rem;
  border: 1px solid var(--green-500);
  border-radius: 50%;
  content: "";
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; transform: scale(0.5); }
  80%, 100% { opacity: 0; transform: scale(1.25); }
}

.panel {
  padding: 1.5rem 1.65rem;
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  box-shadow: 0 8px 30px rgba(15, 39, 65, 0.045);
}

.panel-heading {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.panel-heading h2 {
  margin-bottom: 0;
  color: var(--navy-900);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.last-checked {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.78rem;
  text-align: right;
}

.component-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 5.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.component-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.component-name-wrap {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.component-status-dot {
  flex: 0 0 auto;
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.35rem;
  background: var(--green-500);
  border: 3px solid var(--green-100);
  border-radius: 50%;
  box-sizing: content-box;
}

.status-degraded .component-status-dot {
  background: var(--amber-500);
  border-color: var(--amber-100);
}

.status-major_outage .component-status-dot {
  background: var(--red-500);
  border-color: var(--red-100);
}

.status-unknown .component-status-dot,
.is-loading .component-status-dot {
  background: var(--gray-500);
  border-color: var(--gray-100);
}

.component-row h3 {
  margin-bottom: 0.2rem;
  color: var(--ink-900);
  font-size: 0.98rem;
}

.component-row p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.status-pill,
.incident-badge {
  flex: 0 0 auto;
  padding: 0.38rem 0.68rem;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 720;
}

.status-degraded .status-pill {
  color: var(--amber-700);
  background: var(--amber-100);
}

.status-major_outage .status-pill {
  color: var(--red-700);
  background: var(--red-100);
}

.status-unknown .status-pill,
.is-loading .status-pill {
  color: var(--ink-700);
  background: var(--gray-100);
}

.uptime-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.2fr) minmax(12rem, 3fr) 4.5rem;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-700);
  font-size: 0.85rem;
}

.uptime-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.uptime-track {
  height: 0.55rem;
  overflow: hidden;
  background: var(--gray-100);
  border-radius: 999px;
}

.uptime-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-500), #47c792);
  border-radius: inherit;
  transition: width 450ms ease;
}

.uptime-row strong {
  color: var(--ink-900);
  font-size: 0.82rem;
  text-align: right;
}

.empty-state {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding-top: 1.25rem;
}

.empty-state-icon {
  display: grid;
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 50%;
  font-weight: 800;
}

.empty-state h3,
.incident-item h3 {
  margin-bottom: 0.18rem;
  color: var(--ink-900);
  font-size: 0.95rem;
}

.empty-state p,
.incident-item p {
  margin-bottom: 0;
  color: var(--ink-500);
  font-size: 0.82rem;
}

.incident-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.incident-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.impact-major_outage .incident-badge {
  color: var(--red-700);
  background: var(--red-100);
}

.impact-degraded .incident-badge {
  color: var(--amber-700);
  background: var(--amber-100);
}

.monitoring-note {
  max-width: 46rem;
  margin: 1.5rem auto 4.5rem;
  color: var(--ink-500);
  font-size: 0.78rem;
  text-align: center;
}

.site-footer {
  color: #b9cbe0;
  background: var(--navy-950);
  font-size: 0.78rem;
}

.footer-inner {
  min-height: 5.5rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: #dbe7f4;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 1.25rem, 70rem);
  }

  .intro {
    align-items: flex-start;
    padding-top: 3rem;
  }

  .overall-card {
    grid-template-columns: auto 1fr;
    padding: 1.25rem;
  }

  .live-indicator {
    grid-column: 2;
    justify-self: start;
  }

  .panel {
    padding: 1.25rem;
  }

  .panel-heading {
    display: block;
  }

  .last-checked {
    margin-top: 0.45rem;
    text-align: left;
  }

  .uptime-row {
    grid-template-columns: 1fr auto;
  }

  .uptime-track {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .page-name {
    display: none;
  }

  .intro {
    display: block;
  }

  .environment-badge {
    display: inline-block;
    margin-top: 1.25rem;
  }

  .component-row,
  .incident-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill,
  .incident-badge {
    margin-left: 1.72rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
