:root {
  color-scheme: dark;
  --bg: #0b1014;
  --panel: #111921;
  --panel-strong: #15212b;
  --line: rgba(180, 198, 214, 0.16);
  --text: #f4f7f8;
  --muted: #9fafba;
  --soft: #d7e1e7;
  --green: #39d98a;
  --green-soft: rgba(57, 217, 138, 0.16);
  --amber: #f3bb3f;
  --amber-soft: rgba(243, 187, 63, 0.16);
  --red: #ff6b70;
  --red-soft: rgba(255, 107, 112, 0.16);
  --cyan: #59c7f9;
  --cyan-soft: rgba(89, 199, 249, 0.14);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(89, 199, 249, 0.12), transparent 32rem),
    linear-gradient(180deg, #0b1014 0%, #0e151b 42%, #0b1014 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.status-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 171px;
}

.brand img {
  display: block;
  width: 171px;
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.refresh-state {
  min-width: 12rem;
  text-align: right;
}

.refresh-button {
  min-width: 6.5rem;
  min-height: 2.5rem;
  border: 1px solid rgba(89, 199, 249, 0.5);
  border-radius: 8px;
  background: rgba(89, 199, 249, 0.1);
  color: var(--text);
  cursor: pointer;
}

.refresh-button:hover,
.refresh-button:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 28px;
  align-items: end;
  padding: 76px 0 30px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 13ch;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.7rem);
  line-height: 0.94;
  font-weight: 850;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--soft);
  font-size: 1.12rem;
  overflow-wrap: break-word;
}

.overall-card,
.metric,
.service-card,
.incident-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 25, 33, 0.88);
  box-shadow: var(--shadow);
}

.overall-card {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 16px;
  padding: 22px;
}

.status-dot {
  width: 14px;
  height: 14px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--muted);
  box-shadow: 0 0 0 7px rgba(159, 175, 186, 0.12);
}

.status-dot.small {
  width: 11px;
  height: 11px;
  margin-top: 6px;
}

[data-status="operational"] .status-dot,
.service-card[data-status="operational"] .status-dot,
.incident-card .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 7px var(--green-soft);
}

[data-status="degraded"] .status-dot,
.service-card[data-status="degraded"] .status-dot,
[data-status="stale"] .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 7px var(--amber-soft);
}

[data-status="outage"] .status-dot,
.service-card[data-status="outage"] .status-dot,
[data-status="unavailable"] .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 7px var(--red-soft);
}

.overall-label,
.metric-label,
.check-meta,
#feed-note {
  color: var(--muted);
  font-size: 0.86rem;
}

.overall-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.35rem;
  line-height: 1.15;
}

.overall-card span:last-child {
  display: block;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 34px;
}

.metric {
  min-height: 112px;
  padding: 18px;
  background: rgba(21, 33, 43, 0.72);
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 1.8rem;
  line-height: 1.1;
}

#metric-checked {
  font-size: 1.08rem;
  line-height: 1.25;
}

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

.service-list {
  display: grid;
  gap: 14px;
}

.service-card {
  padding: 20px;
  background: rgba(17, 25, 33, 0.86);
}

.service-topline {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 16px;
}

.service-card h3 {
  margin: 0 0 3px;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.service-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.service-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.4rem;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 750;
  text-transform: uppercase;
}

.service-card[data-status="operational"] .service-pill {
  border-color: rgba(57, 217, 138, 0.38);
  background: var(--green-soft);
  color: #bdf7d9;
}

.service-card[data-status="degraded"] .service-pill {
  border-color: rgba(243, 187, 63, 0.42);
  background: var(--amber-soft);
  color: #ffe2a0;
}

.service-card[data-status="outage"] .service-pill {
  border-color: rgba(255, 107, 112, 0.42);
  background: var(--red-soft);
  color: #ffc1c4;
}

.checks {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(180, 198, 214, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(7, 12, 16, 0.24);
}

.check-name {
  overflow-wrap: anywhere;
  color: var(--soft);
  font-weight: 650;
}

.check-meta {
  display: block;
  margin-top: 1px;
}

.check-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.2rem;
  min-height: 1.9rem;
  border-radius: 999px;
  background: rgba(159, 175, 186, 0.12);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 760;
}

.check-result.ok {
  background: var(--green-soft);
  color: #bdf7d9;
}

.check-result.fail {
  background: var(--red-soft);
  color: #ffc1c4;
}

.incident-section {
  margin-top: 34px;
}

.incident-card {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 14px;
  padding: 18px 20px;
}

.incident-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.status-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-footer a:hover,
.status-footer a:focus-visible {
  color: var(--text);
  outline: none;
}

.skeleton {
  pointer-events: none;
}

.service-title-placeholder,
.check-row-placeholder {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(159, 175, 186, 0.1), rgba(159, 175, 186, 0.2), rgba(159, 175, 186, 0.1));
  background-size: 220% 100%;
  animation: loading-sheen 1.8s ease-in-out infinite;
}

.service-title-placeholder {
  width: 12rem;
  height: 1.2rem;
}

.check-row-placeholder {
  width: 100%;
  height: 2.75rem;
  margin-top: 10px;
}

.check-row-placeholder.short {
  width: 68%;
}

@keyframes loading-sheen {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -220% 0;
  }
}

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

@media (max-width: 820px) {
  .status-shell {
    width: min(640px, calc(100vw - 24px));
    padding-top: 18px;
  }

  .status-header,
  .section-heading,
  .header-actions {
    align-items: flex-start;
  }

  .status-header,
  .hero,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .status-header,
  .header-actions,
  .section-heading {
    flex-direction: column;
  }

  .refresh-state {
    min-width: 0;
    text-align: left;
  }

  .hero {
    padding-top: 48px;
  }

  h1 {
    max-width: 11ch;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-topline,
  .check-row {
    grid-template-columns: 1fr;
  }

  .service-topline {
    gap: 10px;
  }

  .service-topline > .status-dot {
    display: none;
  }

  .service-pill,
  .check-result {
    justify-self: start;
  }

  .status-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: min(640px, calc(100vw - 24px));
  }
}

@media (max-width: 560px) {
  .status-shell,
  .status-footer {
    width: min(366px, calc(100vw - 24px));
    margin-left: 12px;
    margin-right: auto;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .metric {
    min-height: 92px;
  }
}
