/* Mini corso: lettore delle lezioni. Blu = guadagno, arancio = perdita (sempre con segni e testo). */
:root { --c-blue:#5aa9ff; --c-orange:#ff8a3d; --c-gold:#c7a86b; --c-ivory:#f0f0ed; --c-fog:#a8a9ae; --c-card:#121316; }

.corso-stage { position:relative; width:100%; aspect-ratio:16/9; background:#0b0c0e; border:1px solid rgba(199,168,107,.35);
  border-radius:18px; overflow:hidden; }
.corso-stage svg { width:100%; height:100%; display:block; }
.corso-subs { margin-top:10px; padding:12px 16px; background:#0b0c0e; border:1px solid rgba(255,255,255,.08); border-radius:12px;
  color:#f0f0ed; font-size:15px; line-height:1.5; text-align:center; min-height:4.2em; }
.corso-subs[hidden] { display:none; }
.corso-start { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  background:rgba(8,9,10,.82); cursor:pointer; border:0; color:#f0f0ed; font-family:inherit; }
.corso-start[hidden] { display:none; }
.corso-start .big-play { width:84px; height:84px; border-radius:50%; background:linear-gradient(135deg,#c7a86b,#a98a52); display:flex; align-items:center; justify-content:center; }

/* SVG */
.corso-stage .t   { fill:var(--c-ivory); font-family:Manrope,sans-serif; font-weight:700; }
.corso-stage .tf  { fill:var(--c-fog);   font-family:Manrope,sans-serif; font-weight:600; }
.corso-stage .tg  { fill:var(--c-gold);  font-family:Manrope,sans-serif; font-weight:800; }
.corso-stage .tb  { fill:var(--c-blue);  font-family:Manrope,sans-serif; font-weight:800; }
.corso-stage .to  { fill:var(--c-orange);font-family:Manrope,sans-serif; font-weight:800; }
.corso-stage .dark{ fill:#08090a;        font-family:Manrope,sans-serif; font-weight:800; }
.corso-stage .xs{font-size:17px} .corso-stage .sm{font-size:20px} .corso-stage .md{font-size:26px}
.corso-stage .lg{font-size:34px} .corso-stage .big{font-size:56px}
.corso-stage .card { fill:var(--c-card); stroke:rgba(255,255,255,.14); stroke-width:2; }
.corso-stage .card.gold { stroke:rgba(199,168,107,.7); }
.corso-stage .pill-blue   { fill:#1d5fb0; stroke:var(--c-blue);   stroke-width:2; }
.corso-stage .pill-orange { fill:#a8470a; stroke:var(--c-orange); stroke-width:2; }
.corso-stage .pill-gold   { fill:#6b5629; stroke:var(--c-gold);   stroke-width:2; }
.corso-stage .fill-blue{fill:var(--c-blue)} .corso-stage .fill-orange{fill:var(--c-orange)} .corso-stage .fill-gold{fill:var(--c-gold)}
.corso-stage .line-gold  { stroke:var(--c-gold);   stroke-width:4; fill:none; }
.corso-stage .line-blue  { stroke:var(--c-blue);   stroke-width:7; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.corso-stage .line-orange{ stroke:var(--c-orange); stroke-width:7; fill:none; stroke-linecap:round; stroke-linejoin:round; }
.corso-stage .dash  { stroke-dasharray:8 8; }
.corso-stage .dash2 { stroke-dasharray:3 10; stroke-width:4; stroke-linecap:round; }
.corso-stage .divider{ stroke:rgba(255,255,255,.14); stroke-width:2; stroke-dasharray:4 8; }
.corso-stage .node { fill:var(--c-card); stroke:var(--c-gold); stroke-width:3; }
.corso-stage .node.hot { stroke:var(--c-blue); stroke-width:4; }

/* Animazioni: ogni elemento con data-c compare quando la voce arriva al suo punto */
.corso-stage .anim { opacity:0; transform:translateY(14px); transform-box:fill-box; transition:opacity .6s ease, transform .6s ease; }
.corso-stage .anim.on { opacity:1; transform:none; }
.corso-stage .draw { stroke-dasharray:1; stroke-dashoffset:1; transition:stroke-dashoffset 1.6s ease; }
.corso-stage .anim.on .draw { stroke-dashoffset:0; }
@media (prefers-reduced-motion: reduce) {
  .corso-stage .anim, .corso-stage .draw { transition:none; transform:none; }
}

/* Comandi */
.corso-bar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:12px; }
.corso-btn { min-width:44px; height:44px; padding:0 14px; border-radius:12px; background:#121316; border:1px solid rgba(255,255,255,.14);
  color:#f0f0ed; font:600 14px Manrope,sans-serif; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.corso-btn:hover { border-color:rgba(199,168,107,.7); }
.corso-btn:focus-visible, .corso-start:focus-visible, .quiz-opt:focus-visible { outline:3px solid #e2c487; outline-offset:2px; }
.corso-btn.main { background:linear-gradient(135deg,#c7a86b,#a98a52); color:#08090a; border:0; min-width:56px; }
.corso-btn[aria-pressed="true"] { border-color:#c7a86b; color:#e2c487; }
.corso-dots { display:flex; gap:6px; flex:1; min-width:160px; justify-content:center; }
.corso-dot { flex:1; max-width:44px; height:10px; border-radius:6px; background:rgba(255,255,255,.14); border:0; cursor:pointer; padding:0; }
.corso-dot.done { background:rgba(199,168,107,.55); }
.corso-dot.cur  { background:#e2c487; }

/* Testo completo e quiz */
.corso-testo p { margin:0 0 .6rem; line-height:1.6; }
.corso-testo .cur { color:#e2c487; }
.quiz-opt { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:12px 14px; margin-top:8px; border-radius:12px;
  background:#121316; border:1px solid rgba(255,255,255,.14); color:#f0f0ed; font:500 15px Manrope,sans-serif; cursor:pointer; }
.quiz-opt:hover:not(:disabled) { border-color:rgba(199,168,107,.7); }
.quiz-opt:disabled { cursor:default; }
.quiz-opt.ok  { border-color:#5aa9ff; background:rgba(90,169,255,.14); }
.quiz-opt.ko  { border-color:#ff8a3d; background:rgba(255,138,61,.14); }
.quiz-esito { margin-top:10px; font-size:14px; line-height:1.5; }
.quiz-esito.ok { color:#5aa9ff; } .quiz-esito.ko { color:#ff8a3d; }

@media (max-width:640px) {
  .corso-subs { font-size:14px; padding:10px 12px; }
  .corso-btn { min-width:40px; height:40px; padding:0 10px; }
}

/* Titolo grande delle slide e schermo intero */
.corso-stage .hd { fill:#f0f0ed; font-family:Manrope,sans-serif; font-weight:800; letter-spacing:-.3px; }
#corsoLettore:fullscreen { background:#08090a; padding:14px; display:flex; flex-direction:column; justify-content:center; overflow:auto; }
#corsoLettore:fullscreen .corso-stage { width:min(100%, calc((100vh - 210px) * 16 / 9)); align-self:center; }
#corsoLettore:-webkit-full-screen { background:#08090a; padding:14px; }

/* Schermo intero "di ripiego" (quando il browser non permette quello vero) */
#corsoLettore.corso-fs { position:fixed; inset:0; z-index:100; background:#08090a; padding:14px; display:flex; flex-direction:column; justify-content:center; overflow:auto; }
#corsoLettore.corso-fs .corso-stage { width:min(100%, calc((100vh - 210px) * 16 / 9)); align-self:center; }

/* Testo della lezione a sezioni apribili */
.corso-sez { border-top:1px solid rgba(255,255,255,.08); }
.corso-sez:first-child { border-top:0; }
.corso-sez summary { cursor:pointer; padding:10px 2px; font-weight:600; color:#f0f0ed; list-style:none; display:flex; gap:8px; align-items:center; }
.corso-sez summary::-webkit-details-marker { display:none; }
.corso-sez summary::after { content:'+'; margin-left:auto; color:#c7a86b; font-size:18px; line-height:1; }
.corso-sez[open] summary::after { content:'−'; }
.corso-sez p { margin:0 0 12px; line-height:1.6; }
.corso-sez.cur summary { color:#e2c487; }
#corsoProssima[hidden] { display:none; }

#corsoNoAudio[hidden] { display:none; }
