:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --canvas: #07111f;
  --canvas-soft: #0a1728;
  --panel: #0c1c2f;
  --panel-raised: #10243b;
  --line: rgba(165, 194, 224, 0.17);
  --line-strong: rgba(165, 194, 224, 0.3);
  --ink: #f5f8fc;
  --muted: #a8b8ca;
  --quiet: #8498ad;
  --blue: #70a7ff;
  --blue-soft: rgba(112, 167, 255, 0.13);
  --green: #52e0a0;
  --green-soft: rgba(82, 224, 160, 0.12);
  --amber: #ffc95f;
  --amber-soft: rgba(255, 201, 95, 0.13);
  --red: #ff7e89;
  --red-soft: rgba(255, 126, 137, 0.13);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 85% 4%, rgba(45, 103, 180, 0.16), transparent 27rem),
    linear-gradient(180deg, #07111f 0%, #081422 55%, #07111f 100%);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(143, 177, 214, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 177, 214, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 11px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 800;
  transform: translateY(-150%);
}

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

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

.site-header {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(112, 167, 255, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, #173c66, #0d2440);
  color: #dceaff;
  font-size: 21px;
  font-weight: 900;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
}

.app-link {
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
}

main {
  padding: 74px 0 100px;
}

.hero {
  display: grid;
  min-height: 440px;
  align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(48px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-summary {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

#refresh,
#load-more-incidents,
#subscribe-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-raised);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

#refresh:hover,
#load-more-incidents:hover,
#subscribe-button:hover {
  border-color: rgba(112, 167, 255, 0.55);
  background: #132a45;
}

#refresh:disabled,
#load-more-incidents:disabled,
#subscribe-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

#refresh svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

#refresh.is-loading svg {
  animation: spin 0.8s linear infinite;
}

#checked-at {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
}

.signal-panel {
  position: relative;
  display: grid;
  min-height: 360px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(17, 42, 70, 0.9), rgba(7, 20, 35, 0.92));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.26);
}

.signal-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(112, 167, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 167, 255, 0.06) 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: radial-gradient(circle, black, transparent 70%);
}

.signal-panel > p {
  position: absolute;
  bottom: 25px;
  margin: 0;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signal-orbit {
  position: relative;
  display: grid;
  width: 220px;
  height: 220px;
  place-items: center;
}

.signal-core {
  width: 48px;
  height: 48px;
  border: 10px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 55px rgba(112, 167, 255, 0.52);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.signal-ring {
  position: absolute;
  border: 1px solid rgba(112, 167, 255, 0.34);
  border-radius: 50%;
}

.signal-ring-one {
  inset: 40px;
}

.signal-ring-two {
  inset: 2px;
  border-color: rgba(112, 167, 255, 0.17);
}

.signal-orbit::after {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 15px var(--blue);
  content: "";
  animation: orbit 6s linear infinite;
  transform-origin: 4px 110px;
}

.signal-orbit[data-tone="operational"] .signal-core,
.signal-orbit[data-tone="operational"]::after {
  background: var(--green);
  box-shadow: 0 0 55px rgba(82, 224, 160, 0.48);
}

.signal-orbit[data-tone="degraded"] .signal-core,
.signal-orbit[data-tone="degraded"]::after {
  background: var(--amber);
  box-shadow: 0 0 55px rgba(255, 201, 95, 0.48);
}

.signal-orbit[data-tone="outage"] .signal-core,
.signal-orbit[data-tone="outage"]::after,
.signal-orbit[data-tone="unknown"] .signal-core,
.signal-orbit[data-tone="unknown"]::after {
  background: var(--red);
  box-shadow: 0 0 55px rgba(255, 126, 137, 0.45);
}

.status-section {
  padding-top: 78px;
  scroll-margin-top: 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 24px;
}

.section-heading h2,
.truth-note h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 350px;
  margin-bottom: 4px;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.component-grid {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-section {
  background: var(--canvas);
}

.history-card,
.history-state {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.history-card-heading,
.history-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.history-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.history-card-heading p,
.history-range,
.history-note,
.history-state {
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.55;
}

.history-card-heading p,
.history-note {
  margin: 0;
}

.history-days {
  display: grid;
  margin: 18px 0 8px;
  grid-template-columns: repeat(30, minmax(4px, 1fr));
  gap: 4px;
}

.history-day {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(131, 149, 172, 0.12);
}

.history-day[data-tone="operational"] {
  border-color: rgba(82, 224, 160, 0.36);
  background: rgba(82, 224, 160, 0.62);
}

.history-day[data-tone="degraded"] {
  border-color: rgba(255, 201, 95, 0.48);
  background: rgba(255, 201, 95, 0.65);
}

.history-day[data-tone="unavailable"] {
  border-color: rgba(255, 126, 137, 0.48);
  background: rgba(255, 126, 137, 0.68);
}

.history-note {
  max-width: 850px;
  margin-top: 14px;
}

.component-card {
  display: grid;
  min-height: 138px;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 25px;
  background: rgba(12, 28, 47, 0.68);
}

.component-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.component-card:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.component-icon {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 850;
}

.component-card h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.component-card p {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
  line-height: 1.45;
}

.state-pill,
.incident-badge {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

[data-tone="operational"] .state-pill,
.incident-badge[data-tone="operational"] {
  border-color: rgba(82, 224, 160, 0.35);
  background: var(--green-soft);
  color: #8ff0bd;
}

[data-tone="degraded"] .state-pill,
.incident-badge[data-tone="degraded"] {
  border-color: rgba(255, 201, 95, 0.4);
  background: var(--amber-soft);
  color: #ffd98b;
}

[data-tone="outage"] .state-pill,
[data-tone="unknown"] .state-pill,
.incident-badge[data-tone="outage"] {
  border-color: rgba(255, 126, 137, 0.42);
  background: var(--red-soft);
  color: #ffabb2;
}

.incident-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 28, 47, 0.55);
  color: var(--muted);
  text-align: center;
}

.subscribe-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 60px;
  align-items: center;
}

.subscribe-copy h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.subscribe-copy > p:last-child,
.form-note,
.subscribe-state {
  color: var(--muted);
  line-height: 1.65;
}

.subscribe-panel {
  min-height: 168px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 28, 47, 0.68);
}

#subscribe-form[hidden] {
  display: none;
}

#subscribe-form label {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
}

.subscribe-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

#subscribe-email {
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--canvas-soft);
  color: var(--ink);
  font: inherit;
}

#subscribe-email:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.form-note,
.subscribe-state {
  margin: 12px 0 0;
  font-size: 12px;
}

.subscribe-state[data-tone="success"] {
  color: #8ff0bd;
}

.subscribe-state[data-tone="error"] {
  color: #ffc2c7;
}

.status-link-result {
  margin-top: 70px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--muted);
}

.status-link-result[hidden] {
  display: none;
}

.status-link-result[data-tone="success"] {
  border-color: rgba(82, 224, 160, 0.35);
  background: var(--green-soft);
  color: #c1f8da;
}

.status-link-result[data-tone="error"] {
  border-color: rgba(255, 126, 137, 0.35);
  background: var(--red-soft);
  color: #ffc2c7;
}

.incident-state[hidden],
.incident-list[hidden] {
  display: none;
}

.incident-state p {
  margin: 0;
}

.incident-state[data-tone="error"] {
  border-color: rgba(255, 126, 137, 0.35);
  background: var(--red-soft);
  color: #ffc2c7;
}

.incident-state[data-tone="empty"] {
  border-color: rgba(82, 224, 160, 0.25);
  background: var(--green-soft);
  color: #c1f8da;
}

.loading-line {
  width: 34px;
  height: 2px;
  overflow: hidden;
  background: var(--line-strong);
}

.loading-line::after {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--blue);
  content: "";
  animation: loading 1.1s ease-in-out infinite alternate;
}

.incident-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.incident-actions {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
}

.incident-actions[hidden],
#load-more-incidents[hidden] {
  display: none;
}

#load-more-incidents {
  flex: 0 0 auto;
}

#incident-page-state {
  margin: 0;
  color: var(--quiet);
  font-size: 12px;
}

.incident-card {
  padding: 28px;
  background: rgba(12, 28, 47, 0.72);
}

.incident-card + .incident-card {
  border-top: 1px solid var(--line);
}

.incident-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.incident-kicker,
.incident-meta {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.incident-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.incident-card h3 {
  margin-bottom: 10px;
  font-size: clamp(20px, 3vw, 27px);
  letter-spacing: -0.025em;
}

.incident-summary {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.incident-meta {
  flex: 0 0 auto;
  text-align: right;
}

.incident-timeline {
  position: relative;
  display: grid;
  gap: 17px;
  margin: 25px 0 0;
  padding: 0 0 0 20px;
  border-left: 1px solid var(--line-strong);
  list-style: none;
}

.incident-update {
  position: relative;
}

.incident-update::before {
  position: absolute;
  top: 5px;
  left: -24px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px rgba(112, 167, 255, 0.35);
  content: "";
}

.incident-update-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}

.incident-update time {
  color: var(--quiet);
  font-size: 11px;
}

.incident-update p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.truth-note {
  display: grid;
  margin-top: 90px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(115deg, rgba(25, 59, 95, 0.78), rgba(10, 25, 43, 0.86));
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px 60px;
}

.truth-note .eyebrow {
  grid-column: 1 / -1;
}

.truth-note p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

footer {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 12px;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 20px;
}

footer a:hover {
  color: var(--ink);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loading {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(200%);
  }
}

@media (max-width: 800px) {
  .site-header {
    align-items: flex-start;
    padding: 18px 0;
  }

  nav {
    gap: 12px;
  }

  nav > a:not(.app-link) {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 52px;
    grid-template-columns: 1fr;
    gap: 45px;
  }

  .signal-panel {
    min-height: 270px;
  }

  .component-grid,
  .truth-note,
  .subscribe-section {
    grid-template-columns: 1fr;
  }

  .history-days {
    gap: 3px;
  }

  .subscribe-section {
    gap: 28px;
  }

  .component-card:nth-child(odd) {
    border-right: 0;
  }

  .component-card:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }

  .truth-note h2,
  .truth-note p:last-child {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .brand small {
    display: none;
  }

  .app-link {
    padding: 0 13px;
  }

  main {
    padding-top: 30px;
  }

  h1 {
    font-size: clamp(43px, 13vw, 58px);
  }

  .hero-actions,
  .section-heading,
  .incident-card-head,
  .incident-actions,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > p,
  .incident-meta {
    text-align: left;
  }

  .component-card {
    min-height: 132px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .history-card {
    padding: 19px 16px;
  }

  .history-card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .history-day {
    min-height: 20px;
  }

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

  .incident-card {
    padding: 23px 20px;
  }

  .subscribe-panel {
    min-height: 0;
    padding: 22px 18px;
  }

  .subscribe-controls {
    grid-template-columns: 1fr;
  }

  #subscribe-button {
    width: 100%;
  }

  .truth-note {
    padding: 28px 22px;
  }

  footer {
    padding: 30px 0;
  }

  footer div {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .signal-orbit::after,
  #refresh.is-loading svg,
  .loading-line::after {
    animation: none;
  }
}
