:root {
  --background: #111218;
  --surface: #181920;
  --surface-raised: #1d1e27;
  --line: #2a2c38;
  --line-soft: #242630;
  --text: #f5f6fb;
  --muted: #9094a5;
  --muted-light: #b9bcc8;
  --purple: #795cff;
  --blue: #49a4ff;
  --green: #46d5a1;
  --red: #ff6174;
  --amber: #f3bd5b;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.ambient { position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(110px); opacity: .13; }
.ambient-one { width: 520px; height: 520px; background: var(--purple); top: -280px; right: 4%; }
.ambient-two { width: 420px; height: 420px; background: #195cff; top: 480px; left: -300px; opacity: .08; }

.site-header, main, footer { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.site-header { height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand > span { display: flex; flex-direction: column; gap: 1px; }
.brand strong, .footer-brand { font-family: "Space Grotesk", sans-serif; font-size: 17px; letter-spacing: .04em; }
.brand strong span, .footer-brand span span { color: var(--blue); }
.brand small { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .34em; }
.header-actions { display: flex; align-items: center; gap: 28px; }
.live-label { color: var(--muted-light); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.live-label i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(70,213,161,.08), 0 0 14px var(--green); }
.support-link { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; color: var(--muted-light); transition: border-color .2s, color .2s; }
.support-link:hover { border-color: var(--purple); color: white; }
.support-link span { color: var(--purple); margin-left: 6px; }

.hero { padding: 82px 0 48px; }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--purple); font-size: 10px; font-weight: 700; letter-spacing: .2em; }
.hero-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 9px; font: 600 clamp(36px, 5vw, 56px)/1.04 "Space Grotesk", sans-serif; letter-spacing: -.045em; }
.hero-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.updated { color: var(--muted); font-size: 11px; white-space: nowrap; }
.overview { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; min-height: 146px; padding: 32px 36px; border: 1px solid rgba(70,213,161,.32); border-radius: var(--radius); background: linear-gradient(102deg, rgba(70,213,161,.09), rgba(31,34,39,.76) 48%, rgba(73,164,255,.035)); }
.overview::after { content: ""; position: absolute; top: -130px; right: 50px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.03); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.012), 0 0 0 90px rgba(255,255,255,.01); }
.overview.outage { border-color: rgba(255,97,116,.35); background: linear-gradient(102deg, rgba(255,97,116,.09), rgba(31,34,39,.76)); }
.overview.checking { border-color: rgba(243,189,91,.25); background: linear-gradient(102deg, rgba(243,189,91,.07), rgba(31,34,39,.76)); }
.overview-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(70,213,161,.11); }
.overview-icon span { width: 17px; height: 17px; border: 4px solid var(--green); border-radius: 50%; box-shadow: 0 0 16px rgba(70,213,161,.55); }
.outage .overview-icon { background: rgba(255,97,116,.1); }
.outage .overview-icon span { border-color: var(--red); box-shadow: 0 0 16px rgba(255,97,116,.5); }
.checking .overview-icon span { border-color: var(--amber); box-shadow: 0 0 16px rgba(243,189,91,.4); }
.overview-copy h2 { margin-bottom: 6px; font: 600 19px "Space Grotesk", sans-serif; }
.overview-copy p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.overview-metrics { position: relative; z-index: 1; display: flex; align-items: center; }
.overview-metrics > div { min-width: 110px; padding-inline: 24px; border-left: 1px solid var(--line); }
.overview-metrics strong { display: block; margin-bottom: 5px; font: 600 19px "Space Grotesk", sans-serif; }
.overview-metrics small { color: var(--muted); font-size: 9px; letter-spacing: .03em; }
.maintenance-list { display: grid; gap: 10px; margin-top: 14px; }
.maintenance-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; padding: 16px 18px; border: 1px solid rgba(243,189,91,.25); border-radius: 12px; background: rgba(243,189,91,.055); }
.maintenance-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--amber); background: rgba(243,189,91,.1); font-size: 13px; }
.maintenance-banner h3 { margin: 0 0 4px; font-size: 11px; }
.maintenance-banner p, .maintenance-banner time { margin: 0; color: var(--muted); font-size: 9px; }
.maintenance-banner time { white-space: nowrap; }

.status-content, .regions-section, .history-section { padding: 46px 0 36px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section-title h2 { margin-bottom: 0; font: 600 24px "Space Grotesk", sans-serif; letter-spacing: -.025em; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 9px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot.up { background: var(--green); box-shadow: 0 0 8px rgba(70,213,161,.6); }
.dot.down { background: var(--red); }

.groups { display: grid; gap: 18px; }
.group-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(24,25,32,.82); }
.group-header { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px; border-bottom: 1px solid var(--line-soft); }
.group-name { display: flex; align-items: center; gap: 11px; }
.group-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #a38fff; background: rgba(121,92,255,.1); }
.group-icon svg { width: 14px; height: 14px; }
.group-name strong { font-size: 12px; font-weight: 600; }
.group-count { color: var(--muted); font-size: 9px; }
.component { display: grid; grid-template-columns: minmax(190px, 1.25fr) minmax(250px, 2fr) 100px 90px; align-items: center; gap: 24px; min-height: 93px; padding: 17px 22px; border-bottom: 1px solid var(--line-soft); }
.component:last-child { border-bottom: 0; }
.component-info { min-width: 0; }
.component-title { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.component-title strong { font-size: 12px; }
.component-info p { overflow: hidden; margin: 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { flex: 0 0 auto; width: 7px; height: 7px; border: 2px solid var(--muted); border-radius: 50%; }
.status-dot.up { border-color: var(--green); box-shadow: 0 0 9px rgba(70,213,161,.65); }
.status-dot.down { border-color: var(--red); box-shadow: 0 0 9px rgba(255,97,116,.55); }
.uptime-track { display: flex; height: 23px; gap: 2px; align-items: stretch; }
.uptime-day { flex: 1; min-width: 1px; border-radius: 2px; background: #30323d; }
.uptime-day.up { background: #426c63; }
.uptime-day.perfect { background: #388b73; }
.uptime-day.down { background: #9b4654; }
.uptime-day:hover { filter: brightness(1.35); }
.metric { text-align: right; }
.metric strong { display: block; margin-bottom: 5px; font: 500 11px "Space Grotesk", sans-serif; }
.metric small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.status-pill { justify-self: end; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(70,213,161,.18); border-radius: 20px; color: var(--green); background: rgba(70,213,161,.06); font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.status-pill.down { color: var(--red); border-color: rgba(255,97,116,.18); background: rgba(255,97,116,.06); }
.status-pill.unknown { color: var(--muted-light); border-color: var(--line); background: rgba(255,255,255,.02); }

.region-note { color: var(--muted); font-size: 9px; }
.region-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.region-card { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.region-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--green); }
.region-card.down::before { background: var(--red); }
.region-card.unreachable::before { background: var(--amber); }
.region-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.region-top strong { font-size: 11px; }
.region-state { color: var(--green); font-size: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.region-card.down .region-state { color: var(--red); }
.region-card.unreachable .region-state { color: var(--amber); }
.region-stats { display: flex; gap: 24px; }
.region-stats span { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; }
.region-stats strong { display: block; margin-bottom: 3px; color: white; font: 600 15px "Space Grotesk", sans-serif; }
.region-skeleton { height: 112px; }
.connection-explainer { max-width: 720px; margin: -5px 0 20px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.test-button { padding: 10px 14px; border: 1px solid rgba(121,92,255,.35); border-radius: 8px; color: #c9c0ff; background: rgba(121,92,255,.08); cursor: pointer; font-size: 9px; font-weight: 700; }
.test-button:disabled { opacity: .55; cursor: wait; }
.connection-results { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.connection-empty { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 120px; color: var(--muted); }
.connection-empty > span { font-size: 27px; color: #9c88ff; }
.connection-empty strong { display: block; margin-bottom: 5px; color: var(--muted-light); font-size: 11px; }
.connection-empty p { margin: 0; font-size: 9px; }
.connection-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(100px, .7fr)); align-items: center; gap: 18px; min-height: 70px; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); }
.connection-row:last-child { border-bottom: 0; }
.connection-node strong { display: block; margin-bottom: 4px; font-size: 11px; }
.connection-node small { color: var(--muted); font-size: 8px; }
.connection-metric strong { display: block; margin-bottom: 4px; font: 500 11px "Space Grotesk", sans-serif; }
.connection-metric small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.connection-metric.unavailable strong { color: var(--amber); }

.history-section { padding-bottom: 90px; }
.period-tabs { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.period-tabs button { padding: 7px 12px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }
.period-tabs button.active { color: white; background: #292b36; }
.incidents { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.empty-state { display: flex; min-height: 180px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-check { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 14px; border: 1px solid rgba(70,213,161,.2); border-radius: 50%; color: var(--green); background: rgba(70,213,161,.06); font-size: 13px; }
.empty-state h3 { margin-bottom: 7px; font: 600 13px "Space Grotesk", sans-serif; }
.empty-state p { margin: 0; color: var(--muted); font-size: 10px; }
.incident-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.incident-row:last-child { border-bottom: 0; }
.incident-row h3 { margin-bottom: 6px; font-size: 12px; }
.incident-row p, .incident-row time { margin: 0; color: var(--muted); font-size: 9px; }
.incident-state { align-self: start; color: var(--red); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.incident-state.resolved { color: var(--green); }
.published-incident { display: block; }
.incident-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.incident-impact { color: var(--amber); font-size: 8px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.incident-updates { display: grid; gap: 13px; margin-top: 16px; padding-left: 14px; border-left: 1px solid var(--line); }
.incident-update strong { display: block; margin-bottom: 4px; color: var(--muted-light); font-size: 9px; text-transform: capitalize; }
.incident-update p { color: var(--muted-light); line-height: 1.55; }
.skeleton-card { height: 230px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-raised) 50%, var(--surface) 70%); background-size: 300% 100%; animation: loading 1.4s infinite; }
@keyframes loading { to { background-position: -150% 0; } }

.subscribe-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; margin-bottom: 90px; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(110deg, rgba(121,92,255,.08), var(--surface) 48%); }
.subscribe-copy h2 { margin-bottom: 9px; font: 600 24px "Space Grotesk", sans-serif; }
.subscribe-copy p { max-width: 450px; margin-bottom: 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.rss-link { color: #a994ff; font-size: 10px; }
.subscribe-panel { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(17,18,24,.65); }
.subscribe-tabs { display: flex; gap: 4px; margin-bottom: 18px; }
.subscribe-tabs button { padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }
.subscribe-tabs button.active { color: white; background: #292b36; }
.subscribe-panel label { display: block; margin-bottom: 7px; color: var(--muted-light); font-size: 9px; }
.subscribe-fields { display: flex; gap: 8px; }
.subscribe-fields input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: white; background: #12131a; font: 10px Inter, sans-serif; }
.subscribe-fields input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(121,92,255,.12); }
.subscribe-fields button { padding: 0 16px; border: 0; border-radius: 8px; color: white; background: linear-gradient(135deg, var(--purple), #477fff); cursor: pointer; font-size: 9px; font-weight: 700; }
#subscribe-help { margin: 9px 0 0; color: var(--muted); font-size: 8px; }
#subscribe-result { display: block; margin-top: 9px; color: var(--green); font-size: 9px; }
#subscribe-result.error { color: var(--red); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 120px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 9px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: white; font-size: 13px; }
footer p { margin: 0; }
footer nav { display: flex; gap: 20px; }
footer nav a:hover { color: white; }

@media (max-width: 880px) {
  .overview { grid-template-columns: auto 1fr; }
  .overview-metrics { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--line); }
  .overview-metrics > div:first-child { border-left: 0; padding-left: 0; }
  .component { grid-template-columns: minmax(160px, 1fr) minmax(190px, 1.8fr) 80px; }
  .status-pill { display: none; }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
  .subscribe-section { gap: 35px; }
  .connection-row { grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(80px, .7fr)); }
}

@media (max-width: 640px) {
  .site-header, main, footer { width: min(100% - 30px, 1160px); }
  .site-header { height: 76px; }
  .header-actions { gap: 10px; }
  .live-label { display: none; }
  .hero { padding-top: 54px; }
  .hero-heading { display: block; }
  .updated { margin-top: 18px; }
  .overview { display: grid; grid-template-columns: auto 1fr; padding: 24px 20px; }
  .overview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .overview-metrics > div { min-width: 0; padding: 0 10px; }
  .overview-metrics strong { font-size: 15px; }
  .section-title { display: block; }
  .legend, .period-tabs { margin-top: 16px; }
  .history-heading .period-tabs { display: inline-flex; }
  .component { grid-template-columns: 1fr auto; gap: 12px; padding: 17px; }
  .uptime-track { grid-column: 1 / -1; grid-row: 2; order: 3; }
  .metric { grid-column: 2; grid-row: 1; }
  .group-header { padding-inline: 17px; }
  .maintenance-banner { grid-template-columns: auto 1fr; }
  .maintenance-banner time { grid-column: 2; }
  .region-grid { grid-template-columns: 1fr; }
  .region-note { display: block; margin-top: 12px; }
  .connection-section .section-title { display: flex; align-items: end; }
  .connection-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .connection-node { grid-column: 1 / -1; }
  .subscribe-section { grid-template-columns: 1fr; gap: 26px; margin-bottom: 55px; padding: 24px 18px; }
  .subscribe-fields { display: grid; }
  .subscribe-fields button { min-height: 40px; }
  footer { flex-wrap: wrap; padding: 28px 0; }
  footer p { order: 3; width: 100%; }
}

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