:root {
  color-scheme: light;
  --page: #f6f8fa;
  --surface: #ffffff;
  --surface-muted: #eef3f4;
  --text: #172126;
  --muted: #5d6c72;
  --border: #d8e1e4;
  --teal: #006c74;
  --teal-strong: #00545a;
  --blue: #2066a8;
  --green: #167447;
  --yellow: #8a6500;
  --orange: #b54708;
  --gray: #626e77;
  --red: #b42318;
  --focus: #1c7ed6;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  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;
  letter-spacing: 0;
}

a {
  color: var(--teal-strong);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 96px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: clamp(176px, 15vw, 208px);
  height: auto;
}

.header-copy {
  min-width: 0;
}

.header-copy h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.12;
}

.header-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

main {
  padding-bottom: 32px;
}

.status-banner {
  --report-accent: var(--gray);
  --report-tint: #f1f4f6;
  background: #f5f7f9;
  border-bottom: 1px solid #e4e9ec;
}

.banner-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(620px, 1.1fr);
  align-items: center;
  gap: 32px;
}

.status-banner h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 34px;
  font-weight: 750;
  line-height: 1.05;
}

.report-copy {
  min-width: 0;
}

.report-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.overall-status {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.report-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.network-totals {
  display: grid;
  grid-template-columns: repeat(6, minmax(86px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #d9e1e5;
  border-radius: 8px;
  background: #d9e1e5;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.05);
}

.report-card {
  min-width: 0;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 0;
  border-top: 3px solid transparent;
  border-radius: 0;
  padding: 11px 13px 12px;
  background: rgba(255, 255, 255, 0.86);
}

.report-value {
  color: var(--report-accent);
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0;
}

.report-label {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.report-card-Total {
  border-top-color: var(--teal);
}

.report-card-Total .report-value {
  color: var(--teal);
}

.report-card-Operational {
  border-top-color: var(--green);
}

.report-card-Operational .report-value {
  color: var(--green);
}

.report-card-Delayed {
  border-top-color: var(--yellow);
}

.report-card-Delayed .report-value {
  color: var(--yellow);
}

.report-card-Offline {
  border-top-color: var(--orange);
}

.report-card-Offline .report-value {
  color: var(--orange);
}

.report-card-Maintenance {
  border-top-color: var(--blue);
}

.report-card-Maintenance .report-value {
  color: var(--blue);
}

.report-card-Unknown {
  border-top-color: var(--gray);
}

.report-card-Unknown .report-value {
  color: var(--gray);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-transform: none;
}

.status-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: currentColor;
  box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 16%, transparent);
}

.status-banner.status-Operational {
  --report-accent: var(--green);
  --report-tint: #eefaf3;
}

.status-banner.status-Delayed {
  --report-accent: var(--yellow);
  --report-tint: #fff7df;
}

.status-banner.status-Offline {
  --report-accent: var(--orange);
  --report-tint: #fff0e8;
}

.status-banner.status-Maintenance {
  --report-accent: var(--blue);
  --report-tint: #ecf5ff;
}

.status-banner.status-Unknown {
  --report-accent: var(--gray);
  --report-tint: #f1f4f6;
}

.content-section,
.error-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
}

.error-panel {
  border: 1px solid #f1b8b3;
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--red);
  background: #fff2f1;
}

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

.section-heading h2,
.group-title h3 {
  margin: 0;
}

.section-heading h2 {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.2;
}

.incidents-list,
.groups-root {
  display: grid;
  gap: 16px;
}

.incident-card,
.group-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.incident-card {
  padding: 16px;
}

.incident-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.incident-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.incident-card p {
  margin: 8px 0 0;
}

.incident-meta,
.equipment-meta,
.source-text,
.footer-note {
  color: var(--muted);
  font-size: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.chip,
.badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid currentColor;
  padding: 3px 9px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.chip {
  color: var(--teal-strong);
  background: #eefafa;
}

.badge-Major,
.badge-Offline {
  color: var(--orange);
  background: #fff0e8;
}

.badge-Minor,
.badge-Delayed {
  color: var(--yellow);
  background: #fff7df;
}

.badge-Maintenance {
  color: var(--blue);
  background: #ecf5ff;
}

.badge-Operational {
  color: var(--green);
  background: #eefaf3;
}

.badge-Unknown {
  color: var(--gray);
  background: #f1f4f6;
}

.group-block {
  overflow: hidden;
}

.group-title {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}

.group-title h3 {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.equipment-list {
  display: grid;
}

.equipment-row {
  display: grid;
  grid-template-columns: minmax(150px, 170px) minmax(220px, 1fr) minmax(150px, 190px) minmax(160px, 220px) auto;
  gap: 16px;
  align-items: center;
  min-height: 86px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.equipment-row:first-child {
  border-top: 0;
}

.equipment-main {
  min-width: 0;
}

.equipment-name {
  display: block;
  color: var(--text);
  font-size: 15.5px;
  font-weight: 750;
  text-decoration: none;
}

.equipment-name:hover {
  text-decoration: underline;
}

.equipment-message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

.last-data,
.eta-data {
  min-width: 0;
}

.last-data strong,
.eta-data strong {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
}

.last-data span,
.eta-data span,
.source-text {
  overflow-wrap: anywhere;
}

.source-text {
  justify-self: end;
  text-align: right;
}

.status-pill {
  justify-content: center;
  width: fit-content;
  min-width: 120px;
}

.status-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
}

.loading-list {
  display: grid;
  gap: 10px;
}

[hidden] {
  display: none !important;
}

.snapshot-empty {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: var(--surface);
}

.skeleton-row {
  height: 78px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent),
    #e8eef1;
  background-size: 240px 100%, 100% 100%;
  animation: shimmer 1.4s infinite linear;
}

.site-footer,
.noscript {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@keyframes shimmer {
  from {
    background-position: -240px 0, 0 0;
  }
  to {
    background-position: calc(100% + 240px) 0, 0 0;
  }
}

@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;
  }
}

@media (max-width: 1000px) {
  .banner-inner {
    grid-template-columns: 1fr;
    padding: 26px 0;
  }

  .network-totals {
    grid-template-columns: repeat(3, minmax(104px, 1fr));
  }

  .equipment-row {
    grid-template-columns: minmax(140px, auto) minmax(260px, 1fr);
  }

  .source-text {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 88px;
    gap: 14px;
  }

  .brand img {
    width: 124px;
  }

  .header-copy h1 {
    font-size: 23px;
  }

  .banner-inner {
    min-height: 0;
  }

  .status-banner h2 {
    font-size: 27px;
  }

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

  .report-card {
    min-height: 72px;
  }

  .group-title,
  .incident-topline,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary {
    justify-content: flex-start;
  }

  .equipment-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .status-pill {
    min-width: 132px;
  }
}
