:root {
  --bg: #f6f8fb;
  --bg-strong: #eef3f8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-soft: rgba(248, 250, 253, 0.86);
  --text: #111827;
  --text-soft: #4b5563;
  --text-muted: #7a8494;
  --line: rgba(17, 24, 39, 0.1);
  --line-strong: rgba(17, 24, 39, 0.16);
  --green: #16a36d;
  --green-bg: #e8f8f1;
  --amber: #c47b13;
  --amber-bg: #fff4df;
  --red: #d73b3e;
  --red-bg: #ffebec;
  --blue: #276fde;
  --shadow: 0 24px 70px rgba(35, 54, 84, 0.12);
  --shadow-soft: 0 12px 34px rgba(35, 54, 84, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 248, 251, 0.96) 42%, #eef3f8 100%);
  color-scheme: light;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 18% 10%, rgba(39, 111, 222, 0.08), transparent 24rem),
    radial-gradient(circle at 86% 4%, rgba(22, 163, 109, 0.08), transparent 22rem);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.status-shell {
  width: min(100% - 2rem, 1120px);
  margin: 0 auto;
  padding: 1.2rem 0 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.2rem 2.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.brand img {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 24px rgba(39, 111, 222, 0.2);
}

.brand span {
  display: grid;
  gap: 0.05rem;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1;
  letter-spacing: 0;
}

.brand span span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(35, 54, 84, 0.08);
  backdrop-filter: blur(18px);
}

.topnav a {
  display: inline-flex;
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  padding: 0 0.86rem;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 720;
  letter-spacing: 0;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  background: var(--surface-solid);
  color: var(--text);
  outline: none;
}

.status-main {
  display: grid;
  gap: 1rem;
}

.hero-panel,
.status-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(24px);
}

.hero-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem;
  min-height: 12.4rem;
  padding: clamp(1.25rem, 3.4vw, 2.05rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.overall-mark {
  position: relative;
  width: clamp(3.6rem, 7vw, 4.7rem);
  height: clamp(3.6rem, 7vw, 4.7rem);
  border-radius: 50%;
  background: var(--green-bg);
}

.overall-mark::before,
.overall-mark::after {
  position: absolute;
  inset: 50% auto auto 50%;
  content: "";
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.overall-mark::before {
  width: 52%;
  height: 52%;
  background: var(--green);
  box-shadow: 0 14px 34px rgba(22, 163, 109, 0.32);
}

.overall-mark::after {
  width: 66%;
  height: 66%;
  border: 1px solid rgba(22, 163, 109, 0.3);
}

.overall-mark[data-tone="degraded"] {
  background: var(--amber-bg);
}

.overall-mark[data-tone="degraded"]::before {
  background: var(--amber);
  box-shadow: 0 14px 34px rgba(196, 123, 19, 0.28);
}

.overall-mark[data-tone="degraded"]::after {
  border-color: rgba(196, 123, 19, 0.32);
}

.overall-mark[data-tone="outage"] {
  background: var(--red-bg);
}

.overall-mark[data-tone="outage"]::before {
  background: var(--red);
  box-shadow: 0 14px 34px rgba(215, 59, 62, 0.26);
}

.overall-mark[data-tone="outage"]::after {
  border-color: rgba(215, 59, 62, 0.3);
}

.status-kicker {
  margin: 0 0 0.68rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.01em;
}

.hero-copy h1 {
  max-width: 20ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.45rem, 5vw, 4.1rem);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.98;
}

.hero-copy p:last-child {
  max-width: 42rem;
  margin: 0.82rem 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.5;
}

.hero-meta {
  align-self: start;
  display: grid;
  justify-items: end;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.hero-meta span {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1;
}

.hero-meta strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1;
}

.systems-section,
.status-grid {
  display: grid;
  gap: 1rem;
}

.status-grid--lower {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(17rem, 0.9fr);
}

.status-card {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.35rem);
  border-radius: var(--radius-md);
}

.status-card--wide {
  min-height: 0;
}

.status-card--quiet {
  display: grid;
  align-content: start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.66);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.section-header--compact {
  margin-bottom: 0;
}

.section-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.14rem;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: 0;
}

.section-header p {
  margin: 0.28rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(22, 163, 109, 0.18);
  border-radius: 999px;
  background: var(--green-bg);
  color: #08734d;
  font-size: 0.8rem;
  font-weight: 780;
  white-space: nowrap;
}

.summary-pill[data-tone="degraded"] {
  border-color: rgba(196, 123, 19, 0.22);
  background: var(--amber-bg);
  color: #93560b;
}

.summary-pill[data-tone="outage"] {
  border-color: rgba(215, 59, 62, 0.22);
  background: var(--red-bg);
  color: #aa2328;
}

.component-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.component-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.88rem;
  min-height: 4.15rem;
  padding: 0.68rem 0.1rem;
  border-bottom: 1px solid var(--line);
}

.component-row:last-child {
  border-bottom: 0;
}

.component-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.34rem rgba(22, 163, 109, 0.12);
}

.component-dot[data-tone="degraded"] {
  background: var(--amber);
  box-shadow: 0 0 0 0.34rem rgba(196, 123, 19, 0.13);
}

.component-dot[data-tone="outage"] {
  background: var(--red);
  box-shadow: 0 0 0 0.34rem rgba(215, 59, 62, 0.12);
}

.component-name {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.component-name strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.18;
}

.component-name span {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.component-state {
  color: #08734d;
  font-size: 0.84rem;
  font-weight: 780;
  white-space: nowrap;
}

.component-state[data-tone="degraded"] {
  color: #93560b;
}

.component-state[data-tone="outage"] {
  color: #aa2328;
}

.component-row--loading {
  grid-template-columns: auto minmax(0, 1fr);
}

.history-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 0.28rem;
}

.history-bar {
  min-height: 4.8rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: inset 0 -18px 28px rgba(0, 0, 0, 0.08);
}

.history-bar[data-tone="degraded"] {
  background: var(--amber);
}

.history-bar[data-tone="outage"] {
  background: var(--red);
}

.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 680;
}

.history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.legend-dot--operational {
  background: var(--green);
}

.legend-dot--degraded {
  background: var(--amber);
}

.legend-dot--outage {
  background: var(--red);
}

.timeline-list {
  display: grid;
  gap: 0.7rem;
}

.timeline-item,
.empty-state {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.timeline-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.timeline-item strong,
.empty-state strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.25;
}

.timeline-item p,
.empty-state p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.timeline-state {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--green-bg);
  color: #08734d;
  font-size: 0.72rem;
  font-weight: 790;
  white-space: nowrap;
}

.timeline-state[data-tone="degraded"] {
  background: var(--amber-bg);
  color: #93560b;
}

.timeline-state[data-tone="outage"] {
  background: var(--red-bg);
  color: #aa2328;
}

.status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0.3rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.status-footer span:last-child {
  text-align: right;
}

@media (max-width: 820px) {
  .status-shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 0.65rem;
  }

  .topbar {
    padding-bottom: 1rem;
  }

  .topnav {
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 58vw;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: auto;
  }

  .overall-mark {
    width: 4.2rem;
    height: 4.2rem;
  }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.35rem, 12vw, 4rem);
  }

  .hero-meta {
    justify-self: start;
    justify-items: start;
  }

  .status-grid--lower {
    grid-template-columns: 1fr;
  }

  .component-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .component-state {
    grid-column: 2;
    justify-self: start;
  }

  .history-bar {
    min-height: 5.4rem;
  }

  .status-footer {
    display: grid;
  }

  .status-footer span:last-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .brand span span {
    display: none;
  }

  .topnav {
    max-width: 68vw;
  }

  .topnav a {
    min-height: 2rem;
    padding: 0 0.68rem;
    font-size: 0.78rem;
  }

  .hero-panel,
  .status-card {
    border-radius: 20px;
  }

  .section-header {
    display: grid;
  }

  .summary-pill {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .status-card {
    animation: rise-in 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .status-grid .status-card:nth-child(2) {
    animation-delay: 70ms;
  }

  .status-grid--lower .status-card {
    animation-delay: 120ms;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
