/* Lisa Medicare – Formazione infermieri
   Colori del marchio: blu navy #1A3A8F, oro #E8A020 */

:root {
  --navy: #1A3A8F;
  --navy-d: #12296a;
  --navy-l: #e8edf8;
  --gold: #E8A020;
  --gold-l: #fdf3e0;
  --ink: #1d2433;
  --muted: #5d6679;
  --line: #dde2ec;
  --bg: #f5f7fb;
  --card: #ffffff;
  --ok: #1f8a4c;
  --ok-l: #e5f5ec;
  --ko: #c0392b;
  --ko-l: #fbe9e7;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 80, .06), 0 4px 16px rgba(16, 32, 80, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Malayalam", "Noto Sans Tamil", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Sinhala", "Noto Sans Telugu", "Noto Sans Kannada", "Noto Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: var(--navy); }
img { max-width: 100%; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: .4rem 0 .6rem; color: var(--navy); }
h2 { font-size: 1.2rem; margin: 1.4rem 0 .6rem; color: var(--navy); }
h3 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; }
p { margin: .5rem 0; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.ic.big { width: 2rem; height: 2rem; }
[hidden] { display: none !important; }

/* ---------- barra superiore */
.topbar { background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; gap: 1rem; justify-content: space-between; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.logo { width: 42px; height: 42px; border-radius: 50%; background: #fff; object-fit: contain; flex: none; padding: 3px; box-shadow: 0 0 0 2px var(--gold); }
.logo-text { display: inline-grid; place-items: center; color: var(--navy); font-weight: 800; font-size: .95rem; border: 2px solid var(--gold); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-size: 1.02rem; letter-spacing: .01em; }
.brand-txt small { color: #cfd8f2; font-size: .78rem; }
.mainnav { display: flex; gap: .2rem; flex-wrap: wrap; }
.mainnav a { color: #dfe6fa; text-decoration: none; padding: .45rem .6rem; border-radius: 8px; display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; position: relative; }
.mainnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-lang, .nav-out { margin: 0; display: inline-flex; align-items: center; }
.nav-lang label { display: inline-flex; align-items: center; gap: .3rem; color: #dfe6fa; padding: .3rem .4rem; margin: 0; font-weight: 400; }
.nav-lang select { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: .3rem .4rem; font-size: .85rem; width: auto; min-height: 0; }
.nav-lang option { color: #111; }
.nav-out button { background: none; border: 0; color: #dfe6fa; padding: .45rem .6rem; border-radius: 8px; display: inline-flex; align-items: center; gap: .35rem; font-size: .92rem; cursor: pointer; font-family: inherit; }
.nav-out button:hover { background: rgba(255,255,255,.08); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mainnav a.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.badge { background: var(--gold); color: var(--navy-d); border-radius: 999px; font-size: .72rem; padding: 0 .4rem; min-width: 1.2rem; text-align: center; }

@media (max-width: 720px) {
  .topbar-in { gap: .4rem; }
  .mainnav { width: 100%; justify-content: space-between; }
  .mainnav a { flex-direction: column; gap: .1rem; font-size: .72rem; padding: .3rem .35rem; flex: 1; text-align: center; }
  .mainnav a .ic { width: 1.3rem; height: 1.3rem; }
  .nav-out button { flex-direction: column; gap: .1rem; font-size: .72rem; padding: .3rem .35rem; }
  .nav-out button .ic { width: 1.3rem; height: 1.3rem; }
  .mainnav .badge { position: absolute; top: 0; right: 18%; }
}

/* ---------- impaginazione */
.wrap { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
.wrap.narrow { max-width: 560px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; margin: 0 0 1rem; border: 1px solid var(--line); }
.card > h2:first-child, .card > h1:first-child { margin-top: .2rem; }
.grid2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.row-gap { display: flex; gap: .4rem; flex-wrap: wrap; }
.sec-title { margin-top: 2rem; }

.foot { border-top: 4px solid var(--gold); background: #fff; }
.foot-in { max-width: 1100px; margin: 0 auto; padding: .9rem 16px; font-size: .78rem; color: var(--muted); text-align: center; }

/* ---------- pulsanti e moduli */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 10px; padding: .62rem 1.05rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--navy-d); border-color: var(--navy-d); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-ghost { background: #fff; color: var(--navy); }
.btn-ghost:hover { background: var(--navy-l); color: var(--navy-d); }
.btn-sm { padding: .35rem .7rem; min-height: 36px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--ko); border-color: var(--ko); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.form { display: flex; flex-direction: column; gap: .75rem; }
.form.inline { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.form.inline input { flex: 1; min-width: 180px; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .93rem; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea { font: inherit; padding: .6rem .7rem; border: 1.5px solid #c8cfdd; border-radius: 9px; background: #fff; color: var(--ink); width: 100%; min-height: 44px; }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; min-height: 0; accent-color: var(--navy); }
textarea { resize: vertical; line-height: 1.5; }
.form.danger { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; }

.alert { padding: .75rem 1rem; border-radius: 10px; margin: 0 0 1rem; border-left: 5px solid; }
.alert-ok { background: var(--ok-l); border-color: var(--ok); }
.alert-err { background: var(--ko-l); border-color: var(--ko); }
.alert-warn { background: var(--gold-l); border-color: var(--gold); }

.pill { display: inline-block; padding: .35rem .8rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .9rem; margin: 0 .3rem .4rem 0; }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters { margin: .4rem 0 1rem; }
.tag { display: inline-block; font-size: .78rem; padding: .1rem .5rem; border-radius: 6px; background: #eef0f4; color: var(--muted); }
.tag.good { background: var(--ok-l); color: var(--ok); }

/* ---------- accesso */
.page-login .wrap { max-width: 1040px; padding-top: 24px; }
.landing { display: grid; gap: 1.2rem; grid-template-columns: 1fr; grid-template-areas: "hero" "login" "info"; }
@media (min-width: 900px) { .landing { grid-template-columns: 1.4fr 1fr; grid-template-areas: "hero login" "info login"; align-items: start; } .login-box { position: sticky; top: 100px; } }
.landing-hero { grid-area: hero; }
.login-box { grid-area: login; }
.landing-info { grid-area: info; }
.eyebrow { color: #9a6200; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin: 0; }
.landing-hero h1 { font-size: 1.9rem; margin: .3rem 0 .5rem; }
.lead { font-size: 1.08rem; color: var(--muted); }
.landing-courses { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .landing-courses { grid-template-columns: 1fr 1fr; } }
.lc { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--navy); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.lc h3 { color: var(--navy); margin: .6rem 0 .3rem; }
.lc p { color: var(--muted); font-size: .95rem; }
.landing-feat { list-style: none; padding: 0; margin: 1.1rem 0; display: grid; gap: .5rem; }
.landing-feat li { display: flex; gap: .5rem; align-items: flex-start; }
.landing-feat .ic { color: var(--ok); margin-top: .2rem; }
.landing-note { border-left: 3px solid var(--gold); padding-left: .7rem; }
.lang-pills { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; }

/* ---------- corsi */
.courses { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 1rem; }
@media (min-width: 760px) { .courses { grid-template-columns: 1fr 1fr; } }
.course-card { display: block; background: #fff; border-radius: var(--radius); padding: 1.1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); border-top: 5px solid var(--navy); transition: transform .12s; }
.course-card:hover { transform: translateY(-2px); }
.course-card h2 { margin: .4rem 0 .3rem; }
.course-card p { color: var(--muted); font-size: .95rem; }
.course-ic { color: var(--navy); background: var(--gold-l); border-radius: 12px; width: 52px; height: 52px; display: grid; place-items: center; flex: none; }
.course-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.course-head h1 { margin-top: 0; }
.bar { height: 8px; background: #e6e9f0; border-radius: 99px; overflow: hidden; margin: .6rem 0 .25rem; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), #3a5fc4); border-radius: 99px; }

.backlink { display: inline-flex; align-items: center; gap: .2rem; text-decoration: none; font-size: .92rem; margin-bottom: .4rem; }

.items { list-style: none; padding: 0; margin: 0; counter-reset: it; }
.item a { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; text-decoration: none; color: var(--ink); }
.item a:hover { border-color: var(--navy); }
.item-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--navy-l); color: var(--navy); }
.item-quiz .item-ic { background: var(--gold-l); color: #9a6200; }
.item-flash .item-ic { background: #eef7f1; color: var(--ok); }
.item-oral .item-ic { background: #f3ecfb; color: #6b3fa0; }
.item-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.item-txt small { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.item-txt strong { font-weight: 600; }
.item-st { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); }
.item.done .item-ic { background: var(--ok-l); color: var(--ok); }
.tick { color: var(--ok); }
.score { font-weight: 700; padding: .1rem .5rem; border-radius: 7px; font-size: .9rem; }
.score.good { background: var(--ok-l); color: var(--ok); }
.score.low { background: var(--gold-l); color: #8a5a00; }

.list { list-style: none; padding: 0; margin: 0; }
.list li > a, .list li.row-between { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list li > a > span:first-child { display: flex; flex-direction: column; }
.list.compact li > a, .list.compact li.row-between { padding: .5rem .1rem; }

/* ---------- lezioni */
.lesson { background: #fff; border-radius: var(--radius); padding: 1rem 1.1rem 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.lesson h1 { margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin: 0 0 1rem; }
.tab { background: none; border: none; font: inherit; padding: .55rem .9rem; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.tab.on { color: var(--navy); border-color: var(--gold); }
.md h2 { border-left: 4px solid var(--gold); padding-left: .55rem; }
.md table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.md th { background: var(--navy); color: #fff; text-align: left; padding: .5rem .6rem; font-weight: 600; }
.md td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; vertical-align: top; }
.md tr:nth-child(even) td { background: #f8f9fc; }
.table-wrap { overflow-x: auto; margin: .6rem 0; }
.md blockquote { margin: .8rem 0; padding: .7rem 1rem; background: var(--gold-l); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; }
.md li { margin: .25rem 0; }
.md code { background: #eef0f6; padding: 0 .3rem; border-radius: 4px; }
.md-tr { font-size: 1.02rem; }
.lesson-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; margin: 1rem 0; }
.prevnext { display: flex; gap: .5rem; }
.ok-line { color: var(--ok); font-weight: 600; }
.tr-loading { color: var(--muted); font-style: italic; }
@media (max-width: 640px) {
  .md table thead { display: none; }
  .md table, .md tbody, .md tr, .md td { display: block; width: 100%; }
  .md tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: .6rem; overflow: hidden; }
  .md td { border: none; border-bottom: 1px solid var(--line); }
  .md td::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--navy); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
  .md tr:nth-child(even) td { background: #fff; }
}

/* ---------- esercizi */
.intro { background: var(--navy-l); border-radius: 10px; padding: .7rem .9rem; }
.quiz-sec { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.quiz-sec h2 { margin-top: 0; }
.reading { background: #fbfaf6; border: 1px dashed #d9cfb5; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.qitem { padding: .8rem 0; border-top: 1px solid var(--line); }
.qitem:first-of-type { border-top: none; }
.qnum { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 700; margin-right: .4rem; flex: none; }
.qtext { font-weight: 600; display: flex; align-items: flex-start; gap: .2rem; margin-bottom: .5rem; }
.opts { display: flex; flex-direction: column; gap: .4rem; }
.opt { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; background: #fff; flex-direction: row; }
.opt:hover { border-color: var(--navy); }
.opt input { margin-top: .15rem; }
.opt.sel { border-color: var(--navy); background: var(--navy-l); }
.opt.right { border-color: var(--ok); background: var(--ok-l); }
.opt.wrong { border-color: var(--ko); background: var(--ko-l); }
.tf { flex-direction: row; }
.tf .opt { flex: 1; justify-content: center; }
.qtr { margin-top: .4rem; }
.qtr-box { background: var(--gold-l); border-radius: 8px; padding: .5rem .7rem; margin-top: .4rem; font-size: .95rem; }
.link-btn { background: none; border: none; color: var(--navy); font: inherit; font-size: .85rem; cursor: pointer; padding: .2rem 0; display: inline-flex; align-items: center; gap: .25rem; text-decoration: underline; }
.feedback { margin-top: .5rem; font-size: .92rem; padding: .5rem .7rem; border-radius: 8px; }
.feedback.ok { background: var(--ok-l); color: #135f33; }
.feedback.ko { background: var(--ko-l); color: #8c2318; }
.match-row, .cloze-row { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: .7rem 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .match-row { grid-template-columns: 1fr 1fr; align-items: center; } }
.bank { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 .8rem; }
.bank span { background: var(--navy-l); color: var(--navy); padding: .15rem .6rem; border-radius: 6px; font-weight: 600; font-size: .9rem; }
.audio-box { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: var(--navy-l); padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; }
.dict textarea { min-height: 180px; font-size: 1.05rem; }
.body-wrap { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) { .body-wrap { grid-template-columns: 300px 1fr; } }
.body-svg { max-width: 300px; margin: 0 auto; display: block; }
.body-list { display: grid; gap: .45rem; }
.body-list label { flex-direction: row; align-items: center; gap: .5rem; }
.body-list .qnum { margin: 0; }
.quiz-submit { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0 .6rem; display: flex; justify-content: center; gap: .6rem; }
.timer { position: fixed; right: 12px; bottom: 76px; background: var(--navy); color: #fff; padding: .4rem .8rem; border-radius: 99px; font-weight: 700; box-shadow: var(--shadow); z-index: 30; border: 2px solid var(--gold); }
.timer.low { background: var(--ko); }
.start-box { text-align: center; }

.result-head { display: flex; align-items: center; gap: 1rem; }
.big-score { font-size: 2.3rem; font-weight: 800; padding: .3rem .9rem; border-radius: 14px; }
.big-score.good { color: var(--ok); background: var(--ok-l); }
.big-score.low { color: #8a5a00; background: var(--gold-l); }
.res-item { display: flex; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--line); }
.res-item.open, .res-item:not(.ok):not(.ko) { display: block; }
.res-item .mark { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; }
.res-item.ok .mark { background: var(--ok-l); color: var(--ok); }
.res-item.ko .mark { background: var(--ko-l); color: var(--ko); }
.res-item .q { font-weight: 600; margin: 0 0 .2rem; }
.answer { background: #f8f9fc; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; white-space: normal; }
.teacher { background: var(--gold-l); border-radius: 8px; padding: .5rem .7rem; }
.diff { line-height: 2; }
.diff del { background: var(--ko-l); color: var(--ko); text-decoration: line-through; padding: 0 .2rem; border-radius: 4px; }
.diff ins { background: var(--ok-l); color: var(--ok); text-decoration: none; padding: 0 .2rem; border-radius: 4px; font-weight: 600; }
.transcript { margin-top: .8rem; }
.transcript summary { cursor: pointer; color: var(--navy); font-weight: 600; }

/* ---------- flashcard */
.flash { max-width: 520px; margin: 0 auto; }
.fcard { perspective: 1200px; height: 240px; cursor: pointer; margin: 1rem 0; }
.fcard-in { position: relative; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.fcard.flipped .fcard-in { transform: rotateY(180deg); }
.fface { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 1.2rem; text-align: center; font-size: 1.35rem; font-weight: 700; box-shadow: var(--shadow); }
.ffront { background: var(--navy); color: #fff; border-bottom: 6px solid var(--gold); }
.fback { background: #fff; color: var(--ink); transform: rotateY(180deg); border: 2px solid var(--navy); flex-direction: column; font-size: 1.1rem; font-weight: 600; overflow-y: auto; }
.fback .tr { font-size: .98rem; font-weight: 500; color: var(--muted); margin-top: .6rem; }
.fcount { text-align: center; color: var(--muted); }
.fbtns { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* ---------- orale */
.oral-q { font-size: 1.15rem; font-weight: 600; background: #fff; border-radius: var(--radius); padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 5px solid var(--gold); }
.oral-ctrl { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0; }
.oral audio { width: 100%; margin-top: .5rem; }
.rec-dot { display: inline-block; width: .7rem; height: .7rem; background: var(--ko); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- area docente */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: #fff; border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); border: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat b { font-size: 1.8rem; color: var(--navy); }
.stat span { font-size: .85rem; color: var(--muted); }
.stat.warn { border-color: var(--gold); background: var(--gold-l); }
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tbl th { background: var(--navy); color: #fff; text-align: left; padding: .6rem .7rem; font-size: .88rem; }
.tbl td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); font-size: .93rem; vertical-align: top; }
.tbl tr.inactive td { opacity: .5; }
@media (max-width: 720px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border-bottom: 2px solid var(--line); padding: .3rem 0; }
  .tbl td { border: none; padding: .25rem .7rem; }
  .tbl td::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
  .tbl td:first-child::before { content: none; }
}
.checklist { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.checklist li { display: flex; align-items: center; gap: .4rem; padding: .25rem 0; color: var(--muted); }
.checklist li.done { color: var(--ink); }
.checklist li.done .ic { color: var(--ok); }
.checklist .score { margin-left: auto; }
.dot { width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid #c8cfdd; display: inline-block; margin: 0 .25rem; }
.review .q { font-weight: 600; }
.review-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end; margin-top: .7rem; }
.review-row label:first-child { width: 120px; }
.review-row .grow { flex: 1; min-width: 220px; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .8rem; }
.logo-preview .logo { width: 84px; height: 84px; font-size: 1.6rem; }
.tr-row summary { cursor: pointer; }
pre.src { white-space: pre-wrap; background: #f8f9fc; padding: .7rem; border-radius: 8px; font-family: var(--font); font-size: .9rem; max-height: 420px; overflow: auto; }
.fb p { margin: .3rem 0 0; }

/* ---------- credenziali da stampare */
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.cred { border: 1.5px dashed #9aa6c2; border-radius: 10px; padding: .8rem; background: #fff; break-inside: avoid; }
.cred-head { display: flex; align-items: center; gap: .5rem; border-bottom: 3px solid var(--gold); padding-bottom: .4rem; margin-bottom: .4rem; color: var(--navy); }
.cred-head .logo { width: 32px; height: 32px; font-size: .7rem; }
.cred p { margin: .2rem 0; }

/* ---------- stampa */
@media print {
  .topbar, .foot, .toolbar, .noprint, .lesson-foot, .backlink, .mainnav, .tabs, .quiz-submit, .timer { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .lesson, .card { box-shadow: none; border: none; }
  .md th { background: #1A3A8F !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- lingue da destra a sinistra */
[dir=rtl] .md h2 { border-left: none; border-right: 4px solid var(--gold); padding-left: 0; padding-right: .55rem; }

/* registrazione */
.reg-box { max-width: 520px; margin: 0 auto; }
.reg-box h1 { margin-top: 0; font-size: 1.5rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-cta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #e3e7ef); text-align: center; }
.reg-cta p { margin: 0 0 8px; font-weight: 600; }

/* registrazione */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reg-box { max-width: 520px; margin: 1.5rem auto; }
.grid2.tight { gap: .75rem; }
.signup-cta { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line, #e5e7ef); text-align: center; }
.signup-cta p { margin: 0 0 .5rem; font-weight: 600; }

/* scale */
.scale-total { margin: .6rem 0 .2rem; padding: .7rem .9rem; border-radius: 10px; background: #eef2fb; border-left: 4px solid var(--navy); font-weight: 600; color: var(--navy); }
.scale-total.ok { background: #e9f7ef; border-left-color: #1f9d55; }
.scale-total.ko { background: #fdf0ee; border-left-color: #c0392b; }
.scale-total .small, .scale-total small { font-weight: 400; color: var(--ink); }

/* domande al docente */
.ask { margin-top: 1.2rem; }
.qa { border-left: 3px solid var(--line); padding: .3rem 0 .3rem .8rem; margin: .6rem 0; }
.qa-q { margin: .2rem 0; }
.qa-a { margin: .3rem 0; background: #eef2fb; border-radius: 8px; padding: .5rem .7rem; }
.row-gap { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
/* avvisi */
.events-box { border-left: 5px solid var(--gold); }
.events-box ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.wa-btn { background: #1f9d55; color: #fff !important; border-color: #1f9d55; }
.wa-btn:hover { background: #18804a; }

/* prova orale con esaminatore AI */
.oralai { margin-top: 1rem; }
.oa-log { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.oa-bubble { max-width: 88%; padding: .65rem .9rem; border-radius: 14px; background: #fff; border: 1px solid #e3e7ef; }
.oa-bubble small { display: block; color: #6b7385; font-size: .75rem; margin-bottom: .2rem; }
.oa-bubble p { margin: 0 0 .3rem; line-height: 1.45; }
.oa-bubble.ex { align-self: flex-start; background: #eef2fb; border-color: #d6def2; border-bottom-left-radius: 4px; }
.oa-bubble.me { align-self: flex-end; background: #fdf6e7; border-color: #f0e2bf; border-bottom-right-radius: 4px; }
.oa-controls { display: flex; flex-direction: column; gap: .7rem; position: sticky; bottom: .5rem; }
.oa-mic { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-size: 1.05rem; padding: .9rem 1rem; }
.oa-mic svg { width: 22px; height: 22px; }
.oa-mic.rec { background: #c0392b; border-color: #c0392b; animation: oaPulse 1.4s ease-in-out infinite; }
@keyframes oaPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); } 50% { box-shadow: 0 0 0 10px rgba(192,57,43,0); } }
.oa-text { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #d5dae4; border-radius: 10px; resize: vertical; }
.oa-status:empty { display: none; }
.oa-score { display: grid; grid-template-columns: 9.5rem 1fr 3rem; align-items: center; gap: .6rem; }
.oa-score .bar { margin: 0; }
.oa-score strong { text-align: right; }
.oa-eval h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.oa-corr { padding-left: 1.1rem; }
.oa-corr li { margin-bottom: .45rem; }
.oa-corr del { color: #b03a2e; }
.oa-corr ins { color: #1e7b45; text-decoration: none; font-weight: 600; }
@media (max-width: 520px) { .oa-score { grid-template-columns: 7rem 1fr 2.6rem; font-size: .9rem; } .oa-bubble { max-width: 96%; } }
@media (prefers-reduced-motion: reduce) { .oa-mic.rec { animation: none; } }

/* iscrizioni da approvare */
.waiting-box { border-left: 5px solid var(--gold); }
.waiting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.waiting-row select { padding: .35rem .5rem; border-radius: 8px; border: 1px solid #d5dae4; font: inherit; }

/* iscrizioni da approvare */
.waiting-box { border-left: 5px solid var(--gold); }
.waiting-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.waiting-row select { padding: .35rem .5rem; border-radius: 8px; border: 1px solid #d5dae4; font: inherit; }

/* traduzioni in malayalam: testo e voce */
[lang="ml"] { font-family: "Noto Sans Malayalam", "Nirmala UI", "Kartika", system-ui, sans-serif; line-height: 1.7; }
.tr-tools { margin-top: .4rem; }
.tr-listen { font-size: .9rem; }
.feedback .xt { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed currentColor; }
.fbtns .tr-listen { align-self: center; }

/* ---- v1.1: simulazioni, Lisa, live, oggi */
.tag.bad { background: var(--ko-l); color: var(--ko); }
.badge.live { background: #d93025; color: #fff; font-size: .55rem; line-height: 1rem; }
.sim-dots { display: flex; gap: .5rem; margin: .2rem 0 .6rem; }
.sim-dots span { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); color: var(--muted); font-weight: 700; background: #fff; }
.sim-dots span.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.sim-dots span .ic { width: 1.1rem; height: 1.1rem; }
.sim-dots.small span { width: 1.7rem; height: 1.7rem; font-size: .8rem; }
.sim-parts { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sim-parts li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem .6rem; border-radius: 8px; background: #f2f4f8; font-size: .9rem; }
.sim-parts li.ok { background: var(--ok-l); color: var(--ok); }
.sim-parts li.ko { background: var(--ko-l); color: var(--ko); }
.sim-parts li.pend { background: var(--gold-l); color: #8a5a00; }
.sim-row { border-top: 1px solid var(--line); padding-top: .6rem; margin-top: .6rem; }
section.sim-row:first-of-type { border-top: 0; }
.sim-row-h { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sim-card { text-decoration: none; color: inherit; display: block; }
.sim-card:hover { border-color: var(--navy); }
.sim-action .btn { margin-top: .3rem; }
.lisa-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.lisa-head h1 { margin: 0; }
.lisa-head p { margin: 0; }
.lisa-new { margin-left: auto; }
.lisa-av { width: 2.8rem; height: 2.8rem; border-radius: 50%; background: linear-gradient(135deg, var(--navy), #3f63c9); color: #fff; font-weight: 800; font-size: 1.3rem; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--gold); flex: none; }
.lisa { margin-top: .8rem; }
.lisa-log { display: flex; flex-direction: column; gap: .6rem; min-height: 40vh; }
.lisa-txt p { margin: 0 0 .4rem; line-height: 1.5; }
.lisa-txt ul { margin: .2rem 0 .4rem 1.1rem; padding: 0; }
.lisa-b.wait p { color: var(--muted); font-style: italic; }
.lisa-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem 0 .3rem; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid #d6def2; background: #fff; color: var(--navy); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--navy-l); }
.lisa-bar { position: sticky; bottom: 0; background: var(--bg); padding: .5rem 0; display: flex; gap: .5rem; align-items: flex-end; }
.lisa-in { flex: 1; min-height: 3rem; resize: vertical; }
.lisa-btns { display: flex; gap: .4rem; }
.lisa-mic.rec { background: var(--ko); color: #fff; border-color: var(--ko); }
.lisa-micsw { text-align: right; }
.lisa-left, .lisa-note { margin-top: .3rem; }
.lisa-mini { display: flex; gap: .7rem; align-items: center; margin-bottom: .4rem; }
.lisa-mini small { display: block; }
.today-plan .items { margin: .4rem 0 .8rem; }
.live-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: #d93025; box-shadow: 0 0 0 0 rgba(217, 48, 37, .6); animation: livepulse 1.6s infinite; vertical-align: middle; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(217, 48, 37, .55); } 70% { box-shadow: 0 0 0 10px rgba(217, 48, 37, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 48, 37, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-now { border-left: 4px solid #d93025; }
.live-banner { display: block; text-decoration: none; color: inherit; }
.live-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; padding: .55rem .2rem; }
.live-row > span { display: flex; flex-direction: column; flex: 1 1 14rem; }
.live-q { margin-top: .8rem; }
.live-q textarea { width: 100%; }
.live-list { list-style: none; padding: .5rem 1rem; }
.live-list li { display: flex; gap: .4rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.live-list li.done { opacity: .5; }
.live-list li span:nth-child(2) { flex: 1; }
form.inline { display: inline; }
.profile-links { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.plink { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--navy); font-weight: 600; position: relative; }
.plink .badge { margin-left: auto; }
.ready-box { border-left: 4px solid var(--ok); }
.narrow { max-width: 560px; margin: 2rem auto; }
@media (max-width: 720px) {
  .mainnav a { padding: .3rem .15rem; }
}
a.card { display: block; text-decoration: none; color: inherit; }
a.card.fb p { color: var(--ink); }
