/* Wizard "a percorso" (direttiva design 2026-07-15): un passo per schermata,
   Next giallo grande, Step n of N coi pallini, schema orizzontale in testa,
   spiegazioni tecniche e soccorso nascosti in blocchi espandibili. */

.wintro, .wstep, .wdone { display: none; }
.wintro.on, .wstep.on, .wdone.on { display: block; animation: wfade .25s ease; }
@keyframes wfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Intro: lo schema del percorso ---- */
.phases { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.phases .ph {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 7px 15px; font-size: 13.5px; font-weight: 650; white-space: nowrap;
}
.phases .arr { color: var(--faint); font-size: 15px; }
.wtimebadge { color: var(--muted); font-size: 14px; margin: 12px 0 2px; }
.wtimebadge b { color: var(--text); }
.wassure {
  border: 1px solid rgba(46,232,121,.35); background: rgba(46,232,121,.07);
  border-radius: 12px; padding: 13px 16px; margin: 14px 0 6px; font-size: 14px; line-height: 1.6; color: var(--muted);
}
.wassure b { color: var(--green); }
.otherroad { color: var(--faint); font-size: 13px; margin-top: 16px; }
.otherroad a { color: var(--accent); }

/* ---- Il passo corrente ---- */
.wprog { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; }
.wprog .wcount { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 750; }
.wprog .wtime { font-size: 12px; color: var(--faint); }
.wdots { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.wdots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block;
  transition: background .2s, box-shadow .2s;
}
.wdots i.done { background: var(--accent); opacity: .55; }
.wdots i.cur { background: var(--accent); box-shadow: 0 0 8px rgba(234,255,0,.6); transform: scale(1.35); }

.wstep {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px; margin: 6px 0 16px;
}
.wstep h2 { font-size: 20px; font-weight: 750; letter-spacing: -.01em; margin: 0 0 10px; }
.wstep p, .wstep li { color: var(--muted); font-size: 14.5px; line-height: 1.7; }
.wstep p { margin: 8px 0; }
.wstep b { color: var(--text); }
.wstep a { color: var(--accent); }
.wstep code {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; font-size: 12.5px; color: var(--text);
}

/* Il nome esatto del bottone da cliccare, in evidenza */
.pill {
  display: inline-block; border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--accent); border-radius: 999px; padding: 2px 13px; font-weight: 750; font-size: 13.5px;
  white-space: nowrap;
}

/* Avvisi (riusati dal vecchio wizard) */
.warn { border: 1px solid rgba(255,178,36,.4); background: rgba(255,178,36,.07); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 13.5px; color: var(--muted); }
.warn b { color: var(--amber); }

/* Copiabili */
.copyrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.codebox { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--text); word-break: break-all; user-select: all; flex: 1; min-width: 220px; }

/* ---- Espandibili: tecnica e soccorso, nascosti di default ---- */
details.whatis, details.stuck {
  border: 1px solid var(--line); background: var(--bg); border-radius: 10px;
  padding: 10px 14px; margin-top: 12px;
}
details.whatis summary, details.stuck summary {
  cursor: pointer; font-size: 13.5px; font-weight: 650; color: var(--muted); list-style: none; user-select: none;
}
details.whatis summary::before { content: "💡 "; }
details.stuck summary::before { content: "🛟 "; }
details.stuck summary { color: var(--amber); }
details.whatis[open] summary, details.stuck[open] summary { margin-bottom: 6px; }
details.whatis p, details.stuck p { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin: 6px 0; }
details.whatis b, details.stuck b { color: var(--text); }
details.whatis a, details.stuck a { color: var(--accent); }
details.whatis code, details.stuck code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--text); }

/* ---- Navigazione ---- */
.wnav { display: flex; align-items: center; gap: 14px; margin: 4px 0 30px; }
.wnext {
  background: var(--accent); color: #171716; border: 1px solid var(--accent);
  font-weight: 750; font-size: 15.5px; border-radius: 12px; padding: 14px 30px;
  cursor: pointer; box-shadow: var(--accent-glow); font-family: inherit;
  transition: transform .12s ease;
}
.wnext:hover { transform: translateY(-1px); }
.wback {
  color: var(--muted); font-size: 13.5px; cursor: pointer; background: none; border: none;
  font-family: inherit; padding: 8px 4px;
}
.wback:hover { color: var(--text); }

/* ---- Schermata finale ---- */
.wdone { text-align: center; padding: 40px 0 10px; }
.wdone .big { font-size: 44px; }
.wdone h2 { font-size: 24px; font-weight: 750; margin: 12px 0 8px; }
.wdone p { color: var(--muted); font-size: 14.5px; line-height: 1.7; max-width: 520px; margin: 8px auto; }
.wdone .btn.primary { display: inline-block; margin-top: 14px; }
