/* Installation pages: form, summary and progress; colours come from tokens.css. */
.install-cols { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 900px) { .install-cols { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.install .card { padding: 1.5rem; background: var(--backdrop); }
@media (min-width: 640px) { .install .card { padding: 2rem; } }
.install .card > * + *, .install form > * + * { margin-top: 1rem; }
.install .btn { cursor: pointer; font-family: inherit; }
.install-form .btn { width: 100%; }
@media (min-width: 640px) { .install-form .btn { width: auto; } }

/* The label input and the fixed suffix read as one address */
.subdomain-input { display: flex; align-items: stretch; min-width: 0; }
.subdomain-input input { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.subdomain-input span {
  display: flex;
  align-items: center;
  padding-inline: 0.7rem;
  border: 1px solid var(--ghost-border);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Reserves the Turnstile widget's height, so the button does not jump when it loads */
.cf-turnstile { min-height: 65px; }

.install-next ol { counter-reset: next; }
.install-next li { counter-increment: next; position: relative; padding-left: 2.2rem; }
.install-next li + li { margin-top: 0.8rem; }
.install-next li::before {
  content: counter(next);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5rem;
  text-align: center;
}
.install-note { font-size: 0.9rem; color: var(--muted); }

.install-message > * + * { margin-top: 1rem; }

.install-summary dl { display: grid; gap: 0.3rem 1rem; }
@media (min-width: 480px) { .install-summary dl { grid-template-columns: auto 1fr; } }
.install-summary dt { font-size: 0.9rem; font-weight: 600; }
.install-summary dd { margin: 0 0 0.5rem; overflow-wrap: anywhere; }
@media (min-width: 480px) { .install-summary dd { margin-bottom: 0; } }

.install-steps li { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; border-top: 1px solid var(--line); color: var(--muted); }
.install-steps li:first-child { border-top: 0; }
.install-steps li::before { content: ""; flex: none; width: 0.75rem; height: 0.75rem; border: 1px solid var(--ghost-border); border-radius: 50%; }
.install-steps li.is-done { color: var(--ink); }
.install-steps li.is-done::before { border-color: var(--accent); background: var(--accent); }
.install-steps li.is-current { color: var(--accent-deep); font-weight: 600; }
.install-steps li.is-current::before { border-color: var(--accent-deep); animation: install-pulse 1.2s ease-in-out infinite; }
.install-steps li.is-failed { color: var(--danger); font-weight: 600; }
.install-steps li.is-failed::before { border-color: var(--danger); background: var(--danger); }
@keyframes install-pulse { 50% { background: var(--accent); } }

.install-progress [data-show] > * + *, .install-progress [data-password] > * + * { margin-top: 0.75rem; }
.install-done { font-weight: 600; color: var(--accent-deep); }
.install-password-label { font-size: 0.9rem; font-weight: 600; }
.install-password { padding: 0.7rem 0.9rem; border: 1px solid var(--accent-deep); border-radius: var(--radius); font-size: 1.15rem; overflow-wrap: anywhere; user-select: all; }
.install-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  .install-steps li.is-current::before { animation: none; background: var(--accent); }
}

/* The consent checkbox sits beside its label, which links the documents and is the tap target */
.field-check { grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 0.7rem; }
.field-check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin-top: 0.15rem; padding: 0; accent-color: var(--accent-deep); }
.field-check label { font-weight: 400; line-height: 1.5; }
.field-check a { color: var(--accent-deep); }
.field-check .field-error { grid-column: 1 / -1; }
