:root {
  color-scheme: dark;
  --void: #020410;
  --box: #161616;
  --box-alt: #1b1b1a;
  --edge: #272625;
  --ink: #fdfdfd;
  --subheading: #cac8c4;
  --body: #888888;
  --accent: #8a4fff;
  --link: #7088f7;
  --up: #4ade80;
  --down: #f87171;
  --degraded: #fbbf24;
  --panel: rgb(22 22 22 / 0.6);
  --strip: rgb(255 255 255 / 0.04);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --z-nav: 10;

  --body-background-color: var(--void);
  --body-text-color: var(--subheading);
  --card-background-color: var(--panel);
  --card-border-color: var(--edge);
  --nav-background-color: rgb(2 4 16 / 0.9);
  --nav-border-bottom-color: var(--edge);
  --nav-current-border-bottom-color: transparent;
  --up-border-left-color: var(--edge);
  --down-border-left-color: var(--edge);
  --degraded-border-left-color: var(--edge);
  --down-background-color: rgb(248 113 113 / 0.06);
  --tag-color: var(--void);
  --tag-up-background-color: var(--up);
  --tag-down-background-color: var(--down);
  --tag-degraded-background-color: var(--degraded);
  --change-background-color: rgb(138 79 255 / 0.25);
  --error-button-border-color: var(--accent);
  --error-button-background-color: var(--accent);
  --error-button-color: #fff;
  --submit-button-border-color: var(--accent);
  --submit-button-background-color: var(--accent);
  --submit-button-color: #fff;
  --code-color: var(--ink);
  --code-background-color: var(--box-alt);
}

:root body {
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.6;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

:root ::selection {
  background: rgb(138 79 255 / 0.35);
  color: var(--ink);
}

:root .container {
  max-width: 760px;
  padding: 0 16px;
}

:root h1,
:root h2,
:root h3,
:root h4 {
  color: var(--ink);
  text-wrap: balance;
  letter-spacing: -0.01em;
}

:root a {
  color: var(--link);
  text-decoration-color: rgb(112 136 247 / 0.4);
  text-underline-offset: 0.2em;
  transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease),
    background-color 150ms var(--ease), border-color 150ms var(--ease);
}
:root a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}
:root a:focus-visible,
:root input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

:root:root nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: 56px;
  padding: 0;
  margin-bottom: 0;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
:root:root nav .container {
  height: 100%;
}
:root:root nav ul {
  height: 100%;
}
:root:root nav ul a {
  padding: 5px 10px;
  color: var(--subheading);
  font-size: 0.8125rem;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.02);
  text-decoration: none;
}
:root:root nav ul a:hover {
  color: var(--ink);
  border-color: #3a3836;
  background: rgb(255 255 255 / 0.05);
}
:root:root .logo {
  float: none;
  margin-right: 1rem;
  padding: 0;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
:root:root .logo img {
  height: 22px;
  width: 22px;
  margin: 0;
  border-radius: 0;
}

:root:root main.container {
  display: flex;
  flex-direction: column;
  padding-top: 48px;
}
:root:root main > * {
  order: 2;
}
:root:root main > article.up {
  order: 0;
}
:root:root main > header {
  order: 1;
  margin: 0 0 40px;
}
:root:root main > header h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:root:root p.lead {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--body);
  max-width: 65ch;
}

:root:root p.lead[data-checked]::after {
  content: " Last checked " attr(data-checked) ".";
}

:root:root main > article.up {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  font-size: 0;
}
:root:root main > article.up::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 14px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 0 rgb(74 222 128 / 0.5);
  animation: live 2.4s var(--ease) infinite;
}
:root:root main > article.up::after {
  content: "All systems operational";
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
}
:root:root main:has(.down-active) > header::before {
  content: "Robolyst is down";
  display: block;
  padding-left: 24px;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
  background: radial-gradient(circle at 5px 50%, var(--down) 5px, transparent 5.5px);
}
:root:root main:has(.down-active.degraded):not(:has(.down-active:not(.degraded))) > header::before {
  content: "Robolyst is degraded";
  background: radial-gradient(circle at 5px 50%, var(--degraded) 5px, transparent 5.5px);
}
@keyframes live {
  0% {
    box-shadow: 0 0 0 0 rgb(74 222 128 / 0.45);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgb(74 222 128 / 0);
  }
}

:root h2 {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0;
}
:root section + h2 {
  margin-top: 0;
}
:root h4 {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0;
}

:root article {
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--body);
  font-size: 0.8125rem;
}
:root article.up,
:root article.down,
:root article.degraded {
  border-left-width: 1px;
}

:root:root main > div.f {
  margin: 0;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--edge);
  border-radius: 8px 8px 0 0;
  background: var(--strip);
}
:root:root form.f.r {
  gap: 2px;
}
:root:root .r label {
  display: block;
  margin: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--body);
  cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
:root:root .r label:hover {
  color: var(--ink);
}
:root:root .r input:checked + label {
  font-weight: 700;
  color: var(--ink);
  background: rgb(255 255 255 / 0.08);
}

:root:root .live-status {
  border: 1px solid var(--edge);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--panel);
  overflow: hidden;
}
:root:root .live-status article.graph {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 32px;
  margin: 0;
  padding: 16px 16px 48px;
  border: 0;
  border-radius: 0;
  background: none;
}
:root:root .live-status article + article {
  border-top: 1px solid var(--edge);
}
:root:root .live-status article.graph::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 28px;
  z-index: -1;
  background: var(--accent);
  -webkit-mask: var(--background) center / 100% 100% no-repeat;
  mask: var(--background) center / 100% 100% no-repeat;
  opacity: 0.4;
  pointer-events: none;
}
:root:root .live-status article.down::before {
  background: var(--down);
}
:root:root .live-status article.degraded::before {
  background: var(--degraded);
}
:root:root .live-status article.link a {
  pointer-events: none;
  color: var(--ink);
  text-decoration: none;
}
:root:root .live-status article.link a::after {
  display: none;
}
:root:root .live-status h4 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 0.9375rem;
}
:root:root .live-status h4 .icon {
  height: 16px;
  width: 16px;
  margin: 0;
  transform: none;
  border-radius: 3px;
}
:root:root .live-status h4::after {
  content: "Operational";
  padding-left: 13px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--up);
  background: radial-gradient(circle at 3.5px 50%, currentColor 3px, transparent 3.5px);
}
:root:root .live-status article.down h4::after {
  content: "Down";
  color: var(--down);
}
:root:root .live-status article.degraded h4::after {
  content: "Degraded";
  color: var(--degraded);
}
:root:root .live-status article > div {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--body);
}
:root:root .live-status .data {
  padding: 0;
  font-size: 1rem;
  line-height: 1.3;
}
:root:root .data {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  border-radius: 4px;
  transition: background-color 300ms var(--ease);
}

:root:root main > section:has(> h2):not(.live-status) {
  margin-top: 32px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
:root:root main > section:has(> h2):not(.live-status):first-of-type {
  margin-top: 0;
  margin-bottom: 32px;
}
:root:root main > section:has(.down-active) {
  border-color: rgb(248 113 113 / 0.45);
}
:root:root main > section > h2 {
  margin: 0;
  padding: 10px 16px;
  background: var(--strip);
  border-bottom: 1px solid var(--edge);
}
:root:root main > section > h3 {
  margin: 0;
  padding: 12px 16px 0;
  opacity: 1;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--body);
}
:root:root main > section > h3:not(h2 + h3) {
  border-top: 1px solid var(--edge);
}
:root:root main > section > article {
  margin: 0;
  padding: 4px 16px 14px;
  border: 0;
  border-radius: 0;
  background: none;
}
:root:root main > section > article + article {
  padding-top: 14px;
  border-top: 1px solid var(--edge);
}
:root:root main > section > article.down-active {
  padding-top: 14px;
  background: var(--down-background-color);
}
:root:root main > section > article h4 {
  margin-bottom: 2px;
}
:root:root main > section > article .f {
  gap: 8px 24px;
}
:root:root main > section > article .r a {
  position: static;
  color: var(--link);
  font-size: 0.8125rem;
  text-decoration: none;
}
:root:root main > section > article .r a:hover {
  color: var(--ink);
}
:root:root main > section > article.link a::after {
  display: none;
}

:root .tag {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

:root dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin: 1rem 0 2rem;
}
:root dl dt {
  grid-row: 1;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--body);
}
:root dl dd {
  grid-row: 2;
  margin: 0;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}
:root canvas {
  margin-top: 0.5rem;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  box-sizing: border-box;
}
:root article p {
  color: var(--subheading);
}

:root a.error-button,
:root .submit-button {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
}
:root a.error-button:hover,
:root .submit-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
:root input[type="text"],
:root input[type="password"] {
  font: inherit;
  color: var(--ink);
  background: var(--box);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 8px 12px;
  caret-color: var(--link);
}
:root input[type="text"]:focus,
:root input[type="password"]:focus {
  outline: none;
  border-color: var(--link);
}

:root:root .loading {
  height: 56px;
  margin: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--box) 0%, var(--box-alt) 50%, var(--box) 100%) 0 0 / 200% 100%;
  animation: skeleton 1.4s linear infinite;
}
:root:root .live-status .loading {
  height: 104px;
  border-radius: 0;
}
:root:root .loading svg {
  display: none;
}
@keyframes skeleton {
  to {
    background-position: -200% 0;
  }
}

:root:root #sapper > footer {
  max-width: 728px;
  margin: 64px auto 0;
  padding: 20px 0 32px;
  border-top: 1px solid var(--edge);
  text-align: left;
  opacity: 1;
  font-size: 0.75rem;
  color: var(--body);
}
:root:root #sapper > footer p {
  margin: 0;
}
:root:root #sapper > footer a {
  color: var(--subheading);
  text-decoration: none;
}
:root:root #sapper > footer a:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  :root:root #sapper > footer {
    margin-inline: 16px;
  }
}

@media (max-width: 560px) {
  :root:root main.container {
    padding-top: 32px;
  }
  :root:root main > article.up::after {
    font-size: 1.25rem;
  }
  :root:root main:has(.down-active) > header::before {
    font-size: 1.25rem;
  }
  :root:root .live-status article.graph {
    grid-template-columns: auto auto 1fr;
    row-gap: 10px;
    column-gap: 24px;
  }
  :root:root .live-status h4 {
    grid-column: 1 / -1;
  }
  :root:root .live-status article > div {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root *,
  :root *::before,
  :root *::after {
    transition: none !important;
    animation: none !important;
  }
}
