@font-face { font-family: 'Figtree'; font-weight: 300 900; font-style: normal; font-display: swap; src: url('/fonts/figtree-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 200 800; font-style: normal; font-display: swap; src: url('/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --ink: #10243b;
  --ink-2: #44586d;
  --ink-3: #6f8294;
  --paper: #edf1f3;
  --card: #ffffff;
  --line: #d2dce2;
  --line-2: #e4ebef;
  --sea: #d8e9ef;
  --land: #fdfcf8;
  --coast: #5d7b8d;
  --river: #3f95c9;
  --pin: #ffc928;
  --ok: #157a52;
  --ok-bg: #e0f3ea;
  --bad: #c93636;
  --bad-bg: #fbe5e5;
  --warn-bg: #fff3cf;
  --focus: #1a64d6;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; letter-spacing: -0.01em; }

/* ---------- pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); padding: 9px 16px; border-radius: 9px; font-weight: 700; line-height: 1.1; transition: background .12s, transform .05s; white-space: nowrap; }
.btn:hover { background: #f4f7f8; }
.btn:active { transform: translateY(1px); }
.btn.primario { background: var(--ink); color: #fff; }
.btn.primario:hover { background: #1b3a5a; }
.btn.giallo { background: var(--pin); border-color: var(--ink); }
.btn.giallo:hover { background: #ffd24f; }
.btn.pericolo { border-color: var(--bad); color: var(--bad); }
.btn.pericolo:hover { background: var(--bad-bg); }
.btn.piccolo { padding: 6px 11px; font-size: 14px; border-radius: 8px; }
.btn.tenue { border-color: var(--line); font-weight: 400; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- pin (logo e carta) ---------- */
.logo-pin { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pin); border: 2px solid var(--ink); font: 700 15px/1 var(--display); color: var(--ink); }

/* ---------- accesso ---------- */
.accesso { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); background: var(--sea); position: relative; overflow: hidden; }
.accesso .sfondo { position: absolute; inset: 0; pointer-events: none; }
.accesso .sfondo .fondo-mappa { opacity: .55; }
.accesso .sfondo svg { width: 100%; height: 100%; }
.accesso .sfondo .land { fill: #eef6f8; stroke: #9fbac7; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.accesso .sfondo .lakes { fill: var(--sea); stroke: #9fbac7; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.accesso .sfondo .rivers path { fill: none; stroke: #86b9d6; stroke-width: 1.4px; vector-effect: non-scaling-stroke; }
.accesso .sfondo .goccia { transform-box: fill-box; transform-origin: 50% 100%; animation: cade .7s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--i) * 90ms + 250ms); }
@keyframes cade { from { transform: translateY(-26px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.accesso .testo { position: relative; padding: clamp(28px, 6vw, 88px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.accesso .testo h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 750; max-width: 12ch; text-wrap: balance; }
.accesso .testo p { margin: 0; max-width: 34ch; font-size: 1.2rem; color: var(--ink-2); }
.accesso .modulo { position: relative; align-self: center; justify-self: center; width: min(420px, calc(100% - 32px)); background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; padding: 28px; box-shadow: 6px 6px 0 var(--ink); margin: 24px 16px; }
.accesso .modulo h2 { font-size: 1.5rem; margin-bottom: 4px; }
.accesso .modulo .sotto { margin: 0 0 18px; color: var(--ink-2); font-size: .95rem; }
.campo { display: block; margin-bottom: 14px; }
.campo span { display: block; font-weight: 700; margin-bottom: 5px; font-size: .95rem; }
.campo input { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; font-size: 1.1rem; }
.campo input:hover { border-color: var(--ink-3); }
.campo input:focus { border-color: var(--focus); outline: 3px solid #1a64d633; outline-offset: 0; }
.spunta { display: flex; gap: 11px; align-items: center; margin: 2px 0 18px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 9px; cursor: pointer; }
.spunta:hover { border-color: var(--ink-3); }
.spunta:has(input:checked) { border-color: var(--ink); background: #e6edff; }
.spunta input { width: 20px; height: 20px; flex: none; accent-color: var(--ink); }
.spunta span { display: flex; flex-direction: column; line-height: 1.25; }
.spunta small { color: var(--ink-2); font-size: .85rem; }
.spunta[hidden] { display: none; }
.errore { background: var(--bad-bg); color: #7d1d1d; border-radius: 9px; padding: 10px 12px; margin: 0 0 14px; font-size: .95rem; }
.avviso { background: var(--warn-bg); border-radius: 9px; padding: 10px 12px; margin: 0 0 14px; font-size: .95rem; }
.modulo .btn { width: 100%; padding: 13px; font-size: 1.1rem; }
@media (max-width: 860px) { .accesso { grid-template-columns: 1fr; } .accesso .testo { padding-bottom: 0; } }

/* ---------- barra superiore ---------- */
.barra { display: flex; align-items: center; gap: 16px; background: var(--ink); color: #fff; padding: 0 18px; height: 58px; flex: none; }
.barra .marchio { display: flex; align-items: center; gap: 11px; font: 650 1.15rem var(--display); white-space: nowrap; }
.barra .marchio small { font: 400 .85rem var(--text); opacity: .75; margin-left: 2px; }
.barra .spazio { flex: 1; }
.barra .chi { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; }
.barra .btn { border-color: #fff; background: transparent; color: #fff; }
.barra .btn:hover { background: #ffffff1f; }
.barra .btn.giallo { background: var(--pin); color: var(--ink); border-color: var(--pin); }
.barra .btn.giallo:hover { background: #ffd24f; }
.avanzamento { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avanzamento .testo-av { font-weight: 700; white-space: nowrap; }
.avanzamento .barretta { width: clamp(90px, 18vw, 260px); height: 10px; border-radius: 6px; background: #ffffff33; overflow: hidden; }
.avanzamento .barretta i { display: block; height: 100%; width: 0; background: var(--pin); border-radius: 6px; transition: width .25s; }

/* ---------- verifica alunno ---------- */
.verifica { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.verifica .corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(330px, 29vw, 420px); gap: 12px; padding: 12px; }
.carta { position: relative; min-height: 0; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--ink); background: #c5d6de; touch-action: none; user-select: none; -webkit-user-select: none; }
.carta-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.carta-svg.panning { cursor: grabbing; }
.carta-svg .mare { fill: var(--sea); stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.carta-svg .land { fill: var(--land); stroke: var(--coast); stroke-width: .9px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.carta-svg .lakes { fill: var(--sea); stroke: var(--coast); stroke-width: .9px; vector-effect: non-scaling-stroke; }
.carta-svg .rivers path { fill: none; stroke: var(--river); stroke-width: 1.7px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.carta .comandi { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.carta .comandi button { width: 40px; height: 40px; border-radius: 9px; border: 1.5px solid var(--ink); background: #fff; font: 700 1.3rem/1 var(--display); display: grid; place-items: center; padding: 0; }
.carta .comandi button:hover { background: #f1f6f8; }
.carta .suggerimento { position: absolute; right: 12px; bottom: 10px; z-index: 2; background: #ffffffe6; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .85rem; color: var(--ink-2); pointer-events: none; max-width: 60%; }
.perno { cursor: pointer; }
.perno .p-alone { fill: var(--pin); opacity: 0; transform-box: fill-box; transform-origin: center; }
.perno .p-disco { fill: var(--pin); stroke: var(--ink); stroke-width: 1.8px; transition: fill .15s; }
.perno .p-num { font: 700 13px var(--display); fill: var(--ink); text-anchor: middle; pointer-events: none; font-variant-numeric: tabular-nums; }
.perno .p-hit { fill: transparent; }
.perno.pieno .p-disco { fill: var(--ink); }
.perno.pieno .p-num { fill: #fff; }
.perno.giusta .p-disco { fill: var(--ok); stroke: #0b4a31; }
.perno.giusta .p-num { fill: #fff; }
.perno.sbagliata .p-disco { fill: var(--bad); stroke: #6d1717; }
.perno.sbagliata .p-num { fill: #fff; }
.perno.vuota .p-disco { fill: #cfd8de; stroke: var(--ink-3); stroke-dasharray: 3 2.5; }
.perno.vuota .p-num { fill: var(--ink-2); }
.perno.bersaglio .p-alone, .perno.attivo .p-alone { opacity: .55; animation: alone .8s ease-in-out infinite alternate; }
.perno.bersaglio .p-disco { stroke-width: 3px; }
.perno.selezionabile:hover .p-alone { opacity: .45; }
@keyframes alone { from { transform: scale(.85); } to { transform: scale(1.15); } }
.etichetta text { font: 700 12.5px var(--text); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.etichetta.sbagliata text { fill: #8a1f1f; }
.etichetta.giusta text { fill: #0b4a31; }

.pannello { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.scheda { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.scheda > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 14px 9px; border-bottom: 1px solid var(--line-2); }
.scheda > header h2 { font-size: 1.1rem; }
.scheda > header .n { color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.scheda.luoghi { flex: 0 1 46%; }
.scheda.risposte { flex: 1 1 54%; }
.scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.pool { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 12px 14px; align-content: flex-start; }
.pool.bersaglio { background: #fff7dc; }
.pool .vuoto-pool { color: var(--ink-2); padding: 6px 4px; }
.chip { display: inline-flex; align-items: center; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; padding: 6px 10px; font-weight: 700; font-size: .95rem; line-height: 1.15; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 2px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .12s; }
.chip:hover { background: #fff7dc; }
.chip.scelto { background: var(--pin); transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.chip.in-mano { opacity: .35; }
.chip.fantasma { position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -140%) rotate(-3deg); background: var(--pin); box-shadow: 0 8px 18px #10243b55; cursor: grabbing; }
.riga { display: grid; grid-template-columns: 40px minmax(0, 1fr) 30px; align-items: center; gap: 8px; padding: 5px 10px 5px 10px; border-bottom: 1px solid var(--line-2); min-height: 46px; }
.riga:last-child { border-bottom: 0; }
.riga .nr { width: 32px; height: 32px; border-radius: 50%; border: 1.8px solid var(--ink); background: var(--pin); font: 700 .95rem var(--display); display: grid; place-items: center; padding: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.riga .nr:hover { box-shadow: 0 0 0 3px #ffc92866; }
.riga.piena .nr { background: var(--ink); color: #fff; }
.riga .slot { min-height: 32px; display: flex; align-items: center; border-radius: 8px; border: 1.5px dashed var(--line); padding: 0 4px; color: var(--ink-3); font-size: .9rem; }
.riga .slot:has(.chip) { border: 0; padding: 0; }
.riga .slot .chip { width: 100%; justify-content: flex-start; box-shadow: none; background: #f2f6f8; border-color: var(--line); font-weight: 700; }
.riga .slot .chip:hover { background: #fff7dc; border-color: var(--ink); }
.riga.bersaglio { background: #fff7dc; }
.riga.bersaglio .slot { border-color: var(--ink); border-style: solid; }
.riga .x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; font-size: 1.2rem; line-height: 1; color: var(--ink-3); padding: 0; }
.riga .x:hover { background: var(--bad-bg); color: var(--bad); }
body.trascinando, body.trascinando * { cursor: grabbing !important; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 2000; box-shadow: 0 8px 24px #10243b55; max-width: calc(100% - 32px); }

@media (max-width: 960px) {
  .verifica { height: auto; min-height: 100%; }
  .verifica .corpo { grid-template-columns: 1fr; grid-template-rows: 56vh auto; }
  .scheda.luoghi, .scheda.risposte { flex: none; max-height: 46vh; }
  .barra .chi { display: none; }
}

/* ---------- finestre ---------- */
dialog { border: 1.5px solid var(--ink); border-radius: 16px; padding: 0; width: min(520px, calc(100% - 28px)); box-shadow: 8px 8px 0 var(--ink); background: var(--card); color: var(--ink); }
dialog::backdrop { background: #10243b99; }
dialog.largo { width: min(720px, calc(100% - 28px)); }
dialog .d-corpo { padding: 24px 26px 8px; }
dialog h2 { font-size: 1.5rem; margin-bottom: 10px; }
dialog p { margin: 0 0 12px; color: var(--ink-2); }
dialog .d-azioni { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 26px 22px; flex-wrap: wrap; }
dialog textarea { width: 100%; min-height: 220px; padding: 12px; border: 1.5px solid var(--line); border-radius: 9px; resize: vertical; font-size: 1rem; line-height: 1.5; }
dialog textarea:focus { border-color: var(--focus); outline: 3px solid #1a64d633; outline-offset: 0; }

/* ---------- consegna / voto ---------- */
.esito { min-height: 100%; display: grid; place-items: center; padding: 24px; background: var(--sea); position: relative; overflow: hidden; }
.esito .sfondo { position: absolute; inset: 0; }
.esito .sfondo .fondo-mappa { opacity: .5; }
.esito .sfondo svg { width: 100%; height: 100%; }
.esito .sfondo .land { fill: #eef6f8; stroke: #9fbac7; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.esito .sfondo .lakes { fill: var(--sea); stroke: #9fbac7; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.esito .sfondo .rivers path { fill: none; stroke: #86b9d6; stroke-width: 1.4px; vector-effect: non-scaling-stroke; }
.esito .scatola { position: relative; background: var(--card); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 8px 8px 0 var(--ink); padding: clamp(24px, 5vw, 48px) clamp(28px, 7vw, 84px); text-align: center; }
.esito .scatola h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 650; }
.esito .etichetta-voto { font: 700 clamp(1.4rem, 3.5vw, 2rem) var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin-top: 18px; }
.esito .voto { font: 800 clamp(7rem, 24vw, 15rem)/.95 var(--display); letter-spacing: -0.04em; margin: 0 0 4px; font-variant-numeric: tabular-nums; }
.esito .voto.ok { color: var(--ok); }
.esito .voto.no { color: var(--bad); }
.esito .dettaglio { font-size: 1.3rem; margin: 0 0 22px; color: var(--ink-2); }
.esito .scatola .btn { padding: 11px 26px; }
.esito .scatola .nota { font-size: .95rem; color: var(--ink-3); margin-top: 18px; }
.appare { animation: appare .6s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes appare { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- dashboard docente ---------- */
.dash { min-height: 100%; display: flex; flex-direction: column; }
.dash .contenuto { padding: 18px; display: flex; flex-direction: column; gap: 14px; max-width: 1400px; width: 100%; margin: 0 auto; }
.dash select { border: 1.5px solid #fff; background: transparent; color: #fff; border-radius: 9px; padding: 8px 10px; font-weight: 700; max-width: 280px; }
.dash select option { color: var(--ink); }
.riepilogo { display: flex; gap: 12px; flex-wrap: wrap; }
.numero { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 10px 16px 11px; min-width: 130px; }
.numero b { display: block; font: 750 2rem/1.05 var(--display); font-variant-numeric: tabular-nums; }
.numero span { color: var(--ink-2); font-size: .92rem; }
.strumenti { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.strumenti .spazio { flex: 1; }
.interruttore { display: inline-flex; align-items: center; gap: 9px; border: 1.5px solid var(--ink); background: var(--card); border-radius: 9px; padding: 8px 13px; font-weight: 700; }
.interruttore i { width: 34px; height: 20px; border-radius: 12px; background: var(--ink-3); position: relative; transition: background .15s; }
.interruttore i::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.interruttore[aria-pressed="true"] i { background: var(--ok); }
.interruttore[aria-pressed="true"] i::after { transform: translateX(14px); }
.tabella-wrap { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: auto; }
table.alunni { border-collapse: collapse; width: 100%; min-width: 820px; }
.alunni th { text-align: left; font-weight: 700; font-size: .9rem; color: var(--ink-2); padding: 10px 14px; border-bottom: 1.5px solid var(--ink); background: #f6f9fa; position: sticky; top: 0; white-space: nowrap; }
.alunni th button { background: none; border: 0; padding: 0; font-weight: 700; color: inherit; }
.alunni th button:hover { color: var(--ink); text-decoration: underline; }
.alunni td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.alunni tbody tr { cursor: pointer; }
.alunni tbody tr:hover { background: #f4f8fa; }
.alunni tbody tr:last-child td { border-bottom: 0; }
.alunni .nome-al { font-weight: 700; }
.alunni .nome-al .pallino { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-right: 8px; }
.alunni .nome-al .pallino.on { background: #22b573; box-shadow: 0 0 0 3px #22b57333; }
.alunni .nome-al .pallino.off { background: #e5a73a; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: #e6edff; color: #20418f; margin-left: 8px; vertical-align: 1px; }
.badge.consegnato { background: var(--ok-bg); color: var(--ok); margin-left: 0; }
.badge.in_corso { background: var(--warn-bg); color: #7a5600; margin-left: 0; }
.badge.non_entrato { background: #eceff1; color: var(--ink-2); margin-left: 0; }
.prog { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.prog .b { flex: 1; height: 12px; border-radius: 7px; background: var(--line-2); overflow: hidden; position: relative; }
.prog .b i { position: absolute; left: 0; top: 0; bottom: 0; background: #c3d3dc; transition: width .3s; }
.prog .b u { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); transition: width .3s; }
.prog span { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 3.6em; text-align: right; }
.cella-voto { font: 750 1.5rem var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cella-voto.ok { color: var(--ok); }
.cella-voto.no { color: var(--bad); }
.cella-voto.prov { color: var(--ink-2); opacity: .75; font-weight: 600; }
.cella-voto small { font: 400 .8rem var(--text); color: var(--ink-3); margin-left: 4px; }
.alunni .agg { color: var(--ink-2); font-size: .92rem; white-space: nowrap; }
@keyframes lampo { from { background: #fff1b8; } to { background: transparent; } }
.alunni tr.lampo td { animation: lampo 1.4s ease-out; }
.vuoto-tab { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.vuoto-tab b { display: block; font: 650 1.3rem var(--display); color: var(--ink); margin-bottom: 6px; }

/* dettaglio alunno (docente) */
.dettaglio-al { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.dettaglio-al .testata { display: flex; align-items: center; gap: 16px; padding: 12px 18px; background: var(--card); border-bottom: 1.5px solid var(--ink); flex-wrap: wrap; }
.dettaglio-al .testata h1 { font-size: 1.6rem; }
.dettaglio-al .testata .grande { font: 800 2.6rem/1 var(--display); font-variant-numeric: tabular-nums; }
.dettaglio-al .testata .grande.ok { color: var(--ok); }
.dettaglio-al .testata .grande.no { color: var(--bad); }
.dettaglio-al .testata .meta { color: var(--ink-2); }
.dettaglio-al .corpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 30vw, 440px); gap: 12px; padding: 12px; }
.filtri { display: flex; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.filtri button { border: 1.5px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px; font-weight: 700; font-size: .9rem; }
.filtri button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.r-det { display: grid; grid-template-columns: 34px minmax(0, 1fr) 24px; gap: 10px; align-items: start; padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.r-det:hover { background: #f4f8fa; }
.r-det.attiva { background: #fff7dc; }
.r-det .nr { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.r-det.giusta .nr { background: var(--ok); }
.r-det.sbagliata .nr { background: var(--bad); }
.r-det.vuota .nr { background: #aab8c2; }
.r-det .dato { font-weight: 700; }
.r-det .dato.vuota { color: var(--ink-3); font-weight: 400; font-style: italic; }
.r-det .giusto { font-size: .92rem; color: var(--ink-2); }
.r-det .giusto b { color: var(--ok); }
.r-det .seg { font-size: 1.2rem; font-weight: 700; text-align: center; }
.r-det.giusta .seg { color: var(--ok); }
.r-det.sbagliata .seg { color: var(--bad); }
.interr-etichette { margin-left: auto; }
.legenda { position: absolute; right: 12px; top: 12px; z-index: 2; background: #ffffffec; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; display: flex; gap: 12px; font-size: .88rem; flex-wrap: wrap; }
.legenda span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--ink); }
.legenda .g::before { background: var(--ok); }
.legenda .s::before { background: var(--bad); }
.legenda .v::before { background: #cfd8de; }
.selezione-dsa { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; margin-bottom: 12px; }
.selezione-dsa h3 { grid-column: 1 / -1; font-size: 1rem; margin: 10px 0 2px; }
.selezione-dsa label { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.selezione-dsa input { width: 18px; height: 18px; accent-color: var(--ink); }
@media (max-width: 960px) {
  .dettaglio-al { height: auto; }
  .dettaglio-al .corpo { grid-template-columns: 1fr; grid-template-rows: 56vh auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.live { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; opacity: .9; white-space: nowrap; }
.live::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #8b9bab; }
.live[data-on="1"]::before { background: #3ddc97; box-shadow: 0 0 0 3px #3ddc9744; }

@media (max-width: 600px) { .avanzamento .barretta { display: none; } .barra { gap: 10px; padding: 0 12px; } .barra .marchio small { display: none; } }
