/* flash.plynx.cc: i colori di plynx.cc (carta calda, teal, inchiostro, oro)
   e il vetro dell'app. Il fulmine e' bianco e nero: e' l'unico oggetto della
   pagina che si preme davvero, e non deve somigliare a nient'altro. */

:root {
  --bg: #eae4dc;
  --bg-deep: #d9d1c7;
  --surface: #f4f0e9;
  --raised: #faf7f2;
  --ink: #29241e;
  --ink-soft: #5f564a;
  --ink-faint: #615a4f;
  --line: rgba(41, 36, 30, 0.14);
  --accent: #00c9a7;
  --accent-ink: #066756;
  --accent-soft: rgba(0, 201, 167, 0.13);
  --gold: #d9a542;
  --danger: #b4432f;
  --glass: rgba(250, 247, 242, 0.62);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 2px rgba(41, 36, 30, 0.05), 0 24px 60px -24px rgba(41, 36, 30, 0.32);
  --tick: rgba(41, 36, 30, 0.16);
  --bolt-bg: #18140f;
  --bolt-fg: #ffffff;
  --code-bg: rgba(41, 36, 30, 0.05);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1a15;
    --bg-deep: #17130f;
    --surface: #27221b;
    --raised: #2e2820;
    --ink: #ece6dc;
    --ink-soft: #b3a897;
    --ink-faint: #988e80;
    --line: rgba(236, 230, 220, 0.13);
    --accent-ink: #35dcbb;
    --accent-soft: rgba(0, 201, 167, 0.15);
    --danger: #ec8a74;
    --glass: rgba(39, 34, 27, 0.62);
    --glass-edge: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 24px 60px -24px rgba(0, 0, 0, 0.7);
    --tick: rgba(236, 230, 220, 0.16);
    --bolt-bg: #f6f2ea;
    --bolt-fg: #14110d;
    --code-bg: rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--accent-ink); }
svg { display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ------------------------------------------------------------ lo sfondo vivo */

.sfondo {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--bg);
}

.macchia {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.macchia-1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: rgba(0, 201, 167, 0.42); animation: deriva 26s ease-in-out infinite alternate; }
.macchia-2 { width: 38vmax; height: 38vmax; right: -14vmax; top: 18vh; background: rgba(217, 165, 66, 0.36); animation: deriva 32s ease-in-out -8s infinite alternate-reverse; }
.macchia-3 { width: 34vmax; height: 34vmax; left: 22vw; bottom: -20vmax; background: rgba(32, 104, 241, 0.16); animation: deriva 38s ease-in-out -14s infinite alternate; }

@media (prefers-color-scheme: dark) {
  .macchia { opacity: 0.32; }
}

@keyframes deriva {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(0.95); }
}

/* ------------------------------------------------------------ testa e piede */

.testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(680px, 100% - 32px);
  margin: 22px auto 0;
}

.marchio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.etichetta-flash {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bolt-fg);
  background: var(--bolt-bg);
}

.etichetta-flash svg { width: 14px; height: 14px; fill: currentColor; }

.piede {
  width: min(680px, 100% - 32px);
  margin: 28px auto 26px;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  font-size: 0.86rem;
  color: var(--ink-faint);
}

.privacy { text-wrap: balance; }
.privacy svg { display: inline-block; vertical-align: -3px; margin-right: 6px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.lingue { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.lingue a {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--ink-faint);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.lingue a[aria-current="true"] { color: var(--ink); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.riga a { color: var(--ink-faint); }

/* ------------------------------------------------------------ i tre passi */

main {
  flex: 1 0 auto;
  width: min(680px, 100% - 32px);
  margin: 26px auto 0;
}

.passi {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.passi { gap: 28px; }

.passi li {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}

/* Il trattino fra due passi sta FUORI dalla pastiglia: dentro, la pastiglia
   accesa se lo portava dietro. */
.passi li + li::before {
  content: "";
  position: absolute;
  right: calc(100% + 5px);
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--line);
}

.pallino {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tick);
  transition: background 0.3s, box-shadow 0.3s;
}

.passi li.attivo { color: var(--ink); background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.passi li.attivo .pallino { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.passi li.fatto .pallino { background: var(--accent-ink); }

@media (max-width: 520px) {
  .passi { gap: 18px; }
  .passi li:not(.attivo) > span:last-child { display: none; }
  .passi li + li::before { width: 10px; right: calc(100% + 4px); }
}

/* ------------------------------------------------------------ il palco 3D */

.palco {
  display: grid;
  perspective: 1400px;
}

.schermo {
  grid-area: 1 / 1;
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
  transform-origin: 50% 40%;
}

.vetro {
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.5);
  backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  border-radius: 30px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-transparency: reduce) {
  .vetro { background: var(--raised); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.schermo.entra { animation: entra 0.62s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
.schermo.esce { animation: esce 0.42s cubic-bezier(0.4, 0, 0.8, 0.4) both; pointer-events: none; }
.schermo.entra.indietro { animation-name: entra-indietro; }
.schermo.esce.indietro { animation-name: esce-indietro; }

@keyframes entra {
  from { opacity: 0; transform: translate3d(46px, 0, -120px) rotateY(-14deg); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes esce {
  from { opacity: 1; transform: none; filter: none; }
  to { opacity: 0; transform: translate3d(-60px, 0, -180px) rotateY(16deg); filter: blur(6px); }
}
@keyframes entra-indietro {
  from { opacity: 0; transform: translate3d(-46px, 0, -120px) rotateY(14deg); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes esce-indietro {
  from { opacity: 1; transform: none; filter: none; }
  to { opacity: 0; transform: translate3d(60px, 0, -180px) rotateY(-16deg); filter: blur(6px); }
}

/* ------------------------------------------------------------ tipografia */

h1:focus { outline: none; }

h1 {
  font-size: clamp(1.6rem, 5vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.024em;
  font-weight: 750;
  text-wrap: balance;
  margin: 6px auto 0;
  max-width: 17em;
}

h2 {
  font-size: 1.04rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.lede {
  margin: 12px auto 0;
  max-width: 31em;
  color: var(--ink-soft);
  font-size: 1.03rem;
  text-wrap: pretty;
}

.nota {
  font-size: 0.86rem;
  color: var(--ink-faint);
  max-width: 30em;
  margin: 0 auto;
  text-wrap: pretty;
}

/* ------------------------------------------------------------ bottoni */

.azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
}

.azioni-colonna { flex-direction: column; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.2s;
}

.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn:disabled { cursor: progress; }

.btn-primario {
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
}

.btn-grande { min-height: 56px; padding: 14px 30px; font-size: 1.06rem; }

.btn-vetro {
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-piccolo {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.86rem;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}

.link-tenue {
  margin-top: 18px;
  padding: 8px 12px;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.94rem;
  border-radius: 999px;
}
.link-tenue:hover { background: var(--accent-soft); }

.giro {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.2px solid currentColor;
  border-right-color: transparent;
  animation: gira 0.8s linear infinite;
}
.in-corso .giro { display: inline-block; }
.in-corso .icona-usb { display: none; }

@keyframes gira { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ collega */

.scena-cavo {
  width: min(360px, 100%);
  margin: -6px auto 10px;
  overflow: hidden;
}

.scena-cavo svg { width: 100%; height: auto; overflow: hidden; }
.filo { stroke: var(--ink); stroke-width: 9; stroke-linecap: round; fill: none; }
.spina-corpo { fill: var(--ink); }
.spina-metallo { fill: #b9b3a8; }
.pin circle { fill: var(--gold); }
.presa { fill: #c8c2b6; }
.chip-ponte { fill: #1a1712; }
.antenna { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linejoin: round; }
.led { fill: #0a2622; }
.serigrafia { font: 700 9px var(--font-mono); fill: rgba(255, 255, 255, 0.55); letter-spacing: 0.1em; }

.cavo { animation: inserisci 4.2s cubic-bezier(0.6, 0, 0.2, 1) infinite; }
.led { animation: accendi 4.2s steps(1) infinite; }

@keyframes inserisci {
  0%, 12% { transform: translateX(-34px); }
  34%, 82% { transform: translateX(0); }
  100% { transform: translateX(-34px); }
}
@keyframes accendi {
  0%, 36% { fill: #0a2622; filter: none; }
  37%, 82% { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
  83%, 100% { fill: #0a2622; filter: none; }
}

.consigli {
  list-style: none;
  display: grid;
  gap: 10px;
  margin: 22px auto 0;
  max-width: 30em;
  text-align: left;
}

.consigli li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.consigli svg {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 11px;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gia {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px auto 0;
  padding: 10px 12px 10px 16px;
  max-width: 30em;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 0.93rem;
  font-weight: 550;
}

.punto-vivo {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.5);
  animation: batte 1.8s ease-out infinite;
}

@keyframes batte {
  0% { box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(0, 201, 167, 0); }
}

.errore {
  margin: 18px auto 0;
  max-width: 30em;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.93rem;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  text-wrap: pretty;
}

.driver {
  margin: 22px auto 0;
  max-width: 30em;
  text-align: left;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.driver summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  font-size: 0.93rem;
  font-weight: 650;
  cursor: pointer;
  border-radius: 16px;
}
.driver summary::-webkit-details-marker { display: none; }
.driver summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-faint);
  border-bottom: 2px solid var(--ink-faint);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
}
.driver[open] summary::after { transform: rotate(225deg) translateY(-2px); }

.driver-corpo {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ il fulmine */

.gettone-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
}
.gettone-chip .sep { color: var(--ink-faint); }
#chip-mem { color: var(--ink-faint); font-weight: 500; }

.quadrante {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 1;
  margin: 26px auto 0;
  display: grid;
  place-items: center;
}

.tacche { position: absolute; inset: 0; width: 100%; height: 100%; }
.tacche line { stroke: var(--tick); stroke-width: 3; stroke-linecap: round; transition: stroke 0.25s, stroke-width 0.25s; }
.tacche line.lunga { stroke-width: 3.6; }
.tacche line.accesa { stroke: var(--accent); }
.tacche line.testa { stroke: var(--gold); stroke-width: 4.4; }
.tacche .arco { fill: none; stroke: var(--tick); stroke-width: 1; opacity: 0.6; }

.fulmine {
  position: relative;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bolt-fg);
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--bolt-bg) 78%, #ffffff), var(--bolt-bg) 62%);
  box-shadow:
    0 22px 40px -18px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), box-shadow 0.3s;
}

.fulmine::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  opacity: 0;
}

[data-stato="pronto"] .fulmine::before { animation: alone 2.4s ease-out infinite; }
[data-stato="pronto"] .fulmine:hover { transform: scale(1.04); }
[data-stato="pronto"] .fulmine:active { transform: scale(0.96); }

@keyframes alone {
  0% { opacity: 0.9; transform: scale(0.94); }
  100% { opacity: 0; transform: scale(1.22); }
}

.fulmine svg { position: absolute; width: 44%; height: 44%; transition: opacity 0.35s, transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.bolt { fill: currentColor; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25)); }
.spunta { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(0.6); }
.spunta path { stroke-dasharray: 24; stroke-dashoffset: 24; }

[data-stato="lavoro"] .fulmine { cursor: progress; }
[data-stato="lavoro"] .bolt { animation: pulsa 1.6s ease-in-out infinite; }
[data-stato="prepara"] .tacche { animation: gira 2.6s linear infinite; }
[data-stato="prepara"] .bolt { animation: pulsa 1.6s ease-in-out infinite; }

@keyframes pulsa {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

[data-stato="fatto"] .fulmine { background: var(--accent); color: #fff; box-shadow: 0 22px 46px -16px rgba(0, 201, 167, 0.7); }
[data-stato="fatto"] .bolt { opacity: 0; transform: scale(0.4) rotate(-20deg); }
[data-stato="fatto"] .spunta { opacity: 1; transform: none; }
[data-stato="fatto"] .spunta path { transition: stroke-dashoffset 0.6s 0.15s ease-out; stroke-dashoffset: 0; }

[data-stato="guasto"] .fulmine { background: var(--surface); color: var(--danger); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 50%, transparent); }

/* Il contachilometri: ogni cifra e' una striscia 0-9 che scorre. */
.contachilometri {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 20px;
  height: 2.6rem;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 2.6rem;
}

.cifra {
  display: inline-block;
  width: 0.62em;
  height: 2.6rem;
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(var(--code-bg), transparent 40%, transparent 60%, var(--code-bg));
  margin: 0 1px;
  transition: opacity 0.3s, width 0.3s;
}
.cifra.spenta { opacity: 0; width: 0; margin: 0; }
.striscia { display: block; transition: transform 0.55s cubic-bezier(0.25, 1.3, 0.4, 1); }
.striscia span { display: block; height: 2.6rem; text-align: center; }
.percento { margin-left: 4px; font-size: 1.3rem; color: var(--ink-faint); }

.fase {
  min-height: 1.6em;
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ fatto */

.emblema { width: 84px; height: 84px; margin: 0 auto 8px; }
.emblema svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.emblema-fatto circle { fill: var(--accent); stroke: none; }
.emblema-fatto path { stroke: #fff; stroke-width: 4.5; stroke-dasharray: 44; stroke-dashoffset: 44; animation: traccia 0.7s 0.35s ease-out forwards; }
.emblema-fatto { animation: sboccia 0.7s cubic-bezier(0.3, 1.5, 0.5, 1) both; filter: drop-shadow(0 14px 22px rgba(0, 201, 167, 0.45)); }
.emblema-no svg { stroke: var(--ink-soft); stroke-width: 3; }
.emblema-no .taglio { stroke: var(--danger); }

@keyframes traccia { to { stroke-dashoffset: 0; } }
@keyframes sboccia { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

.passi-app {
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 26em;
  margin: 26px auto 18px;
  text-align: left;
}

.passi-app li {
  display: grid;
  grid-template-columns: 26px 40px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  font-size: 0.97rem;
}

.passi-app .numero {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--bg);
  background: var(--ink);
}

.passi-app svg {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: var(--accent-soft);
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store img { height: 44px; width: auto; }

/* ------------------------------------------------------------ IDE */

.passi-ide {
  list-style: none;
  counter-reset: passo;
  display: grid;
  gap: 14px;
  margin: 26px 0 0;
  text-align: left;
}

.passi-ide > li {
  counter-increment: passo;
  position: relative;
  display: grid;
  gap: 8px;
  padding: 16px 18px 16px 60px;
  border-radius: 20px;
  background: var(--raised);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
  min-width: 0;
}

.passi-ide > li::before {
  content: counter(passo);
  position: absolute;
  left: 16px;
  top: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 0.86rem;
  color: var(--bg);
  background: var(--ink);
}

.passi-ide h2 { color: var(--ink); }

.riga-codice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.riga-codice code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 10px;
  font: 0.78rem var(--font-mono);
  background: var(--code-bg);
}

.schede-chip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schede-chip button {
  padding: 6px 12px;
  border-radius: 999px;
  font: 600 0.82rem var(--font-mono);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.2s, color 0.2s;
}

.schede-chip button[aria-checked="true"] { color: var(--bg); background: var(--ink); box-shadow: none; }

.codice { position: relative; min-width: 0; }
.codice .copia { position: absolute; top: 8px; right: 8px; }

.codice pre {
  overflow-x: auto;
  padding: 48px 16px 14px;
  border-radius: 14px;
  background: var(--code-bg);
  font: 0.8rem/1.55 var(--font-mono);
  color: var(--ink);
}

.senza-js { text-align: center; padding: 40px 0; }

/* ------------------------------------------------------------ moto ridotto */

@media (prefers-reduced-motion: reduce) {
  .macchia, .cavo, .led, .punto-vivo, .fulmine::before, .bolt, .tacche, .giro { animation: none !important; }
  .cavo { transform: none; }
  .led { fill: var(--accent); }
  .schermo.entra, .schermo.esce { animation-name: dissolvi !important; animation-duration: 0.2s !important; }
  .schermo.esce { animation-direction: reverse !important; }
  .striscia { transition: none; }
}

@keyframes dissolvi { from { opacity: 0; } to { opacity: 1; } }
