body.health-open #app *,
body.health-open #app *::before,
body.health-open #app *::after {
  animation-play-state: paused !important;
}
.health-card {
  --health-accent: #22d3a6;
  color-scheme: dark;
  width: min(920px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  margin: auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--health-accent) 38%, #25333c);
  border-radius: 3px;
  background: #090f16;
  color: #e4edf2;
  box-shadow: 0 32px 120px #000b;
  overflow: visible;
  font-family: var(--f-cn);
}
.health-card::backdrop {
  background: #02060cbb;
  backdrop-filter: blur(12px) saturate(0.55);
}
.health-card::before,
.health-card::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border: solid var(--health-accent);
  pointer-events: none;
  z-index: 1;
}
.health-card::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}
.health-card::after {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}
.health-card[open] {
  animation: health-arrive 0.22s ease both;
}
.health-shell {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 66px);
  overflow: hidden;
}
.health-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 24px;
  background: radial-gradient(
    ellipse at top left,
    color-mix(in srgb, var(--health-accent) 9%, transparent),
    transparent 65%
  );
}
.health-kicker {
  color: var(--health-accent);
  font: 10px/1.5 var(--f-mono);
  letter-spacing: 0.18em;
  margin: 0 0 12px;
}
.health-header h2 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0;
}
.health-header h2 span {
  color: var(--health-accent);
}
.health-subtitle {
  color: #8fa3b2;
  font-size: 12px;
  margin: 10px 0 0;
}
.health-close,
.health-refresh {
  border: 1px solid #30414d;
  background: #101c26;
  color: #c4d5df;
  font: 12px var(--f-cn);
  padding: 10px 15px;
  cursor: pointer;
  white-space: nowrap;
}
.health-close span {
  font-size: 20px;
  line-height: 12px;
  vertical-align: -1px;
  margin-left: 12px;
  color: #8ba4b3;
}
.health-refresh span {
  color: var(--health-accent);
  margin-left: 10px;
  font-size: 18px;
}
.health-refresh:disabled {
  opacity: 0.45;
  cursor: wait;
}
.health-close:hover,
.health-refresh:hover {
  border-color: var(--health-accent);
  color: white;
}
.health-card :focus-visible {
  outline: 2px solid var(--health-accent);
  outline-offset: 3px;
}
.health-overview {
  display: flex;
  align-items: center;
  gap: 32px;
  border-block: 1px solid #22313c;
  padding: 18px 32px;
  background: #0d1720;
}
.health-overview > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.health-overview b {
  font: 30px/1 var(--f-hud);
  color: #e4edf2;
}
.health-overview [data-count='good'] {
  color: #65d4b4;
}
.health-overview [data-count='attention'] {
  color: #e6b571;
}
.health-overview span {
  font-size: 11px;
  color: #89a0b0;
}
.health-freshness {
  margin: 0 0 0 auto;
  font-size: 11px;
  color: #d8b989;
  max-width: 170px;
  line-height: 1.6;
}
.health-card[data-fresh='true'] .health-freshness {
  color: #73c9b3;
}
.health-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 32px;
  min-height: 140px;
  scrollbar-width: thin;
  scrollbar-color: #334753 transparent;
}
.health-section-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #91a7b6;
  margin: 0 0 12px;
}
.health-section-label > span:last-child {
  font: 9px var(--f-mono);
  letter-spacing: 0.12em;
  color: #577080;
}
.health-groups {
  display: grid;
  gap: 12px;
}
.health-group {
  background: #0c1620;
  border: 1px solid #25343f;
  padding: 17px 20px;
}
.health-group-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.health-group-name {
  min-width: 0;
}
.health-group h3 {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.health-group-name p {
  font:
    10px/1.6 var(--f-mono),
    var(--f-cn);
  color: #75909e;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
.health-badge {
  flex-shrink: 0;
  border: 1px solid #384753;
  background: #18232c;
  color: #9cafbc;
  font-size: 10px;
  padding: 4px 8px;
  line-height: 1.4;
}
.health-group[data-tone='good'] .health-badge {
  border-color: #285249;
  background: #132e2b;
  color: #77d8ba;
}
.health-group[data-tone='warn'] .health-badge {
  border-color: #695432;
  background: #302919;
  color: #ecc37b;
}
.health-group[data-tone='bad'] .health-badge {
  border-color: #643d48;
  background: #301c27;
  color: #f5a2ac;
}
.health-history {
  display: flex;
  gap: 3px;
  margin: 16px 0 12px;
  height: 13px;
}
.health-history i {
  flex: 1;
  min-width: 0;
  background: #263641;
  border-radius: 1px;
}
.health-history .ok,
.health-legend .ok {
  background: #50bfa1;
}
.health-history .slow,
.health-legend .slow {
  background: #d8ac65;
}
.health-history .error,
.health-legend .error {
  background: #d77688;
}
.health-history .empty,
.health-legend .empty {
  background: #30434e;
}
.health-group-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.health-group-meta span {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.health-group-meta small {
  font-size: 10px;
  color: #8299a9;
}
.health-group-meta b {
  font: 12px var(--f-mono);
  color: #cedce5;
}
.health-empty {
  padding: 34px 12px;
  color: #94aaba;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
.health-cdn:empty {
  display: none;
}
.health-cdn {
  margin-top: 22px;
}
.health-cdn-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid #21313c;
  font-size: 11px;
  color: #839dac;
}
.health-cdn-row strong {
  font-weight: 500;
  color: #bdd0dc;
  overflow-wrap: anywhere;
}
.health-cdn-row span {
  text-align: right;
}
.health-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #263541;
  padding: 16px 32px;
  background: #0b131b;
}
.health-updated {
  font-size: 10px;
  color: #7d95a6;
  margin: 0 0 8px;
  line-height: 1.6;
}
.health-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  color: #829aa9;
}
.health-legend i {
  width: 5px;
  height: 5px;
  margin-left: 8px;
}
.health-legend i:first-child {
  margin-left: 0;
}
.nav button.channel-status-link {
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}
@keyframes health-arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 700px) {
  .health-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 28px);
  }
  .health-shell {
    max-height: calc(100dvh - 30px);
  }
  .health-header {
    padding: 22px 18px 18px;
  }
  .health-header h2 {
    font-size: 25px;
  }
  .health-kicker {
    font-size: 8px;
  }
  .health-overview {
    padding: 16px 18px;
    gap: 20px;
    flex-wrap: wrap;
  }
  .health-overview > div {
    flex-direction: column;
    gap: 5px;
  }
  .health-overview b {
    font-size: 27px;
  }
  .health-overview span {
    font-size: 10px;
  }
  .health-freshness {
    flex-basis: 100%;
    max-width: none;
    margin: 0;
    font-size: 10px;
  }
  .health-scroll {
    padding: 18px 14px;
  }
  .health-group {
    padding: 14px;
  }
  .health-group h3 {
    font-size: 12px;
  }
  .health-group-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .health-history {
    gap: 2px;
    height: 10px;
  }
  .health-footer {
    padding: 14px;
    align-items: flex-end;
  }
  .health-refresh {
    padding: 8px 10px;
    font-size: 11px;
  }
  .health-close {
    font-size: 10px;
    padding: 8px 10px;
  }
  .health-cdn-row {
    flex-direction: column;
    gap: 5px;
  }
  .health-cdn-row span {
    text-align: left;
  }
  .health-section-label > span:last-child {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .health-card[open] {
    animation: none;
  }
}

body.health-open {
  overflow: hidden;
}
.health-window {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 32px 0;
}
.health-window button {
  font: 12px var(--f-mono);
  border: 1px solid #30414d;
  background: #101c26;
  color: #a4bac9;
  padding: 7px 13px;
  cursor: pointer;
}
.health-window button[aria-pressed='true'] {
  border-color: var(--health-accent);
  color: var(--health-accent);
  background: color-mix(in srgb, var(--health-accent) 9%, #101c26);
}
.health-window > span {
  font: 10px var(--f-cn);
  color: #91a7b6;
  margin-left: auto;
}
.health-group-meta {
  margin-top: 12px;
}
.health-history button {
  padding: 0;
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 1px;
  cursor: help;
  background: #30434e;
}
.health-history .ok {
  background: #50bfa1;
}
.health-history .slow {
  background: #d8ac65;
}
.health-history .error {
  background: #d77688;
}
.health-point-info {
  min-height: 30px;
  font: 10px/1.6 var(--f-cn);
  color: #a1b4c6;
  margin: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .health-window {
    padding: 12px 14px 0;
    flex-wrap: wrap;
  }
  .health-window > span {
    width: 100%;
    margin: 4px 0 0;
  }
  .health-history {
    height: 16px;
  }
  .health-point-info {
    min-height: 48px;
  }
}
