:root {
  --bg: #f6f4fb;
  --surface: #ffffff;
  --surface-soft: #faf8ff;
  --border: #e6e1f2;
  --text: #1d1433;
  --muted: #5b5570;
  --brand: #5e3c9e;
  --brand-deep: #2d1b65;
  --operational: #146c3f;
  --operational-soft: #e6f6ed;
  --degraded: #8a5a00;
  --degraded-soft: #fff4d6;
  --outage: #c62828;
  --outage-soft: #fdecec;
  --maintenance: #1f63a8;
  --maintenance-soft: #e3effb;
  --unknown: #5b5570;
  --unknown-soft: #efedf5;
  --bar-operational: #2fa65a;
  --bar-degraded: #d99a00;
  --bar-partial: #e8702a;
  --bar-major: #d0342c;
  --bar-maintenance: #2f74cf;
  --none: #d9d5e3;
  --tip-bg: #1d1433;
  --tip-text: #ffffff;
  --shadow: 0 1px 2px rgba(29, 20, 51, 0.05), 0 8px 24px rgba(29, 20, 51, 0.06);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120c1f;
    --surface: #1b1430;
    --surface-soft: #221a3a;
    --border: #342a52;
    --text: #f1edfa;
    --muted: #b6aecb;
    --brand: #b79cf0;
    --brand-deep: #e6dcff;
    --operational: #4ade80;
    --operational-soft: rgba(74, 222, 128, 0.12);
    --degraded: #fbbf24;
    --degraded-soft: rgba(251, 191, 36, 0.12);
    --outage: #f87171;
    --outage-soft: rgba(248, 113, 113, 0.14);
    --maintenance: #60a5fa;
    --maintenance-soft: rgba(96, 165, 250, 0.14);
    --unknown: #b6aecb;
    --unknown-soft: rgba(182, 174, 203, 0.12);
    --bar-operational: #34b866;
    --bar-degraded: #e0a515;
    --bar-partial: #e8742f;
    --bar-major: #ef5350;
    --bar-maintenance: #4a8ff0;
    --none: #3a3155;
    --tip-bg: #f1edfa;
    --tip-text: #1b1430;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.status-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

a {
  color: var(--brand);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  vertical-align: -0.125em;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 30;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--brand-deep);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.status-wrap {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px;
  min-width: 0;
}

.status-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.status-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.status-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.status-brand img {
  display: block;
}

.status-brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-deep);
}

.status-brand-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-nav a {
  text-decoration: none;
}

.status-nav a:hover {
  text-decoration: underline;
}

.status-nav a[aria-current="page"] {
  color: var(--brand-deep);
}

.status-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.status-main {
  flex: 1 0 auto;
  padding-top: 32px;
  padding-bottom: 48px;
}

.banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #6a6580 0%, #5b5570 100%);
  box-shadow: var(--shadow);
}

.banner.is-operational {
  background: linear-gradient(135deg, #1a7f45 0%, #146c3f 100%);
}

.banner.is-degraded {
  color: #241a00;
  background: linear-gradient(135deg, #f5c93a 0%, #eab308 100%);
}

.banner.is-partial {
  background: linear-gradient(135deg, #c2410c 0%, #b23a0c 100%);
}

.banner.is-major {
  background: linear-gradient(135deg, #c62828 0%, #ad1f1f 100%);
}

.banner.is-maintenance {
  background: linear-gradient(135deg, #1f63a8 0%, #1a5696 100%);
}

.banner-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  font-size: 1.5rem;
}

.banner.is-degraded .banner-icon {
  background: rgba(36, 26, 0, 0.1);
}

.banner-body {
  min-width: 0;
}

.banner-title {
  margin: 0;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.banner-text {
  margin: 2px 0 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.intro {
  margin: 20px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.section {
  margin-top: 36px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 14px;
}

.section-head .section-title {
  margin: 0 auto 0 0;
}

.section-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  color: var(--brand-deep);
}

.section-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.section-more {
  margin: 14px 0 0;
  font-weight: 500;
}

.section-more a,
.incident-more a,
.back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.section-more a:hover,
.incident-more a:hover,
.back a:hover {
  text-decoration: underline;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

.text-button[hidden] {
  display: none;
}

.card,
.incident,
.group {
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.incident {
  position: relative;
  margin-bottom: 14px;
  padding: 18px 20px 16px;
  overflow: hidden;
}

.incident {
  border-color: var(--bar-degraded);
}

.incident.is-major {
  border-color: var(--bar-partial);
}

.incident.is-critical {
  border-color: var(--bar-major);
}

.incident.is-maintenance {
  border-color: var(--bar-maintenance);
}

.incident-head,
.past-head,
.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 12px;
}

.incident-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.incident-title a {
  color: var(--text);
  text-decoration: none;
}

.incident-title a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--degraded-soft);
  color: var(--degraded);
}

.badge.is-major,
.badge.is-critical {
  background: var(--outage-soft);
  color: var(--outage);
}

.badge.is-maintenance {
  background: var(--maintenance-soft);
  color: var(--maintenance);
}

.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 6px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.incident-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.incident-meta a,
.component-note a,
.detail-affects a,
.detail-state a,
.intro a,
.status-footer a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.updates {
  position: relative;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.update {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
}

.update:last-child {
  padding-bottom: 0;
}

.update:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.update-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.update.is-state-resolved .update-dot {
  background: var(--bar-operational);
}

.update.is-escalation .update-dot,
.update.is-failed .update-dot {
  background: var(--bar-major);
}

.update.is-remediation .update-dot,
.update.is-diagnosis .update-dot,
.update.is-action .update-dot {
  background: var(--surface);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.update.is-failed .update-dot {
  background: var(--bar-major);
  box-shadow: none;
}

.update-body {
  min-width: 0;
}

.update-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand);
}

.update-text {
  margin: 0;
  overflow-wrap: anywhere;
}

.update-text strong {
  color: var(--text);
}

.update-time {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--muted);
}

.tag.is-failed {
  border-color: transparent;
  background: var(--outage-soft);
  color: var(--outage);
}

.more {
  margin-top: 12px;
}

.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.more > summary::-webkit-details-marker,
.group-head::-webkit-details-marker {
  display: none;
}

.more > summary .icon {
  transition: transform 0.2s ease;
}

.more[open] > summary .icon {
  transform: rotate(90deg);
}

.incident-more {
  margin: 12px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.groups {
  display: grid;
  gap: 14px;
}

.group {
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: var(--surface-soft);
  cursor: pointer;
  list-style: none;
}

.group[open] > .group-head {
  border-bottom: 1px solid var(--border);
}

.group-head:focus-visible {
  outline-offset: -3px;
}

.group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
}

.group-icon .icon + .icon,
.group[open] .group-icon .icon:first-child {
  display: none;
}

.group[open] .group-icon .icon + .icon {
  display: inline;
}

.group-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.group-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--unknown);
  white-space: nowrap;
}

.group.is-operational .group-status {
  color: var(--operational);
}

.group.is-degraded .group-status {
  color: var(--degraded);
}

.group.is-outage .group-status {
  color: var(--outage);
}

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

.components {
  margin: 0;
  padding: 0;
  list-style: none;
}

.component {
  padding: 16px 20px;
  min-width: 0;
}

.component + .component {
  border-top: 1px solid var(--border);
}

.component-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.component-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.info {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: help;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--unknown-soft);
  color: var(--unknown);
}

.pill.is-operational {
  background: var(--operational-soft);
  color: var(--operational);
}

.pill.is-degraded {
  background: var(--degraded-soft);
  color: var(--degraded);
}

.pill.is-outage {
  background: var(--outage-soft);
  color: var(--outage);
}

.pill.is-maintenance {
  background: var(--maintenance-soft);
  color: var(--maintenance);
}

.component-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bars {
  display: flex;
  gap: 2px;
  height: 34px;
  margin-top: 12px;
  border-radius: 4px;
}

.bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 3px;
  background: var(--none);
  transition: opacity 0.15s ease;
}

.bar:hover,
.bar[data-active] {
  opacity: 0.75;
}

.bar[data-active] {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.bar.is-operational,
.swatch.is-operational {
  background: var(--bar-operational);
}

.bar.is-degraded,
.swatch.is-degraded {
  background: var(--bar-degraded);
}

.bar.is-partial,
.swatch.is-partial {
  background: var(--bar-partial);
}

.bar.is-major,
.swatch.is-major {
  background: var(--bar-major);
}

.bar.is-maintenance,
.swatch.is-maintenance {
  background: var(--bar-maintenance);
}

.bars-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.bars-uptime {
  font-weight: 700;
  color: var(--text);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.range-short {
  display: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--none);
}

.tip {
  position: fixed;
  z-index: 20;
  max-width: min(300px, calc(100vw - 16px));
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--tip-bg);
  color: var(--tip-text);
  font-size: 0.82rem;
  line-height: 1.4;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5);
  overflow-wrap: anywhere;
}

.tip[hidden] {
  display: none;
}

.tip strong,
.tip span {
  display: block;
}

.history {
  overflow: hidden;
}

.history-day {
  padding: 16px 20px;
  min-width: 0;
}

.history-day + .history-day {
  border-top: 1px solid var(--border);
}

.history-date {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--brand-deep);
}

.history-empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.past-item {
  padding: 10px 12px;
  border: 1px solid var(--bar-degraded);
  border-radius: 10px;
  min-width: 0;
}

.past-item + .past-item {
  margin-top: 12px;
}

.past-item.is-major {
  border-color: var(--bar-partial);
}

.past-item.is-critical {
  border-color: var(--bar-major);
}

.past-item.is-maintenance {
  border-color: var(--bar-maintenance);
}

.past-title {
  margin: 0;
  font-size: 1rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.past-title a {
  color: var(--degraded);
  text-decoration: none;
}

.past-title a:hover {
  text-decoration: underline;
}

.past-item.is-major .past-title a,
.past-item.is-critical .past-title a {
  color: var(--outage);
}

.past-item.is-maintenance .past-title a {
  color: var(--maintenance);
}

.past-item .update-text {
  margin-top: 2px;
  font-size: 0.92rem;
}

.back {
  margin: 0 0 16px;
  font-size: 0.92rem;
  font-weight: 500;
}

.page-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--brand-deep);
}

.page-lead {
  margin: 4px 0 20px;
  color: var(--muted);
}

.detail {
  padding: 24px 26px;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem);
  line-height: 1.25;
  color: var(--brand-deep);
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail.is-minor .detail-title {
  color: var(--degraded);
}

.detail.is-major .detail-title,
.detail.is-critical .detail-title {
  color: var(--outage);
}

.detail.is-maintenance .detail-title {
  color: var(--maintenance);
}

.detail-state {
  margin: 8px 0 0;
  font-size: 1.02rem;
}

.detail-cause {
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}

.detail-subtitle {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--brand-deep);
}

.detail .updates {
  margin-top: 14px;
}

.detail-affects {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--muted);
}

.phase {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.phase + .phase::before {
  content: "";
  width: 24px;
  height: 2px;
  margin: 0 8px;
  border-radius: 2px;
  background: var(--border);
}

.phase.is-done + .phase::before {
  background: var(--brand);
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
}

.phase.is-done .phase-dot {
  border-color: var(--brand);
  background: var(--brand);
}

.phase.is-current {
  color: var(--brand-deep);
  font-weight: 700;
}

.phase.is-current .phase-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(94, 60, 158, 0.2);
}

.status-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--muted);
}

.status-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 16px;
  padding-bottom: 4px;
}

.status-footer-inner.is-small {
  padding-top: 4px;
  padding-bottom: 18px;
  font-size: 0.78rem;
}

.status-footer-inner.is-makers {
  padding-top: 2px;
  padding-bottom: 2px;
}

.makers-dot {
  margin: 0 4px;
  color: #d6336c;
  font-weight: 700;
}

.status-footer .makers-line a {
  border-radius: 3px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.status-footer .makers-line a:hover,
.status-footer .makers-line a:focus-visible {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-footer p {
  margin: 0;
  overflow-wrap: anywhere;
}

.status-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.heart {
  color: #d6336c;
}

.status-disabled {
  padding: 80px 20px;
  text-align: center;
}

@media (max-width: 640px) {
  .status-wrap {
    padding: 0 16px;
  }
  .status-main {
    padding-top: 20px;
  }
  .banner {
    padding: 16px 18px;
    gap: 12px;
  }
  .banner-icon {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .incident {
    padding: 16px 16px 14px 21px;
  }
  .group-head,
  .component,
  .history-day {
    padding-left: 16px;
    padding-right: 16px;
  }
  .detail {
    padding: 18px 16px;
  }
  .bars {
    height: 28px;
  }
  .bars .bar:nth-last-child(n + 31) {
    display: none;
  }
  .range-long {
    display: none;
  }
  .range-short {
    display: inline;
  }
  .phases {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
  }
  .phase + .phase::before {
    display: none;
  }
}

.status-pause {
  min-height: 24px;
  font-size: 0.9rem;
  color: inherit;
}
