:root {
  color-scheme: light dark;
  --page: #f5f1e9;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --text: #18202c;
  --muted: #657080;
  --line: #dcd6cb;
  --brand: #d96816;
  --brand-strong: #a94308;
  --brand-soft: #fff0e2;
  --success: #167a55;
  --success-soft: #e6f5ee;
  --warning: #9a6100;
  --warning-soft: #fff2cf;
  --danger: #b23838;
  --danger-soft: #fde8e5;
  --unknown: #647084;
  --shadow: 0 24px 70px rgb(38 31 22 / 10%);
  font-family:
    "Avenir Next",
    Avenir,
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #080d16;
    --surface: #0f1725;
    --surface-strong: #131d2d;
    --text: #f4f7fb;
    --muted: #9da8b8;
    --line: #29364a;
    --brand: #ff7a1a;
    --brand-strong: #ff9a52;
    --brand-soft: #2a1b12;
    --success: #4bd3a0;
    --success-soft: #102b24;
    --warning: #f2bc55;
    --warning-soft: #2d2515;
    --danger: #ff8a80;
    --danger-soft: #331d20;
    --unknown: #a4afbf;
    --shadow: 0 28px 80px rgb(0 0 0 / 32%);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--page);
  color: var(--text);
  line-height: 1.5;
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  width: 44rem;
  height: 44rem;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body::before {
  top: -31rem;
  right: -14rem;
}

body::after {
  bottom: -35rem;
  left: -18rem;
}

a {
  color: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--page);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 920px);
  margin: 0 auto;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  min-height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.open-app-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.open-app-link:hover {
  color: var(--brand-strong);
}

.status-hero,
.services,
.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-hero {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px 30px;
  align-items: center;
  padding: clamp(28px, 5vw, 50px);
  border-radius: 22px;
}

.status-orbit {
  position: relative;
  grid-row: span 2;
  width: 104px;
  height: 104px;
}

.orbit,
.orbit-marker,
.orbit-core {
  position: absolute;
  border-radius: 50%;
}

.orbit {
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--line));
}

.orbit-inner {
  inset: 18px;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.orbit-marker {
  top: 4px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--unknown);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--unknown) 14%, transparent);
  transform: translateX(-50%);
  transform-origin: 6px 48px;
  animation: orbit-check 2.6s linear infinite;
}

.orbit-core {
  inset: 40px;
  background: var(--unknown);
}

body[data-overall="operational"] .orbit-marker,
body[data-overall="operational"] .orbit-core,
body[data-overall="operational"] .overall-dot {
  background: var(--success);
}

body[data-overall="degraded"] .orbit-marker,
body[data-overall="degraded"] .orbit-core,
body[data-overall="degraded"] .overall-dot {
  background: var(--warning);
}

body[data-overall="outage"] .orbit-marker,
body[data-overall="outage"] .orbit-core,
body[data-overall="outage"] .overall-dot {
  background: var(--danger);
}

body[data-overall]:not([data-overall="checking"]) .orbit-marker {
  animation-duration: 12s;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 640px;
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.status-summary {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.16rem);
}

.status-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 10px;
}

.overall-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: 0.82rem;
  font-weight: 750;
}

.overall-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--unknown);
}

.last-checked {
  color: var(--muted);
  font-size: 0.82rem;
}

.refresh-button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
}

.refresh-button:hover {
  background: var(--brand-soft);
}

.refresh-button:disabled {
  color: var(--muted);
  cursor: wait;
  opacity: 0.7;
}

.services {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 18px;
  box-shadow: none;
}

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

.section-heading h2,
.notice h2 {
  margin-bottom: 0;
  font-size: 1.3rem;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 280px;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.service-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
}

.service-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--unknown);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--unknown) 12%, transparent);
}

.service-row[data-state="operational"] .service-marker {
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 13%, transparent);
}

.service-row[data-state="slow"] .service-marker {
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 14%, transparent);
}

.service-row[data-state="unavailable"] .service-marker {
  background: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent);
}

.service-copy h3 {
  margin-bottom: 2px;
  font-size: 0.98rem;
  font-weight: 750;
}

.service-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.service-state {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  text-align: right;
}

.service-row[data-state="operational"] .service-state {
  color: var(--success);
}

.service-row[data-state="slow"] .service-state {
  color: var(--warning);
}

.service-row[data-state="unavailable"] .service-state {
  color: var(--danger);
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: none;
}

.notice-icon {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-family: Georgia, serif;
  font-weight: 700;
}

.notice h2 {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.notice p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.noscript-notice {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--warning);
  border-radius: 12px;
  background: var(--warning-soft);
}

.site-footer {
  min-height: 106px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: var(--brand-strong);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 65%, white);
  outline-offset: 3px;
}

@keyframes orbit-check {
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 78px;
  }

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

  .status-orbit {
    grid-row: auto;
    width: 82px;
    height: 82px;
  }

  .orbit-inner {
    inset: 14px;
  }

  .orbit-core {
    inset: 31px;
  }

  .orbit-marker {
    transform-origin: 6px 37px;
  }

  .status-meta {
    grid-column: 1;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 8px;
    text-align: left;
  }

  .service-row {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 10px 12px;
    padding: 16px 0;
  }

  .service-state {
    grid-column: 2;
    text-align: left;
  }

  .site-footer {
    display: block;
    padding: 28px 0;
  }

  .site-footer a {
    display: inline-block;
    margin-top: 9px;
  }
}

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