/* THE WISE GUY · Metodo — Concept 3 «Dal problema al rilascio» (29/11/2026). Solo token del sito.
   Contatori con spazio riservato: arrivano dal JSON senza spostare nulla. */
.mg-sec .cl-sec-h2 em { font-style: normal; color: var(--accent-emerald); }
.mg-status { display: flex; width: fit-content; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 12px/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted); }
.mg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-muted); }
.mg-sec[data-stato="live"] .mg-status { color: var(--accent-emerald); }
.mg-sec[data-stato="live"] .mg-dot { background: var(--accent-emerald); animation: mg-pulse 2s infinite; }
.mg-sec[data-stato="fermo"] .mg-status { color: var(--accent-amber); }
.mg-sec[data-stato="fermo"] .mg-dot { background: var(--accent-amber); }
.mg-quando { color: var(--fg-muted); letter-spacing: .04em; }

.mg-card { --mg-cy: var(--accent-cyan); --mg-vi: var(--accent-violet); --mg-bl: #3B82F6; --mg-em: var(--accent-emerald); --mg-co: #D97757; --mg-am: var(--accent-amber);
  position: relative; margin-top: 28px; padding: 76px 28px 28px; }
.mg-c-cyan { --c: var(--mg-cy); } .mg-c-violet { --c: var(--mg-vi); } .mg-c-blue { --c: var(--mg-bl); }
.mg-c-emerald { --c: var(--mg-em); } .mg-c-coral { --c: var(--mg-co); } .mg-c-amber { --c: var(--mg-am); }

.mg-steps { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.mg-st { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-width: 0; }
.mg-node { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--bg-card-solid); border: 1px solid var(--border-medium); color: var(--c); animation: mg-lit 7s infinite; animation-delay: var(--d); }
.mg-node svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mg-txt { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.mg-who { font: 600 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-muted); }
.mg-h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; color: var(--fg-primary); }
.mg-p { margin: 0; max-width: 17ch; font-size: 12.5px; line-height: 1.35; color: var(--fg-muted); }
.mg-cnt { margin-top: 4px; padding: 4px 9px; border-radius: 99px; font: 600 12.5px var(--font-mono); color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); white-space: nowrap; }
.mg-cnt b, .mg-rifare b { font-variant-numeric: tabular-nums; }

/* binario orizzontale: dal centro del primo nodo al centro dell'ultimo */
.mg-track { position: absolute; left: calc(28px + (100% - 56px) / 14); right: calc(28px + (100% - 56px) / 14); top: 107px; height: 3px; border-radius: 3px; background: var(--border-medium); }
.mg-track::after { content: ""; position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet), var(--accent-emerald)); transform-origin: left; animation: mg-fill 7s linear infinite; }
.mg-token { position: absolute; z-index: 2; top: -6px; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--fg-primary); box-shadow: 0 0 0 5px var(--accent-violet-soft), 0 0 22px var(--accent-violet); animation: mg-run 7s linear infinite; }
.mg-loop { position: absolute; top: 20px; left: calc(28px + (100% - 56px) * 2.5 / 7 - 8px); width: calc((100% - 56px) * 2 / 7); height: 70px; overflow: visible; }
.mg-loop path { fill: none; stroke: var(--accent-danger); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; animation: mg-dash 1.2s linear infinite; }
.mg-rifare { position: absolute; top: 18px; left: calc(28px + (100% - 56px) * 3.5 / 7); transform: translateX(-50%); font: 700 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-danger); white-space: nowrap; background: var(--bg-card-solid); padding: 0 6px; }
.mg-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 26px 0 0; font-size: 13px; color: var(--fg-secondary); }
.mg-legend span { display: inline-flex; align-items: center; gap: 8px; }
.mg-legend i { width: 22px; border-top: 2px solid var(--accent-violet); }
.mg-legend i.mg-l-ko { border-top: 2px dashed var(--accent-danger); }
.mg-nota { margin: 16px 0 0; font-size: 13.5px; color: var(--fg-muted); }
.mg-sec[data-stato="vuoto"] .mg-cnt, .mg-sec[data-stato="vuoto"] .mg-rifare { opacity: .55; }

@keyframes mg-run { from { left: 0; } to { left: calc(100% - 15px); } }
@keyframes mg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mg-dash { to { stroke-dashoffset: -12; } }
@keyframes mg-lit { 0%, 100% { box-shadow: none; } 6% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent), 0 0 30px var(--c); } 14% { box-shadow: none; } }
@keyframes mg-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); } 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@keyframes mg-runv { from { top: 0; } to { top: calc(100% - 15px); } }
@keyframes mg-fillv { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 900px) {
  .mg-card { padding: 24px 18px; }
  .mg-steps { grid-template-columns: 1fr; gap: 22px; }
  .mg-st { flex-direction: row; align-items: center; gap: 14px; text-align: left; }
  .mg-txt { align-items: flex-start; }
  .mg-p { max-width: none; }
  .mg-node { flex: 0 0 56px; width: 56px; height: 56px; }
  .mg-track { left: 45px; right: auto; top: 84px; bottom: 148px; width: 3px; height: auto; }
  .mg-track::after { transform-origin: top; animation-name: mg-fillv; }
  .mg-token { left: -6px; top: 0; animation-name: mg-runv; }
  .mg-loop { display: none; }
  .mg-rifare { position: static; display: inline-block; transform: none; margin: 0 0 18px; padding: 0; background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-node, .mg-track::after, .mg-token, .mg-loop path, .mg-dot { animation: none !important; }
  .mg-token { display: none; }
}

/* 3 motori (29/11): loghi monocromi dei vendor sotto «chi», riga sotto la card (fuori dal binario mobile) */
.mg-logos { display: block; font-size: 15px; line-height: 1; color: var(--fg-secondary); }
.mg-motori { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 16px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--fg-muted); }
.mg-motori .vlogos { font-size: 16px; color: var(--fg-secondary); }
