:root {
  --bg: #f6f6f9;
  --card: #ffffff;
  --text: #1c1c24;
  --muted: #62626f;
  --line: #e3e3ea;
  --accent: #5b5bd6;
  --accent-text: #ffffff;
  --field: #ffffff;
  --ok: #1f8a4c;
  --bad: #c4372d;
  --wait: #b7791f;
  --code: #f0f0f5;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111116;
    --card: #1b1b22;
    --text: #ececf2;
    --muted: #a0a0ad;
    --line: #2d2d37;
    --accent: #7c7cf0;
    --accent-text: #0f0f14;
    --field: #14141a;
    --ok: #4cc47f;
    --bad: #f0776c;
    --wait: #e3b04b;
    --code: #24242d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.mark {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent);
  display: grid;
  place-items: center;
}

.mark svg { width: 34px; height: 34px; fill: var(--accent-text); }

h1 { margin: 0; font-size: 28px; line-height: 1.2; }

.lead { margin: 2px 0 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 18px;
  margin-bottom: 18px;
}

h2 { margin: 0 0 12px; font-size: 18px; }

.steps { margin: 0 0 18px; padding-left: 22px; }

.steps li { margin-bottom: 4px; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

input {
  width: 100%;
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 14px;
}

input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

button {
  font: inherit;
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  padding: 11px 20px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }

.status {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--code);
}

.status .dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--wait);
}

.status.ok .dot { background: var(--ok); }
.status.bad .dot { background: var(--bad); }
.status.busy .dot { animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.3; } }

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

.note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

.commands { margin: 0; }

.commands dt { margin-top: 10px; }

.commands dt:first-child { margin-top: 0; }

.commands dd { margin: 2px 0 0; color: var(--muted); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  background: var(--code);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

footer { font-size: 13px; color: var(--muted); padding: 0 4px; }

footer p { margin: 6px 0; }
