/* Dragonroll status page. Self-contained: no fonts, images or scripts from other hosts. */
:root {
  color-scheme: dark;
  --bg: #08090d;
  --surface: #121419;
  --surface-2: #1b1e25;
  --line: #262a33;
  --line-strong: #3b404c;
  --text: #f5f6f8;
  --muted: #a4a8b4;
  --subtle: #737885;
  --lime: #7ccf00;
  --lime-soft: #b6ec5f;
  --orange: #ffae6f;
  --red: #ff6b74;
  --none: #1d2027;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
}
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font:
    15px/1.5 Inter,
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  background:
    radial-gradient(70rem 26rem at 50% -8rem, rgb(124 207 0 / 13%), transparent 70%),
    radial-gradient(40rem 20rem at 100% 0, rgb(255 174 111 / 7%), transparent 70%),
    repeating-linear-gradient(-82deg, rgb(255 255 255 / 1.1%) 0 1px, transparent 1px 26px),
    var(--bg);
  background-repeat: no-repeat;
}
a {
  color: var(--lime-soft);
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
main,
.topbar,
.footer {
  width: min(880px, 100% - 32px);
  margin-inline: auto;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  font-size: 19px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.03em;
  transform: skewX(-4deg);
}
.brand b {
  color: var(--lime);
}
.brand em {
  padding: 2px 8px;
  border: 1px solid rgb(124 207 0 / 35%);
  border-radius: 4px;
  color: var(--lime);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topbar__links {
  display: flex;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgb(255 255 255 / 5%);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 300ms var(--ease),
    border-color 300ms var(--ease),
    color 300ms var(--ease);
}
.pill svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.pill--primary {
  border-color: var(--lime);
  color: #0c1404;
  background: var(--lime);
}
.pill--primary:is(:hover, :focus-visible) {
  background: var(--lime-soft);
}
.pill--discord:is(:hover, :focus-visible) {
  border-color: #5865f2;
  background: #5865f2;
}
.pill--ghost:is(:hover, :focus-visible) {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 9%);
}
.pill:disabled {
  cursor: progress;
  opacity: 0.6;
}

/* ---------- Verdict ---------- */
.hero {
  --tone: var(--subtle);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 34px 0 26px;
  text-align: center;
}
.hero[data-state='up'] {
  --tone: var(--lime);
}
.hero[data-state='minor'] {
  --tone: var(--orange);
}
.hero[data-state='major'],
.hero[data-state='down'] {
  --tone: var(--red);
}
.hero__ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 18%, transparent);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--tone) 9%, transparent),
    0 0 40px color-mix(in srgb, var(--tone) 35%, transparent);
  transition:
    background-color 600ms var(--ease),
    box-shadow 600ms var(--ease);
}
.hero__glyph {
  display: none;
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--tone);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}
.hero[data-state='up'] .hero__glyph--up,
.hero[data-state='minor'] .hero__glyph--warn,
.hero[data-state='major'] .hero__glyph--warn,
.hero[data-state='down'] .hero__glyph--down {
  display: block;
}
.hero__spinner {
  display: none;
  width: 28px;
  height: 28px;
  border: 3px solid rgb(255 255 255 / 12%);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
.hero[data-state='checking'] .hero__spinner {
  display: block;
}
.hero h1 {
  margin: 0;
  font-size: clamp(26px, 5.4vw, 38px);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.hero__detail {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--subtle);
  font-size: 12.5px;
}
.hero__meta time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
#next-check {
  font-variant-numeric: tabular-nums;
}

/* ---------- Help ---------- */
.help {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid rgb(255 174 111 / 35%);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(255 174 111 / 9%), var(--surface) 55%);
}
.help h2 {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 16px;
}
.help ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.help b {
  color: var(--text);
}

/* ---------- Groups ---------- */
.groups {
  display: grid;
  gap: 16px;
}
.group {
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: var(--radius);
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface), #fff 2.5%),
    var(--surface) 45%,
    #0c0d12
  );
  box-shadow: 0 24px 60px -32px rgb(0 0 0 / 90%);
}
.group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
}
.group__head::-webkit-details-marker {
  display: none;
}
.group__title {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.group__state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--subtle);
  font-size: 12.5px;
  font-weight: 750;
}
.group__state::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}
.group__state[data-state='up'],
.group__state[data-state='reachable'] {
  color: var(--lime);
}
.group__state[data-state='minor'] {
  color: var(--orange);
}
.group__state[data-state='major'],
.group__state[data-state='down'] {
  color: var(--red);
}
.group__chevron {
  width: 9px;
  height: 9px;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 300ms var(--ease);
}
.group:not([open]) .group__chevron {
  transform: rotate(-45deg);
}
.group:not([open]) .group__head {
  border-bottom-color: transparent;
}
.group__note {
  margin: 0;
  padding: 10px 18px 14px;
  color: var(--subtle);
  font-size: 12px;
}
.services {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- One service ---------- */
.svc {
  --tone: var(--subtle);
  display: grid;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid rgb(255 255 255 / 5%);
}
.svc[data-state='up'] {
  --tone: var(--lime);
}
.svc[data-state='reachable'] {
  --tone: var(--lime-soft);
}
.svc[data-state='minor'] {
  --tone: var(--orange);
}
.svc[data-state='major'],
.svc[data-state='down'] {
  --tone: var(--red);
}
.svc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}
.svc__name {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 15px;
}
.svc__name b,
.svc__link {
  font-weight: 800;
}
.svc__link {
  color: var(--text);
  text-decoration: none;
}
.svc__link:is(:hover, :focus-visible) {
  color: var(--lime-soft);
  text-decoration: underline;
}
.svc__sub {
  overflow: hidden;
  color: var(--subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc__dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tone) 70%, transparent);
}
.svc[data-state='checking'] .svc__dot {
  animation: breathe 1.4s ease-in-out infinite;
}
.svc[data-state='up'] .svc__dot::after {
  position: absolute;
  inset: -4px;
  border: 1px solid var(--tone);
  border-radius: 50%;
  opacity: 0;
  animation: ping 2.8s var(--ease) infinite;
  content: '';
}
.chip {
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--muted);
  background: rgb(255 255 255 / 7%);
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chip[data-role='primary'] {
  color: #0c1404;
  background: var(--lime);
}
.chip[data-role='backup'] {
  color: #1a0d03;
  background: var(--orange);
}
.chip[data-role='index'] {
  color: var(--lime-soft);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgb(124 207 0 / 45%);
}
.svc__ms,
.svc__meta {
  color: var(--subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.svc__state {
  min-width: 88px;
  color: var(--tone);
  font-size: 12.5px;
  font-weight: 800;
  text-align: right;
}
.svc__detail {
  margin: -2px 0 0 19px;
  color: var(--muted);
  font-size: 12.5px;
}
.svc__detail:empty {
  display: none;
}
.bars {
  display: grid;
  grid-template-columns: repeat(48, minmax(0, 1fr));
  gap: 2px;
  height: 26px;
}
.bars i {
  border-radius: 2px;
  background: var(--none);
  transition: background-color 600ms var(--ease);
}
.bars i[data-s='up'] {
  background: var(--lime);
}
.bars i[data-s='reachable'] {
  background: color-mix(in srgb, var(--lime) 55%, var(--none));
}
.bars i[data-s='minor'] {
  background: var(--orange);
}
.bars i[data-s='major'],
.bars i[data-s='down'] {
  background: var(--red);
}
.svc__axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--subtle);
  font-size: 11px;
}
.svc__uptime {
  color: var(--tone);
  font-weight: 750;
}

/* ---------- Notices ---------- */
.notices {
  margin-top: 34px;
}
.notices--active {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.015em;
}
.legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--subtle);
  font-size: 11.5px;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: -5px;
  border-radius: 2px;
}
.legend i[data-tone='major'],
.notice[data-tone='major'] {
  --tone: var(--red);
}
.legend i[data-tone='minor'],
.notice[data-tone='minor'] {
  --tone: var(--orange);
}
.legend i[data-tone='info'],
.notice[data-tone='info'] {
  --tone: var(--lime);
}
.legend i[data-tone='resolved'],
.notice[data-tone='resolved'] {
  --tone: #4fd99a;
}
.legend i {
  background: var(--tone);
}
.day {
  margin-bottom: 18px;
}
.day__date {
  margin: 0 0 8px;
  color: var(--subtle);
  font-size: 12.5px;
  font-weight: 750;
}
.day__items {
  display: grid;
  gap: 10px;
}
.notice {
  position: relative;
  padding: 14px 18px 12px 22px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 7%);
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--tone) 8%, var(--surface)),
    var(--surface) 40%
  );
}
.notice::before {
  position: absolute;
  inset: 12px auto 12px 9px;
  width: 4px;
  border-radius: 2px;
  background: var(--tone);
  content: '';
}
.notice h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.notice p {
  margin: 0;
  color: var(--muted);
}
.notice .notice__stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 11.5px;
}
.empty {
  color: var(--subtle);
}

/* ---------- Footer ---------- */
.footer {
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 26px;
  color: var(--subtle);
  font-size: 12.5px;
}
.footer p {
  margin: 0 0 6px;
}
.footer b,
.footer em {
  color: var(--muted);
}
.noscript {
  width: min(880px, 100% - 32px);
  margin: 0 auto 30px;
  color: var(--orange);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}
@keyframes ping {
  0% {
    opacity: 0.7;
    transform: scale(0.6);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}
@media (max-width: 560px) {
  .svc__state {
    min-width: 0;
  }
  .svc__ms {
    order: 3;
  }
  .bars {
    height: 22px;
    gap: 1px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
