:root {
  --bg: #0a0a0a;
  --surface: #0a0a0a;
  --surface-raised: #262626;
  --text: #fafafa;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border: #262626;
  --border-strong: #404040;
  --accent: #a3a3a3;
  --accent-light: #d4d4d4;
  --success: #22c55e;
  --success-minor: #86efac;
  --warning: #facc15;
  --partial: #fb923c;
  --danger: #f87171;
  --maintenance: #60a5fa;
  --muted-bar: #262626;
  --radius: 8px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

button,
summary {
  font: inherit;
}

.shell {
  width: min(960px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 56px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand img {
  width: 27px;
  height: auto;
}

.page-content {
  padding-block: 28px 44px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 10px;
}

.section-heading.compact {
  margin-bottom: 9px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 0;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(22px, 3vw, 26px);
  line-height: 1.2;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.4;
}

.last-updated {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.overall-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 9px 13px;
  border: 0;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.075);
}

.overall-status strong {
  margin: 0;
  font-size: 15px;
}

.overall-status--issue {
  background: rgba(248, 113, 113, 0.075);
}

.overall-status--unknown {
  background: rgba(255, 255, 255, 0.025);
}

.overall-icon,
.empty-check {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.13);
  color: var(--success);
  font-size: 15px;
  font-weight: 800;
}

.overall-icon--issue {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
}

.overall-icon--unknown {
  background: rgba(131, 125, 151, 0.18);
  color: var(--text-secondary);
}

.service-panel,
.component-panel {
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.core-service {
  padding: 12px 15px;
}

.core-service + .core-service,
.component-row + .component-row {
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.service-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 8px;
}

.service-name-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.empty-incidents p {
  color: var(--text-secondary);
}

.service-meta {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.uptime-summary {
  color: var(--text-secondary);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
}

.status-indicator {
  position: relative;
  z-index: 3;
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 10%, transparent);
}

.status-indicator::after {
  position: absolute;
  top: calc(100% + 7px);
  right: -3px;
  width: max-content;
  max-width: 190px;
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #20262d;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.34);
  color: var(--text);
  content: attr(data-status-label);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 100ms ease, transform 100ms ease;
  visibility: hidden;
  white-space: nowrap;
}

.status-indicator:hover::after,
.status-indicator:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.status-indicator:focus-visible {
  outline: 2px solid color-mix(in srgb, currentColor 48%, transparent);
  outline-offset: 2px;
}

.status-indicator--success {
  color: var(--success);
}

.status-indicator--warning {
  color: var(--warning);
}

.status-indicator--partial {
  color: var(--partial);
}

.status-indicator--danger {
  color: var(--danger);
}

.status-indicator--maintenance {
  color: var(--maintenance);
}

.status-indicator--muted {
  color: var(--text-muted);
}

.history-scroll {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.history-bars {
  display: grid;
  min-width: 630px;
  height: 26px;
  grid-template-columns: repeat(90, minmax(3px, 1fr));
  gap: 0;
}

.history-day {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.history-day::before {
  position: absolute;
  inset: 0 1.5px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--history-day-color, var(--muted-bar));
  content: "";
  transition: border-color 120ms ease, filter 120ms ease;
}

.history-day:hover::before,
.history-day:focus-visible::before {
  border-color: rgba(255, 255, 255, 0.58);
  filter: brightness(1.1);
}

.history-day:focus-visible {
  outline: none;
}

.history-day.is-selected::before {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.9);
  filter: brightness(1.08);
}

.history-day--success {
  --history-day-color: var(--success);
}

.history-day--minor {
  --history-day-color: var(--success-minor);
}

.history-day--warning {
  --history-day-color: var(--warning);
}

.history-day--partial {
  --history-day-color: var(--partial);
}

.history-day--danger {
  --history-day-color: var(--danger);
}

.history-day--maintenance {
  --history-day-color: var(--maintenance);
}

.history-day--muted {
  --history-day-color: var(--muted-bar);
}

.history-range {
  display: flex;
  justify-content: space-between;
  min-height: 18px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.history-context {
  overflow: hidden;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-context.is-active {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.capability-section,
.diagnostic-section,
.incident-section {
  margin-top: 27px;
}

.component-header {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 14px;
}

.component-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.description-trigger {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.description-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.description-trigger:hover,
.description-trigger:focus-visible {
  color: var(--text);
}

.description-trigger:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-light) 58%, transparent);
  outline-offset: 2px;
}

.description-trigger.is-pinned {
  border-color: color-mix(in srgb, var(--accent-light) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent-light);
}

.description-tooltip {
  position: fixed;
  z-index: 100;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #20262d;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: text;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  user-select: text;
  visibility: hidden;
  transition: opacity 100ms ease;
}

.description-tooltip::before {
  position: absolute;
  top: -4px;
  left: var(--tooltip-arrow-left, 18px);
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border-strong);
  background: #20262d;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.description-tooltip.is-above::before {
  top: auto;
  bottom: -4px;
  border: 0;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.description-tooltip.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.component-history {
  padding: 0 14px 11px;
}

.empty-incidents {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-incidents strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.empty-incidents p {
  margin-bottom: 0;
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-muted);
  font-size: 11px;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 920px);
  }

  .header-inner {
    min-height: 52px;
  }

  .page-content {
    padding-block: 22px 34px;
  }

  .section-heading {
    align-items: end;
    gap: 12px;
  }

  .section-heading h1 {
    flex: none;
  }

  .last-updated {
    max-width: 175px;
    margin: 0;
    line-height: 1.4;
    text-align: right;
    white-space: normal;
  }

  .core-service {
    padding: 11px 12px;
  }

  .service-topline {
    align-items: center;
    gap: 10px;
  }

  .history-bars {
    min-width: 540px;
  }

  .history-day::before {
    inset-inline: 1px;
  }

  .component-header {
    gap: 10px;
    padding: 8px 12px;
  }

  .component-history {
    padding: 0 12px 11px;
  }

  .capability-section,
  .diagnostic-section,
  .incident-section {
    margin-top: 24px;
  }

  .footer-inner {
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
