:root {
  --up-bg: #09090b;
  --up-ink: #f2f2f4;
  --up-muted: #9b9ba6;
  --up-subtle: #6d6d78;
  --up-line: rgba(255, 255, 255, 0.1);
  --up-ok: #7dcf95;
  --up-warn: #d2b36a;
  --up-bad: #e08a8c;
  --up-font: "Manrope", system-ui, sans-serif;
  --up-display: "Syne", "Manrope", system-ui, sans-serif;
  --up-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body.up-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--up-font);
  color: var(--up-ink);
  background: var(--up-bg);
  -webkit-font-smoothing: antialiased;
}

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

.up-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.up-bg__wash {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(55% 45% at 8% 0%, rgba(125, 207, 149, 0.09), transparent 58%),
    radial-gradient(50% 40% at 92% 12%, rgba(210, 179, 106, 0.07), transparent 55%),
    radial-gradient(70% 55% at 50% 110%, rgba(255, 255, 255, 0.04), transparent 60%),
    linear-gradient(180deg, #0d0d10 0%, #09090b 48%, #070708 100%);
}

.up-body--degraded .up-bg__wash {
  background:
    radial-gradient(55% 45% at 10% 0%, rgba(224, 138, 140, 0.12), transparent 58%),
    radial-gradient(50% 40% at 90% 18%, rgba(255, 255, 255, 0.03), transparent 55%),
    linear-gradient(180deg, #120c0d 0%, #09090b 55%, #070708 100%);
}

.up-body--operational .up-bg__wash {
  background:
    radial-gradient(55% 45% at 8% 0%, rgba(125, 207, 149, 0.14), transparent 58%),
    radial-gradient(45% 35% at 88% 10%, rgba(255, 255, 255, 0.035), transparent 55%),
    linear-gradient(180deg, #0c100e 0%, #09090b 52%, #070708 100%);
}

.up-bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}

.up-bg__edge {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 55%);
}

.up-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 0 0;
}

.up-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  animation: up-in 0.55s var(--up-ease) both;
}

.up-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.up-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.up-brand__name {
  font-family: var(--up-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  line-height: 1;
}

.up-brand__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--up-subtle);
  border-bottom: 1px solid var(--up-line);
  padding-bottom: 2px;
}

.up-top__actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.up-lang {
  display: inline-flex;
  gap: 10px;
}

.up-lang a {
  font-size: 12px;
  font-weight: 700;
  color: var(--up-subtle);
  letter-spacing: 0.04em;
}

.up-lang a.is-active {
  color: var(--up-ink);
}

.up-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--up-muted);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.up-back:hover {
  color: var(--up-ink);
  border-bottom-color: rgba(255, 255, 255, 0.28);
}

.up-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 28px;
}

.up-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--up-line);
  animation: up-in 0.65s var(--up-ease) 0.05s both;
}

.up-hero__brand {
  margin: 0 0 10px;
  font-family: var(--up-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.92;
  color: var(--up-ink);
}

.up-hero__title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--up-muted);
}

.up-hero.is-ok .up-hero__title { color: var(--up-ok); }
.up-hero.is-warn .up-hero__title { color: var(--up-warn); }
.up-hero.is-bad .up-hero__title { color: var(--up-bad); }

.up-hero__lead {
  margin: 12px 0 0;
  max-width: 46ch;
  color: var(--up-subtle);
  font-size: 0.95rem;
  line-height: 1.55;
}

.up-hero__signal {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--up-line);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.up-hero__pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--up-subtle);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15);
}

.up-hero.is-ok .up-hero__pulse {
  background: var(--up-ok);
  animation: up-pulse 2.4s var(--up-ease) infinite;
}

.up-hero.is-warn .up-hero__pulse { background: var(--up-warn); }
.up-hero.is-bad .up-hero__pulse {
  background: var(--up-bad);
  animation: up-pulse 1.4s var(--up-ease) infinite;
}

.up-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 40px;
  align-items: start;
  animation: up-in 0.7s var(--up-ease) 0.1s both;
}

.up-panel__head {
  margin-bottom: 18px;
}

.up-panel__head h2 {
  margin: 0;
  font-family: var(--up-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.up-panel__head p {
  margin: 6px 0 0;
  color: var(--up-subtle);
  font-size: 0.88rem;
}

.up-services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.up-svc {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.up-svc:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--up-line);
  transform: translateY(-1px);
}

.up-svc__mark {
  width: 3px;
  height: 28px;
  border-radius: 99px;
  background: var(--up-subtle);
}

.up-svc.is-up .up-svc__mark { background: var(--up-ok); }
.up-svc.is-down .up-svc__mark { background: var(--up-bad); }
.up-svc.is-maint .up-svc__mark { background: var(--up-warn); }

.up-svc__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--up-muted);
}

.up-svc__icon svg {
  width: 18px;
  height: 18px;
}

.up-svc__name {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.up-svc__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--up-subtle);
}

.up-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--up-muted);
}

.up-badge.is-up { color: var(--up-ok); }
.up-badge.is-down { color: var(--up-bad); }
.up-badge.is-maint { color: var(--up-warn); }

.up-panel--history {
  padding-left: 28px;
  border-left: 1px solid var(--up-line);
}

.up-history-empty {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  color: var(--up-subtle);
}

.up-history-empty strong {
  color: var(--up-muted);
  font-size: 0.98rem;
}

.up-history-empty span {
  font-size: 0.9rem;
  line-height: 1.45;
}

.up-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.up-day {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.up-day:first-child {
  border-top: 0;
  padding-top: 2px;
}

.up-day__when {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.up-day__date {
  font-weight: 650;
  letter-spacing: -0.02em;
}

.up-day__state {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--up-subtle);
}

.up-day.is-clear .up-day__state { color: rgba(125, 207, 149, 0.75); }
.up-day.has-incident .up-day__state { color: var(--up-warn); }

.up-day__detail p {
  margin: 0;
  color: var(--up-subtle);
  font-size: 0.9rem;
  line-height: 1.4;
}

.up-day__detail p.is-incident {
  color: var(--up-warn);
}

.up-day__detail p + p {
  margin-top: 4px;
}

.up-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 22px;
  border-top: 1px solid var(--up-line);
  font-size: 12px;
  color: var(--up-subtle);
  animation: up-in 0.55s var(--up-ease) 0.16s both;
}

.up-foot__left,
.up-foot__right {
  min-width: 0;
}

.up-foot__right {
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@keyframes up-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes up-pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 207, 149, 0.45); }
  70% { box-shadow: 0 0 0 14px rgba(125, 207, 149, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 207, 149, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .up-top,
  .up-hero,
  .up-panels,
  .up-foot,
  .up-hero__pulse {
    animation: none !important;
  }
}

@media (max-width: 920px) {
  .up-panels {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .up-panel--history {
    padding-left: 0;
    border-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--up-line);
  }
}

@media (max-width: 640px) {
  .up-shell {
    width: calc(100% - 28px);
    padding-top: 20px;
  }

  .up-brand__tag {
    display: none;
  }

  .up-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .up-hero__signal {
    width: 52px;
    height: 52px;
  }

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

  .up-svc__icon {
    display: none;
  }

  .up-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
