:root {
  --bg: #0f121a;
  --panel: #191c24;
  --line: #21242d;
  --line-strong: #2d313c;
  --chip: #21242d;
  --text: #ffffff;
  --muted: #8a91a5;
  --ok: #10b981;
  --ok-dim: #064e3b;
  --warn: #f59e0b;
  --bad: #f87171;
  --info: #60a5fa;
  --unknown: #6b7280;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--muted);
  font-family: Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar — same thin pill as russia-games.ru */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

body {
  overflow-x: clip;
  overflow-y: auto;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body::-webkit-scrollbar-track {
  margin: 0;
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

body::-webkit-scrollbar-thumb:hover {
  background: rgba(241, 59, 87, 0.7);
  border: 2px solid transparent;
  background-clip: padding-box;
}

body::-webkit-scrollbar-thumb:active {
  background: rgba(241, 59, 87, 0.9);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.icons {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: auto;
  max-width: 200px;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.brand:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.brand img {
  display: block;
  height: 38px;
  width: 38px;
  border-radius: 50%;
}

.brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.is-active {
  color: var(--text);
  background: linear-gradient(180deg, #2a3140 0%, #21242d 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 6px 16px rgba(0, 0, 0, 0.28);
}

.updates-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 118px;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 9px 14px 9px 16px;
  background: linear-gradient(180deg, #262b36 0%, #1c2029 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.updates-btn:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, #2c3340 0%, #222733 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 0 3px rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

.updates-arrow {
  opacity: 0.7;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.updates-btn:hover .updates-arrow {
  opacity: 1;
  transform: translate(1px, -1px);
}

.hero {
  margin: 64px 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.hero-icon svg {
  display: block;
  width: 40px;
  height: 40px;
}

.hero h1 {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.hero-meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.section {
  margin: 8px -12px 0;
  padding: 0 12px;
  border-radius: 8px;
}

.section:first-child {
  margin-top: -4px;
}

.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  margin-top: 4px;
  padding: 12px 12px 12px 0;
  border-radius: 8px;
  text-align: left;
  transition: background-color 0.15s ease;
}

.section-toggle:hover,
.section.collapsed .section-toggle {
  background: var(--chip);
}

.section-title {
  margin-left: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.section-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.badge svg {
  color: var(--ok);
  flex-shrink: 0;
}

.badge.is-warn svg {
  color: var(--warn);
}

.badge.is-bad svg {
  color: var(--bad);
}

.badge.is-unknown svg {
  color: var(--unknown);
}

.badge.is-warn {
  color: var(--warn);
}

.badge.is-bad {
  color: var(--bad);
}

.badge.is-unknown {
  color: var(--muted);
}

.chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.section.collapsed .chevron {
  transform: rotate(-90deg);
}

.section.collapsed .section-body {
  display: none;
}

.section-body {
  margin: 0 12px;
}

.monitor {
  margin-top: 24px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
}

.monitor:last-child {
  border-bottom: 0;
}

.monitor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monitor-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.monitor-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-name .status-mark {
  flex-shrink: 0;
  display: block;
}

.monitor-uptime {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ok);
  font-variant-numeric: tabular-nums;
}

.monitor-uptime.is-unknown {
  color: var(--muted);
}

.ticks {
  display: flex;
  margin-top: 12px;
  height: 32px;
}

.tick {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  margin-right: 1px;
  border-radius: 1px;
  background: var(--ok);
  cursor: default;
}

.tick:first-child {
  border-radius: 4px 1px 1px 4px;
}

.tick:last-child {
  margin-right: 0;
  border-radius: 1px 4px 4px 1px;
}

.tick:hover {
  filter: none;
  opacity: 0.6;
}

.tick.has-incident {
  cursor: pointer;
}

.tick-none {
  background: #2a3140;
}

.tick-operational {
  background: var(--ok);
}

.tick-degraded {
  background: var(--warn);
}

.tick-major_outage {
  background: var(--bad);
}

.tick-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.incidents-wrap {
  margin-top: 40px;
}

.incidents-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.incidents-wrap h2,
.page-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.incidents-head h2 {
  margin: 0;
}

.incidents-all {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.incidents-all:hover {
  color: var(--text);
}

.page-title {
  margin-top: 24px;
}

.incident-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 20px 22px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.incident-card + .incident-card {
  margin-top: 12px;
}

.incident-card:hover {
  border-color: #2d313c;
  background: #1b1f28;
}

.incident-card-top {
  margin-bottom: 10px;
}

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border-radius: 999px;
  padding: 6px 10px;
}

.pill-ok {
  color: var(--ok);
  background: rgba(16, 185, 129, 0.18);
}

.pill-warn {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
}

.pill-bad {
  color: #f87171;
  background: rgba(248, 113, 113, 0.16);
}

.pill-info {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.16);
}

.incident-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.incident-card-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.incident-card-body {
  margin-top: 12px;
  color: #c5cad6;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.incident-card-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.back-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--chip);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.back-link:hover .back-icon {
  color: var(--text);
}

.report {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}

.report-header {
  padding: 28px 28px 20px;
}

.report-title {
  margin: 12px 0 0;
  max-width: 420px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.report-started {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.report-affected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-top: 1px solid rgba(33, 36, 45, 0.85);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #2a3140;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.report-timeline {
  padding: 16px 28px 28px;
  background: #151820;
}

.tl-item {
  display: flex;
  gap: 10px;
}

.tl-item + .tl-item {
  margin-top: 12px;
}

.tl-rail {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  margin-top: 14px;
}

.tl-icon {
  display: block;
}

.tl-icon.is-ok {
  color: var(--ok);
}

.tl-icon.is-muted {
  color: #5b6478;
}

.tl-line {
  position: absolute;
  left: 8px;
  top: 26px;
  bottom: -20px;
  border-left: 1px solid var(--line);
}

.tl-card {
  flex: 1;
  min-width: 0;
  border: 1px solid #2a3140;
  background: #232833;
  border-radius: 10px;
  padding: 14px 16px;
}

.tl-head {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.tl-kind {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.tl-body {
  margin: 10px 0 0;
  color: #d7dbe7;
  font-size: 13px;
  line-height: 1.55;
}

.empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.footer {
  margin-top: 36px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  width: 190px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid #2d313c;
  background: #21242d;
  box-shadow: 0 4px 7px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  color: var(--text);
}

.tooltip-status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  font-weight: 500;
  margin: 0;
}

.tooltip-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--muted);
}

.tooltip.is-ok .tooltip-icon {
  color: var(--ok);
}

.tooltip.is-warn .tooltip-icon {
  color: var(--warn);
}

.tooltip.is-bad .tooltip-icon {
  color: var(--bad);
}

.tooltip-title {
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.tooltip-detail {
  margin: -2px 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.tooltip-date {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid #2d313c;
  padding: 8px;
  font-size: 12px;
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    row-gap: 14px;
    padding-bottom: 14px;
  }

  .brand {
    max-width: none;
  }

  .brand-text {
    display: none;
  }

  .updates-btn {
    width: auto;
    min-width: 0;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .hero {
    margin: 48px 0 36px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .ticks {
    height: 28px;
  }

  .report-header,
  .report-affected,
  .report-timeline {
    padding-left: 16px;
    padding-right: 16px;
  }
}
