:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-alt: #eef3f7;
  --stroke: #d6dde5;
  --text: #111827;
  --muted: #536171;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --warning: #b45309;
  --danger: #b91c1c;
  --radius: 22px;
  --shadow: none;
}

body[data-theme="dark"] {
  --bg: #111418;
  --surface: #1b1f25;
  --surface-alt: #252b33;
  --stroke: #39414d;
  --text: #f8fafc;
  --muted: #b4bdc9;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --warning: #f59e0b;
  --danger: #f87171;
  --shadow: none;
}

@media (forced-colors: active) {
  :root {
    --bg: Canvas;
    --surface: Canvas;
    --surface-alt: Canvas;
    --stroke: ButtonBorder;
    --text: CanvasText;
    --muted: CanvasText;
    --accent: Highlight;
    --accent-soft: Canvas;
    --warning: CanvasText;
    --danger: CanvasText;
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: transparent;
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}

.splash {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: transparent;
}

.shell {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.mark {
  position: relative;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.ring {
  position: absolute;
  inset: 7px;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.8s linear infinite;
}

.brandText h1 {
  margin: 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0;
}

.brandText p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.percent {
  min-width: 54px;
  text-align: right;
  color: var(--accent);
  font-size: 17px;
  font-weight: 650;
}

.progressWrap {
  display: grid;
  gap: 8px;
}

.progressTrack {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--stroke);
}

.progressFill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.statusRow {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}

.stateDot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: pulse 1.6s ease-in-out infinite;
}

.stateDot.warning {
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 18%, transparent);
}

.stateDot.danger {
  background: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}

.statusText p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.statusText span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.closeButton {
  display: none;
  justify-self: end;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  background: var(--surface-alt);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.closeButton.visible {
  display: inline-flex;
}

.closeButton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring,
  .stateDot {
    animation: none;
  }
}
