* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--opsphere-font);
  background:
    radial-gradient(ellipse 72% 34% at 50% -10%, rgba(53, 120, 183, 0.16), transparent 70%),
    linear-gradient(180deg, #050911 0%, var(--opsphere-bg) 28rem, #020408 100%);
  color: var(--opsphere-text);
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.01) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 55%);
  content: '';
  pointer-events: none;
}

a {
  color: rgba(147, 197, 253, 0.95);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid rgba(174, 201, 229, 0.1);
  background: linear-gradient(180deg, rgba(13, 21, 34, 0.92), rgba(7, 12, 21, 0.9));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22), inset 0 -1px 0 rgba(74, 161, 230, 0.03);
  backdrop-filter: blur(18px) saturate(130%);
}

.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.site-header__brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.site-header__logo {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: min(11rem, 48vw);
}

.site-header__nav {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.site-header__nav a {
  display: inline-flex;
  padding: 0.42rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--opsphere-text-muted);
  text-decoration: none;
}

.site-header__nav a:hover {
  border-color: rgba(148, 177, 208, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--opsphere-text);
  text-decoration: none;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4.5rem;
}

.hero {
  position: relative;
  margin-bottom: 1.35rem;
  padding-left: 1rem;
}

.hero::before {
  position: absolute;
  top: 0.2rem;
  bottom: 0.1rem;
  left: 0;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, #9ed8ff, #1687d9 52%, rgba(22, 135, 217, 0));
  box-shadow: 0 0 18px rgba(61, 166, 236, 0.45);
  content: '';
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: #f5f9ff;
  font-weight: 740;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 18px rgba(188, 221, 255, 0.08);
}

.hero__overall {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.overall--ok { color: var(--status-ok); }
.overall--warn { color: var(--status-warn); }
.overall--down { color: var(--status-down); }
.overall--maint { color: var(--status-maint); }
.overall--unknown { color: #94a3b8; }

.hero__updated {
  margin: 0;
  color: var(--opsphere-text-subtle);
  font-size: 0.875rem;
}

/* Professional incident banner (Statuspage-style) */
.incident-banner {
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.incident-banner__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 1.5rem;
}

.incident-banner--investigating {
  background: linear-gradient(180deg, var(--banner-investigating), #92400e);
}

.incident-banner--degraded {
  background: linear-gradient(180deg, var(--banner-degraded), #b45309);
}

.incident-banner--major {
  background: linear-gradient(180deg, var(--banner-major), #991b1b);
}

.incident-banner--maintenance {
  background: linear-gradient(180deg, var(--banner-maintenance), #334155);
}

.incident-banner__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.incident-banner__pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.incident-banner__updated {
  font-size: 0.8125rem;
  opacity: 0.9;
}

.incident-banner__title {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.incident-banner__message {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  max-width: 52rem;
}

.incident-banner__affected {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.95;
}

.component-row {
  position: relative;
  isolation: isolate;
  margin-bottom: 1.15rem;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(164, 191, 221, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.028), transparent 22%),
    linear-gradient(160deg, rgba(12, 20, 33, 0.98), rgba(6, 11, 20, 0.98));
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.25),
    0 3px 12px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.component-row::before {
  position: absolute;
  z-index: -1;
  top: -12rem;
  right: -9rem;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(33, 146, 215, 0.07), transparent 65%);
  content: '';
  pointer-events: none;
}

.component-row::after {
  position: absolute;
  z-index: -1;
  inset: 0.5px 10% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 226, 249, 0.14), transparent);
  content: '';
  pointer-events: none;
}

.component-row:hover {
  border-color: rgba(128, 188, 229, 0.24);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(76, 166, 226, 0.025), inset 0 1px 0 rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
}

.component-row__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.component-row__indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.component-row__indicator.status--ok { background: var(--status-ok); box-shadow: 0 0 0 4px rgba(40, 209, 124, 0.08), 0 0 16px rgba(40, 209, 124, 0.35); }
.component-row__indicator.status--maint { background: var(--status-maint); box-shadow: 0 0 12px rgba(100, 116, 139, 0.28); }
.component-row__indicator.status--warn { background: var(--status-warn); box-shadow: 0 0 14px rgba(245, 158, 11, 0.3); }
.component-row__indicator.status--down { background: var(--status-down); box-shadow: 0 0 14px rgba(220, 38, 38, 0.32); }
.component-row__indicator.status--unknown { background: #64748b; box-shadow: 0 0 12px rgba(100, 116, 139, 0.28); }

.component-row__status.status--ok { color: var(--status-ok); }
.component-row__status.status--maint { color: #94a3b8; background: rgba(100, 116, 139, 0.07); }
.component-row__status.status--warn { color: var(--status-warn); background: rgba(245, 158, 11, 0.06); }
.component-row__status.status--down { color: #f87171; background: rgba(220, 38, 38, 0.07); }
.component-row__status.status--unknown { color: #94a3b8; background: rgba(100, 116, 139, 0.07); }

.component-row__name {
  margin: 0;
  font-size: 1.0625rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: #f3f7fc;
  letter-spacing: -0.012em;
}

.component-row__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.component-row__note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #6ee7b7;
}

.component-row--always-on {
  border-color: rgba(52, 211, 153, 0.22);
}

.component-row__desc {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--opsphere-text-subtle);
}

.component-row__status {
  padding: 0.28rem 0.56rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(40, 209, 124, 0.045);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.component-row__history + .component-row__history {
  margin-top: 0.9rem;
}

.component-row__history-title {
  margin: 0 0 0.4rem;
  color: var(--opsphere-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.operational-storyline {
  position: relative;
  margin-top: 0.25rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid rgba(118, 166, 211, 0.16);
  border-radius: 13px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.027), transparent 18%),
    radial-gradient(circle at 92% -8%, rgba(42, 139, 211, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(10, 18, 31, 0.98), rgba(5, 10, 18, 0.97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 0 0 1px rgba(2, 7, 14, 0.45), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.storyline__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.storyline__eyebrow {
  margin: 0 0 0.2rem;
  color: #9bd2fa;
  font-size: 0.625rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.storyline__title {
  margin: 0;
  color: var(--opsphere-text);
  font-size: 0.9375rem;
}

.storyline__live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #86efac;
  font-size: 0.6875rem;
  font-weight: 650;
  white-space: nowrap;
}

.storyline__live > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.1), 0 0 12px rgba(74, 222, 128, 0.6);
}

.storyline__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid rgba(156, 187, 218, 0.13);
  border-radius: 10px;
  background: rgba(156, 187, 218, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 8px 16px rgba(0, 0, 0, 0.12);
}

.storyline__metrics > div {
  min-width: 0;
  padding: 0.72rem 0.75rem;
  background: linear-gradient(150deg, rgba(11, 18, 29, 0.95), rgba(4, 9, 17, 0.95));
}

.storyline__metrics dt,
.storyline__metrics small {
  display: block;
  overflow: hidden;
  color: var(--opsphere-text-subtle);
  font-size: 0.625rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyline__metrics dd {
  margin: 0.2rem 0 0.14rem;
  color: #f8fafc;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
}

.storyline__track {
  display: grid;
  grid-template-columns: repeat(24, minmax(5px, 1fr));
  gap: 3px;
  height: 42px;
  padding: 1px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.story-hour {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  appearance: none;
  border: 1px solid transparent;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, filter 140ms ease, opacity 140ms ease;
}

.story-hour:hover,
.story-hour:focus-visible,
.story-hour[aria-pressed="true"] {
  z-index: 2;
  border-color: rgba(255, 255, 255, 0.82);
  outline: none;
  filter: brightness(1.12);
  transform: translateY(-2px) scaleY(1.08);
}

.story-hour--live::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(147, 197, 253, 0.8);
  border-radius: inherit;
  box-shadow: inset 0 0 10px rgba(96, 165, 250, 0.28);
  content: '';
  pointer-events: none;
}

.story-hour.story-hour--collecting {
  background: linear-gradient(115deg, rgba(27, 119, 93, 0.76), rgba(42, 211, 132, 0.92) 42%, rgba(88, 180, 232, 0.78) 58%, rgba(25, 115, 91, 0.78));
  background-size: 240% 100%;
  box-shadow: inset 0 1px 0 rgba(224, 255, 244, 0.42), inset 0 -1px 0 rgba(0, 35, 25, 0.32), 0 0 18px rgba(40, 209, 124, 0.2);
  animation: live-scan 2.8s ease-in-out infinite;
}

@keyframes live-scan {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

.story-hour__event {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.75);
  transform: translateX(-50%);
}

.storyline__explanation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  margin-top: 0.9rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 178, 208, 0.12);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(5, 10, 18, 0.84), rgba(2, 6, 12, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.storyline--collecting .storyline__explanation {
  border-color: rgba(67, 221, 148, 0.2);
  background:
    radial-gradient(circle at 94% 0%, rgba(43, 201, 129, 0.075), transparent 35%),
    linear-gradient(135deg, rgba(5, 14, 19, 0.9), rgba(2, 8, 13, 0.78));
}

.storyline--collecting [data-story-impact] {
  border-color: rgba(67, 221, 148, 0.26);
  background: rgba(40, 209, 124, 0.07);
  color: #71e7ad;
}

.storyline--collecting [data-story-availability] {
  color: #55dfa0;
  text-shadow: 0 0 18px rgba(40, 209, 124, 0.18);
}

.storyline__explanation-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.storyline__explanation-head strong {
  overflow: hidden;
  color: var(--opsphere-text);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyline__explanation-head span {
  padding: 0.16rem 0.42rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.625rem;
  white-space: nowrap;
}

.storyline__explanation-value {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  grid-column: 2;
  grid-row: 1 / span 2;
}

.storyline__explanation-value strong {
  color: #f8fafc;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.storyline__explanation-value span,
.storyline__explanation small {
  color: var(--opsphere-text-subtle);
  font-size: 0.625rem;
}

.storyline__explanation p {
  margin: 0;
  color: var(--opsphere-text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.storyline__explanation small {
  grid-column: 1;
}

.component-row__bars {
  display: flex;
  gap: 2px;
  height: 34px;
  align-items: stretch;
}

.component-row__bars--hourly {
  gap: 3px;
}

.bar-day {
  flex: 1;
  min-width: 0;
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.bar-day--ok { background: var(--status-ok); opacity: 0.85; }
.bar-day--maint { background: var(--status-maint); opacity: 0.75; }
.bar-day--warn { background: var(--status-warn); opacity: 0.9; }
.bar-day--down { background: var(--status-down); opacity: 0.95; }
.bar-day--none { background: var(--status-none); }

.component-row__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  color: var(--opsphere-text-subtle);
}

.status-legend {
  margin: 0.5rem 0 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(164, 191, 221, 0.12);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(11, 18, 29, 0.78), rgba(5, 9, 16, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 12px 30px rgba(0, 0, 0, 0.16);
}

.status-legend__title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.status-legend__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.status-legend__list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8125rem;
  color: var(--opsphere-text-muted);
}

.status-legend__swatch {
  flex: 0 0 1.25rem;
  width: 1.25rem;
  height: 0.75rem;
  border-radius: 3px;
}

.status-legend__note {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--opsphere-text-subtle);
  line-height: 1.45;
}

.section-title {
  margin: 2.5rem 0 1rem;
  font-size: 1.125rem;
  color: #edf4fb;
  letter-spacing: -0.018em;
}

.incidents-empty {
  color: var(--opsphere-text-subtle);
}

.incident-history-item {
  border-left: 3px solid var(--opsphere-border);
  padding: 0 0 1.25rem 1rem;
  margin-bottom: 0.5rem;
}

.incident-history-item__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.incident-history-item__meta {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--opsphere-text-subtle);
}

.incident-history-item__message {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--opsphere-text-muted);
}

.site-footer {
  border-top: 1px solid var(--opsphere-border);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--opsphere-text-subtle);
  background: linear-gradient(180deg, rgba(6, 10, 17, 0), rgba(8, 13, 22, 0.65));
}

@media (max-width: 640px) {
  .page {
    padding-top: 1.75rem;
  }
  .hero {
    padding-left: 0.75rem;
  }
  .component-row__header {
    grid-template-columns: auto 1fr;
  }
  .component-row__status {
    grid-column: 2;
    justify-self: start;
  }
  .operational-storyline {
    margin-inline: -0.25rem;
    padding: 0.85rem;
  }
  .storyline__metrics > div {
    padding: 0.62rem 0.55rem;
  }
  .storyline__track {
    gap: 2px;
    height: 38px;
  }
  .storyline__explanation {
    grid-template-columns: 1fr;
  }
  .storyline__explanation-value {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .component-row,
  .story-hour {
    transition: none;
  }
  .story-hour.story-hour--collecting {
    animation: none;
  }
}
