/* Impara Lavoro — stile Windows 11 / Fluent: Mica, NavigationView, angoli 8px, Segoe UI Variable, accento petrolio. */
:root {
  --acc: #0b6a5b; --acc-h: #0a5c4f; --acc-t: #fff; --acc-tenue: #d9efea;
  --fondo: #f3f3f3; --mica: radial-gradient(1200px 700px at 0% 0%, #e3efec 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #eef0f6 0%, transparent 55%), #f3f3f3;
  --carta: #ffffff; --carta2: #f9f9f9; --carta-v: rgba(255, 255, 255, .7);
  --testo: #1b1b1b; --testo2: #5c5c5c; --testo3: #6e6e6e;
  --bordo: rgba(0, 0, 0, .0803); --bordo2: rgba(0, 0, 0, .14); --sotto: rgba(0, 0, 0, .3);
  --ok: #0f7b0f; --ok-t: #dff6dd; --warn: #9d5d00; --warn-t: #fff4ce; --ko: #c42b1c; --ko-t: #fde7e9;
  --om1: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 6px rgba(0, 0, 0, .04);
  --om2: 0 2px 4px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .09);
  --om3: 0 8px 16px rgba(0, 0, 0, .12), 0 32px 64px rgba(0, 0, 0, .18);
  --r: 8px; --r-s: 4px;
  --f: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --f-d: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --f-m: "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  --tocco: 40px; --nav: 280px;
  color-scheme: light;
}
[data-tema="scuro"] {
  --acc: #4fc3ad; --acc-h: #6fd3c0; --acc-t: #062c25; --acc-tenue: #173a34;
  --fondo: #202020; --mica: radial-gradient(1200px 700px at 0% 0%, #1d2d2a 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #23252c 0%, transparent 55%), #202020;
  --carta: #2b2b2b; --carta2: #323232; --carta-v: rgba(44, 44, 44, .72);
  --testo: #ffffff; --testo2: #c8c8c8; --testo3: #a8a8a8;
  --bordo: rgba(255, 255, 255, .0837); --bordo2: rgba(255, 255, 255, .16); --sotto: rgba(255, 255, 255, .45);
  --ok: #6ccb5f; --ok-t: #1f3a1d; --warn: #fce100; --warn-t: #3d3517; --ko: #ff99a4; --ko-t: #44272a;
  --om1: 0 1px 2px rgba(0, 0, 0, .25); --om2: 0 2px 4px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .35); --om3: 0 8px 16px rgba(0, 0, 0, .4), 0 32px 64px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (pointer: coarse) { :root { --tocco: 44px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; font: 15px/1.5 var(--f); color: var(--testo); background: var(--mica); background-attachment: fixed; min-height: 100vh; -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in srgb, var(--acc) 30%, transparent); }
:focus-visible { outline: 2px solid var(--testo); outline-offset: 2px; border-radius: var(--r-s); }
a { color: var(--acc); text-underline-offset: 3px; }
code { overflow-wrap: anywhere; font: .92em var(--f-m); background: color-mix(in srgb, var(--testo) 7%, transparent); padding: .1em .35em; border-radius: var(--r-s); }
h1, h2, h3 { font-family: var(--f-d); text-wrap: balance; }
p { text-wrap: pretty; }
svg { flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sec { color: var(--testo2); }
.salta { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--carta); padding: 8px 14px; border-radius: var(--r); }
.salta:focus { left: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--testo) 22%, transparent); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
* { scrollbar-color: color-mix(in srgb, var(--testo) 25%, transparent) transparent; }

/* ---------- guscio: NavigationView a sinistra su PC, barra in basso sul telefono */
.guscio { display: grid; grid-template-columns: var(--nav) 1fr; min-height: 100vh; }
.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 12px 8px; gap: 6px; }
.nav-marca { display: flex; align-items: center; gap: 12px; padding: 10px 12px 18px; text-decoration: none; color: var(--testo); }
.nav-marca b { display: block; font: 600 15px/1.2 var(--f-d); } .nav-marca small { color: var(--testo2); font-size: 12px; }
.nav-voci { display: grid; gap: 2px; }
.nav-voci a { position: relative; display: flex; align-items: center; gap: 14px; min-height: var(--tocco); padding: 0 14px; border-radius: var(--r-s); color: var(--testo); text-decoration: none; transition: background .12s; }
.nav-voci a:hover { background: color-mix(in srgb, var(--testo) 5%, transparent); }
.nav-voci a.on { background: color-mix(in srgb, var(--testo) 7%, transparent); font-weight: 600; }
.nav-voci a.on::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 3px; background: var(--acc); animation: pillola .25s cubic-bezier(.16, 1, .3, 1); }
@keyframes pillola { from { transform: scaleY(0); } }
.nav-piede { margin-top: auto; padding: 12px 14px; display: flex; justify-content: space-between; font-size: 12px; color: var(--testo2); }
.nav-piede a { color: var(--testo2); }
.vista { min-width: 0; padding: 28px clamp(16px, 3.5vw, 48px) 64px; margin: 8px 8px 8px 0; background: var(--carta-v); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--om1); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); outline: none; min-height: calc(100vh - 16px); }
.vista.entra > * { animation: entra .28s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
.tab { display: none; }
@media (max-width: 1100px) and (min-width: 700px) {
  :root { --nav: 72px; }
  .nav-marca span, .nav-voci a span, .nav-piede { display: none; }
  .nav-marca { justify-content: center; padding: 10px 0 18px; } .nav-voci a { justify-content: center; padding: 0; }
}
@media (max-width: 699px) {
  .guscio { display: block; } .nav { display: none; }
  .vista { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tab { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--carta-v); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); border-top: 1px solid var(--bordo); }
  .tab a { display: grid; justify-items: center; gap: 2px; min-height: 48px; padding: 4px 0; font-size: 11px; color: var(--testo2); text-decoration: none; border-radius: var(--r); }
  .tab a svg { width: 22px; height: 22px; }
  .tab a.on { color: var(--acc); font-weight: 600; }
  .tab a.on svg { stroke-width: 2; }
}

/* ---------- tipografia di pagina */
.testa { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.testa h1 { font: 600 clamp(26px, 3.2vw, 32px)/1.2 var(--f-d); margin: 0; letter-spacing: -.01em; }
.testa p { margin: 6px 0 0; color: var(--testo2); max-width: 62ch; }
h2.sez { font: 600 20px/1.3 var(--f-d); margin: 36px 0 12px; }

/* ---------- controlli Fluent */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tocco); padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--bordo2); border-bottom-color: color-mix(in srgb, var(--bordo2) 100%, var(--sotto) 30%); background: var(--carta); color: var(--testo); font: 600 14px/1 var(--f); text-decoration: none; cursor: pointer; transition: background .12s, transform .08s; white-space: nowrap; }
.btn:hover { background: var(--carta2); }
.btn:active { transform: translateY(1px); opacity: .9; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.acc { background: var(--acc); color: var(--acc-t); border-color: color-mix(in srgb, var(--acc) 80%, #000); }
.btn.acc:hover { background: var(--acc-h); }
.btn.sub { background: transparent; border-color: transparent; color: var(--testo); }
.btn.sub:hover { background: color-mix(in srgb, var(--testo) 6%, transparent); }
.btn.ic { padding: 0; width: var(--tocco); }
.btn.grande { min-height: 48px; padding: 0 22px; font-size: 15px; }
.campo { width: 100%; min-height: var(--tocco); padding: 8px 12px; border: 1px solid var(--bordo2); border-bottom: 1px solid var(--sotto); border-radius: var(--r-s); background: var(--carta); color: var(--testo); font: 15px var(--f); }
.campo:focus { outline: none; border-bottom: 2px solid var(--acc); padding-bottom: 7px; }
.etich { display: block; font-weight: 600; margin: 18px 0 8px; font-size: 14px; }
.errore { color: var(--ko); min-height: 1.4em; margin: 8px 0; font-weight: 600; }
.es-azioni { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 12px; background: color-mix(in srgb, var(--c, var(--acc)) 10%, transparent); color: var(--testo); font-size: 12px; font-weight: 600; }
.chip.t { background: var(--warn-t); color: var(--warn); }
.barra { display: block; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--testo) 12%, transparent); overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 4px; background: var(--acc); }
.sem { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sem i { width: 10px; height: 10px; border-radius: 50%; background: var(--testo3); }
.sem.ok i { background: var(--ok); } .sem.warn i { background: #e8a200; } .sem.ko i { background: var(--ko); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .ko { color: var(--ko); }

/* ---------- superfici */
.blocco { background: var(--carta); border: 1px solid var(--bordo); border-radius: var(--r); box-shadow: var(--om1); padding: 18px 20px; }
.blocco h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 600 17px/1.3 var(--f-d); }
.blocco h2 svg { color: var(--acc); }
.blocco h3 { font: 600 15px/1.3 var(--f-d); margin: 18px 0 8px; }
.link-blocco { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--testo); transition: background .12s; }
.link-blocco:hover { background: var(--carta2); }
.link-blocco > span:nth-child(2) { flex: 1; } .link-blocco b { display: block; } .link-blocco small { color: var(--testo2); }
.link-blocco.evid { border-color: color-mix(in srgb, var(--acc) 45%, transparent); background: color-mix(in srgb, var(--acc) 7%, var(--carta)); }
.lb-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); background: var(--acc-tenue); color: var(--acc); }
.vuoto { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 48px 16px; }
.vuoto h2 { margin: 6px 0 0; font: 600 20px/1.3 var(--f-d); } .vuoto p { margin: 0 0 12px; color: var(--testo2); max-width: 46ch; }
.vuoto-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--acc-tenue); color: var(--acc); }
.vuoto-ic svg { width: 28px; height: 28px; }
.gira svg { animation: gira 1s linear infinite; } @keyframes gira { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 50; background: var(--carta); color: var(--testo); border: 1px solid var(--bordo2); box-shadow: var(--om3); border-radius: var(--r); padding: 12px 18px; font-weight: 600; animation: su .3s cubic-bezier(.16, 1, .3, 1); max-width: calc(100vw - 32px); }
.toast.err { border-left: 1px solid var(--ko); color: var(--ko); }
.toast.via { opacity: 0; transition: opacity .4s; }
@keyframes su { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 699px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- OGGI */
.oggi-g { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.oggi-g > .blocco:last-child { grid-column: 1 / -1; }
.oggi-col { display: grid; gap: 16px; }
.riprendi { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 24px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om2); overflow: hidden; }
.riprendi { border-color: color-mix(in srgb, var(--c, var(--acc)) 30%, var(--bordo)); background: linear-gradient(160deg, color-mix(in srgb, var(--c, var(--acc)) 7%, var(--carta)) 0%, var(--carta) 45%); }
.riprendi.fine { display: block; padding: 0; }
.rip-ic { grid-row: span 2; }
.rip-t small { color: var(--testo2); font-weight: 600; font-size: 13px; }
.rip-t h2 { font: 600 clamp(20px, 2.4vw, 26px)/1.25 var(--f-d); margin: 4px 0 6px; }
.rip-meta { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--testo2); font-size: 14px; }
.rip-meta svg { width: 16px; height: 16px; }
.ant { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 12px; border-radius: var(--r-s); background: var(--carta2); border: 1px solid var(--bordo); font: 14px var(--f-m); color: var(--testo2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.xl-ant b { font: italic 600 13px var(--f); color: var(--c); }
.py-ant { background: #1e2430; color: #d6e2ff; border-color: transparent; }
.riprendi .btn.grande { grid-column: 1 / -1; justify-self: start; margin-top: 10px; min-width: 200px; }
.sett-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sett-t h2 { margin: 0; }
.serie { display: inline-flex; align-items: center; gap: 4px; color: var(--testo2); font-size: 14px; }
.serie svg { color: #e8650a; } .serie b { color: var(--testo); font-size: 16px; }
.giorni { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.giorni li { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--testo2); font-weight: 600; }
.giorni i { display: grid; place-items: center; width: 100%; max-width: 40px; aspect-ratio: 1; border-radius: var(--r); background: color-mix(in srgb, var(--testo) 6%, transparent); color: var(--acc-t); }
.giorni li.studio i { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent); }
.giorni li.fatto i { background: var(--acc); }
.giorni li.oggi span { color: var(--acc); }
.giorni li.oggi i { outline: 2px solid var(--testo); outline-offset: 2px; }
.sett .sec { margin: 14px 0 0; font-size: 13px; }
.percorso-l { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.percorso-l a, .percorso-l li.presto { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); text-decoration: none; color: var(--testo); background: var(--carta2); border: 1px solid var(--bordo); min-height: 64px; }
.percorso-l a:hover { border-color: var(--bordo2); }
.percorso-l span { flex: 1; display: grid; gap: 4px; } .percorso-l small { color: var(--testo2); font-size: 12px; }
.percorso-l li.presto { opacity: .7; }
@media (max-width: 900px) { .oggi-g { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .riprendi { grid-template-columns: 1fr; padding: 20px; } .rip-ic { grid-row: auto; } .riprendi .btn.grande { width: 100%; } }

/* ---------- CORSI */
.corsi-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.corso-r { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 200px); gap: 18px; align-items: center; padding: 16px 18px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om1); color: var(--testo); text-decoration: none; transition: border-color .12s, box-shadow .12s, transform .12s; }
a.corso-r:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: var(--om2); transform: translateY(-1px); }
.cr-t { display: grid; gap: 4px; } .cr-t b { font: 600 17px/1.3 var(--f-d); } .cr-t > small { color: var(--testo2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cr-a { display: grid; gap: 6px; } .cr-a small { color: var(--testo2); font-size: 12px; }
.presto .corso-r { background: var(--carta2); box-shadow: none; }
@media (max-width: 640px) { .corso-r { grid-template-columns: auto minmax(0, 1fr); } .cr-a { grid-column: 1 / -1; } }

/* ---------- CORSO */
.corso-testa { position: relative; margin: -28px calc(-1 * clamp(16px, 3.5vw, 48px)) 20px; padding: 18px clamp(16px, 3.5vw, 48px) 24px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), transparent); border-bottom: 1px solid var(--bordo); border-radius: var(--r) var(--r) 0 0; }
.btn.ind { margin-left: -12px; }
.ct-r { display: flex; gap: 18px; align-items: center; margin: 10px 0 18px; }
.ct-r h1 { margin: 0; font: 600 clamp(26px, 3.4vw, 34px)/1.15 var(--f-d); letter-spacing: -.015em; }
.ct-r p { margin: 6px 0 0; color: var(--testo2); max-width: 60ch; }
.ct-a { display: grid; grid-template-columns: minmax(120px, 320px) auto 1fr; gap: 14px; align-items: center; }
.ct-a > span { color: var(--testo2); font-size: 14px; } .ct-a .btn { justify-self: end; }
.corso-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.corso-g .programma { grid-row: span 2; }
.lavori, .cv { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lavori li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--bordo); } .lavori li:last-child { border: 0; padding: 0; }
.lavori span { color: var(--testo2); font-size: 14px; }
.cv li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; background: var(--carta2); border-radius: var(--r-s); font-size: 14px; }
.cv .btn.ic { width: 36px; min-height: 36px; }
.caps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.cap h3 { display: grid; margin: 0 0 8px; } .cap h3 span { font: 600 12px var(--f); color: var(--testo2); text-transform: uppercase; letter-spacing: .04em; }
.lez { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lez a { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; min-height: var(--tocco); padding: 4px 10px; border-radius: var(--r-s); color: var(--testo); text-decoration: none; }
.lez a:hover { background: color-mix(in srgb, var(--testo) 5%, transparent); }
.lez small { color: var(--testo2); font-size: 12px; }
.stato-l { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--bordo2); color: var(--testo2); }
.stato-l svg { width: 14px; height: 14px; }
.lez a.fatta .stato-l { background: var(--ok); border-color: var(--ok); color: #fff; }
.quiz-r { font-weight: 600; } .quiz-r .stato-l { border-style: dashed; }
.esame-b .btn { margin: 4px 0 8px; }
.perc-cap { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perc-cap li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 42px; gap: 10px; align-items: center; font-size: 13px; }
.perc-cap b { text-align: right; font-variant-numeric: tabular-nums; }
.nota-legale { font-size: 12.5px; color: var(--testo2); margin: 14px 0 0; }
@media (max-width: 900px) { .corso-g { grid-template-columns: 1fr; } .corso-g .programma { grid-row: auto; } .ct-a { grid-template-columns: 1fr; } .ct-a .btn { justify-self: stretch; } }
@media (max-width: 699px) { .corso-testa { margin: -20px -16px 16px; padding: 12px 16px 20px; border-radius: 0; } }

/* ---------- LEZIONE */
.lezione, .quiz { max-width: 760px; margin: 0 auto; }
.briciole { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 14px; color: var(--testo2); }
.briciole a { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tocco); color: var(--testo); text-decoration: none; font-weight: 600; }
.briciole a svg { width: 16px; height: 16px; }
.lez-t { margin: 20px 0 8px; } .lez-t small { color: var(--c, var(--acc)); font-weight: 700; font-size: 13px; }
.lez-t h1 { margin: 4px 0 6px; font: 600 clamp(26px, 3.4vw, 34px)/1.18 var(--f-d); letter-spacing: -.015em; }
.lez-t .sec { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; } .lez-t .sec svg { width: 16px; height: 16px; }
.testo { font-size: 16.5px; line-height: 1.65; max-width: 68ch; }
.testo p { margin: 14px 0; }
.lista { padding-left: 20px; margin: 12px 0; } .lista li { margin: 6px 0; } .lista li::marker { color: var(--c, var(--acc)); }
.esempio { margin: 18px 0; padding: 14px 18px; border-radius: var(--r); background: color-mix(in srgb, var(--c, var(--acc)) 8%, var(--carta)); border: 1px solid color-mix(in srgb, var(--c, var(--acc)) 22%, transparent); }
.esempio b { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--c, var(--acc)); } .esempio p { margin: 6px 0 0; }
.nota { display: flex; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: var(--r); background: var(--warn-t); color: var(--testo); }
.nota svg { color: var(--warn); margin-top: 3px; } .nota p { margin: 0; }
.codice { position: relative; margin: 16px 0; }
.codice pre { margin: 0; padding: 16px 52px 16px 16px; border-radius: var(--r); background: #1e2430; color: #e3ebff; font: 14px/1.6 var(--f-m); overflow-x: auto; white-space: pre-wrap; }
.codice code { background: none; padding: 0; color: inherit; }
.codice .btn.ic { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .08); color: #fff; border-color: transparent; }
.prova { margin: 32px 0 0; padding: 22px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om2); position: relative; overflow: hidden; }
.prova { border-color: color-mix(in srgb, var(--c, var(--acc)) 35%, var(--bordo)); }
.prova h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font: 600 19px/1.3 var(--f-d); }
.prova h2 svg { color: var(--c, var(--acc)); } .prova h2 small { font: 600 12px var(--f); color: var(--testo2); background: var(--carta2); padding: 3px 10px; border-radius: 12px; }
.consegna { font-size: 16px; margin: 10px 0 16px; }
.lez-piede { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--bordo); }
@media (max-width: 520px) { .lez-piede .btn span { display: none; } .lez-piede .btn.grande { flex: 1; } .prova { margin-left: -16px; margin-right: -16px; border-radius: 0; padding: 18px 16px; } }

/* ---------- esercizi */
.esito { display: flex; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: var(--r); background: var(--carta2); border: 1px solid var(--bordo); animation: entra .25s cubic-bezier(.16, 1, .3, 1); }
.esito.ok { background: var(--ok-t); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.esito.ko { background: var(--carta2); }
.esito-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--testo3); color: #fff; flex-shrink: 0; }
.esito.ok .esito-ic { background: var(--ok); } .esito-ic svg { width: 16px; height: 16px; }
.esito p { margin: 4px 0 0; } .esito pre.atteso { margin: 6px 0 0; padding: 8px 10px; border-radius: var(--r-s); background: var(--carta); font: 13px var(--f-m); white-space: pre-wrap; }
/* Excel */
.xl-barra { display: flex; align-items: stretch; border: 1px solid var(--bordo2); border-radius: var(--r-s); background: var(--carta); overflow: hidden; }
.xl-barra:focus-within { border-bottom: 2px solid #1d7a46; }
.xl-nome { display: grid; place-items: center; min-width: 54px; padding: 0 10px; font: 600 13px var(--f); border-right: 1px solid var(--bordo2); background: var(--carta2); }
.xl-fx { display: grid; place-items: center; padding: 0 10px; font: italic 600 14px Georgia, serif; color: var(--testo2); border-right: 1px solid var(--bordo); }
.xl-in { flex: 1; min-width: 0; min-height: 44px; border: 0; padding: 0 12px; font: 16px var(--f-m); background: transparent; color: var(--testo); outline: none; }
.xl-colori { margin: 6px 0 0; padding: 4px 12px; font: 600 14px var(--f-m); min-height: 1.4em; overflow-wrap: anywhere; }
.xl-colori[hidden] { display: none; }
.xl-scroll { overflow-x: auto; margin-top: 10px; border-radius: var(--r-s); border: 1px solid var(--bordo2); }
.xl { border-collapse: collapse; font-size: 14px; min-width: 100%; background: var(--carta); }
.xl th { background: var(--carta2); color: var(--testo2); font-weight: 600; font-size: 12px; padding: 4px 8px; border: 1px solid var(--bordo); text-align: center; min-width: 32px; }
.xl td { position: relative; padding: 7px 10px; border: 1px solid var(--bordo); white-space: nowrap; min-width: 70px; font-variant-numeric: tabular-nums; cursor: cell; }
.xl td.xl-num { text-align: right; } .xl td.xl-int { font-weight: 600; background: color-mix(in srgb, #1d7a46 7%, var(--carta)); }
.xl td.xl-target { outline: 2px solid #1d7a46; outline-offset: -2px; background: color-mix(in srgb, #1d7a46 10%, var(--carta)); font-weight: 700; text-align: right; }
.xl td.xl-target.xl-err { color: var(--ko); outline-color: var(--ko); }
.xl td[data-rif] { box-shadow: inset 0 0 0 2px var(--rif); background: color-mix(in srgb, var(--rif) 9%, var(--carta)); }
.xl-tip { font-size: 12.5px; color: var(--testo2); margin: 8px 0 0; }
/* Python */
.py-ed, .py-out { border-radius: var(--r); overflow: hidden; background: #1e2430; border: 1px solid #2c3445; }
.py-testa { display: flex; justify-content: space-between; padding: 8px 14px; font: 600 12px var(--f); color: #9fb0d0; background: #252c3a; }
.py-code { display: block; width: 100%; border: 0; resize: vertical; padding: 14px; background: transparent; color: #e3ebff; font: 14.5px/1.6 var(--f-m); tab-size: 4; outline: none; caret-color: #ffd43b; }
.py-code:focus { box-shadow: inset 0 -2px 0 #ffd43b; }
.py-out { margin-top: 12px; } .py-out pre { margin: 0; padding: 12px 14px; color: #c6f6c2; font: 14px/1.5 var(--f-m); white-space: pre-wrap; }
/* Prompt */
.pz { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.pz li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); border: 1px dashed var(--bordo2); background: var(--carta2); transition: background .2s, border-color .2s; }
.pz li small { display: block; color: var(--testo2); font-size: 12.5px; }
.pz-ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--bordo2); color: transparent; flex-shrink: 0; transition: all .2s; }
.pz-ic svg { width: 14px; height: 14px; }
.pz li.on { border-style: solid; border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-t); }
.pz li.on .pz-ic { background: var(--ok); border-color: var(--ok); color: #fff; }
.pr-t { width: 100%; padding: 12px; border: 1px solid var(--bordo2); border-bottom-color: var(--sotto); border-radius: var(--r-s); background: var(--carta); color: var(--testo); font: 15px/1.55 var(--f); resize: vertical; }
.pr-t:focus { outline: none; border-bottom: 2px solid var(--acc); }
.pr-meta { font-size: 12.5px; color: var(--testo2); margin-top: 6px; }
.pr-prova { margin-top: 12px; padding: 10px 14px; border-radius: var(--r); background: var(--acc-tenue); font-size: 14px; }
/* Calcolo */
.calc-riga { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-in { width: 180px; min-height: 44px; padding: 0 12px; border: 1px solid var(--bordo2); border-bottom-color: var(--sotto); border-radius: var(--r-s); background: var(--carta); color: var(--testo); font: 600 18px var(--f); font-variant-numeric: tabular-nums; }
.cal-in:focus { outline: none; border-bottom: 2px solid var(--acc); }
.cal-u { font-weight: 600; color: var(--testo2); }
/* Ordina */
.ord { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ord li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 6px 6px 6px 12px; border-radius: var(--r); background: var(--carta2); border: 1px solid var(--bordo); transition: background .2s; }
.ord li.ok { background: var(--ok-t); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.ord-n { font-weight: 700; color: var(--testo2); font-variant-numeric: tabular-nums; }
.ord-b { display: flex; gap: 4px; } .ord-b .btn.ic { width: 40px; min-height: 40px; }
/* Scelta e domande */
.opz { display: grid; gap: 8px; }
.opz-b { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--bordo2); background: var(--carta); color: var(--testo); font: 15px/1.4 var(--f); text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.opz-b:hover { border-color: var(--sotto); }
.opz-b input { position: absolute; opacity: 0; pointer-events: none; }
.opz-l { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--carta2); border: 1px solid var(--bordo2); font: 700 13px var(--f); flex-shrink: 0; }
.opz-b:has(input:checked), .opz-b[aria-checked="true"] { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 7%, var(--carta)); }
.opz-b:has(input:checked) .opz-l, .opz-b[aria-checked="true"] .opz-l { background: var(--acc); color: var(--acc-t); border-color: var(--acc); }
.opz-b:has(input:focus-visible) { outline: 2px solid var(--testo); outline-offset: 2px; }
.opz-b.ok, .opz-b.giusta { border-color: var(--ok); background: var(--ok-t); } .opz-b.giusta .opz-l, .opz-b.ok .opz-l { background: var(--ok); color: #fff; border-color: var(--ok); }
.opz-b.ko { border-color: var(--ko); background: var(--ko-t); }
.dom.ko .opz-b:has(input:checked):not(.giusta) { border-color: var(--ko); background: var(--ko-t); } .dom.ko .opz-b:has(input:checked):not(.giusta) .opz-l { background: var(--ko); border-color: var(--ko); color: #fff; }
.dom { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.dom legend { display: flex; gap: 12px; font: 600 17px/1.4 var(--f-d); margin-bottom: 12px; padding: 0; }
.dom legend > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-s); background: var(--c, var(--acc)); color: #fff; font-size: 14px; flex-shrink: 0; }
.spieg { display: flex; gap: 10px; margin: 10px 0 0; padding: 10px 14px; border-radius: var(--r); background: var(--carta2); font-size: 14.5px; }
.dom.ok .spieg svg { color: var(--ok); } .dom.ko .spieg svg { color: var(--ko); }
.risultato { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin: 24px 0; padding: 24px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om2); }
.risultato h2 { margin: 0 0 6px; font: 600 22px/1.25 var(--f-d); } .risultato p { margin: 0; color: var(--testo2); }
.ris-n { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; background: var(--ko-t); color: var(--ko); text-align: center; align-content: center; }
.risultato.ok .ris-n { background: var(--ok-t); color: var(--ok); }
.ris-n b { font: 700 30px/1 var(--f-d); font-variant-numeric: tabular-nums; } .ris-n span { font-size: 12px; font-weight: 600; }
.esiti { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.esiti li { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-s); font: 700 13px var(--f); color: #fff; background: var(--ko); } .esiti li.ok { background: var(--ok); }
@media (max-width: 560px) { .risultato { grid-template-columns: 1fr; justify-items: start; } .ris-n { width: 92px; height: 92px; } }
.ripasso { max-width: 760px; }
.rip-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; font-size: 14px; } .rip-meta .sec { margin-left: auto; font-weight: 400; }
.ripasso .barra { margin-bottom: 22px; }
.regole { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.regole li { display: flex; gap: 12px; align-items: center; } .regole svg { color: var(--acc); }
.esame-t { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 600; color: var(--testo2); }
.tempo { display: inline-flex; align-items: center; gap: 6px; color: var(--testo); font-variant-numeric: tabular-nums; }
.esame .barra { margin-bottom: 24px; }

/* ---------- PROGRESSI */
.numeri { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.numeri div { padding: 16px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om1); }
.numeri b { display: block; font: 600 30px/1.1 var(--f-d); font-variant-numeric: tabular-nums; } .numeri span { color: var(--testo2); font-size: 13px; }
@media (max-width: 640px) { .numeri { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.calore { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; max-width: 520px; }
.calore li, .legenda i { aspect-ratio: 1; border-radius: 3px; background: color-mix(in srgb, var(--testo) 8%, transparent); }
.calore .l1, .legenda .l1 { background: color-mix(in srgb, var(--acc) 35%, transparent); } .calore .l2, .legenda .l2 { background: color-mix(in srgb, var(--acc) 65%, transparent); } .calore .l3, .legenda .l3 { background: var(--acc); }
.legenda { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 12px 0 0; } .legenda i { display: inline-block; width: 12px; margin-left: 6px; }
.prog-l { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.prog-t { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--testo); text-decoration: none; }
.prog-t span { flex: 1; display: grid; } .prog-t small { color: var(--testo2); font-size: 13px; }
.prog-p { font: 600 22px var(--f-d); font-variant-numeric: tabular-nums; }
.prog-d { margin-top: 14px; display: grid; gap: 10px; }
.prog-c > .blocco { margin-top: 16px; }
.blocco + .blocco, .prog-l + .blocco, .numeri + .blocco { margin-top: 16px; }

/* ---------- PERCORSO */
.obiettivi { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.obb { display: grid; gap: 4px; align-content: start; text-align: left; min-height: 96px; padding: 14px; border-radius: var(--r); border: 1px solid var(--bordo2); background: var(--carta2); color: var(--testo); font: 14px/1.4 var(--f); cursor: pointer; transition: border-color .12s, background .12s; }
.obb:hover { border-color: var(--sotto); } .obb b { font-size: 15px; } .obb small { color: var(--testo2); }
.obb.on { border: 2px solid var(--acc); background: color-mix(in srgb, var(--acc) 8%, var(--carta)); padding: 13px; }
.obb-c { display: flex; gap: 4px; margin-top: 6px; }
.obiettivi.mini { grid-template-columns: 1fr; text-align: left; margin: 10px 0; } .obiettivi.mini .obb { min-height: 0; }
.percorso-n { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.percorso-n li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--carta2); border: 1px solid var(--bordo); font-weight: 600; font-size: 14px; }
.percorso-n li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--acc); color: var(--acc-t); font-size: 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: var(--r); background: color-mix(in srgb, var(--testo) 6%, transparent); }
.seg button { min-width: 48px; min-height: var(--tocco); padding: 0 12px; border: 0; border-radius: var(--r-s); background: transparent; color: var(--testo); font: 600 14px var(--f); cursor: pointer; }
.seg button[aria-checked="true"], .seg button[aria-pressed="true"] { background: var(--carta); box-shadow: var(--om1); color: var(--acc); }
.campo[type=time] { width: 160px; }
.stima { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--r); background: var(--acc-tenue); }
.stima:empty { display: none; }

/* ---------- ATTESTATI */
.att-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.att-l a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--carta); border: 1px solid var(--bordo); box-shadow: var(--om1); color: var(--testo); text-decoration: none; }
.att-l a span { flex: 1; display: grid; } .att-l small { color: var(--testo2); } .att-l code { font-size: 12px; }
.att-az { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; } .att-az .spazio { flex: 1; }
.cert { max-width: 900px; margin: 0 auto; padding: 14px; background: #fff; color: #1b1b1b; border-radius: var(--r); box-shadow: var(--om3); aspect-ratio: 1.414; }
.cert-in { height: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(18px, 4vw, 44px); border: 2px solid var(--c); border-radius: 4px; outline: 1px solid color-mix(in srgb, var(--c) 40%, transparent); outline-offset: -8px; background: radial-gradient(600px 300px at 50% 0%, color-mix(in srgb, var(--c) 7%, transparent), transparent); }
.cert-testa { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; } .cert-testa span { flex: 1; display: grid; } .cert-testa small { color: #5c5c5c; }
.cert-occ { margin: clamp(10px, 3vw, 28px) 0 4px; font: 700 clamp(13px, 1.6vw, 16px) var(--f); letter-spacing: .18em; text-transform: uppercase; color: var(--c); }
.cert p { margin: 4px 0; color: #444; }
.cert h1 { margin: 6px 0; font: 600 clamp(26px, 4.6vw, 44px)/1.15 var(--f-d); letter-spacing: -.01em; color: #111; }
.cert h2 { margin: 4px 0; font: 600 clamp(18px, 2.6vw, 26px)/1.2 var(--f-d); color: var(--c); }
.cert-dett { font-size: clamp(13px, 1.5vw, 15px); }
.cert-piede { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr auto; gap: 18px; align-items: end; width: 100%; text-align: left; }
.cert-piede span { display: block; font-weight: 600; border-bottom: 1px solid #c8c8c8; padding-bottom: 4px; } .cert-piede small { color: #6b6b6b; font-size: 12px; }
.firma { font-family: "Segoe Script", "Brush Script MT", cursive; font-weight: 400 !important; font-size: 1.15em; }
.cert-qr { display: grid; justify-items: center; gap: 4px; } .cert-qr svg { width: clamp(64px, 11vw, 96px); height: auto; } .cert-qr small { font: 600 11px var(--f-m); }
.cert-verifica { font-size: 12px !important; margin-top: 12px !important; }
.cert-legale { font-size: 11px !important; color: #6b6b6b !important; max-width: 70ch; }
@media (max-width: 600px) { .cert { aspect-ratio: auto; } .cert-piede { grid-template-columns: 1fr 1fr; } .cert-qr { grid-column: 1 / -1; } }

/* ---------- ALTRO */
.altro-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.menu { list-style: none; margin: 0; padding: 6px; }
.menu a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 10px; border-radius: var(--r-s); color: var(--testo); text-decoration: none; }
.menu a:hover { background: color-mix(in srgb, var(--testo) 5%, transparent); }
.menu a > span:nth-child(2) { flex: 1; display: grid; } .menu small { color: var(--testo2); font-size: 13px; }
.menu a > svg:last-child { color: var(--testo2); width: 16px; height: 16px; }
.menu .lb-ic { width: 36px; height: 36px; }
.credit { text-align: center; color: var(--testo2); font-size: 13px; margin-top: 28px; }
.funz { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.funz li { display: flex; gap: 14px; align-items: flex-start; } .funz p { margin: 4px 0; color: var(--testo2); font-size: 14px; }
.legale { max-width: 72ch; } .legale p { margin: 10px 0; }

/* ---------- finestre */
.dlg { border: 1px solid var(--bordo2); border-radius: var(--r); padding: 0; background: var(--carta); color: var(--testo); box-shadow: var(--om3); width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
.dlg::backdrop { background: rgba(0, 0, 0, .4); backdrop-filter: blur(2px); }
.dlg[open] { animation: apri .22s cubic-bezier(.16, 1, .3, 1); }
@keyframes apri { from { opacity: 0; transform: scale(.96); } }
.dlg-c { position: relative; padding: 26px 24px 20px; }
.dlg-x { position: absolute; top: 8px; right: 8px; }
.dlg h2 { margin: 12px 0 8px; font: 600 20px/1.3 var(--f-d); } .dlg p { color: var(--testo2); margin: 0 0 8px; }
.dlg-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--acc-tenue); color: var(--acc); }
.dlg-ic svg { width: 24px; height: 24px; }
.dlg-az { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 18px -24px -20px; padding: 16px 24px; background: var(--carta2); border-top: 1px solid var(--bordo); border-radius: 0 0 var(--r) var(--r); }
.punti { list-style: none; display: flex; gap: 6px; padding: 0; margin: 16px 0 0; } .punti li { width: 8px; height: 8px; border-radius: 4px; background: var(--bordo2); } .punti li.on { width: 22px; background: var(--acc); }

/* ---------- stampa: solo l'attestato */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .nav, .tab, .no-stampa, .salta, #centrale-cgfa { display: none !important; }
  .guscio { display: block; } .vista { margin: 0; padding: 0; border: 0; box-shadow: none; background: #fff; backdrop-filter: none; }
  .cert { box-shadow: none; max-width: none; width: 100%; aspect-ratio: auto; height: 188mm; padding: 0; }
  .vista.entra > * { animation: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
