:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101312;
  color: #eef2ef;
  font-synthesis: none;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #101312; }
button { font: inherit; letter-spacing: 0; }

.shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
}

header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 44px; }
.eyebrow, .label, .phase { color: #8d9992; font-size: 12px; font-weight: 700; text-transform: uppercase; }
h1 { margin: 8px 0 0; font-size: 30px; line-height: 1.15; letter-spacing: 0; }
h2 { margin: 0 0 12px; font-size: 21px; letter-spacing: 0; }

.status-band { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 0 28px; border-bottom: 1px solid #303632; }
.status-band strong { display: block; margin-top: 7px; font-size: 42px; line-height: 1; letter-spacing: 0; }
.health { display: inline-flex; align-items: center; gap: 8px; color: #b7c0ba; font-size: 14px; }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e5a84b; }
.health.online::before { background: #57c47b; }

.progress { min-height: 104px; display: flex; flex-direction: column; justify-content: center; gap: 10px; border-bottom: 1px solid #303632; }
.progress-line { display: flex; align-items: center; gap: 12px; color: #dce2de; font-size: 16px; }
.pulse { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #6d7871; }
.progress.busy .pulse { background: #e5a84b; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

.actions { padding: 32px 0; }
.primary, .danger, .secondary { min-height: 52px; border: 0; border-radius: 7px; padding: 0 20px; font-weight: 750; cursor: pointer; }
.primary { width: 100%; background: #eef2ef; color: #121513; }
.primary:disabled { cursor: not-allowed; opacity: .38; }
.secondary { background: #2b302d; color: #eef2ef; }
.danger { background: #d85f5f; color: #fff; }
.icon-button { border: 0; background: transparent; color: #9da7a1; padding: 8px 0; cursor: pointer; }

.facts { margin: 0; border-top: 1px solid #303632; }
.facts div { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid #303632; }
.facts dt { color: #8d9992; }
.facts dd { margin: 0; text-align: right; color: #dce2de; }

.auth { max-width: 440px; padding-top: 10vh; }
.auth p { color: #b7c0ba; line-height: 1.55; margin: 0 0 26px; }
.auth .fine { margin-top: 18px; font-size: 13px; }

dialog { width: min(calc(100% - 36px), 460px); border: 1px solid #3a413d; border-radius: 8px; padding: 24px; background: #181c1a; color: #eef2ef; }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
dialog p { margin: 0; color: #b7c0ba; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.notice { position: fixed; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 688px; margin: auto; padding: 14px 16px; border: 1px solid #7a3e3e; border-radius: 7px; background: #321f1f; color: #ffd8d8; }

@media (max-width: 480px) {
  .shell { padding-left: 18px; padding-right: 18px; }
  header { margin-bottom: 34px; }
  .status-band { align-items: flex-start; flex-direction: column; }
  .status-band strong { font-size: 38px; }
  .facts div { flex-direction: column; gap: 6px; }
  .facts dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) { .progress.busy .pulse { animation: none; } }
