/**
 * The installer's own styling.
 *
 * Self-contained on purpose: no Tailwind, no design tokens, no imports.
 * This file lives for two minutes and is then overwritten by the real
 * script's stylesheet, so it must not depend on anything that arrives
 * later — or on anything the customer's host might not serve.
 */

:root {
  color-scheme: light dark;

  --paper: #f4f2f8;
  --card: #ffffff;
  --ink: #16151c;
  --ink-soft: #565366;
  --ink-faint: #86818f;
  --line: rgba(22, 21, 28, 0.1);
  --accent: #5b4bd6;
  --accent-ink: #ffffff;
  --good: #0b7d67;
  --bad: #c73442;
  --bad-bg: #ffecee;
  --field: #fbfafd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #100f16;
    --card: #191822;
    --ink: #ecebf2;
    --ink-soft: #b3aec2;
    --ink-faint: #86818f;
    --line: rgba(236, 235, 242, 0.13);
    --accent: #8b7aff;
    --accent-ink: #100f16;
    --good: #4fd6b8;
    --bad: #ff8a95;
    --bad-bg: rgba(255, 90, 105, 0.14);
    --field: #12111a;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-inline: 18px;
  padding-block: 48px;
}

.card {
  width: 100%;
  max-width: 470px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 30px 32px;
  box-shadow: 0 18px 50px rgba(20, 18, 30, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 15px;
}

h1 {
  margin: 18px 0 0;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  text-wrap: pretty;
}

form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

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

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

button {
  margin-top: 6px;
  padding: 13px 18px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.18s ease;
}

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

button:not(:disabled):hover {
  opacity: 0.9;
}

button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.log {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.log li.done .dot {
  background: var(--good);
}

.log li.doing .dot {
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}

.log .what {
  flex: 1;
  min-width: 0;
}

.log .detail {
  flex: 0 0 auto;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.bar {
  margin-top: 14px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.bad {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bad-bg);
  color: var(--bad);
  font-size: 14.5px;
  text-wrap: pretty;
}

.restart {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.restart div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field);
}

.restart b {
  font-size: 13px;
  font-weight: 700;
}

.restart span,
.restart code {
  font-size: 14px;
  color: var(--ink-soft);
}

.restart code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--line);
  color: var(--ink);
}

.restart span b {
  color: var(--ink);
}

.after {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--ink-faint);
}

.foot {
  margin: 0;
  font-size: 13px;
  color: var(--ink-faint);
  text-align: center;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
