.stat-body {
  background: var(--color-surface-tint);
}

.stat {
  --stat-operational: var(--color-success);
  --stat-maintenance: var(--color-primary);
  --stat-degraded: #e3a400;
  --stat-degraded-text: #8f6400;
  --stat-partial: #ef6c1a;
  --stat-partial-text: #b94d08;
  --stat-major: var(--color-accent-red);
  --stat-none: #d3dbe3;
  --stat-width: 880px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.stat-head {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

.stat-head-inner,
.stat-main,
.stat-foot {
  width: 100%;
  max-width: calc(var(--stat-width) + 2 * var(--page-gutter));
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.stat-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
}

.stat-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-primary-dark);
}

.stat-logo {
  height: 34px;
}

.stat-brand-label {
  padding-left: 14px;
  border-left: 1px solid var(--color-border);
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.stat-main {
  flex: 1;
  padding-top: 48px;
  padding-bottom: 72px;
}

.stat-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 28px;
  border-radius: var(--radius-2xl);
  background: var(--stat-level);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

.stat-banner-operational {
  --stat-level: var(--stat-operational);
}

.stat-banner-maintenance {
  --stat-level: var(--stat-maintenance);
}

.stat-banner-degraded {
  --stat-level: var(--stat-degraded);
  color: var(--color-navy);
}

.stat-banner-partial {
  --stat-level: var(--stat-partial);
}

.stat-banner-major {
  --stat-level: var(--stat-major);
}

.stat-banner-icon {
  font-size: 36px;
}

.stat-banner-icon :not(:first-child) {
  fill: var(--stat-level);
  stroke: var(--stat-level);
}

.stat-banner-title {
  font-size: 24px;
  line-height: 30px;
}

.stat-banner-time {
  margin-top: 2px;
  font-size: 14px;
  opacity: 0.85;
}

.stat-notice {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--stat-level);
  border-radius: var(--radius-xl);
  background: var(--color-background);
  box-shadow: var(--shadow-soft);
}

.stat-notice-maintenance {
  --stat-level: var(--stat-maintenance);
}

.stat-notice-degraded {
  --stat-level: var(--stat-degraded);
  --stat-level-text: var(--stat-degraded-text);
}

.stat-notice-partial {
  --stat-level: var(--stat-partial);
  --stat-level-text: var(--stat-partial-text);
}

.stat-notice-major {
  --stat-level: var(--stat-major);
}

.stat-notice-title {
  font-size: 20px;
  line-height: 26px;
}

.stat-notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--stat-level-text, var(--stat-level));
  font-size: 14px;
  font-weight: 700;
}

.stat-notice-parts {
  color: var(--color-muted);
  font-weight: 600;
}

.stat-notice-window {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}

.stat-updates {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.stat-update-text {
  font-size: 15px;
  line-height: 23px;
  overflow-wrap: anywhere;
}

.stat-update-status {
  margin-right: 4px;
  font-weight: 800;
}

.stat-update-time {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 13px;
}

.stat-components,
.stat-history {
  margin-top: 56px;
}

.stat-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.stat-section-title {
  font-size: 26px;
  line-height: 32px;
  color: var(--color-navy);
}

.stat-section-note {
  color: var(--color-muted);
  font-size: 14px;
}

.stat-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  background: var(--color-background);
  box-shadow: var(--shadow-soft);
}

.stat-item {
  padding: 22px 28px;
}

.stat-item + .stat-item {
  border-top: 1px solid var(--color-border);
}

.stat-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stat-item-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
}

.stat-item-desc {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 20px;
}

.stat-item-level {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
}

.stat-text-operational {
  color: var(--stat-operational);
}

.stat-text-maintenance {
  color: var(--stat-maintenance);
}

.stat-text-degraded {
  color: var(--stat-degraded-text);
}

.stat-text-partial {
  color: var(--stat-partial-text);
}

.stat-text-major {
  color: var(--stat-major);
}

.stat-bars {
  display: flex;
  gap: 2px;
  height: 34px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.stat-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  background: var(--stat-none);
  transition: opacity 0.2s var(--ease-soft);
}

.stat-bars:hover .stat-bar {
  opacity: 0.55;
}

.stat-bars .stat-bar:hover,
.stat-bars .stat-bar-active {
  opacity: 1;
}

.stat-bar-operational {
  background: var(--stat-operational);
}

.stat-bar-maintenance {
  background: var(--stat-maintenance);
}

.stat-bar-degraded {
  background: var(--stat-degraded);
}

.stat-bar-partial {
  background: var(--stat-partial);
}

.stat-bar-major {
  background: var(--stat-major);
}

.stat-scale {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 13px;
  white-space: nowrap;
}

.stat-scale-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.stat-scale-short {
  display: none;
}

.stat-day {
  margin-top: 28px;
}

.stat-day-date {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.stat-day-empty {
  margin-top: 12px;
  color: var(--color-muted);
  font-size: 15px;
}

.stat-past {
  margin-top: 16px;
}

.stat-past-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.stat-past .stat-updates {
  margin-top: 10px;
}

.stat-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
}

.stat-tip {
  position: fixed;
  top: var(--stat-tip-y);
  left: var(--stat-tip-x);
  z-index: 10;
  width: max-content;
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  line-height: 19px;
  pointer-events: none;
}

.stat-tip-date {
  font-size: 14px;
  font-weight: 800;
}

.stat-tip-uptime {
  margin-top: 2px;
  color: var(--color-muted);
}

.stat-tip-list {
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
  font-weight: 700;
}

@media (max-width: 640px) {
  .stat-logo {
    height: 26px;
  }

  .stat-brand {
    gap: 10px;
  }

  .stat-brand-label {
    padding-left: 10px;
    font-size: 17px;
  }

  .stat-home {
    padding: 0 16px;
  }

  .stat-main {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .stat-banner {
    gap: 14px;
    padding: 18px 20px;
  }

  .stat-banner-icon {
    font-size: 30px;
  }

  .stat-banner-title {
    font-size: 20px;
    line-height: 26px;
  }

  .stat-notice,
  .stat-item {
    padding: 18px 20px;
  }

  .stat-components,
  .stat-history {
    margin-top: 40px;
  }

  .stat-section-title {
    font-size: 22px;
    line-height: 28px;
  }

  .stat-bar:nth-child(-n + 60) {
    display: none;
  }

  .stat-bars {
    gap: 3px;
  }

  .stat-scale {
    gap: 8px;
  }

  .stat-scale-long {
    display: none;
  }

  .stat-scale-short {
    display: inline;
  }

  .stat-foot {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .stat-brand-label {
    display: none;
  }

  .stat-item-head {
    flex-direction: column;
    gap: 2px;
  }
}
