/* tutoro/polish.css */
/*
  Tutoro · rifiniture della landing (novembre 2026)
  Un solo foglio per home, funzioni, prezzi, centri studi e 404, caricato per ultimo nell'<head>.
  Tiene insieme tre cose:
    1. il respiro della pagina ora che le sezioni non sono più alte "uno schermo esatto" (system.css);
    2. il movimento: comparsa allo scroll, header che si fa vetro, parallasse dell'hero, luce sulle schede;
    3. i ritocchi di profondità (ombre, bordi, bande scure arrotondate).
  Regole di casa: tutto ciò che nasconde qualcosa vale solo con html.pl-js (lo mette polish.js), quindi
  senza script la pagina è intera; con prefers-reduced-motion niente si muove.
*/

/* ---------------------------------------------------------------- respiro */
@media (min-width: 640px) {
  :root { --padt: clamp(96px, 13svh, 128px); --padb: clamp(64px, 8svh, 88px); }
}
@media (max-width: 639px) {
  :root { --padt: 76px; --padb: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------------------------------------------------------------- header: vetro e avanzamento
   Il fondo sta su ::before (non sul .nav): un backdrop-filter sul .nav farebbe da contenitore al
   menu a tutto schermo del telefono, che è position: fixed dentro di lui. */
.nav { background: transparent; border-bottom-color: transparent; transition: border-color .3s ease, box-shadow .3s ease; }
.nav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); transition: background-color .3s ease; }
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 14px 34px -26px rgb(10 22 40 / .35); }
.nav.is-scrolled::before {
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(16px); backdrop-filter: saturate(170%) blur(16px);
}
.nav.is-open::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
/* la riga verde sotto l'header: quanta pagina hai letto */
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, #3cb371, #2f9c62);
  transform-origin: 0 50%; transform: scaleX(var(--pl-scroll, 0)); opacity: 0; transition: opacity .3s ease;
}
.nav.is-scrolled::after { opacity: 1; }
.nav.is-open::after { opacity: 0; }

/* ---------------------------------------------------------------- comparsa allo scroll
   polish.js mette .rv solo ai blocchi che al caricamento stanno sotto lo schermo, e .rv-in quando
   entrano. Si muove con translate (non transform), così chi ha già una rotazione o un hover suo li tiene. */
@media (prefers-reduced-motion: no-preference) {
  html.pl-js .rv { opacity: 0; }
  html.pl-js .rv.rv-in { animation: plRv .9s cubic-bezier(.16, 1, .3, 1) var(--rv-d, 0ms) both; }
  html.pl-js .rv.rv--big.rv-in { animation-name: plRvBig; animation-duration: 1.1s; }
  @keyframes plRv { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
  @keyframes plRvBig { from { opacity: 0; translate: 0 40px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
}
@media print { html.pl-js .rv { opacity: 1 !important; } }

/* ---------------------------------------------------------------- hero */
main > .hero { overflow: clip; }
/* una luce menta e inchiostro blu dietro la finestra, che respira piano */
main > .hero::before, main > .sub-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(46% 54% at 80% 36%, rgb(60 179 113 / .17), transparent 70%),
    radial-gradient(38% 44% at 98% 84%, rgb(47 93 168 / .10), transparent 70%),
    radial-gradient(34% 40% at 4% 6%, rgb(60 179 113 / .08), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent);
}
main > .sub-hero { isolation: isolate; overflow: clip; }
@media (prefers-reduced-motion: no-preference) {
  main > .hero::before, main > .sub-hero::before { animation: plAurora 14s ease-in-out infinite alternate; }
  @keyframes plAurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3%, 4%, 0) scale(1.1); } }
}

/* il collage dell'hero: la cornice ha un'altezza sua e la finestra finisce sempre sopra una fascia libera
   in fondo, così il post-it e il disegno hanno il loro posto a ogni altezza di schermo (prima il post-it
   copriva le righe della finestra appena lo schermo scendeva sotto i 900px, e sempre sul tablet) */
@media (min-width: 640px) {
  .hero--collage .hero__art { box-shadow: 0 40px 80px -56px rgb(10 22 40 / .45); }
  .hero--collage .hero__art > .ly-piece--main { bottom: var(--art-band, 150px); display: flex; flex-direction: column; }
  .hero--collage .hero__art > .ly-piece--main > .d-win__body { flex: 1 1 0; min-height: 0; }
  .hero--collage .hero__art .d-main { overflow: hidden; }
}
@media (min-width: 1024px) {
  .hero--collage .hero__art { min-height: clamp(520px, 100svh - 184px, 720px); }
}
/* tablet e telefono: sotto le parole la cornice non ha più "il resto dello schermo" da prendere */
@media (max-width: 1023px) {
  .hero--collage .hero__art { flex: none; height: clamp(440px, 62vw, 540px); --art-band: 132px; }
}
@media (max-width: 639px) {
  .hero--collage .hero__art { height: 320px; }
}
/* parallasse del puntatore: tre profondità (polish.js scrive --px e --py, da -1 a 1) */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero__art > .ly-piece--main { translate: calc(var(--px, 0) * -7px) calc(var(--py, 0) * -6px); transition: translate .6s cubic-bezier(.2, .7, .2, 1); }
  .hero__art > .ly-piece--note { translate: calc(var(--px, 0) * 12px) calc(var(--py, 0) * 10px); transition: translate .6s cubic-bezier(.2, .7, .2, 1); }
  .hero__art > .doodle { translate: calc(var(--px, 0) * 20px) calc(var(--py, 0) * 14px); transition: translate .6s cubic-bezier(.2, .7, .2, 1); }
}
/* le righe della finestra entrano una dopo l'altra, e la lezione "In corso" ha il puntino vivo */
@media (prefers-reduced-motion: no-preference) {
  .hero__art .d-row { animation: plRow .7s cubic-bezier(.16, 1, .3, 1) both; }
  .hero__art .d-row:nth-child(1) { animation-delay: .45s; }
  .hero__art .d-row:nth-child(2) { animation-delay: .53s; }
  .hero__art .d-row:nth-child(3) { animation-delay: .61s; }
  .hero__art .d-row:nth-child(4) { animation-delay: .69s; }
  .hero__art .d-row:nth-child(5) { animation-delay: .77s; }
  @keyframes plRow { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
  .hero__art .d-row:nth-child(2) .d-chip::before { animation: plPulse 1.8s ease-out infinite; }
  @keyframes plPulse { 0% { box-shadow: 0 0 0 0 rgb(23 103 63 / .55); } 70%, 100% { box-shadow: 0 0 0 6px rgb(23 103 63 / 0); } }
}

/* ---------------------------------------------------------------- bottoni
   Il primario ha un po' di corpo (luce in alto, ombra verde sotto) e un riflesso che lo attraversa. */
.btn--primary {
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .32), 0 1px 2px rgb(13 60 36 / .22), 0 12px 26px -14px rgb(31 122 77 / .75);
}
.btn--primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; translate: -130% 0;
  background: linear-gradient(105deg, transparent 32%, rgb(255 255 255 / .42) 50%, transparent 68%);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .btn--primary:hover::before { translate: 130% 0; transition: translate .75s cubic-bezier(.2, .7, .2, 1); }
  .btn--primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .32), 0 1px 2px rgb(13 60 36 / .22), 0 18px 34px -14px rgb(31 122 77 / .8); }
}

/* ---------------------------------------------------------------- schede dei piani
   Si alzano sotto il puntatore, con una luce menta che lo segue (--mx, --my da polish.js). */
.card--plan { transition: translate .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease, border-color .3s ease; }
.card--plan > * { position: relative; z-index: 1; }
.card--plan::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), rgb(60 179 113 / .16), transparent 68%);
}
.card--plan.is-featured {
  background: linear-gradient(180deg, color-mix(in oklab, var(--action) 9%, var(--card)), var(--card) 46%);
  box-shadow: inset 0 0 0 1px var(--action), 0 30px 64px -44px rgb(31 122 77 / .6);
}
@media (hover: hover) and (pointer: fine) {
  .card--plan:hover::before { opacity: 1; }
  .card--plan:hover { translate: 0 -6px; box-shadow: 0 34px 64px -40px rgb(10 22 40 / .42); }
  .card--plan.is-featured:hover { box-shadow: inset 0 0 0 1px var(--action), 0 38px 70px -40px rgb(31 122 77 / .7); }
}
@media (prefers-reduced-motion: reduce) { .card--plan:hover { translate: none; } }
/* in una scheda stretta il prezzo resta intero: va a capo il "Consigliato", non il simbolo dell'euro */
.card--plan .price { flex-wrap: wrap; row-gap: var(--s-2); }
.card--plan .price .t-stat { white-space: nowrap; }

/* ---------------------------------------------------------------- la grande finestra che "atterra"
   Dove il browser sa animare sullo scroll, .tilt-in arriva inclinata e si raddrizza mentre sale
   (altrove resta piana e compare come gli altri blocchi). */
.tilt-in { box-shadow: 0 1px 2px rgb(10 22 40 / .06), 0 50px 90px -60px rgb(10 22 40 / .5); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
    .tilt-in {
      transform-origin: 50% 0;
      animation: plTilt linear both; animation-timeline: view(); animation-range: entry 0% cover 34%;
    }
    @keyframes plTilt {
      from { opacity: .3; transform: perspective(1800px) rotateX(11deg) scale(.94); }
      55% { opacity: 1; }
      to { opacity: 1; transform: perspective(1800px) rotateX(0deg) scale(1); }
    }
  }
}

/* ---------------------------------------------------------------- la banda scura (la lavagna)
   Non più una fascia da bordo a bordo: una lavagna appoggiata sulla pagina, con gli angoli tondi.
   Il .wrap si allarga di quanto la banda rientra, così i suoi bordi restano sulle righe della pagina. */
main > section.ground-inverse {
  --band-in: clamp(8px, 1.4vw, 20px);
  margin-inline: var(--band-in); border-radius: clamp(20px, 2.6vw, 40px); overflow: clip;
  box-shadow: 0 50px 90px -70px rgb(10 22 40 / .7);
  padding-block: clamp(72px, 10svh, 112px);   /* una lavagna ha lo stesso margine sopra e sotto */
}
main > section.ground-inverse > :is(.wrap, .container) { width: min(100% - 2 * (var(--gut) - var(--band-in)), var(--container)); }
/* un'ancora sulla lavagna lascia vedere il suo bordo sotto l'header */
main > section.ground-inverse { scroll-margin-top: 24px; }
/* i fogli a quadretti sulla lavagna si sollevano sotto il puntatore */
main > section.ground-inverse .card--open > .panel { transition: translate .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  main > section.ground-inverse .card--open:hover > .panel { translate: 0 -5px; box-shadow: 0 30px 50px -28px rgb(0 0 0 / .75); }
}

/* ---------------------------------------------------------------- la nota del fondatore
   Un foglio appoggiato un po' storto, che si raddrizza quando ci passi sopra. */
.founder { rotate: -.6deg; transition: rotate .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
@media (hover: hover) and (pointer: fine) {
  .founder:hover { rotate: 0deg; box-shadow: 0 36px 70px -44px rgb(10 22 40 / .55); }
}
@media (prefers-reduced-motion: reduce) { .founder { transition: none; } }

/* ---------------------------------------------------------------- footer: la scritta in gesso e l'aeroplanino */
footer.closing.footer--dark { border-radius: clamp(20px, 2.6vw, 40px) clamp(20px, 2.6vw, 40px) 0 0; }
@media (prefers-reduced-motion: no-preference) {
  html.pl-js .close__board .close__word { clip-path: inset(-20% 100% -20% -4%); }
  html.pl-js .close__board .close__word.is-written { clip-path: inset(-20% -4% -20% -4%); transition: clip-path 1.5s cubic-bezier(.6, .05, .25, 1); }
}
/* l'aeroplanino vola in percentuali della lavagna (prima erano tre tracciati in px, uno per larghezza) */
.close__board .plane { offset-path: none; left: calc(100% - 44px); top: 6px; rotate: -24deg; }
.close__board .plane.is-flying { animation: plPlane 2.8s cubic-bezier(.45, 0, .25, 1) both; }
@keyframes plPlane {
  0%   { left: 46%; top: 78%; rotate: -4deg; opacity: 0; }
  8%   { opacity: 1; }
  30%  { left: 60%; top: 30%; rotate: -34deg; }
  55%  { left: 74%; top: 64%; rotate: 22deg; }
  78%  { left: 88%; top: 40%; rotate: -30deg; }
  100% { left: calc(100% - 44px); top: 6px; rotate: -24deg; opacity: 1; }
}
html.pl-js .close__board .plane:not(.is-flying, .has-flown) { opacity: 0; }
@media (prefers-reduced-motion: reduce) { html.pl-js .close__board .plane { opacity: 1 !important; } }
@media print {
  html.pl-js .close__board .close__word { clip-path: none !important; }
  .nav::after { display: none; }
}

/* ---------------------------------------------------------------- telefono
   Il disco dei cookie (cookie-consent.js) stava sopra i contenuti e sui bottoni di pausa: dove il footer ha già
   "Preferenze cookie", sul telefono e sul tablet non serve. */
@media (max-width: 1023px) {
  :root:has(#cookiePrefs) .tutoro-cc-fab { display: none !important; }
}

/* tutoro/menu.css */
/*
  Tutoro · il menu "Funzioni" dell'header (novembre 2026), in tutte le pagine della landing e nel blog.
  Al computer: un riquadro sospeso sotto la parola, che entra morbido; le voci arrivano una dopo l'altra con
  la loro icona, e a destra la scheda "lavagna" di Centro Studi con la mappa della sede che cambia da sola e
  una sostituzione accettata. Si apre al passaggio del mouse (dopo 150ms, come prima) o con la tastiera.
  Sul telefono, dentro il menu a tutto schermo: le stesse voci in elenco, la scheda dei centri senza disegni.
  Senza prefers-reduced-motion niente cambia nell'impaginazione, solo i movimenti spariscono.
*/
.nav__menu.mm {
  --mm-mint: #3cb371; --mm-deep: #2e9b5e; --mm-light: #edfaf4; --mm-ink: #0a1628; --mm-muted: #6b7280; --mm-board: #16231b;
  --mm-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ================================================================ computer */
@media (min-width: 1024px) {
  .nav__menu.mm {
    background: transparent; border: 0; padding: 10px 0 0;   /* il margine trasparente tiene aperto il menu mentre il mouse scende */
    transform: none; pointer-events: none;
  }
  .nav__item:hover > .nav__menu.mm, .nav__item:focus-within > .nav__menu.mm { pointer-events: auto; transform: none; }
  .mm__card {
    width: min(1100px, calc(100% - 2 * var(--gut, 24px))); margin-inline: auto;
    display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 10px; padding: 10px;
    border-radius: 26px; background: #fff;
    box-shadow: 0 0 0 1px rgb(10 22 40 / .07), 0 2px 4px rgb(10 22 40 / .04), 0 24px 48px -20px rgb(10 22 40 / .28), 0 60px 120px -60px rgb(10 22 40 / .35);
    opacity: 0; translate: 0 -10px; scale: .985; transform-origin: 30% 0;
    transition: opacity .18s ease, translate .32s var(--mm-ease), scale .32s var(--mm-ease);
  }
  .nav__item:hover > .mm .mm__card, .nav__item:focus-within > .mm .mm__card { opacity: 1; translate: 0 0; scale: 1; transition-delay: .15s; }

  .mm__main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 18px 14px 10px 18px; align-content: start; }
  .mm__col { display: grid; gap: 2px; align-content: start; }
  .mm__label { margin: 0 0 8px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-muted); }

  /* una voce: icona, titolo e riga; al passaggio la riga si colora e l'icona si accende */
  .mm__link { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 16px;
    color: var(--mm-ink); text-decoration: none; transition: background-color .2s ease; }
  .mm__link::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -4px; border-top: 2px solid var(--mm-deep); border-right: 2px solid var(--mm-deep);
    rotate: 45deg; opacity: 0; translate: -6px 0; transition: opacity .2s ease, translate .3s var(--mm-ease); }
  .mm__link:hover, .mm__link:focus-visible { background: #f4f7f5; }
  .mm__link:hover::after, .mm__link:focus-visible::after { opacity: 1; translate: 0 0; }
  .mm__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mm-light); color: var(--mm-deep);
    box-shadow: inset 0 0 0 1px rgb(60 179 113 / .14); transition: background-color .25s ease, color .25s ease, transform .45s cubic-bezier(.3, 1.5, .5, 1), box-shadow .25s ease; }
  .mm__ico svg.i { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mm__link:hover .mm__ico, .mm__link:focus-visible .mm__ico { background: var(--mm-mint); color: #fff; transform: rotate(-8deg) scale(1.06); box-shadow: 0 8px 16px -8px rgb(46 155 94 / .8); }
  .mm__txt { display: grid; gap: 1px; min-width: 0; padding-right: 18px; }
  .mm__txt b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .mm__txt small { font-size: 13.5px; color: var(--mm-muted); }

  /* in fondo a sinistra: tutte le funzioni */
  .mm__all { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 14px 16px; border-radius: 16px;
    background: #f6f8fa; color: var(--mm-ink); text-decoration: none; transition: background-color .2s ease; }
  .mm__all b { display: block; font-size: 14.5px; font-weight: 600; }
  .mm__all small { font-size: 13px; color: var(--mm-muted); }
  .mm__all:hover { background: var(--mm-light); }
  .mm__arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: translate .3s var(--mm-ease); }
  .mm__all:hover .mm__arrow, .mm__board:hover .mm__go .mm__arrow, .mm__side-link:hover .mm__arrow { translate: 4px 0; }

  /* le voci entrano una dopo l'altra */
  .mm :is(.mm__label, .mm__link, .mm__all, .mm__side) { opacity: 0; translate: 0 6px; transition: opacity .25s ease, translate .4s var(--mm-ease), background-color .2s ease; }
  .nav__item:hover > .mm :is(.mm__label, .mm__link, .mm__all, .mm__side),
  .nav__item:focus-within > .mm :is(.mm__label, .mm__link, .mm__all, .mm__side) { opacity: 1; translate: 0 0; }
  .nav__item:hover > .mm .mm__col:nth-child(1) > :nth-child(1) { transition-delay: .17s, .17s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(1) > :nth-child(2) { transition-delay: .2s, .2s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(1) > :nth-child(3) { transition-delay: .23s, .23s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(1) > :nth-child(4) { transition-delay: .26s, .26s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(2) > :nth-child(1) { transition-delay: .2s, .2s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(2) > :nth-child(2) { transition-delay: .23s, .23s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(2) > :nth-child(3) { transition-delay: .26s, .26s, 0s; }
  .nav__item:hover > .mm .mm__col:nth-child(2) > :nth-child(4) { transition-delay: .29s, .29s, 0s; }
  .nav__item:hover > .mm .mm__all { transition-delay: .32s, .32s, 0s; }
  .nav__item:hover > .mm .mm__side { transition-delay: .22s, .22s, 0s; }

  /* ---- a destra: la lavagna dei centri studi ---- */
  .mm__side { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; }
  .mm__board { position: relative; display: grid; align-content: start; gap: 4px; min-height: 300px; padding: 22px 22px 20px; border-radius: 20px; overflow: hidden; isolation: isolate;
    background-color: var(--mm-board); color: #eef4ee; text-decoration: none;
    background-image: radial-gradient(80% 60% at 100% 0%, rgb(60 179 113 / .22), transparent 70%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='372' height='320' fill='none' stroke='%23eef4ee' stroke-opacity='.07' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M300 60 q30 -50 60 0'/%3E%3Cpath d='M292 66 H372 M330 84 V10'/%3E%3Cpath d='M24 292 h26 m-13 -13 v26 M70 292 h20'/%3E%3C/svg%3E");
    background-repeat: no-repeat; transition: translate .35s var(--mm-ease), box-shadow .35s ease; }
  .mm__board:hover { translate: 0 -2px; box-shadow: 0 22px 40px -24px rgb(0 0 0 / .7); }
  .mm__kicker { font: 600 22px/1 var(--hand, "Caveat", cursive); color: #9fe3bd; transform: rotate(-2deg); transform-origin: left; }
  .mm__title { margin-top: 6px; font: 500 26px/1.1 var(--font-display, "Geist", sans-serif); letter-spacing: -.03em; color: #fff; }
  .mm__sub { max-width: 30ch; font-size: 14px; line-height: 1.45; color: #b9c8be; }
  .mm__go { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 14px; font-size: 14.5px; font-weight: 600; color: #fff; }

  /* la sede vista dall'alto: le aule si liberano e si occupano da sole */
  .mm__map { position: relative; display: grid; grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: 52px 46px; gap: 5px; margin-top: 16px; padding: 6px; border-radius: 12px;
    background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px rgb(238 244 238 / .1); }
  .mm__map .r { position: relative; display: flex; align-items: flex-end; padding: 5px 7px; border-radius: 7px; font-style: normal;
    background: rgb(60 179 113 / .26); box-shadow: inset 0 0 0 1px rgb(127 224 168 / .35); }
  .mm__map .r em { font: 500 10.5px/1 var(--font-text, "Geist", sans-serif); font-style: normal; color: rgb(238 244 238 / .85); white-space: nowrap; }
  .mm__map .r::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #7fe0a8; box-shadow: 0 0 0 3px rgb(127 224 168 / .18); }
  .mm__map .r4 { grid-column: 1 / 3; }
  .mm__map .r.is-busy, .mm__map .r2, .mm__map .r5 { background: rgb(224 98 84 / .24); box-shadow: inset 0 0 0 1px rgb(240 140 128 / .35); }
  .mm__map .r2::after, .mm__map .r5::after { background: #f08c80; box-shadow: 0 0 0 3px rgb(240 140 128 / .18); }

  /* il biglietto: una sostituzione accettata, che arriva quando si apre il menu */
  .mm__toast { position: absolute; right: 16px; bottom: 58px; display: grid; grid-template-columns: 22px auto; column-gap: 8px; align-items: center; padding: 8px 12px 8px 9px; border-radius: 12px;
    background: #fff; color: var(--mm-ink); font-size: 12.5px; font-weight: 600; box-shadow: 0 14px 28px -12px rgb(0 0 0 / .55); z-index: 2; }
  .mm__toast svg { grid-row: span 2; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--mm-mint); fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .mm__toast small { font-size: 11.5px; font-weight: 400; color: var(--mm-muted); }

  .mm__side-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--mm-ink);
    text-decoration: none; transition: background-color .2s ease; }
  .mm__side-link:hover { background: #f4f7f5; }

  @media (prefers-reduced-motion: no-preference) {
    @keyframes mmBusy { 0%, 42% { background: rgb(60 179 113 / .26); box-shadow: inset 0 0 0 1px rgb(127 224 168 / .35); } 50%, 92% { background: rgb(224 98 84 / .24); box-shadow: inset 0 0 0 1px rgb(240 140 128 / .35); } 100% { background: rgb(60 179 113 / .26); box-shadow: inset 0 0 0 1px rgb(127 224 168 / .35); } }
    @keyframes mmBusyDot { 0%, 42% { background: #7fe0a8; } 50%, 92% { background: #f08c80; } 100% { background: #7fe0a8; } }
    @keyframes mmToast { 0% { opacity: 0; translate: 0 14px; scale: .94; } 60% { opacity: 1; translate: 0 -2px; scale: 1.01; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
    @keyframes mmPing { 0% { box-shadow: 0 0 0 0 rgb(127 224 168 / .6); } 100% { box-shadow: 0 0 0 10px rgb(127 224 168 / 0); } }
    .nav__item:hover > .mm .mm__map .r1, .nav__item:focus-within > .mm .mm__map .r1 { animation: mmBusy 5.2s ease-in-out .9s infinite; }
    .nav__item:hover > .mm .mm__map .r1::after, .nav__item:focus-within > .mm .mm__map .r1::after { animation: mmBusyDot 5.2s ease-in-out .9s infinite; }
    .nav__item:hover > .mm .mm__map .r4, .nav__item:focus-within > .mm .mm__map .r4 { animation: mmBusy 6.4s ease-in-out 2.2s infinite; }
    .nav__item:hover > .mm .mm__map .r4::after, .nav__item:focus-within > .mm .mm__map .r4::after { animation: mmBusyDot 6.4s ease-in-out 2.2s infinite; }
    .nav__item:hover > .mm .mm__map .r3::after, .nav__item:focus-within > .mm .mm__map .r3::after { animation: mmPing 1.4s ease-out .7s 3; }
    .mm__toast { opacity: 0; }
    .nav__item:hover > .mm .mm__toast, .nav__item:focus-within > .mm .mm__toast { animation: mmToast .6s var(--mm-ease) .7s both; }
  }
}

/* ================================================================ telefono e tablet: dentro il menu a tutto schermo */
@media (max-width: 1023px) {
  .nav.is-open .nav__menu.mm { padding: 0 0 18px; }
  .mm__card, .mm__main, .mm__col, .mm__side { display: grid; gap: 2px; }
  .mm__card { gap: 14px; }
  .mm__label { margin: 8px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-muted); }
  .mm__link { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; padding: 8px 0; color: var(--mm-ink); text-decoration: none; }
  .mm__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--mm-light); color: var(--mm-deep); }
  .mm__ico svg.i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .mm__txt { display: grid; gap: 1px; }
  .mm__txt b { font-size: 16px; font-weight: 500; }
  .mm__txt small { font-size: 13.5px; color: var(--mm-muted); }
  .mm__all, .mm__side-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--mm-ink); text-decoration: none; }
  .mm__all small { display: none; }
  .mm__arrow { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .mm__board { display: grid; gap: 3px; margin-top: 6px; padding: 16px 18px; border-radius: 16px; background: var(--mm-board); color: #eef4ee; text-decoration: none; }
  .mm__kicker { font: 600 19px/1 var(--hand, "Caveat", cursive); color: #9fe3bd; }
  .mm__title { font-size: 19px; font-weight: 600; color: #fff; letter-spacing: -.01em; }
  .mm__sub { font-size: 13.5px; color: #b9c8be; }
  .mm__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; color: #fff; }
  .mm__map, .mm__toast { display: none; }
}

/* tutoro/schermi.css */
/*
  Tutoro · le schermate dell'app disegnate sulla landing (riunione del 19 novembre: "più vicine al prodotto vero").
  Un solo componente, .tw (Tutoro window): la cornice della finestra, la barra laterale blu notte dell'app e i
  blocchi che l'app usa davvero. Colori e forme vengono da webapp/src (globals.css, sidebar.tsx,
  DashboardView/BoxLezione, BriefingView, fine-lezione, ai/page) su main al 20 novembre 2026, in scala da
  miniatura (circa 0,75): mint #3CB371, deep #2E9B5E, light #EDFAF4, ink #0A1628, bg #F4F6FA, muted #6B7280,
  border #E8EAED; schede rounded-2xl, bottoni rounded-xl.
  Si adatta alla larghezza della sua cornice (container query): sotto i 470px la barra laterale sparisce,
  come nell'app sul telefono.
*/
.tw {
  --tw-mint: #3cb371; --tw-deep: #2e9b5e; --tw-light: #edfaf4; --tw-ink: #0a1628; --tw-bg: #f4f6fa;
  --tw-muted: #6b7280; --tw-faint: #9ca3af; --tw-border: #e8eaed; --tw-yellow: #f5b82e; --tw-yellow-2: #f5c451;
  --tw-red: #dc2626;
  container-type: inline-size;
  display: flex; flex-direction: column; overflow: hidden; text-align: left;
  background: var(--tw-bg); color: var(--tw-ink); border-radius: 14px;
  font: 400 12.5px/1.4 "Geist", var(--font-text, system-ui), sans-serif; letter-spacing: 0;
  box-shadow: 0 0 0 1px rgb(10 22 40 / .08), 0 30px 70px -36px rgb(10 22 40 / .55);
}
.tw *, .tw *::before, .tw *::after { box-sizing: border-box; }
.tw svg.i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tw__bar { flex: none; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--tw-border); }
.tw__dots { display: flex; gap: 5px; } .tw__dots i { width: 9px; height: 9px; border-radius: 50%; background: #dcdfe4; }
.tw__url { flex: 1; display: flex; justify-content: center; min-width: 0; }
.tw__url span { padding: 3px 12px; border-radius: 6px; background: var(--tw-bg); font-size: 11px; color: var(--tw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw__body { position: relative; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); }

/* ---- la barra laterale (sidebar.tsx: aside w-60 bg-sidebar) ---- */
.tw__side { display: flex; flex-direction: column; gap: 1px; padding: 10px 8px; background: var(--tw-ink); color: rgb(255 255 255 / .6); min-width: 0; overflow: hidden; }
.tw__logo { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 4px; margin-bottom: 4px; font-weight: 700; font-size: 14px; letter-spacing: -0.02em; color: #fff; }
.tw__logo img { width: 20px; height: 20px; border-radius: 6px; }
.tw__search { display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 7px; margin: 2px 0 6px; border-radius: 7px; background: rgb(255 255 255 / .05); color: rgb(255 255 255 / .4); font-size: 10.5px; }
.tw__search svg.i { width: 11px; height: 11px; }
.tw__search em { margin-left: auto; font-style: normal; }
.tw__label { margin: 7px 8px 2px; font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .35); }
.tw__nav { display: flex; align-items: center; gap: 8px; height: 25px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; }
.tw__nav svg.i { width: 13px; height: 13px; }
.tw__nav.is-on { background: rgb(60 179 113 / .2); color: var(--tw-mint); }
.tw__nav--ai { color: #fff; font-weight: 600; }
.tw__nav--ai > b { display: grid; place-items: center; width: 18px; height: 18px; margin-left: -2px; border-radius: 6px; background: linear-gradient(135deg, var(--tw-mint), var(--tw-deep)); box-shadow: 0 4px 12px -4px rgb(60 179 113 / .8); }
.tw__nav--ai > b svg.i { width: 11px; height: 11px; color: #fff; }
.tw__count { margin-left: auto; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #facc15; color: var(--tw-ink); font-size: 9.5px; font-weight: 700; display: grid; place-items: center; }
.tw__me { margin-top: auto; display: flex; align-items: center; gap: 7px; padding: 8px 4px 0; border-top: 1px solid rgb(255 255 255 / .1); font-size: 11px; color: #fff; white-space: nowrap; }
.tw__me > span:first-child { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgb(60 179 113 / .2); color: var(--tw-mint); font-weight: 700; font-size: 10px; flex: none; }
.tw__me small { display: block; font-size: 9.5px; color: rgb(255 255 255 / .4); }

.tw__main { position: relative; min-width: 0; min-height: 0; overflow: hidden; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.tw__main > * { flex: none; }   /* una finestra bassa taglia in fondo, come lo schermo vero: i blocchi non si schiacciano */
@container (max-width: 470px) {
  .tw__body { grid-template-columns: minmax(0, 1fr); }
  .tw__side { display: none; }
  .tw__main { padding: 14px; }
}

/* ---- i pezzi dell'app ---- */
.tw-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.tw-hello small { display: block; font-size: 11.5px; color: var(--tw-muted); }
.tw-hello h4, .tw-h { margin: 0; font: 700 19px/1.15 "Geist", var(--font-text, system-ui); letter-spacing: -0.02em; color: var(--tw-ink); white-space: nowrap; }
.tw-back { display: flex; align-items: center; gap: 4px; }
.tw-back svg.i { width: 16px; height: 16px; color: var(--tw-muted); }
.tw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--tw-mint); color: #fff; box-shadow: 0 2px 10px rgb(60 179 113 / .22); }
.tw-btn svg.i { width: 13px; height: 13px; }
.tw-btn--outline { background: #fff; color: var(--tw-mint); box-shadow: inset 0 0 0 1px var(--tw-mint); }
.tw-btn--big { height: 36px; border-radius: 11px; font-size: 12.5px; }
.tw-card { background: #fff; border: 1px solid var(--tw-border); border-radius: 14px; box-shadow: 0 1px 2px rgb(10 22 40 / .05); min-width: 0; }
.tw-card--pad { padding: 12px 14px; }
.tw-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 11px; font-weight: 600; color: var(--tw-muted); }
.tw-count { padding: 1px 7px; border-radius: 99px; background: var(--tw-light); color: var(--tw-deep); font-size: 10.5px; font-weight: 700; }
.tw-list { display: grid; background: #fff; border: 1px solid var(--tw-border); border-radius: 14px; overflow: hidden; }
.tw-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 40px; padding: 7px 12px; border-top: 1px solid rgb(232 234 237 / .7); font-size: 12px; color: var(--tw-ink); }
.tw-row:first-child { border-top: 0; }
.tw-row > span:nth-child(2) { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-row b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-row small { display: block; font-size: 11px; color: var(--tw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-row__act { font-size: 11px; font-weight: 600; color: var(--tw-mint); white-space: nowrap; display: flex; align-items: center; gap: 2px; }
.tw-row__act svg.i { width: 12px; height: 12px; color: var(--tw-faint); }
.tw-tile { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--tw-bg); color: var(--tw-muted); }
.tw-tile svg.i { width: 13px; height: 13px; }
.tw-tile--mint { background: var(--tw-light); color: var(--tw-mint); }
.tw-tile--amber { background: #fffbeb; color: #d97706; }
.tw-tile--red { background: #fef2f2; color: var(--tw-red); }
.tw-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 7px; font-size: 10.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.tw-badge--mint { background: rgb(60 179 113 / .12); color: var(--tw-deep); border-color: rgb(60 179 113 / .2); }
.tw-badge--yellow { background: #fefce8; color: #a16207; border-color: #fef08a; }
.tw-badge--red { background: #fef2f2; color: var(--tw-red); }
.tw-badge--grey { background: #f3f4f6; color: #6b7280; }
.tw-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.tw-progress { display: block; height: 5px; margin-top: 5px; border-radius: 99px; background: #edf0f3; overflow: hidden; }
.tw-progress > i { display: block; height: 100%; width: calc(var(--k, .5) * 100%); border-radius: inherit; background: var(--tw-mint); transition: width 1s cubic-bezier(.2, .7, .2, 1); }

/* ---- il riquadro scuro della lezione (BoxLezione / BoxScuro) ---- */
.tw-dark { position: relative; overflow: hidden; border-radius: 14px; padding: 14px; color: #fff; background: var(--tw-ink); border: 1px solid rgb(255 255 255 / .1); }
.tw-dark::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 70% at 100% 0%, rgb(60 179 113 / .34), transparent 55%), radial-gradient(90% 60% at 0% 100%, rgb(46 155 94 / .14), transparent 60%); }
.tw-dark > * { position: relative; }
.tw-dark__top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.tw-ring { position: relative; width: 64px; height: 64px; }
.tw-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tw-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tw-ring b { font-size: 15px; font-weight: 700; line-height: 1; }
.tw-ring small { font-size: 9px; color: rgb(255 255 255 / .5); margin-top: 2px; }
.tw-status { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--tw-mint); }
.tw-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tw-dark__name { display: block; margin: 2px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-dark__topic { display: block; font-size: 12px; color: rgb(255 255 255 / .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-dark__meta { display: block; font-size: 11px; color: rgb(255 255 255 / .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tw-dark__rows { margin-top: 10px; display: grid; }
.tw-dark__rows > span { display: flex; align-items: center; gap: 8px; min-height: 28px; border-top: 1px solid rgb(255 255 255 / .08); font-size: 11.5px; color: rgb(255 255 255 / .85); white-space: nowrap; overflow: hidden; }
.tw-dark__rows svg.i { width: 13px; height: 13px; color: rgb(255 255 255 / .45); }
.tw-dark__rows svg.i.is-yellow { color: var(--tw-yellow-2); }
.tw-dark__btns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 6px; margin-top: 10px; }
.tw-dark__btns > span { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.tw-dark__btns svg.i { width: 13px; height: 13px; }
.tw-prepara { background: linear-gradient(90deg, var(--tw-mint), var(--tw-deep)); font-weight: 600; box-shadow: 0 8px 24px -8px rgb(60 179 113 / .7); }
.tw-prepara::after { content: ""; position: absolute; inset: 0; translate: -120% 0; background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%); }
.tw-briefing { border: 1px solid rgb(255 255 255 / .15); color: rgb(255 255 255 / .8); font-weight: 500; }
.tw-annota { background: var(--tw-yellow); color: var(--tw-ink); font-weight: 700; grid-column: 1 / -1; }
.tw-round { display: flex; gap: 10px; margin-top: 10px; }
.tw-round > span { display: grid; justify-items: center; gap: 3px; font-size: 9.5px; color: rgb(255 255 255 / .65); }
.tw-round > span > i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / .15); background: rgb(255 255 255 / .06); }
.tw-round svg.i { width: 13px; height: 13px; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .tw-prepara::after { animation: twShine 3.6s ease-in-out 1.2s infinite; }
}
@keyframes twShine { 0%, 70% { translate: -120% 0; } 100% { translate: 120% 0; } }

/* ---- la chat dell'Assistente AI (ai/page.tsx) ---- */
.tw-me { justify-self: end; max-width: 78%; padding: 9px 12px; border-radius: 14px 4px 14px 14px; background: var(--tw-ink); color: #fff; font-size: 12.5px; line-height: 1.45; box-shadow: 0 1px 2px rgb(10 22 40 / .12); }
.tw-ai > b { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 600; color: var(--tw-mint); }
.tw-ai { font-size: 12.5px; line-height: 1.5; color: var(--tw-ink); }

/* ---- il riquadro di fine lezione (fine-lezione.tsx) sopra l'app scurita ---- */
.tw-scrim { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 14px; background: rgb(10 22 40 / .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.tw-modal { width: min(100%, 360px); background: #fff; border-radius: 16px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .5); padding: 14px; display: grid; gap: 9px; }
.tw-modal__head { display: flex; align-items: center; gap: 8px; }
.tw-modal__head > i { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: rgb(60 179 113 / .15); color: var(--tw-mint); flex: none; }
.tw-modal__head b { display: block; font-size: 12px; font-weight: 700; }
.tw-modal__head small { display: block; font-size: 10.5px; color: var(--tw-muted); }
.tw-modal__hint { display: block; margin: 0; font-size: 10.5px; color: var(--tw-muted); line-height: 1.45; }
.tw-area { min-height: 66px; padding: 8px 10px; border: 1px solid var(--tw-border); border-radius: 10px; font-size: 11.5px; line-height: 1.5; color: var(--tw-ink); }
.tw-rec { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 10px; border-radius: 10px; font-size: 10.5px; font-weight: 500; background: #fef2f2; color: var(--tw-red); border: 1px solid #fecaca; }
.tw-rec--done { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tw-rec svg.i { width: 11px; height: 11px; }
.tw-live { font-size: 10px; color: var(--tw-faint); }
.tw-done { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 6px 0 2px; }
.tw-done > i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(60 179 113 / .1); color: var(--tw-mint); }
.tw-done > i svg.i { width: 20px; height: 20px; }
.tw-done b { font-size: 13px; font-weight: 700; }
.tw-done ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 11.5px; color: var(--tw-muted); }

/* ---- lo strumento Geometria interattiva (strumenti/matematica/funzioni) ---- */
.tw-tool { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
.tw-tool__panel { background: #fff; border: 1px solid var(--tw-border); border-radius: 14px; padding: 10px; display: grid; align-content: start; gap: 8px; min-width: 0; }
.tw-tool__panel > b { font-size: 11.5px; font-weight: 700; }
.tw-tool__tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.tw-tool__tools span { height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 9px; border: 1px solid var(--tw-border); color: var(--tw-muted); white-space: nowrap; overflow: hidden; }
.tw-tool__tools span.is-on { background: var(--tw-mint); border-color: var(--tw-mint); color: #fff; font-weight: 600; }
.tw-tool__sec { font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tw-muted); }
.tw-tool__f { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px; border: 1px solid var(--tw-border); border-radius: 7px; font: 500 10.5px "Geist Mono", ui-monospace, monospace; color: var(--tw-ink); white-space: nowrap; overflow: hidden; }
.tw-tool__f i { width: 7px; height: 7px; border-radius: 50%; background: #3b82f6; flex: none; }
.tw-tool__f em { font-style: normal; color: var(--tw-muted); }
.tw-tool__canvas { position: relative; min-width: 0; min-height: 0; background: #fff; border: 1px solid var(--tw-border); border-radius: 14px; box-shadow: 0 1px 2px rgb(10 22 40 / .05); overflow: hidden; }
.tw-tool__canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tw-shared { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; background: var(--tw-light); color: var(--tw-deep); font-size: 10px; font-weight: 600; }
.tw-shared svg.i { width: 11px; height: 11px; }
@container (max-width: 470px) { .tw-tool { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } .tw-tool__tools, .tw-tool__sec:first-of-type, .tw-tool__obj { display: none; } }

/* ---- varianti ---- */
.tw-dark--yellow::before { background: radial-gradient(130% 70% at 100% 0%, rgb(245 184 46 / .38), transparent 55%), radial-gradient(90% 60% at 0% 100%, rgb(46 155 94 / .1), transparent 60%); }
.tw-dark--yellow { border-color: rgb(245 184 46 / .4); }
.tw-dark--yellow .tw-status { color: var(--tw-yellow); }
.tw-dark__btns--one { grid-template-columns: minmax(0, 1fr); }
.tw-tool__f i.is-red { background: #ef4444; }
.tw-plot__grid { fill: none; stroke: #eef1f5; stroke-width: 1; }
.tw-plot__axis { fill: none; stroke: #9ca3af; stroke-width: 1.2; }
.tw-plot__curve { fill: none; stroke: #3b82f6; stroke-width: 3; stroke-linecap: round; }
.tw-plot__pts circle { fill: #ef4444; stroke: #fff; stroke-width: 2; }
.tw-plot__lbl { font: 600 12px "Geist", system-ui, sans-serif; fill: #ef4444; }
.tw-plot__f { font: 500 11px "Geist Mono", ui-monospace, monospace; fill: #3b82f6; }
.tw-recs { display: grid; justify-items: start; }
.tw-recs > * { grid-area: 1 / 1; }
.tw-rec--live { visibility: hidden; }
.tw-live { visibility: hidden; }
@container (max-width: 470px) {
  .tw-modal { padding: 12px; gap: 7px; }
  .tw-modal__hint { display: none !important; }
  .tw-hello h4, .tw-h { font-size: 17px; }
}

/* ---- la scena che si muove: .tw-play su un antenato (schermi.js) la fa partire da capo ----
   Senza .tw-play (niente script, prefers-reduced-motion, prima che entri) si vede il quadro finito: per la fine
   lezione è "Lezione chiusa". Con .tw-play: la nota si detta parola per parola, il microfono si ferma, si
   preme "Elabora con l'AI" e arriva la lezione chiusa. */
.tw-seq { display: grid; }
.tw-seq > * { grid-area: 1 / 1; display: grid; gap: 9px; align-content: start; }
.tw-seq__a { visibility: hidden; opacity: 0; }
@keyframes twSeqA { 0% { visibility: visible; opacity: 0; } 6% { opacity: 1; } 92% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }
@keyframes twWord { from { opacity: 0; } }
@keyframes twHide { to { visibility: hidden; opacity: 0; } }
@keyframes twShow { from { visibility: hidden; opacity: 0; } to { visibility: visible; opacity: 1; } }
@keyframes twPress { 0%, 100% { transform: none; } 40% { transform: scale(.95); box-shadow: 0 0 0 5px rgb(60 179 113 / .25); } }
@keyframes twPop { from { transform: scale(0); } }
@keyframes twDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes twGrow { from { width: 0; } }
@keyframes twRise { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: no-preference) {
  .tw-play .tw-seq__a { animation: twSeqA 5.2s linear both; }
  .tw-play .tw-w { animation: twWord .18s ease both; animation-delay: calc(.6s + var(--w) * 95ms); }
  .tw-play .tw-rec--live, .tw-play .tw-live { visibility: visible; animation: twHide 0s linear 3.6s both; }
  .tw-play .tw-rec--live { animation: twHide 0s linear 3.6s both, twPulseRed 1.8s ease-out infinite; }
  .tw-play .tw-rec--done { animation: twShow .3s ease 3.6s both; }
  .tw-play .tw-elabora { animation: twPress .45s ease 4.25s both; }
  .tw-play .tw-seq__b { animation: twRise .5s cubic-bezier(.16, 1, .3, 1) 4.9s both; }
  .tw-play .tw-done > i { animation: twPop .55s cubic-bezier(.3, 1.5, .5, 1) 5.1s both; }
  .tw-play .tw-done li { animation: twRise .4s ease both; }
  .tw-play .tw-done li:nth-child(1) { animation-delay: 5.3s; } .tw-play .tw-done li:nth-child(2) { animation-delay: 5.45s; }
  .tw-play .tw-done li:nth-child(3) { animation-delay: 5.6s; } .tw-play .tw-done li:nth-child(4) { animation-delay: 5.75s; }
  @keyframes twPulseRed { 0% { box-shadow: 0 0 0 0 rgb(239 68 68 / .25); } 60%, 100% { box-shadow: 0 0 0 5px rgb(239 68 68 / 0); } }

  /* il briefing: i blocchi entrano uno dopo l'altro, il piano si riempie */
  .tw-play .tw__main > * { animation: twRise .5s cubic-bezier(.16, 1, .3, 1) both; }
  .tw-play .tw__main > :nth-child(1) { animation-delay: 0s; }
  .tw-play .tw__main > :nth-child(2) { animation-delay: .08s; } .tw-play .tw__main > :nth-child(3) { animation-delay: .16s; } .tw-play .tw__main > :nth-child(4) { animation-delay: .24s; }
  .tw-play .tw-progress > i { animation: twGrow 1s cubic-bezier(.2, .7, .2, 1) .5s both; }
  /* lo strumento: la parabola si disegna, poi le due radici */
  .tw-play .tw-plot__curve { stroke-dasharray: 1; animation: twDraw 1.3s cubic-bezier(.6, .1, .3, 1) .35s both; }
  .tw-play .tw-plot__pts circle { transform-box: fill-box; transform-origin: center; animation: twPop .45s cubic-bezier(.3, 1.5, .5, 1) 1.5s both; }
  .tw-play .tw-plot__pts circle + circle { animation-delay: 1.65s; }
  .tw-play .tw-shared { animation: twRise .4s ease 1.9s both; }
  /* la scena della fine lezione non rientra con la Home sotto: quella resta ferma */
  .tw-play .tw__main:has(+ .tw-scrim) > * { animation: none; }
}

/* ---- la chat del kit (ui/chat) vestita come l'Assistente AI vero: il fumetto del prof blu notte, la risposta
   senza fumetto sotto "Tutoro AI" in menta, sotto l'ultima risposta Assegna / Salva in Banca / Copia, e la
   barra con +, microfono e "Genera". Le classi del kit restano: la sua animazione (risposta riscritta, bottoni
   che rientrano) funziona com'era. */
.tw-chat { --tw-mint: #3cb371; --tw-deep: #2e9b5e; --tw-light: #edfaf4; --tw-ink: #0a1628; --tw-border: #e8eaed; --tw-muted: #6b7280;
  font-family: "Geist", var(--font-text, system-ui), sans-serif; background: #fff; }
.tw-chat svg.i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tw-chat > .ui-head { gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--tw-border); }
.tw-chat__for { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border: 1px solid var(--tw-border); border-radius: 14px; min-width: 0; }
.tw-chat__for > span:nth-child(2) { display: grid; line-height: 1.2; min-width: 0; }
.tw-chat__for small { font-size: 11px; color: var(--tw-muted); }
.tw-chat__for b { font-size: 13px; font-weight: 600; color: var(--tw-ink); white-space: nowrap; }
.tw-chat__for > svg.i { transform: rotate(90deg); color: var(--tw-muted); width: 13px; height: 13px; }
.tw-chat__ini { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgb(60 179 113 / .15); color: var(--tw-mint); font-size: 11px; font-weight: 700; flex: none; }
.tw-chat__new { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--tw-muted); white-space: nowrap; }
.tw-chat__new svg.i { width: 13px; height: 13px; }
.tw-chat .ui-chat__body { gap: 14px; padding: 16px; }
.tw-chat .ui-msg { font-size: 13px; line-height: 1.5; }
.tw-chat .ui-msg--me { max-width: 80%; padding: 10px 14px; border-radius: 16px 4px 16px 16px; background: var(--tw-ink); color: #fff; box-shadow: 0 1px 2px rgb(10 22 40 / .12); }
.tw-chat .ui-msg--bot { max-width: none; }
.tw-chat .ui-msg__col { gap: 8px; color: var(--tw-ink); }
.tw-chat .ui-msg--bot b { font-weight: 600; color: var(--tw-ink); }
.tw-chat b.tw-chat__who { font-size: 12px; font-weight: 600; color: var(--tw-mint); }
.tw-chat .ui-chat__typing i { background: rgb(60 179 113 / .6); }
.tw-chat__ex { margin: 0; padding: 0 0 0 18px; display: grid; gap: 3px; font: 500 12.5px/1.45 "Geist Mono", ui-monospace, monospace; color: var(--tw-ink); }
.tw-chat__ex em { font-style: normal; color: var(--tw-deep); }
.tw-chat .ui-chat__srcs { gap: 6px; padding-top: 2px; }
.tw-chat .ui-chat__src.tw-chat__act { height: 28px; padding: 0 10px; border-radius: 10px; gap: 6px; font-size: 12px; font-weight: 600; color: var(--tw-mint); background: #fff; box-shadow: inset 0 0 0 1px var(--tw-mint); }
.tw-chat .ui-chat__src.tw-chat__act--mint { background: var(--tw-mint); color: #fff; box-shadow: 0 2px 10px rgb(60 179 113 / .22); }
.tw-chat .ui-chat__src.tw-chat__act--plain { color: var(--tw-muted); box-shadow: none; font-weight: 500; }
.tw-chat .ui-chat__src.tw-chat__act svg.i { width: 13px; height: 13px; }
.tw-chat .ui-chat__input { height: auto; gap: 6px; margin: 0; padding: 10px 12px 12px; border-radius: 0; background: #fff; box-shadow: none; border-top: 1px solid var(--tw-border); color: #9ca3af; }
.tw-chat__sq { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--tw-border); color: var(--tw-muted); }
.tw-chat__sq--mint { color: var(--tw-mint); }
.tw-chat .ui-chat__ph { display: flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--tw-border); border-radius: 12px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tw-chat .ui-chat__send { width: auto; height: 36px; padding: 0 12px; gap: 6px; border-radius: 12px; background: var(--tw-mint); color: #fff; font-size: 12.5px; font-weight: 600; box-shadow: 0 2px 10px rgb(60 179 113 / .22); }
.tw-chat .ui-chat__send svg.i { width: 13px; height: 13px; }
@media (max-width: 639px) { .tw-chat__new, .tw-chat__sq + .tw-chat__sq { display: none; } }
.tw-chat__ex { list-style: decimal; }
.tw-chat__ex li::marker { color: var(--tw-muted); }
/* nella cornice .app della home: la barra in fondo resta piena (niente sfumatura) e lascia l'angolo al bottone di pausa */
.app > .app__pane--open::after { display: none; }
.app .tw-chat .ui-chat__input { padding-right: 56px; }

/* ---------------------------------------------------------------- .lz: la lezione che scorre (riunione, secondo giro)
   La sezione si "ferma" sullo schermo: il titolo e il passo restano a sinistra, a destra scorre il nastro delle
   schermate (una per passo) e, quando cambia la schermata, a sinistra cambia la spiegazione. schermi.js la accende
   (.is-live) da 900px di larghezza e 460px di altezza; altrimenti, e con prefers-reduced-motion, ogni passo è una
   riga con il testo e la sua schermata. */
main > section.lz > .wrap.lz__grid { display: grid; gap: var(--s-7, 48px); }   /* system.css fa delle .wrap una colonna flex */
.lz__text { display: grid; gap: var(--s-6, 32px); align-content: start; min-width: 0; }
.lz__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-7, 48px); }
.lz__step { display: grid; gap: var(--s-2, 8px); min-width: 0; }
.lz__step h3 { margin: 0; font-family: var(--font-text); font-weight: 500; font-size: var(--t-lead); line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.lz__step p { margin: 0; max-width: 46ch; color: var(--ink); }
.lz__shot { margin: var(--s-4, 16px) 0 0; border-radius: var(--r-md, 16px); overflow: hidden; min-width: 0; }
.lz .pc-ui--app { padding: 4.5%; place-items: stretch; }
.lz .pc-ui--app > .tw { width: 100%; height: 100%; min-height: 0; }
.lz__stage, .lz__nav { display: none; }
.lz:not(.is-live) .lz__shot > .pc-ui--app { aspect-ratio: 1 / 1; }
@media (min-width: 640px) {
  .lz:not(.is-live) .lz__steps { gap: var(--s-6, 32px); }
  .lz:not(.is-live) .lz__step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gutter, 32px); row-gap: var(--s-2, 8px); align-items: center; border-top: 1px solid var(--line); padding-top: var(--s-6, 32px); }
  .lz:not(.is-live) .lz__step h3 { grid-column: 1; align-self: end; }
  .lz:not(.is-live) .lz__step p { grid-column: 1; align-self: start; }
  .lz:not(.is-live) .lz__shot { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
}
@media (max-width: 639px) { .lz:not(.is-live) .lz__shot > .pc-ui--app { aspect-ratio: 4 / 5; padding: 3%; } }

.lz.is-live { height: calc((var(--lz-n, 3) * .85 + 1) * 100svh); padding: 0; }
.lz.is-live > .lz__grid {
  position: sticky; top: 0; height: 100svh; box-sizing: border-box; padding-top: var(--nav, 72px);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(32px, 5vw, 80px); align-items: center; align-content: center;
}
.lz.is-live .lz__text { gap: var(--s-6, 32px); }
.lz.is-live .lz__steps { gap: 0; }
.lz.is-live .lz__step { grid-area: 1 / 1; align-content: start; opacity: 0; translate: 0 22px; pointer-events: none;
  transition: opacity .35s ease, translate .6s cubic-bezier(.16, 1, .3, 1); }
.lz.is-live .lz__step.is-past { translate: 0 -22px; }
.lz.is-live .lz__step.is-on { opacity: 1; translate: 0 0; pointer-events: auto; }
.lz.is-live .lz__step h3 { font-size: clamp(22px, 1.9vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.lz.is-live .lz__step p { font-size: var(--t-lead); line-height: 1.5; color: var(--muted); }
.lz.is-live .lz__nav { position: relative; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 16px; }
.lz__line { position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.lz__line i { display: block; height: 100%; width: calc(var(--lz-p, 0) * 100%); background: var(--accent, #3cb371); border-radius: inherit; }
.lz__nav button { font: 500 14px/1 var(--font-text); color: var(--muted); background: none; border: 0; padding: 8px 12px; border-radius: 99px; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.lz__nav button:hover { color: var(--ink); }
.lz__nav button.is-on { color: #1f7a4d; background: rgb(60 179 113 / .14); }
.lz.is-live .lz__stage { display: block; position: relative; width: 100%; height: min(calc(100svh - var(--nav, 72px) - 56px), 720px);
  container-type: size; overflow: hidden; border-radius: 24px; box-shadow: 0 40px 80px -56px rgb(10 22 40 / .45); }
.lz__track { display: flex; flex-direction: column; gap: 24px; will-change: transform;
  transform: translate3d(0, calc(var(--lz-x, 0) * (-100cqh - 24px)), 0); }
.lz__track > .lz__shot { flex: none; height: 100cqh; margin: 0; border-radius: 24px; }
.lz__track > .lz__shot > .pc-ui { height: 100%; aspect-ratio: auto; }
@media print { .lz.is-live { height: auto; } .lz.is-live > .lz__grid { position: static; height: auto; } }

/* ---------------------------------------------------------------- pezzi in più per le pagine Funzioni e Centri studi */
.tw-paper { display: grid; padding: 4.5%; border-radius: 22px; overflow: hidden; background-color: #fcfdfb;
  background-image: linear-gradient(90deg, transparent 47px, rgb(208 69 59 / .45) 47px, rgb(208 69 59 / .45) 49px, transparent 49px),
    repeating-linear-gradient(transparent 0 27px, rgb(47 93 168 / .18) 27px 28px);
  box-shadow: 0 40px 80px -56px rgb(10 22 40 / .45); }
.tw-paper > .tw { width: 100%; height: 100%; min-height: 0; }
.tw__body--full { grid-template-columns: minmax(0, 1fr); }
.tw-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tw-ex { margin: 0; padding: 0 0 0 18px; display: grid; gap: 3px; font: 500 11.5px/1.45 "Geist Mono", ui-monospace, monospace; color: var(--tw-ink); list-style: decimal; }
.tw-ex em { font-style: normal; color: var(--tw-deep); }
.tw-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tw-act { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tw-muted); }
.tw-input { margin-top: auto; display: flex; gap: 6px; align-items: center; padding-top: 10px; border-top: 1px solid var(--tw-border); }
.tw-sq { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--tw-border); color: var(--tw-muted); }
.tw-sq--mint { color: var(--tw-mint); }
.tw-ph { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--tw-border); border-radius: 10px; font-size: 11.5px; color: var(--tw-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.tw-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tw-kpis small { display: block; font-size: 11px; color: var(--tw-muted); }
.tw-kpis b { display: block; margin: 2px 0; font-size: 18px; font-weight: 700; color: var(--tw-deep); letter-spacing: -0.01em; }
.tw-av2 { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--tw-ink); }
.tw-flip { display: grid; justify-items: end; }
.tw-flip > * { grid-area: 1 / 1; }
.tw-flip > :first-child { visibility: hidden; }
.tw-toast { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; background: var(--tw-ink); color: #fff; font-size: 11.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 16px 30px -14px rgb(10 22 40 / .6); }
.tw-toast svg.i { color: var(--tw-mint); }
.tw-profile { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.tw-profile > i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 17px; background: linear-gradient(135deg, #d8f0e2, #b9e4cb); color: var(--tw-deep); }
.tw-profile b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.tw-profile small { display: block; font-size: 11.5px; color: var(--tw-muted); }
.tw-stars { display: flex; align-items: center; gap: 2px; margin-top: 3px; color: #f59e0b; font-size: 11px; }
.tw-stars svg.i { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; }
.tw-stars span { margin-left: 5px; color: var(--tw-muted); }
.tw-slots { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-slot { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--tw-border); background: #fff; font-size: 11.5px; font-weight: 500; }
.tw-slot.is-on { border-color: var(--tw-mint); background: var(--tw-light); color: var(--tw-deep); }
.tw-quote { margin: 0; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--tw-border); font-size: 12px; line-height: 1.5; color: var(--tw-ink); }
.tw-quote small { display: block; margin-top: 4px; color: var(--tw-muted); font-size: 11px; }
@keyframes twFlipOut { to { visibility: hidden; opacity: 0; } }
@keyframes twFlipIn { from { visibility: hidden; opacity: 0; transform: scale(.8); } to { visibility: visible; opacity: 1; transform: none; } }
@keyframes twToast { from { opacity: 0; translate: -50% 16px; } to { opacity: 1; translate: -50% 0; } }
@media (prefers-reduced-motion: no-preference) {
  .tw-play .tw__main > :nth-child(5) { animation-delay: .32s; } .tw-play .tw__main > :nth-child(6) { animation-delay: .4s; } .tw-play .tw__main > :nth-child(7) { animation-delay: .48s; }
  .tw-play .tw-flip > :first-child { visibility: visible; animation: twFlipOut 0s linear 1.6s both; }
  .tw-play .tw-flip > :last-child { animation: twFlipIn .35s cubic-bezier(.3, 1.5, .5, 1) 1.6s both; }
  .tw-play .tw-toast { animation: twToast .5s cubic-bezier(.16, 1, .3, 1) 2.2s both; }
  .tw-play .tw-slot.is-on { animation: twFlipIn .35s ease 1.2s both; }
  .tw-play .tw-ex li { animation: twRise .4s ease both; }
  .tw-play .tw-ex li:nth-child(1) { animation-delay: .5s; } .tw-play .tw-ex li:nth-child(2) { animation-delay: .65s; } .tw-play .tw-ex li:nth-child(3) { animation-delay: .8s; }
}

/* ---------------------------------------------------------------- centri studi: la Mappa della sede (gestione/mappa) */
.tw-time { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px 10px; padding: 10px 12px; }
.tw-time > svg.i { width: 16px; height: 16px; color: var(--tw-muted); }
.tw-time b { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tw-now { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgb(60 179 113 / .15); color: var(--tw-deep); font-size: 10.5px; font-weight: 600; transition: opacity .3s ease; }
.tw-now svg.i { width: 11px; height: 11px; }
.tw-now.is-off { opacity: 0; }
.tw-slider { grid-column: 1 / -1; position: relative; height: 4px; border-radius: 99px; background: #e5e8ec; margin: 6px 2px 2px; }
.tw-slider::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--k, .5) * 100%); border-radius: inherit; background: var(--tw-mint); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.tw-slider i { position: absolute; top: 50%; left: calc(var(--k, .5) * 100%); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--tw-mint), 0 2px 6px rgb(0 0 0 / .2); transition: left .9s cubic-bezier(.2, .7, .2, 1); }
.tw-map { padding: 10px; display: grid; gap: 8px; }
.tw-map__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tw-floors { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--tw-bg); font-size: 10.5px; }
.tw-floors span { padding: 3px 8px; border-radius: 7px; color: var(--tw-muted); white-space: nowrap; }
.tw-floors span.is-on { background: #fff; color: var(--tw-ink); font-weight: 600; box-shadow: 0 1px 2px rgb(10 22 40 / .1); }
.tw-count2 { font-size: 10.5px; color: var(--tw-muted); white-space: nowrap; }
.tw-plan { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--tw-border); background: var(--tw-bg); }
.tw-plan .wall { fill: none; stroke: rgb(10 22 40 / .8); stroke-width: 4; stroke-linejoin: round; }
.tw-plan .door { fill: none; stroke: rgb(10 22 40 / .45); stroke-width: 1.2; stroke-dasharray: 3 3; }
.tw-plan .furn { fill: rgb(10 22 40 / .05); stroke: rgb(10 22 40 / .3); stroke-width: 1; }
.tw-plan .lbl { font: 600 13px "Geist", system-ui, sans-serif; fill: var(--tw-ink); text-anchor: middle; }
.tw-plan .det { font: 400 10.5px "Geist", system-ui, sans-serif; fill: var(--tw-muted); text-anchor: middle; }
.tw-plan .free { font: 500 11px "Geist", system-ui, sans-serif; fill: var(--tw-muted); text-anchor: middle; }
.tw-room rect { stroke-width: 1.5; transition: fill .5s ease, stroke .5s ease; }
.tw-room--n rect { fill: #fff; stroke: rgb(10 22 40 / .4); }
.tw-room--l rect { fill: rgb(60 179 113 / .15); stroke: #3cb371; }
.tw-room--o rect { fill: rgb(244 63 94 / .15); stroke: #f43f5e; }
.tw-room--c rect { fill: rgb(156 163 175 / .15); stroke: #9ca3af; }
.tw-legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--tw-muted); }
.tw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tw-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid; }
.tw-legend .l { background: rgb(60 179 113 / .3); border-color: #3cb371; }
.tw-legend .o { background: rgb(244 63 94 / .2); border-color: #f43f5e; }
.tw-legend .c { background: rgb(156 163 175 / .2); border-color: #9ca3af; }
.tw-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--tw-mint); white-space: nowrap; }
.tw-link svg.i { width: 12px; height: 12px; }

/* ---------------------------------------------------------------- centri studi: il passaggio di consegne (scheda studente) */
.tw-ass { display: grid; gap: 8px; }
.tw-ass .tw-title { margin: 0; }
.tw-ass__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--tw-border); border-radius: 10px; }
.tw-ass__row b { display: block; font-size: 12.5px; font-weight: 600; }
.tw-ass__row small { display: block; font-size: 11px; color: var(--tw-muted); }
.tw-mini { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--tw-border); font-size: 11px; font-weight: 500; color: var(--tw-ink); white-space: nowrap; background: #fff; }
.tw-mini svg.i { width: 11px; height: 11px; }
.tw-ass__btns { display: flex; gap: 4px; }
.tw-ass__pick { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 6px 8px; padding: 0 10px; max-height: 0; overflow: hidden; border-radius: 10px; background: var(--tw-bg); visibility: hidden; opacity: 0; margin-top: -8px; }
.tw-ass__pick small { grid-column: 1 / -1; font-size: 10.5px; color: var(--tw-muted); line-height: 1.4; }
.tw-select { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--tw-border); background: #fff; font-size: 11.5px; white-space: nowrap; }
.tw-select svg.i { width: 11px; height: 11px; transform: rotate(90deg); color: var(--tw-muted); }
.tw-swap { display: inline-grid; }
.tw-swap > * { grid-area: 1 / 1; }
.tw-swap > :first-child { visibility: hidden; }
.tw-hand { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px dashed rgb(60 179 113 / .5); }
.tw-person { display: grid; justify-items: center; gap: 3px; font-size: 10.5px; color: var(--tw-muted); white-space: nowrap; }
.tw-person > i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 11px; }
.tw-person--old > i { background: #eef0f3; color: #4d5257; }
.tw-person--new > i { background: rgb(60 179 113 / .2); color: var(--tw-deep); }
.tw-hand__track { position: relative; container-type: inline-size; height: 56px; }
.tw-hand__track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed rgb(10 22 40 / .18); }
.tw-pkt { position: absolute; left: 0; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 8px; background: var(--tw-light); border: 1px solid rgb(60 179 113 / .35); color: var(--tw-deep); font-size: 10.5px; font-weight: 600; white-space: nowrap;
  translate: calc(100cqw - 100%) 0; }
.tw-pkt svg.i { width: 11px; height: 11px; }
.tw-pkt:nth-child(1) { top: 0; } .tw-pkt:nth-child(2) { bottom: 0; }
.tw-closed { font-size: 10.5px; color: var(--tw-muted); }
.tw-closed b { color: var(--tw-ink); font-weight: 600; }
@keyframes twPkt { from { translate: 0 0; } to { translate: calc(100cqw - 100%) 0; } }
@keyframes twPress2 { 0%, 100% { transform: none; } 40% { transform: scale(.92); box-shadow: 0 0 0 4px rgb(60 179 113 / .25); } }
@keyframes twPick { 0% { visibility: visible; opacity: 0; max-height: 0; padding-block: 0; margin-top: -8px; } 12% { opacity: 1; max-height: 140px; padding-block: 10px; margin-top: 0; } 86% { opacity: 1; visibility: visible; max-height: 140px; padding-block: 10px; margin-top: 0; } 100% { opacity: 0; visibility: hidden; max-height: 0; padding-block: 0; margin-top: -8px; } }
@media (prefers-reduced-motion: no-preference) {
  .tw-play .tw-ass__btns .tw-mini:first-child { animation: twPress2 .45s ease .5s both; }
  .tw-play .tw-ass__pick { animation: twPick 2.9s linear .8s both; }
  .tw-play .tw-ass__pick .tw-btn { animation: twPress2 .45s ease 2.1s both; }
  .tw-play .tw-pkt { animation: twPkt 1.2s cubic-bezier(.6, .05, .25, 1) 2.5s both; }
  .tw-play .tw-pkt:nth-child(2) { animation-delay: 2.75s; }
  .tw-play .tw-swap > :first-child { visibility: visible; animation: twFlipOut 0s linear 3.9s both; }
  .tw-play .tw-swap > :last-child { animation: twFlipIn .35s ease 3.9s both; }
  .tw-play .tw-closed { animation: twRise .4s ease 4.2s both; }
  .tw-play .tw-toast { animation: twToast .5s cubic-bezier(.16, 1, .3, 1) 4.5s both; }
}

/* tutoro/funzioni.css */
/*
  Tutoro · pagina Funzioni (riunione del 19 novembre, secondo giro: "tutte le funzioni, con animazioni carine").
  Sei capitoli. In ognuno: a sinistra (o a destra, alternati) una schermata dell'app che resta ferma mentre
  scorrono le schede e si anima quando entra (schermi.css/.js, data-tw-play); dall'altra parte le schede, una per
  funzione, con l'icona dell'app, cosa fa e il piano. Le schede entrano una dopo l'altra (polish.js) e rispondono
  al puntatore. Sotto i 1024px la schermata va sopra le schede.
*/
.fz__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--s-5); align-items: end; margin-bottom: var(--s-7); }
.fz__head .chap-num { margin: 0; }
.fz__head h2 { margin: 0; }
.fz__head .t-lead { margin: var(--s-3) 0 0; max-width: 56ch; }
.fz__head .t-lead .plan { vertical-align: middle; margin-left: 6px; }
.fz__head .chap-doodle { margin: 0; width: 92px; height: 92px; }

.fz__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.fz--flip .fz__shot { order: 2; }
.fz__shot { position: sticky; top: calc(var(--nav, 72px) + 24px); margin: 0; }
.fz__shot .tw-paper { aspect-ratio: 1 / 1; max-height: calc(100svh - var(--nav, 72px) - 48px); }

.fz__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fz__card { position: relative; display: grid; align-content: start; gap: 8px; padding: 20px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line);
  transition: translate .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .3s ease; }
.fz__card h3 { margin: 4px 0 0; font: 600 17px/1.25 var(--font-text); letter-spacing: -0.01em; color: var(--ink); }
.fz__card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.fz__card .plan { justify-self: start; margin-top: 4px; }
.fz__ico { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: #edfaf4; color: #3cb371;
  transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), background-color .3s ease, color .3s ease; }
.fz__ico svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .fz__card:hover { translate: 0 -4px; box-shadow: 0 24px 48px -32px rgb(10 22 40 / .4); border-color: rgb(60 179 113 / .5); }
  .fz__card:hover .fz__ico { transform: rotate(-8deg) scale(1.1); background: #3cb371; color: #fff; }
}
/* l'icona arriva con un piccolo salto quando entra la sua scheda */
@keyframes fzPop { from { transform: scale(.3) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html.pl-js .fz__card.rv-in .fz__ico { animation: fzPop .6s cubic-bezier(.3, 1.5, .5, 1) .18s both; }
}

/* gli strumenti, materia per materia */
.fz__tools { display: grid; gap: 26px; align-content: start; }
.fz__subj h3 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 600 19px/1.2 var(--font-text); letter-spacing: -0.01em; }
.fz__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fz__chip { padding: 9px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 15px; color: var(--ink);
  transition: translate .3s cubic-bezier(.2, .7, .2, 1), border-color .25s ease, background-color .25s ease, color .25s ease; }
@media (hover: hover) and (pointer: fine) {
  .fz__chip:hover { translate: 0 -2px; border-color: #3cb371; background: #edfaf4; color: #1f7a4d; }
}

/* sulla lavagna */
.ground-inverse .fz__card { background: rgb(255 255 255 / .06); border-color: rgb(238 244 238 / .14); }
.ground-inverse .fz__card h3 { color: var(--chalk, #eef4ee); }
.ground-inverse .fz__card p { color: var(--p-inv-muted, #a3b3a8); }
.ground-inverse .fz__ico { background: rgb(60 179 113 / .2); color: #7fe0a8; }
@media (hover: hover) and (pointer: fine) {
  .ground-inverse .fz__card:hover { border-color: rgb(127 224 168 / .55); box-shadow: 0 24px 48px -28px rgb(0 0 0 / .7); }
}

@media (max-width: 1023px) {
  .fz__body { grid-template-columns: minmax(0, 1fr); }
  .fz--flip .fz__shot { order: 0; }
  .fz__shot { position: static; width: min(100%, 560px); justify-self: center; }
  .fz__shot .tw-paper { max-height: none; }
  .fz__head .chap-doodle { display: none; }
  .fz__head { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 639px) {
  .fz__grid { grid-template-columns: minmax(0, 1fr); }
  .fz__shot .tw-paper { aspect-ratio: 4 / 5; padding: 3%; }
  .fz__head { grid-template-columns: minmax(0, 1fr); }
  .fz__head .chap-num { font-size: 48px; }
}

/* l'indice: il numero di pagina non va mai a capo da solo */
.toc a .pg { flex: none; white-space: nowrap; }
.toc .ttl { min-width: 0; }

/* ---- telefono (novembre 2026, "da mobile non si vede bene") ----
   L'indice: il foglio prendeva il margine destro di 84px pensato per il voto cerchiato della pagina errori, e i
   titoli andavano a capo staccando "p. 2" dal numero. Le schede: icona accanto al titolo, metà dell'aria. */
@media (max-width: 639px) {
  nav.sheet--ruled { padding: 26px 18px 26px 62px; }
  .toc a { font-size: 23px; gap: 8px; }
  .toc .ttl { min-width: 0; }
  .toc a .pg { flex: none; white-space: nowrap; }
  .toc a::after { min-width: 8px; }
  .fz__grid { gap: 10px; }
  .fz__card { grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 6px; align-items: center; padding: 16px; border-radius: 16px; }
  .fz__card .fz__ico { width: 34px; height: 34px; border-radius: 10px; }
  .fz__card .fz__ico svg.i { width: 18px; height: 18px; }
  .fz__card h3 { margin: 0; font-size: 16.5px; }
  .fz__card p { grid-column: 1 / -1; font-size: 14.5px; }
  .fz__card .plan { grid-column: 1 / -1; margin-top: 2px; }
  .fz__chip { padding: 8px 12px; font-size: 14px; }
}

