:root {
  color-scheme: dark;
  --bg: #0f0f10;
  --bg-elevated: #161617;
  --panel: #161617;
  --panel-soft: #1c1c1f;
  --panel-hover: #232326;
  --text: #f4f4f2;
  --text-soft: #b9b9b3;
  --muted: #8b8b85;
  --line: #29292d;
  --line-soft: rgba(185, 185, 179, .14);
  --brand: #e5484d;
  --brand-bright: #ef6267;
  --brand-soft: rgba(229, 72, 77, .16);
  --good: #0ca30c;
  --good-soft: rgba(12, 163, 12, .14);
  --warn: #fab219;
  --warn-soft: rgba(250, 178, 25, .15);
  --serious: #ec835a;
  --serious-soft: rgba(236, 131, 90, .15);
  --critical: #d03b3b;
  --critical-soft: rgba(208, 59, 59, .15);
  --nodata: #3a3a40;
  --shadow: 0 16px 44px rgba(0, 0, 0, .40);
  --radius: 10px;
  --radius-small: 8px;
  --shell: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }
button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

.shell {
  width: min(var(--shell), calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  backdrop-filter: blur(18px);
}
.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 210px 1fr auto;
  align-items: center;
  gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: 210px; text-decoration: none; white-space: nowrap; }
.brand img { display: block; width: 34px; height: 34px; object-fit: contain; }
.brand span { display: inline-flex; gap: 7px; align-items: baseline; font-size: 18px; letter-spacing: -.02em; }
.brand strong { color: var(--text); font-weight: 850; }
.brand em { color: var(--muted); font-style: normal; font-weight: 650; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 5px; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 9px;
  padding: 9px 12px;
  transition: color .16s ease, background .16s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--panel-soft); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.button, .icon-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text-soft);
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
}
.button:hover, .icon-button:hover { transform: translateY(-1px); border-color: #52607b; color: var(--text); }
.button-primary { background: #e5484d; border-color: #e5484d; color: #fff; box-shadow: none; }
.button-primary:hover { background: var(--brand-bright); border-color: var(--brand-bright); color: #fff; }
.button-secondary { background: var(--panel-soft); }
.icon-button { width: 39px; padding: 0; }
.icon-button svg, .mobile-menu-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-menu-button { display: none; }

.status-overview { padding: 58px 0 10px; scroll-margin-top: 90px; }
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: rgba(93, 63, 211, .12);
  filter: blur(8px);
  pointer-events: none;
}
.state-surface { --state: #5d3fd3; --state-soft: rgba(93, 63, 211, .16); }
.hero-state-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--state);
  color: #fff;
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 0 0 8px var(--state-soft);
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--muted); }
.hero .live-dot { background: #5d3fd3; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--state, var(--good)); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--state-soft, var(--good-soft)); } 50% { opacity: .55; box-shadow: 0 0 0 6px transparent; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
.hero h1 { margin: 7px 0 5px; font-size: clamp(23px, 4vw, 30px); line-height: 1.12; letter-spacing: -.03em; }
.hero h1 { color: var(--text); }
.hero p { margin: 0; max-width: 610px; color: var(--text-soft); font-size: 14px; line-height: 1.6; }
.hero-meta { position: relative; z-index: 1; display: flex; align-items: flex-end; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; text-align: right; }
.state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--state-soft, var(--good-soft));
  color: var(--state, var(--good));
  font-weight: 850;
}
.state-surface[data-state="operational"] .state-badge { background: var(--good-soft); color: var(--good); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel);
  padding: 18px;
}
.metric-label { display: block; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 8px; font-size: 28px; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-detail { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.4; }

.content-section { padding-top: 56px; scroll-margin-top: 82px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 16px; }
.compact-heading { align-items: flex-start; }
.section-heading h2 { margin: 6px 0 6px; font-size: 22px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.legend { max-width: 470px; display: flex; justify-content: flex-end; gap: 10px 14px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nodata); }
.legend i[data-state="operational"], [data-state="operational"] > .status-dot { background: var(--good); }
.legend i[data-state="degraded"], [data-state="degraded"] > .status-dot { background: var(--warn); }
.legend i[data-state="serious"], [data-state="serious"] > .status-dot { background: var(--serious); }
.legend i[data-state="major"], [data-state="major"] > .status-dot { background: var(--critical); }

.component-list, .chart-list, .timeline-list { display: grid; gap: 12px; }
.component-card, .chart-card, .timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--panel);
}
.component-card { padding: 18px 20px 15px; }
.component-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.component-heading h3, .chart-title, .timeline-title { margin: 0; font-size: 15px; letter-spacing: -.01em; }
.component-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.component-state { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--text-soft); font-size: 12px; font-weight: 800; }
.component-state[data-state="operational"] { color: var(--good); }
.component-state[data-state="degraded"] { color: var(--warn); }
.component-state[data-state="serious"] { color: var(--serious); }
.component-state[data-state="major"] { color: var(--critical); }
.uptime-bars { display: flex; align-items: stretch; gap: 2px; height: 30px; }
.uptime-bar {
  flex: 1 1 0;
  min-width: 2px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--nodata);
  cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
}
.uptime-bar[data-state="operational"] { background: var(--good); }
.uptime-bar[data-state="degraded"] { background: var(--warn); }
.uptime-bar[data-state="serious"] { background: var(--serious); }
.uptime-bar[data-state="major"] { background: var(--critical); }
.uptime-bar:hover, .uptime-bar:focus-visible { transform: scaleY(1.18); filter: brightness(1.1); outline: 1px solid var(--text-soft); outline-offset: 1px; }
.uptime-axis { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.uptime-axis strong { color: var(--text-soft); font-variant-numeric: tabular-nums; }

.chart-card { padding: 17px 20px 14px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 8px; }
.chart-meta { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.chart-chip { border: 1px solid var(--line); border-radius: 999px; background: var(--panel-soft); color: var(--muted); padding: 4px 9px; font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; }
.response-chart { display: block; width: 100%; height: 118px; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 7; }
.chart-area { fill: var(--brand-soft); }
.chart-line { fill: none; stroke: var(--brand-bright); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-failure { fill: var(--critical); }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.empty-state { border: 1px dashed var(--line); border-radius: var(--radius-small); padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }

.timeline-card { position: relative; padding: 17px 18px 17px 20px; overflow: hidden; }
.timeline-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand); }
.timeline-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.timeline-meta { color: var(--muted); font-size: 11.5px; text-align: right; white-space: nowrap; }
.timeline-summary { margin: 7px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.55; }
.timeline-card details { margin-top: 11px; }
.timeline-card summary { color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.update-list { margin: 11px 0 0 5px; padding: 0 0 0 18px; border-left: 1px solid var(--line); list-style: none; }
.update-list li { position: relative; padding: 0 0 13px; color: var(--text-soft); font-size: 12.5px; line-height: 1.5; }
.update-list li:last-child { padding-bottom: 0; }
.update-list li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-bright); }
.update-list time { display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px; }

main#main-content { padding-bottom: 64px; }
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-elevated); }
.footer-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.footer-inner a { color: var(--text-soft); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

.tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  max-width: 280px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elevated);
  color: var(--text-soft);
  box-shadow: var(--shadow);
  padding: 10px 11px;
  font-size: 11.5px;
  line-height: 1.5;
  transition: opacity .1s ease;
}
.tooltip.show { opacity: 1; }
.tooltip strong { color: var(--text); }
.toast {
  position: fixed;
  z-index: 110;
  right: 18px;
  bottom: 18px;
  transform: translateY(22px);
  opacity: 0;
  max-width: min(390px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 12.5px;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-color: color-mix(in srgb, var(--critical) 55%, var(--line)); }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: 190px 1fr auto; }
  .brand { width: 190px; }
  .site-nav { justify-content: flex-start; }
  .header-support { display: none; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header { position: sticky; }
  .header-inner { min-height: 66px; grid-template-columns: 1fr auto auto; gap: 10px; }
  .brand { width: 190px; }
  .mobile-menu-button {
    display: inline-grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
  }
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .nav-link { padding: 11px 12px; }
  .header-discord { display: none; }
  .status-overview { padding-top: 34px; }
  .hero { grid-template-columns: auto 1fr; padding: 21px; }
  .hero-meta { grid-column: 1 / -1; align-items: flex-start; text-align: left; margin-top: 4px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .legend { justify-content: flex-start; }
  .footer-inner { align-items: flex-start; flex-direction: column; padding: 22px 0; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 24px, var(--shell)); }
  .brand { width: 166px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .brand span { gap: 5px; font-size: 15px; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { padding: 14px; }
  .metric-card strong { font-size: 23px; }
  .hero { grid-template-columns: 1fr; }
  .hero-state-icon { width: 46px; height: 46px; }
  .component-heading { flex-direction: column; gap: 9px; }
  .uptime-bars .uptime-bar:nth-child(-n+30) { display: none; }
  .uptime-axis span:first-child { font-size: 0; }
  .uptime-axis span:first-child::after { content: "30 days ago"; font-size: 11px; }
  .chart-header, .timeline-header { align-items: flex-start; flex-direction: column; }
  .chart-meta { justify-content: flex-start; }
  .timeline-meta { text-align: left; white-space: normal; }
}
