/* =====================================================================
   DocentiSmart — sistema grafico
   Principio: intuitivo per chiunque. Una azione principale per schermata,
   pulsanti grandi (min 48px), testi chiari, contrasto alto, focus visibile.
   ===================================================================== */
/* Caratteri (licenza SIL OFL, ospitati sul nostro server: nessun servizio esterno). */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/BricolageGrotesque-Regular.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/InstrumentSans-Italic.ttf") format("truetype"); font-style: italic; font-display: swap; }

:root {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --bg: #faf8f4;            /* sfondo caldo, riposante */
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #1d1b2e;           /* testo */
  --muted: #5d5b6e;
  --line: #e4e0d8;
  --brand: #4f46e5;         /* indaco: identità */
  --brand-2: #7c3aed;       /* viola: gradienti */
  --brand-ink: #ffffff;
  --brand-soft: #eceafd;
  --cta: #ff6b4a;           /* corallo: SOLO azioni principali */
  --cta-hover: #f0532f;
  --cta-ink: #ffffff;
  --sun: #ffd166;           /* evidenziatore */
  --ok: #157a4a; --ok-soft: #e2f5ea;
  --warn: #8a5a00; --warn-soft: #fff3d1;
  --err: #b42318; --err-soft: #fde8e6;
  --focus: #ffb703;
  --radius: 16px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(29, 27, 46, .05), 0 8px 24px rgba(29, 27, 46, .07);
  --shadow-lg: 0 18px 50px rgba(79, 70, 229, .18);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12111c; --surface: #1b1a29; --surface-2: #252338; --ink: #efedf8; --muted: #aeaac4; --line: #34314c;
    --brand: #8b84ff; --brand-2: #b08cff; --brand-ink: #12111c; --brand-soft: #2a2752;
    --cta: #ff8a6f; --cta-hover: #ff9f88; --cta-ink: #1b0f0b;
    --ok: #63d89c; --ok-soft: #173326; --warn: #f3c56b; --warn-soft: #3a2f14; --err: #ff8a80; --err-soft: #3d1b19;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.mt0 { margin-top: 0; }
h1, h2, h3, .brand-name, .step-n, .btn.cta, .code.big { font-family: var(--font-display); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; margin: .2em 0 .45em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 800; margin: 1.4em 0 .5em; }
h3 { font-size: 1.15rem; font-weight: 700; }
.lead { font-size: 1.12rem; color: var(--muted); margin-top: 0; }

/* ---------- intestazione ---------- */
.topbar { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 900; font-size: 1.25rem; letter-spacing: -0.02em; background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button { font: inherit; font-size: .95rem; font-weight: 600; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer; min-height: 42px; display: inline-flex; align-items: center; }
.nav a:hover, .nav button:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav a.nav-cta { background: var(--cta); color: var(--cta-ink); padding: 9px 16px; box-shadow: 0 4px 14px color-mix(in srgb, var(--cta) 35%, transparent); }
.nav a.nav-cta:hover { background: var(--cta-hover); }
.nav a.nav-cta[aria-current="page"] { background: var(--brand); color: var(--brand-ink); }

/* ---------- contenitori ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 24px 20px 56px; }
main > section { max-width: 920px; margin: 0 auto; }
main > section.wide { max-width: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 16px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.loading-page { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ---------- pulsanti ---------- */
.btn { font: inherit; font-weight: 700; font-size: 1rem; border-radius: 12px; padding: 12px 22px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); cursor: pointer; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; box-shadow: none; }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); font-size: 1.08rem; padding: 14px 26px; }
.btn.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); box-shadow: 0 8px 22px color-mix(in srgb, var(--cta) 40%, transparent); }
.btn.secondary { background: var(--surface); color: var(--brand); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); font-weight: 600; }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.danger { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 60%, transparent); }
.btn.small { padding: 7px 12px; min-height: 38px; font-size: .9rem; border-radius: 10px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btns.spread { justify-content: space-between; }
.btns.center { justify-content: center; }
.oauth { display: grid; gap: 10px; }

/* ---------- moduli ---------- */
label, .label { display: block; font-weight: 700; margin-bottom: 6px; }
.hint { color: var(--muted); font-size: .88rem; font-weight: 500; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--brand); }
details.more { border: 2px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
details.more summary { cursor: pointer; font-weight: 700; }
.video-box[open] { border-style: solid; }
.video-steps { margin: 4px 0 0; padding-left: 1.4em; display: grid; gap: 4px; }

/* ---------- avvisi, badge, liste ---------- */
.notice { border-radius: 14px; padding: 14px 16px; border: 1px solid; }
.notice p { margin: .25em 0; }
.notice.info { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice.err { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 14px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list.card { padding-top: 6px; padding-bottom: 6px; }
.meta { color: var(--muted); font-size: .88rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.tabs button { font: inherit; font-weight: 700; padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; color: var(--muted); cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; z-index: 60; max-width: 92vw; font-weight: 600; box-shadow: var(--shadow-lg); }
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- HOME ---------- */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 5vw, 56px); background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--sun) 55%, transparent) 0 120px, transparent 260px), linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.1rem); margin: .1em 0 .35em; }
.hero h1 mark { background: linear-gradient(transparent 60%, color-mix(in srgb, var(--sun) 85%, transparent) 60%); color: inherit; padding: 0 .1em; }
.hero p.lead { color: rgba(255,255,255,.92); font-size: clamp(1.05rem, 1.6vw, 1.22rem); max-width: 38em; }
.kicker { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .9rem; }
.hero .btns { margin-top: 22px; }
.hero .btn.secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.65); }
.hero .btn.secondary:hover { background: rgba(255,255,255,.22); }
.trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; font-size: .92rem; color: rgba(255,255,255,.9); font-weight: 600; }
.trust span::before { content: "✓ "; color: var(--sun); font-weight: 900; }
.hero-art { justify-self: end; width: 100%; max-width: 560px; margin: -10px -14px -24px 0; }
.hero-art img { width: 100%; height: auto; display: block; }
.level .art { display: block; width: calc(100% + 48px); max-width: none; height: auto; margin: -24px -24px 14px; border-radius: var(--radius) var(--radius) 0 0; }
.level { overflow: hidden; }
.section { margin-top: 56px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.section-head h2 { margin: 0 0 .3em; font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px 22px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; transition: transform .12s, box-shadow .15s; }
.step:hover, .tool:hover, .level:hover, .action:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.step-n { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; background: var(--brand); color: var(--brand-ink); margin-bottom: 12px; }
.step h3 { margin: 0 0 .3em; }
.step p { margin: 0; color: var(--muted); }
.step .go { display: inline-block; margin-top: 12px; font-weight: 800; color: var(--brand); }
.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s; }
.tool-badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 1.15rem; color: #fff; }
.tool strong { display: block; }
.tool span.d { color: var(--muted); font-size: .88rem; line-height: 1.4; display: block; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.level { border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .12s, box-shadow .15s; display: block; }
.level .em { font-size: 2.6rem; line-height: 1; }
.level h3 { margin: .4em 0 .2em; }
.level p { margin: 0; color: var(--muted); }
.band { margin-top: 56px; border-radius: 28px; padding: clamp(26px, 4vw, 44px); background: var(--ink); color: var(--bg); display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
@media (prefers-color-scheme: dark) { .band { background: var(--surface-2); color: var(--ink); } }
.band h2 { margin-top: 0; color: inherit; }
.band ul { padding-left: 0; list-style: none; margin: 0; }
.band li { padding: 6px 0 6px 30px; position: relative; }
.band li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--cta); color: #fff; font-size: .8rem; display: grid; place-items: center; font-weight: 900; }
.band .panel { background: color-mix(in srgb, var(--bg) 8%, transparent); border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); border-radius: 18px; padding: 20px; }
.rules { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: r; }
.rule { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; box-shadow: var(--shadow); }
.rule strong { display: block; margin-bottom: 4px; }
.rule strong::before { counter-increment: r; content: counter(r); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--sun); color: #3a2a00; font-weight: 900; margin-right: 8px; font-size: .9rem; }
.rule p { margin: 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 960px) { .tools { grid-template-columns: repeat(2, 1fr); } .rules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .hero, .band { grid-template-columns: 1fr; } .hero-art { display: none; } .steps, .levels { grid-template-columns: 1fr; } }

/* ---------- guida ---------- */
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.toc strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 8px 4px; }
.toc a { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.toc a:hover { background: var(--surface-2); }
.toc a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .toc { position: static; display: none; } }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); overflow-x: auto; box-shadow: var(--shadow); }
.result h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.result h2 { font-size: 1.3rem; } .result h3 { font-size: 1.08rem; }
.result table { border-collapse: separate; border-spacing: 0; width: 100%; margin: 14px 0; font-size: .95rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.result th, .result td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.result th { background: var(--brand-soft); color: var(--ink); font-weight: 800; }
.result tr:last-child td { border-bottom: 0; }
.result tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.result blockquote { border-left: 4px solid var(--brand); margin: 12px 0; padding: 6px 14px; color: var(--muted); }
.result code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.result li { margin: .3em 0; }
.guide { font-size: 1.05rem; }
.guide h1 { margin-top: 0; }
.guide h2 { margin-top: 1.8em; display: flex; align-items: center; gap: 10px; }
.guide h2::before { content: ""; width: 8px; height: 1.1em; border-radius: 4px; background: linear-gradient(var(--brand), var(--brand-2)); flex: none; }
.guide > p:first-of-type { font-size: 1.12rem; }
.guide blockquote { background: var(--brand-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-left: 6px solid var(--brand); border-radius: 14px; padding: 16px 18px; font-size: 1rem; }
.guide blockquote .copy { display: flex; width: fit-content; margin-top: 12px; }
.guide a[target=_blank] { word-break: break-word; }
.guide-next { margin-top: 18px; }

/* ---------- assistente ---------- */
.grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.action { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: flex-start; min-height: 110px; transition: transform .12s, box-shadow .15s, border-color .15s; }
.action:hover { border-color: var(--brand); }
.action .ico { font-size: 1.9rem; line-height: 1; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); flex: none; }
.action strong { display: block; font-size: 1.08rem; margin-bottom: 2px; }
.action span.desc { color: var(--muted); font-size: .93rem; }
@media (max-width: 640px) { .grid4 { grid-template-columns: 1fr; } }
.editor { width: 100%; min-height: 420px; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; }

/* ---------- giochi ---------- */
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fmt { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: flex; gap: 10px; cursor: pointer; min-height: 72px; }
.fmt .ico { font-size: 1.5rem; }
.fmt.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.fmt .desc { display: block; color: var(--muted); font-size: .86rem; }
.fmt .badge { margin-left: 6px; }
.filters { align-items: end; }
.item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0; background: var(--surface); }
.item legend { font-weight: 800; padding: 0 6px; }
.fld { display: block; font-weight: 600; margin: 8px 0; }
.fld > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.row.tight { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt { display: flex; gap: 10px; align-items: center; margin: 4px 0; }
.opt input[type=radio] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.opt input[type=text] { flex: 1; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .15em; }
.code.big { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 900; margin: .1em 0; color: var(--brand); }
.code-input { font-size: 2rem; text-transform: uppercase; letter-spacing: .3em; text-align: center; max-width: 340px; font-weight: 800; }
.player { background: var(--surface); }
.player-head h2 { margin-top: 0; }
.player-instr { font-size: 1.1rem; }
.stage { margin-top: 12px; }
.q { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qtext { font-size: 1.35rem; font-weight: 700; margin: .3em 0; }
.emo { font-size: 2.8rem; line-height: 1; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0; }
.choice { font: inherit; font-size: 1.12rem; font-weight: 600; min-height: 60px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); transition: transform .08s, border-color .15s; }
.choice:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-2px); }
.choice.sel { border-color: var(--brand); background: var(--brand-soft); }
.choice.right { border-color: var(--ok); background: var(--ok-soft); }
.choice.wrong { border-color: var(--err); background: var(--err-soft); }
.choice:disabled { cursor: default; }
.choice .emo, .card-m .emo { font-size: 1.9rem; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.match .col { display: grid; gap: 12px; align-content: start; }
.memory { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.card-m { font: inherit; min-height: 120px; border-radius: 16px; border: 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 1.8rem; font-weight: 900; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; box-shadow: var(--shadow); transition: transform .12s; }
.card-m:hover:not(:disabled) { transform: translateY(-3px) rotate(-1deg); }
.card-m.up { background: var(--surface); color: var(--ink); font-size: 1.02rem; font-weight: 700; border: 2px solid var(--brand); }
.card-m.right { border-color: var(--ok); background: var(--ok-soft); }
.seq { padding-left: 1.4em; }
.seq li { display: flex; gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; background: var(--surface); font-weight: 600; }
.seq li > span:nth-child(2) { flex: 1; }
.seq li.right { border-color: var(--ok); background: var(--ok-soft); }
.seq li.wrong { border-color: var(--err); background: var(--err-soft); }
.flash { border: 3px dashed var(--brand); border-radius: 18px; padding: 24px; text-align: center; margin: 12px 0; background: var(--brand-soft); }
.flash-back { margin-top: 12px; }
.gap { border-bottom: 3px solid var(--brand); padding: 0 10px; }
.end { text-align: center; padding: 10px 0; }
.big { font-size: 3.4rem; margin: 0; }
.say { margin-left: 6px; }
.lim-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 80; overflow: auto; padding: 18px 28px 48px; }
.lim-bar { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-bottom: 12px; }
.lim-bar strong { margin-right: auto; font-size: 1.1rem; }
.lim .player-head h2 { font-size: 2.4rem; }
.lim .player-instr { font-size: 1.6rem; }
.lim .meta { font-size: 1.2rem; }
.lim .qtext { font-size: 2.2rem; }
.lim .choice { font-size: 1.7rem; min-height: 90px; }
.lim .emo { font-size: 4.2rem; }
.lim .card-m { min-height: 170px; font-size: 2.6rem; }
body.lim-xl .lim .qtext, body.lim-xl .lim .choice { font-size: 2.6rem; }
@media (max-width: 640px) { .match { gap: 8px; } .choice { font-size: 1rem; min-height: 54px; } }

/* ---------- accesso / registrazione ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; max-width: 1040px !important; }
.auth-intro h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.kicker.dark { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding: 7px 0 7px 32px; position: relative; font-weight: 600; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; font-size: .8rem; display: grid; place-items: center; font-weight: 900; }
.auth-card { padding: 26px; }
.auth-narrow { max-width: 520px !important; margin-top: 30px !important; }
.btn.wide { width: 100%; }
.pw { display: flex; gap: 8px; align-items: center; }
.pw input { flex: 1; }
input[type=password] { width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
.btn.social { background: var(--surface); color: var(--ink); border-color: var(--line); width: 100%; }
.btn.social:hover { border-color: var(--brand); }
.or { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 0; display: flex; align-items: center; gap: 10px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center-text { text-align: center; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } }

/* ---------- footer del sito ---------- */
.site-foot { background: var(--surface); border-top: 1px solid var(--line); margin-top: 40px; }
.site-foot-in { max-width: 1180px; margin: 0 auto; padding: 36px 20px 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 24px; }
.foot-col a[href^="mailto:"] { overflow-wrap: anywhere; }
.site-foot .brand-name { font-size: 1.4rem; }
.foot-brand p { color: var(--muted); margin: .5em 0 0; max-width: 30em; }
.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-col strong { margin-bottom: 4px; }
.foot-col a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot-col a:hover { color: var(--brand); }
.foot-note { max-width: 1180px; margin: 0 auto; padding: 14px 20px 30px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .site-foot-in { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- inclusione in fabiofidone.it (solo se SITE_LAYOUT=fabiofidone) ---------- */
.layout-frame { display: block; width: 100%; border: 0; overflow: hidden; background: transparent; }
.layout-frame-nav { height: 52px; }
.layout-frame-footer { height: 80px; }
@media (max-width: 720px) { .layout-frame-footer { height: 120px; } }

/* ---------- telefono ---------- */
@media (max-width: 640px) {
  html { font-size: 16px; }
  main { padding: 16px 14px 40px; }
  .topbar { position: static; }
  .topbar-in { padding: 10px 14px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .nav a, .nav button { white-space: nowrap; }
  .card { padding: 16px; }
  .hero { border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .layout-frame, .topbar, .site-foot, .btns, .tabs, .lim-overlay, details.more summary, .say, #toast, .toc { display: none !important; }
  details.more > * { display: block !important; }
  body { background: #fff; color: #000; }
  .card, .result { box-shadow: none; border: 0; }
}

.home-cover { margin: 0 0 24px; overflow: hidden; border-radius: 28px; box-shadow: var(--shadow-lg); background: #f7f5f0; }
.home-cover img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .home-cover { margin-bottom: 16px; border-radius: 20px; } }

.prompt-locked { position: relative; overflow: hidden; min-height: 190px; border-radius: 18px; }
.prompt-locked blockquote { min-height: 190px; margin: 0; filter: blur(7px); user-select: none; pointer-events: none; opacity: .7; }
.prompt-lock-gate { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--ink); background: color-mix(in srgb, var(--paper) 72%, transparent); backdrop-filter: blur(2px); }
.prompt-lock-gate strong { font-size: 1.15rem; }
.prompt-lock-gate span { max-width: 36rem; }

/* Banner consenso statistiche (GA4) - DocentiSmart, 20/11/2026 */
.consenso{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:1000;max-width:42rem;margin:0 auto;
  background:#fff;color:#1f2937;border:1px solid #d1d5db;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.15);
  padding:1rem 1.25rem;display:flex;flex-wrap:wrap;gap:.75rem 1rem;align-items:center}
.consenso p{margin:0;flex:1 1 18rem;font-size:.95rem;line-height:1.45}
.consenso a{text-decoration:underline}
.consenso-btns{display:flex;gap:.5rem;flex:0 0 auto}
.consenso-btns .btn{min-height:44px;padding:.55rem 1.1rem}
@media (max-width:480px){.consenso{left:.5rem;right:.5rem;bottom:.5rem}.consenso-btns{width:100%}.consenso-btns .btn{flex:1}}
