/* The website installer: LAYOUT ONLY.
 *
 * Colours, fonts, radius, shadow and the buttons come from the site's own
 * styles.css, which this page links first. Nothing here names a colour or a
 * font family, so when the site's look changes this page follows it.
 *
 * From styles.css (the light design, live since 2026-11-16) this page uses:
 *   variables: --bg --text --ink --body --muted --line --surface --sand
 *              --accent --accent-ink --green --danger --danger-soft --mono
 *              --radius --shadow
 *   classes:   .btn .btn-primary .btn-ghost .logo
 * Each variable is read through a --wi-* name below with a fallback, so a
 * missing one degrades to something readable instead of to nothing.
 */
.installer, .wi-top, .wi-foot {
  --wi-ink: var(--ink, var(--text));
  --wi-body: var(--body, var(--muted));
  --wi-surface: var(--surface, var(--card));
  --wi-well: var(--sand, var(--bg-2, var(--bg)));
  --wi-accent: var(--accent, var(--orange));
  --wi-accent-ink: var(--accent-ink, var(--orange));
  --wi-ok: var(--green);
  --wi-danger: var(--danger, #B42318);
  --wi-danger-soft: var(--danger-soft, color-mix(in srgb, var(--wi-danger) 9%, transparent));
  --wi-danger-ink: color-mix(in srgb, var(--wi-danger) 62%, var(--wi-ink));
  --wi-shadow: var(--shadow, none);
  --wi-mono: var(--mono, ui-monospace, 'Cascadia Mono', Consolas, monospace);
}
[hidden] { display: none !important; }

/* ----- top bar and footer ----- */
.wi-top { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.wi-top-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wi-logo { color: var(--wi-ink); }
.wi-logo img { border-radius: 8px; }
.wi-back { color: var(--wi-body); font-size: 14px; }
.wi-back:hover { color: var(--wi-ink); }
.wi-foot { border-top: 1px solid var(--line); padding: 28px 24px; text-align: center; color: var(--wi-body); font-size: 13px; }
.wi-links { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.wi-links a:hover { color: var(--wi-ink); }

/* ----- page ----- */
.wi-page { max-width: 760px; margin: 0 auto; padding: 28px 16px 72px; }
.installer a { color: var(--wi-accent-ink); }
.installer a:hover { text-decoration: underline; }

.wi-rail { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 20px; font-size: 12px; color: var(--wi-body); }
.wi-rail li { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.wi-rail li.is-done { color: var(--wi-ok); border-color: color-mix(in srgb, var(--wi-ok) 40%, transparent); }
.wi-rail li.is-now { color: var(--wi-ink); border-color: var(--wi-accent); background: color-mix(in srgb, var(--wi-accent) 12%, transparent); font-weight: 600; }

.wi-card { background: var(--wi-surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--wi-shadow); padding: 28px 28px 24px; }
.wi-card h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0 0 14px; }
.wi-card h1:focus { outline: none; }
.wi-card h2 { font-size: 17px; line-height: 1.3; margin: 22px 0 8px; }
.wi-card p { margin: 0 0 14px; color: var(--wi-body); font-size: 15.5px; }
.wi-card p.wi-lead { color: var(--wi-ink); font-size: 17px; }
.wi-card .wi-small, .wi-log .wi-small { font-size: 13px; }
.wi-card strong { color: var(--wi-ink); font-weight: 600; }
.wi-card ul, .wi-card ol { margin: 0 0 16px; padding-left: 22px; }
.wi-card li { color: var(--wi-body); font-size: 15.5px; margin-bottom: 7px; }
.wi-hint { font-size: 13.5px; color: var(--wi-body); }

.wi-card ol.wi-steps { counter-reset: s; list-style: none; padding: 0; }
.wi-steps > li { counter-increment: s; position: relative; padding: 10px 12px 10px 48px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.7); color: var(--wi-ink); }
.wi-steps > li::before { content: counter(s); position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--wi-accent) 15%, transparent); color: var(--wi-accent-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.wi-steps ul { margin: 8px 0 0; }

.wi-card p.wi-note { border: 1px solid var(--line); border-left: 3px solid var(--wi-accent); border-radius: calc(var(--radius) * 0.7); padding: 10px 14px; color: var(--wi-ink); font-size: 14.5px; }
.wi-card p.wi-note.is-good { border-left-color: var(--wi-ok); }
.wi-card p.wi-phone { font-size: 13.5px; color: var(--wi-ok); margin-bottom: 10px; }
.wi-phone:empty { display: none; }

.wi-card label { display: block; font-size: 14px; font-weight: 600; color: var(--wi-ink); margin: 4px 0 6px; }
.wi-code { font: 600 20px/1.2 var(--wi-mono); letter-spacing: 0.04em; width: 100%; max-width: 420px; padding: 12px 14px; border-radius: calc(var(--radius) * 0.7); border: 1px solid color-mix(in srgb, var(--wi-ink) 30%, transparent); background: var(--wi-well); color: var(--wi-ink); text-transform: uppercase; }
.wi-code::placeholder { color: color-mix(in srgb, var(--wi-body) 60%, transparent); }
.wi-code:focus-visible, .wi-legal:focus-visible, .wi-log summary:focus-visible, .wi-log pre:focus-visible, .wi-check input:focus-visible { outline: 2px solid var(--wi-accent); outline-offset: 2px; }

.wi-card label.wi-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 14px 0 0; cursor: pointer; }
.wi-check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--wi-accent); flex: none; }

.wi-legal { height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.7); background: var(--wi-well); padding: 16px 18px; font-size: 13.5px; line-height: 1.6; color: var(--wi-body); white-space: pre-wrap; overflow-wrap: anywhere; }

.wi-card p.wi-status { min-height: 24px; font-size: 14.5px; margin: 12px 0 0; }
.wi-card p.wi-status.is-ok { color: var(--wi-ok); }
.wi-card p.wi-status.is-bad { color: var(--wi-danger-ink); }
.wi-card p.wi-status.is-busy { color: var(--wi-accent-ink); }

.wi-problem { margin-top: 14px; border: 1px solid color-mix(in srgb, var(--wi-danger) 50%, transparent); background: var(--wi-danger-soft); border-radius: calc(var(--radius) * 0.7); padding: 14px 16px; }
.wi-card .wi-problem h2 { margin: 0 0 6px; color: var(--wi-danger-ink); }
.wi-card .wi-problem p { margin: 0; color: var(--wi-ink); white-space: pre-wrap; overflow-wrap: anywhere; }

.wi-card ul.wi-accounts { list-style: none; padding: 0; margin: 0 0 14px; }
.wi-accounts li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--wi-danger) 40%, transparent); border-radius: calc(var(--radius) * 0.7); color: var(--wi-ink); overflow-wrap: anywhere; }
.wi-accounts .wi-kind { font-weight: 600; }
.wi-accounts .wi-name { color: var(--wi-body); }

.wi-card ol.wi-progress { list-style: none; padding: 0; margin: 16px 0 0; }
.wi-progress li { position: relative; padding: 9px 12px 9px 40px; margin: 0 0 6px; border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.7); }
.wi-progress li::before { content: ""; position: absolute; left: 13px; top: 14px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--wi-body) 55%, transparent); }
.wi-progress li.is-now { color: var(--wi-ink); border-color: color-mix(in srgb, var(--wi-accent) 55%, transparent); }
.wi-progress li.is-now::before { border-color: var(--wi-accent); border-top-color: transparent; animation: wi-spin 0.9s linear infinite; }
.wi-progress li.is-done { color: var(--wi-ink); }
.wi-progress li.is-done::before { border-color: var(--wi-ok); background: var(--wi-ok); }
.wi-progress li.is-bad { color: var(--wi-danger-ink); border-color: color-mix(in srgb, var(--wi-danger) 50%, transparent); }
.wi-progress li.is-bad::before { border-color: var(--wi-danger); background: var(--wi-danger); }
@keyframes wi-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wi-progress li.is-now::before { animation: none; } }

.wi-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.wi-actions .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.wi-log { margin-top: 20px; color: var(--wi-body); font-size: 13px; }
.wi-log summary { cursor: pointer; padding: 6px 0; }
.wi-log pre { background: var(--wi-well); border: 1px solid var(--line); border-radius: calc(var(--radius) * 0.7); padding: 12px 14px; font: 12.5px/1.55 var(--wi-mono); color: var(--wi-body); max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

@media (max-width: 560px) {
  .wi-card { padding: 22px 18px 18px; }
  .wi-actions .btn { flex: 1 1 auto; }
}

/* The trademark note in the footer. A rule here, not a style="" on the tag:
   this page's Content-Security-Policy allows no inline styles, so the tag's
   own style was being dropped by the browser. */
.tm-note { font-size: 12px; opacity: .75; margin-top: 6px; max-width: 720px; }
