:root {
  color-scheme: light;
  --brand: #10a879;
  --brand-dark: #087d5a;
  --brand-deep: #075842;
  --ink: #10211c;
  --muted: #64736e;
  --surface: #ffffff;
  --surface-soft: #f5faf8;
  --border: #dfeae6;
  --shadow: 0 18px 50px rgba(12, 64, 48, 0.10);
  --operational: #0ca678;
  --degraded: #e89b19;
  --outage: #d94a4a;
  --maintenance: #4174d9;
  --unknown: #7d8b87;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 168, 121, 0.08), transparent 26rem),
    #fbfdfc;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(16, 168, 121, 0.32);
  outline-offset: 3px;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 234, 230, 0.85);
  background: rgba(251, 253, 252, 0.88);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

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

.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #cce8dd;
  border-radius: 999px;
  background: #effaf6;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #30413b;
  font-size: 0.94rem;
  font-weight: 650;
}

.top-nav > a:not(.button) {
  text-decoration: none;
}

.top-nav > a:not(.button):hover {
  color: var(--brand-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(25, 74, 58, 0.06);
}

.button-secondary:hover {
  border-color: #b9d9ce;
  box-shadow: 0 9px 22px rgba(25, 74, 58, 0.10);
}

.button-light {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 8px 22px rgba(0, 69, 47, 0.16);
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero {
  padding-top: 72px;
}

.hero-copy {
  max-width: 760px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #b8f2df;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 5vw, 4.15rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.hero-subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.overall-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 180px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: var(--shadow);
  transition: background 240ms ease;
}

.overall-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -80px;
  top: -150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
}

.overall-card.status-operational {
  background: linear-gradient(135deg, #0ba674 0%, #087f5b 100%);
}

.overall-card.status-degraded {
  background: linear-gradient(135deg, #e59b20 0%, #bd6e11 100%);
}

.overall-card.status-partial_outage,
.overall-card.status-major_outage {
  background: linear-gradient(135deg, #d94a4a 0%, #a92535 100%);
}

.overall-card.status-maintenance {
  background: linear-gradient(135deg, #4174d9 0%, #2754b2 100%);
}

.overall-card.status-unknown {
  background: linear-gradient(135deg, #687a74 0%, #43534e 100%);
}

.overall-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.overall-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.status-symbol-alert {
  display: none;
}

.status-degraded .status-symbol-check,
.status-partial_outage .status-symbol-check,
.status-major_outage .status-symbol-check,
.status-maintenance .status-symbol-check,
.status-unknown .status-symbol-check {
  display: none;
}

.status-degraded .status-symbol-alert,
.status-partial_outage .status-symbol-alert,
.status-major_outage .status-symbol-alert,
.status-maintenance .status-symbol-alert,
.status-unknown .status-symbol-alert {
  display: block;
}

.overall-copy,
.overall-actions {
  position: relative;
  z-index: 1;
}

.overall-kicker {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.overall-copy h2 {
  margin-bottom: 5px;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.overall-copy p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
}

.overall-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 11px;
}

.last-checked {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.83rem;
  white-space: nowrap;
}

.content-section {
  padding-top: 72px;
}

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

.section-heading.compact {
  min-height: 67px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
}

.auto-refresh,
.history-window {
  color: var(--muted);
  font-size: 0.86rem;
}

.auto-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--operational);
  box-shadow: 0 0 0 6px rgba(12, 166, 120, 0.11);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(12, 166, 120, 0.10); }
  50% { box-shadow: 0 0 0 9px rgba(12, 166, 120, 0.02); }
}

.service-groups {
  display: grid;
  gap: 18px;
}

.service-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(19, 68, 52, 0.06);
}

.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #fbfdfc 100%);
}

.group-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 820;
}

.group-summary {
  color: var(--muted);
  font-size: 0.82rem;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 21px 22px;
}

.service-row + .service-row {
  border-top: 1px solid var(--border);
}

.service-name {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 760;
}

.service-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.service-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.response-time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 112px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 820;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pill-operational {
  background: #e9f8f2;
  color: #087e5b;
}

.pill-degraded {
  background: #fff6df;
  color: #b96b0e;
}

.pill-outage {
  background: #feeeee;
  color: #bd3443;
}

.pill-maintenance {
  background: #edf2ff;
  color: #315fbf;
}

.pill-unknown {
  background: #eef2f1;
  color: #61706b;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.operational { background: var(--operational); }
.legend-dot.degraded { background: var(--degraded); }
.legend-dot.outage { background: var(--outage); }
.legend-dot.maintenance { background: var(--maintenance); }
.legend-dot.unknown { background: var(--unknown); }

.two-column-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.timeline-card,
.history-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(19, 68, 52, 0.06);
}

.timeline-card {
  min-height: 150px;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 150px;
  padding: 24px;
}

.empty-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eaf8f3;
  color: var(--operational);
  font-size: 1.1rem;
  font-weight: 900;
}

.maintenance-icon {
  background: #edf2ff;
  color: var(--maintenance);
}

.empty-state h3 {
  margin-bottom: 3px;
  font-size: 1rem;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.incident-card {
  padding: 23px;
}

.incident-card + .incident-card {
  border-top: 1px solid var(--border);
}

.incident-card h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.incident-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.incident-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.history-list {
  overflow: hidden;
}

.history-day {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 104px;
}

.history-day + .history-day {
  border-top: 1px solid var(--border);
}

.history-date {
  padding: 24px;
  background: var(--surface-soft);
  color: #33443e;
  font-size: 0.88rem;
  font-weight: 760;
}

.history-content {
  padding: 22px 24px;
}

.history-content.no-incident {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-content p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.check-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #eaf8f3;
  color: var(--operational);
  font-weight: 900;
}

.history-incident-title {
  margin-bottom: 6px;
  font-size: 1rem;
}

.history-updates {
  display: grid;
  gap: 11px;
  margin-top: 15px;
}

.history-update {
  padding-left: 15px;
  border-left: 2px solid #d8e9e3;
}

.history-update strong {
  font-size: 0.82rem;
}

.history-update time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.history-update p {
  margin-top: 4px;
}

.support-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 72px;
  margin-bottom: 72px;
  padding: 34px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 80% -40%, rgba(255, 255, 255, 0.15), transparent 25rem),
    linear-gradient(135deg, #0a7355 0%, #084835 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.support-panel h2 {
  max-width: 750px;
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.support-panel p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.74);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #f5faf8;
}

.footer-wrap {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-wrap strong {
  font-size: 0.95rem;
}

.footer-wrap p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.footer-links a:hover {
  color: var(--brand-dark);
}

.loading-card {
  padding: 23px;
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #edf3f1 25%, #f7faf9 50%, #edf3f1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

.skeleton-title {
  width: 34%;
  height: 18px;
  margin-bottom: 22px;
}

.skeleton-row {
  height: 58px;
  margin-top: 12px;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

.is-refreshing #refresh-button svg {
  animation: spin 720ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  max-width: 680px;
  margin: auto;
  padding: 12px 16px;
  border-radius: 10px;
  background: #8b2531;
  color: #fff;
  text-align: center;
}

@media (max-width: 820px) {
  .top-nav > a:not(.button) {
    display: none;
  }

  .overall-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .overall-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .two-column-section {
    grid-template-columns: 1fr;
  }

  .history-day {
    grid-template-columns: 150px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  .nav-wrap {
    min-height: 74px;
  }

  .brand img {
    width: 160px;
  }

  .status-label {
    display: none;
  }

  .top-nav .button {
    min-height: 39px;
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .hero {
    padding-top: 48px;
  }

  .overall-card {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .overall-icon {
    width: 54px;
    height: 54px;
  }

  .overall-actions {
    grid-column: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-heading.compact {
    min-height: 0;
  }

  .content-section {
    padding-top: 54px;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .service-meta {
    justify-content: space-between;
  }

  .history-day {
    grid-template-columns: 1fr;
  }

  .history-date {
    padding: 14px 19px;
    border-bottom: 1px solid var(--border);
  }

  .history-content {
    padding: 19px;
  }

  .support-panel {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 54px;
    margin-bottom: 54px;
    padding: 26px;
  }

  .footer-wrap {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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