/* ── Public install page (/install/<token>) ────────────────────────────────
   One column, centred on the public sheet. The signature is the three-step
   tracker (connect → update firmware → install program) that advances as the
   install runs. Everything else stays quiet. Brand tokens only (--br-*). */

.br-install-page {
  max-width: 560px;
}

.br-install-eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--br-muted);
  margin: 0 0 0.5rem;
}

.br-install-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.75rem 0 0;
}

.br-install {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Step tracker ────────────────────────────────────────────────────────── */
.br-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.br-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  position: relative;
}

/* Connector line between markers; sits behind them, centred on the 20px dot. */
.br-step::before {
  content: "";
  position: absolute;
  top: 9px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--br-faint);
  z-index: 0;
}

.br-step:first-child::before {
  display: none;
}

.br-step-marker {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--br-paper);
  border: 2px solid var(--br-faint);
  color: var(--br-paper);
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.br-step-label {
  font-size: 13px;
  color: var(--br-muted);
  max-width: 10ch;
}

/* Active: current step — a plum ring with a soft halo, still hollow. */
.br-step.is-active .br-step-marker {
  border-color: var(--br-plum);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--br-plum) 15%, transparent);
}

.br-step.is-active .br-step-label {
  color: var(--br-ink);
  font-weight: 600;
}

/* Done or skipped-because-already-up-to-date: filled plum with a check. Both
   read as "this step is satisfied"; the label ("Up to date") tells them apart.
   The connector into the next step fills too. */
.br-step.is-done .br-step-marker,
.br-step.is-skipped .br-step-marker {
  background: var(--br-plum);
  border-color: var(--br-plum);
}

.br-step.is-done .br-step-marker::after,
.br-step.is-skipped .br-step-marker::after {
  content: "\2713"; /* ✓ */
  color: var(--br-paper);
  font-size: 12px;
  line-height: 1;
}

.br-step.is-done .br-step-label,
.br-step.is-skipped .br-step-label {
  color: var(--br-ink);
}

.br-step.is-error .br-step-marker {
  border-color: var(--br-danger, #b3261e);
  background: var(--br-danger, #b3261e);
}

.br-step.is-done + .br-step::before,
.br-step.is-skipped + .br-step::before {
  background: var(--br-plum);
}

/* ── Status line + progress ──────────────────────────────────────────────── */
.br-install-status {
  text-align: center;
  margin: 0;
  min-height: 1.5em;
  color: var(--br-ink);
}

.br-install-status.is-error {
  color: var(--br-danger, #b3261e);
}

.br-install-status.is-done {
  color: var(--br-plum);
  font-weight: 600;
}

.br-install-progress {
  height: 0.5rem;
  margin: 0;
}

/* ── Action button ───────────────────────────────────────────────────────── */
.br-install-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.br-install-actions .btn {
  min-width: 15rem;
}

/* ── "What's included" card ──────────────────────────────────────────────── */
.br-install-card {
  border: 1px dashed var(--br-faint);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

.br-install-card-title {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--br-muted);
  margin: 0 0 0.5rem;
}

.br-install-contents {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.br-install-contents li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
  border-top: 1px dashed var(--br-faint);
}

.br-install-contents li:first-child {
  border-top: 0;
}

.br-install-contents li span:last-child {
  margin-left: auto;
  font-size: 13px;
}

/* ── Technical details (collapsed) ───────────────────────────────────────── */
.br-install-details {
  font-size: 13px;
}

.br-install-details summary {
  cursor: pointer;
  color: var(--br-bluegray);
}

.br-install-log {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--br-font-mono, monospace);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--br-bluegray);
}

.br-install-log .failed {
  color: var(--br-danger, #b3261e);
}

@media (max-width: 480px) {
  .br-step-label {
    font-size: 12px;
  }
}
