:root {
  color-scheme: light;
  --bg: #f4f7fc;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --surface-muted: #f7f9fd;
  --text: #0b1730;
  --muted: #66728a;
  --border: rgba(18, 39, 78, 0.1);
  --shadow: 0 24px 70px rgba(22, 42, 86, 0.12);
  --blue: #4f7cff;
  --purple: #7a5dff;
  --green: #14a673;
  --green-bg: #e8f8f2;
  --amber: #c9820c;
  --amber-bg: #fff5dc;
  --red: #d64a5f;
  --red-bg: #fff0f2;
  --slate: #8993a8;
  --slate-bg: #eff2f7;
  --radius-lg: 26px;
  --radius-md: 18px;
  --max-width: 1120px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071120;
  --surface: rgba(13, 27, 53, 0.9);
  --surface-solid: #0d1b35;
  --surface-muted: #101f3a;
  --text: #f5f8ff;
  --muted: #a7b1c5;
  --border: rgba(213, 225, 255, 0.11);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  --green-bg: rgba(20, 166, 115, 0.15);
  --amber-bg: rgba(201, 130, 12, 0.17);
  --red-bg: rgba(214, 74, 95, 0.15);
  --slate-bg: rgba(137, 147, 168, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(110px);
  opacity: .13;
  pointer-events: none;
}
.ambient-one { top: -170px; left: -120px; background: var(--blue); }
.ambient-two { top: 220px; right: -200px; background: var(--purple); }

.site-header, main, footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 9px 18px rgba(79, 124, 255, .25)); }
.brand-copy { display: grid; line-height: 1.12; }
.brand-copy strong { font-size: 1.17rem; letter-spacing: -.02em; }
.brand-copy span { margin-top: 4px; color: var(--muted); font-size: .78rem; font-weight: 650; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.live-indicator > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 16%, transparent);
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--green) 0%, transparent); } }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(20, 41, 82, .08);
  cursor: pointer;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle svg { width: 20px; fill: currentColor; }

main { padding: 46px 0 72px; }
.hero { padding-top: 22px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.055em;
}
h2 { margin-bottom: 0; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.035em; }
.hero-copy { max-width: 720px; margin-bottom: 36px; color: var(--muted); font-size: 1.05rem; }

.overall-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 150px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.overall-card::after {
  content: "";
  position: absolute;
  inset: auto -70px -95px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: currentColor;
  opacity: .045;
}
.overall-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 21px;
  color: var(--green);
  background: var(--green-bg);
}
.overall-icon svg { width: 35px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.overall-copy { display: grid; gap: 4px; }
.overall-label, .overall-meta span { color: var(--muted); font-size: .77rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.overall-copy strong { font-size: clamp(1.22rem, 2.6vw, 1.62rem); letter-spacing: -.025em; }
.overall-copy > span:last-child { color: var(--muted); font-size: .92rem; }
.overall-meta { position: relative; z-index: 1; display: grid; justify-items: end; gap: 2px; text-align: right; }
.overall-meta strong { font-size: .92rem; }
.overall-meta small { margin-top: 7px; color: var(--muted); }
.overall-card.status-degraded .overall-icon, .overall-card.status-maintenance .overall-icon { color: var(--amber); background: var(--amber-bg); }
.overall-card.status-partial .overall-icon, .overall-card.status-major .overall-icon { color: var(--red); background: var(--red-bg); }
.overall-card.status-unknown .overall-icon, .overall-card.is-loading .overall-icon { color: var(--slate); background: var(--slate-bg); }

section + section { margin-top: 70px; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: .77rem; font-weight: 650; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.operational { background: var(--green); }
.legend-dot.degraded { background: var(--amber); }
.legend-dot.outage { background: var(--red); }
.hidden { display: none !important; }

.notice-list, .history-list { display: grid; gap: 14px; }
.notice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
}
.notice-marker { width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 6px var(--amber-bg); }
.notice-card.severity-major .notice-marker, .notice-card.severity-partial .notice-marker { background: var(--red); box-shadow: 0 0 0 6px var(--red-bg); }
.notice-card strong { font-size: 1rem; }
.notice-card p { margin: 5px 0 0; color: var(--muted); }
.notice-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; color: var(--muted); font-size: .77rem; }
.notice-updates { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.notice-update { display: grid; grid-template-columns: 126px 1fr; gap: 10px; color: var(--muted); font-size: .83rem; }
.notice-update time { font-weight: 700; }

.service-groups { display: grid; gap: 22px; }
.service-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  box-shadow: 0 12px 42px rgba(20, 41, 82, .06);
}
.group-title { padding: 19px 24px; border-bottom: 1px solid var(--border); background: var(--surface-muted); font-size: .81rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.service-row { padding: 22px 24px; }
.service-row + .service-row { border-top: 1px solid var(--border); }
.service-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.service-name { display: grid; gap: 3px; }
.service-name strong { font-size: .98rem; }
.service-name span { color: var(--muted); font-size: .82rem; }
.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-bg);
  font-size: .72rem;
  font-weight: 800;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.status-degraded, .status-pill.status-maintenance { color: var(--amber); background: var(--amber-bg); }
.status-pill.status-partial, .status-pill.status-major { color: var(--red); background: var(--red-bg); }
.status-pill.status-unknown { color: var(--slate); background: var(--slate-bg); }
.uptime-line { display: flex; align-items: center; gap: 12px; margin-top: 17px; }
.uptime-bars { display: flex; flex: 1; gap: 2px; min-width: 0; height: 30px; }
.uptime-bar { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: var(--slate-bg); }
.uptime-bar.operational { background: var(--green); opacity: .86; }
.uptime-bar.degraded { background: var(--amber); }
.uptime-bar.outage { background: var(--red); }
.uptime-caption { flex: 0 0 auto; min-width: 70px; text-align: right; color: var(--muted); font-size: .72rem; }
.uptime-caption strong { display: block; color: var(--text); font-size: .81rem; }
.service-skeleton { height: 168px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--surface-muted), var(--surface-solid), var(--surface-muted)); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.history-entry {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
}
.history-entry-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.history-entry h3 { margin: 0; font-size: 1rem; }
.history-entry p { margin: 7px 0 0; color: var(--muted); font-size: .9rem; }
.resolved-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--green-bg); font-size: .7rem; font-weight: 800; }
.history-date { margin-top: 12px; color: var(--muted); font-size: .76rem; }
.empty-state { padding: 28px; border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--muted); text-align: center; background: var(--surface-muted); }

.transparency-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(130deg, color-mix(in srgb, var(--blue) 7%, var(--surface-solid)), var(--surface-solid));
}
.transparency-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--blue); background: color-mix(in srgb, var(--blue) 11%, transparent); }
.transparency-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.transparency-card p { margin: 4px 0 0; color: var(--muted); font-size: .88rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
}
footer > div { display: grid; gap: 2px; }
footer strong { color: var(--text); }
footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--blue); }
.noscript { position: fixed; inset: auto 20px 20px; padding: 14px 18px; border-radius: 12px; color: white; background: #d64a5f; text-align: center; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(calc(100% - 28px), var(--max-width)); }
  .site-header { min-height: 78px; }
  .live-indicator { display: none; }
  main { padding-top: 24px; }
  .hero { padding-top: 10px; }
  .overall-card { grid-template-columns: auto 1fr; padding: 22px; }
  .overall-icon { width: 56px; height: 56px; border-radius: 17px; }
  .overall-meta { grid-column: 1 / -1; justify-items: start; padding-top: 16px; border-top: 1px solid var(--border); text-align: left; }
  section + section { margin-top: 54px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .legend { justify-content: flex-start; }
  .service-row { padding: 20px 18px; }
  .group-title { padding-inline: 18px; }
  .service-line { gap: 12px; }
  .service-name span { max-width: 230px; }
  .uptime-bars { height: 26px; gap: 1px; }
  .uptime-caption { min-width: 62px; }
  .notice-update { grid-template-columns: 1fr; gap: 2px; }
  footer { flex-direction: column; }
  footer nav { justify-content: flex-start; }
}

@media (max-width: 480px) {
  h1 { font-size: 2.42rem; }
  .brand-copy span { display: none; }
  .overall-card { gap: 15px; }
  .overall-icon { width: 50px; height: 50px; }
  .service-line { align-items: flex-start; flex-direction: column; }
  .status-pill { align-self: flex-start; }
  .uptime-line { align-items: flex-end; }
  .uptime-bars .uptime-bar:nth-child(-n+30) { display: none; }
  .transparency-card { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
