:root {
  color-scheme: dark;
  --bg: #080b14;
  --panel: rgba(15, 20, 35, 0.78);
  --panel-border: rgba(151, 164, 204, 0.16);
  --text: #f4f6ff;
  --muted: #9aa5c3;
  --purple: #8f5cff;
  --cyan: #43d9ff;
  --green: #49e39a;
  --amber: #ffc45c;
  --red: #ff6f87;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 4%, rgba(71, 216, 255, 0.13), transparent 28rem),
    radial-gradient(circle at 9% 22%, rgba(143, 92, 255, 0.18), transparent 31rem),
    linear-gradient(145deg, #070910 0%, #0b1020 48%, #080b14 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.background-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(128, 143, 190, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 143, 190, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 10%, transparent 78%);
}

.shell {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.topbar,
.panel-heading,
.status-footer,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(151, 164, 204, 0.26);
  background: linear-gradient(145deg, rgba(143, 92, 255, 0.28), rgba(67, 217, 255, 0.12));
  box-shadow: inset 0 0 24px rgba(143, 92, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.brand-mark span,
.brand-mark span::before,
.brand-mark span::after {
  width: 8px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(to bottom, var(--cyan), var(--purple));
}
.brand-mark span { position: relative; transform: rotate(28deg); }
.brand-mark span::before,
.brand-mark span::after { content: ""; position: absolute; top: 0; }
.brand-mark span::before { left: -10px; height: 14px; top: 4px; }
.brand-mark span::after { right: -10px; height: 14px; top: 4px; }

.brand-copy { display: grid; line-height: 1; letter-spacing: 0.16em; }
.brand-copy strong { font-size: 0.92rem; }
.brand-copy span { margin-top: 6px; color: var(--cyan); font-size: 0.68rem; font-weight: 800; }

.status-pill,
.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.status-pill { padding: 10px 14px; background: rgba(8, 11, 20, 0.58); }
.mini-status { padding: 6px 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.status-operational { color: var(--green); }
.status-starting { color: var(--cyan); }
.status-degraded { color: var(--amber); }
.status-unavailable { color: var(--red); }

.hero { padding: 112px 0 86px; max-width: 850px; }
.eyebrow,
.section-kicker {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.22em;
}
.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(3.35rem, 9vw, 7.2rem);
  line-height: 0.91;
  letter-spacing: -0.065em;
}
.hero h1 span {
  color: transparent;
  background: linear-gradient(95deg, #ffffff 0%, var(--cyan) 46%, #aa7cff 90%);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero-copy {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.download-placeholder,
.secondary-button,
#refresh-status {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}
.download-placeholder {
  color: #c8cdf0;
  border: 1px solid rgba(143, 92, 255, 0.3);
  background: linear-gradient(135deg, rgba(143, 92, 255, 0.18), rgba(67, 217, 255, 0.08));
}
.secondary-button,
#refresh-status {
  color: var(--text);
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}
.secondary-button:hover,
#refresh-status:hover { border-color: rgba(67, 217, 255, 0.55); background: rgba(67, 217, 255, 0.07); }
.button-icon { font-size: 1.15rem; }

.status-panel {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(20, 25, 44, 0.88), rgba(10, 14, 27, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.panel-heading h2 { margin: 7px 0 0; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.section-kicker { margin: 0; }
#refresh-status { min-height: 38px; padding: 0 14px; }
#refresh-status[disabled] { opacity: 0.55; cursor: wait; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.service-card {
  min-height: 220px;
  padding: 20px;
  border: 1px solid rgba(151, 164, 204, 0.13);
  border-radius: 18px;
  background: rgba(4, 7, 15, 0.42);
  transition: transform 180ms ease, border-color 180ms ease;
}
.service-card:hover { transform: translateY(-3px); border-color: rgba(67, 217, 255, 0.28); }
.service-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(67, 217, 255, 0.08);
  border: 1px solid rgba(67, 217, 255, 0.16);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.service-card h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.service-card p { margin: 0; min-height: 60px; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.service-detail { display: block; margin-top: 18px; color: #cbd2eb; font-size: 0.75rem; line-height: 1.45; }

.status-footer {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.78rem;
}
.status-footer strong { color: var(--text); font-weight: 700; }

.architecture-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 74px 12px;
}
.architecture-strip > div { position: relative; padding-left: 50px; }
.architecture-number { position: absolute; left: 0; top: 0; color: rgba(67, 217, 255, 0.52); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.12em; }
.architecture-strip strong { font-size: 1rem; }
.architecture-strip p { margin: 9px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.55; }

footer {
  padding-top: 24px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.78rem;
}
footer nav { display: flex; gap: 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--cyan); }

@media (max-width: 900px) {
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .architecture-strip { grid-template-columns: 1fr; padding: 54px 8px; }
}

@media (max-width: 580px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 18px; }
  .topbar { align-items: flex-start; }
  .status-pill { padding: 8px 10px; font-size: 0.62rem; }
  .hero { padding: 78px 0 58px; }
  .status-grid { grid-template-columns: 1fr; }
  .status-panel { border-radius: 20px; }
  .panel-heading { align-items: flex-end; }
  footer { align-items: flex-start; flex-direction: column; }
  footer nav { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
