/* 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/scene.css */
/*
  Tutoro · le scene delle quattro funzioni in home (#funzioni). Il motore è scene.js.
  Regola di casa: lo stile di base è il QUADRO FINITO, quello che resta senza script o con prefers-reduced-motion.
  Il punto di partenza vale solo mentre la scena gira (.sc-run) e finché la sua tappa non è arrivata:
      .sc-run:not(.s4) .x { …com'era prima della tappa 4… }
  Colori e forme dell'app (come schermi.css): mint #3CB371, deep #2E9B5E, light #EDFAF4, ink #0A1628, muted #6B7280.
  Si muove solo transform, opacity, filter e qualche colore: niente che rifaccia l'impaginazione a ogni fotogramma,
  tranne le due righe che si aprono (grid-template-rows) e il cursore (left/top), che sono piccoli.
*/
.sc {
  --mint: #3cb371; --deep: #2e9b5e; --light: #edfaf4; --ink: #0a1628; --muted: #6b7280; --faint: #9ca3af;
  --line: #e8eaed; --bg: #f4f6fa; --amber: #f59e0b; --amber-ink: #c2410c;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); --io: cubic-bezier(.65, 0, .35, 1);
  position: absolute; inset: 0; z-index: 1; container-type: size; overflow: hidden;
  font: 400 12.5px/1.4 "Geist", var(--font-text, system-ui), sans-serif; color: var(--ink); letter-spacing: 0; text-align: left;
  -webkit-font-smoothing: antialiased;
}
.sc *, .sc *::before, .sc *::after { box-sizing: border-box; }
.sc svg.i { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc b { font-weight: 600; }
.sc small { font-size: inherit; }

/* il giro: alla fine sfuma, torna all'inizio senza transizioni e riappare */
.sc-stage { position: absolute; inset: 0; transition: opacity .6s ease, filter .6s ease, transform .6s var(--ease); }
.sc.is-out .sc-stage { opacity: 0; filter: blur(6px); transform: scale(.985); }
.sc.sc-reset, .sc.sc-reset *, .sc.sc-reset *::before, .sc.sc-reset *::after { transition: none !important; animation: none !important; }
.sc.is-paused *, .sc.is-paused *::before, .sc.is-paused *::after { animation-play-state: paused !important; }

/* la scheda bianca dell'app, con un'ombra a strati come un foglio appoggiato sul quaderno */
.sc-card { position: absolute; background: #fff; border-radius: 16px;
  box-shadow: 0 0 0 1px rgb(10 22 40 / .07), 0 1px 2px rgb(10 22 40 / .05), 0 12px 24px -14px rgb(10 22 40 / .2), 0 36px 64px -36px rgb(10 22 40 / .45); }

/* numeri che scorrono: .roll > .roll__in > span, la riga visibile è --k (0, 1, 2) */
.sc .roll { display: inline-block; height: 1.25em; line-height: 1.25em; overflow: hidden; vertical-align: bottom; }
.sc .roll__in { display: flex; flex-direction: column; transform: translateY(calc(var(--k, 0) * -1.25em)); transition: transform .7s var(--ease); }
.sc .roll__in > span { display: block; height: 1.25em; }

/* il bottone di pausa (system.css .loop-pause), chiaro come la carta su cui sta; col mouse si vede quando si passa
   sulla scheda. L'alone del kit dietro le schede (.panel::before) sulla carta faceva una macchia grigia: qui è bianco. */
#funzioni .panel > .sc-pause { background: #fff; color: #0a1628; border-color: rgb(10 22 40 / .12); }
#funzioni .panel:has(> .sc)::before { background: radial-gradient(ellipse 62% 58% at 55% 52%, rgb(255 255 255 / .85), rgb(255 255 255 / 0) 72%); }
@media (hover: hover) and (pointer: fine) {
  .panel > .sc-pause { opacity: 0; transition: opacity .25s ease; }
  .panel:hover > .sc-pause, .panel > .sc-pause:focus-visible, .panel > .sc-pause[aria-label^="Riprendi"] { opacity: 1; }
}

@keyframes scPop { 0% { transform: scale(.55); } 55% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes scFlash { 0% { background-color: rgb(60 179 113 / 0); } 20% { background-color: rgb(60 179 113 / .13); } 100% { background-color: rgb(60 179 113 / 0); } }
@keyframes scSpin { to { transform: rotate(360deg); } }
@keyframes scRipple { from { transform: translate(-50%, -50%) scale(.2); opacity: .6; } to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@keyframes scPing { from { transform: scale(1); opacity: .7; } to { transform: scale(1.45); opacity: 0; } }
@keyframes scShine { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes scSkel { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes scPress { 0% { transform: scale(1); } 35% { transform: scale(.955); } 100% { transform: scale(1); } }
@keyframes scClick { 0% { transform: scale(1); } 40% { transform: scale(.82); } 100% { transform: scale(1); } }


/* ============================================================ 1. il piano di studio
   La nota di fine lezione (il post-it della home) si attacca alla pagina, l'AI la legge ("Leggo le note delle
   lezioni…", la scritta vera dell'app), la nota entra nel piano: Sistemi di disequazioni diventa fatto con la
   frase della nota come prova ("Spuntato dall'AI"), Funzioni passa in corso, l'anello sale 63 → 75 → 88%.
   Tappe: s1 nota · s2 lettura · s3 la nota entra · s4 fatto · s5 la prova · s6 in corso */
.pln { left: 50%; top: 50%; width: min(392px, calc(100% - 84px)); transform: translate(calc(-50% + 18px), -50%); padding: 14px 0 4px; }
.pln__head { display: flex; align-items: center; gap: 12px; padding: 0 16px 12px; }
.pln__ring { position: relative; width: 46px; height: 46px; flex: none; --k: 2; }
.pln__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.pln__ring circle { fill: none; stroke-width: 4; }
.pln__ring circle:first-child { stroke: rgb(60 179 113 / .15); }
.pln__arc { stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: 12; transition: stroke-dashoffset 1.1s var(--ease); }
.pln__pct { position: absolute; left: 0; right: 0; top: 50%; margin-top: -.625em; text-align: center; font: 700 10.5px/1.25 "Geist", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.sc-run:not(.s4) .pln__ring { --k: 0; }
.sc-run.s4:not(.s6) .pln__ring { --k: 1; }
.sc-run:not(.s4) .pln__arc { stroke-dashoffset: 37; }
.sc-run.s4:not(.s6) .pln__arc { stroke-dashoffset: 25; }

.pln__txt { min-width: 0; flex: 1; display: grid; gap: 1px; }
.pln__txt > small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pln__txt > b { font-size: 14.5px; line-height: 1.25; letter-spacing: -.01em; }
.pln__line { display: grid; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pln__line > span { grid-area: 1 / 1; display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .35s ease, transform .5s var(--ease), filter .35s ease; }
.pln__l1, .pln__l2 { opacity: 0; transform: translateY(-6px); filter: blur(3px); }
.pln__l2 { color: var(--deep); font-weight: 500; }
.pln__spin { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 2px solid rgb(60 179 113 / .25); border-top-color: var(--mint); animation: scSpin .7s linear infinite; }
.sc-run:not(.s2) .pln__l1 { opacity: 1; transform: none; filter: none; }
.sc-run:not(.s2) .pln__l2 { transform: translateY(6px); }
.sc-run.s2:not(.s4) .pln__l2 { opacity: 1; transform: none; filter: none; }
.sc-run:not(.s4) .pln__l3 { opacity: 0; transform: translateY(6px); filter: blur(3px); }

.pln__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pln__row { position: relative; display: grid; grid-template-columns: 17px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 9px 16px; }
.pln__row + .pln__row { border-top: 1px solid rgb(232 234 237 / .75); }
.pln__lb { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 13px; }
.pln__t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted);
  background: linear-gradient(#b8bec7, #b8bec7) no-repeat 0 58% / 100% 1px; transition: color .35s ease, background-size .5s var(--ease) .12s; }
.pln__em { flex: none; font-style: normal; font-size: 11px; font-weight: 500; color: #d97706; opacity: 0; transform: scale(.8); transform-origin: left center;
  transition: opacity .3s ease, transform .45s var(--spring); }
/* il cerchio di stato dell'app: fatto (spunta menta), in corso (pallino ambra), da fare (cerchio grigio) */
.pln__st { position: relative; width: 17px; height: 17px; display: block; }
.pln__st svg { width: 100%; height: 100%; display: block; overflow: visible; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pln__st .o { stroke: var(--mint); transition: stroke .3s ease; }
.pln__st .d { fill: var(--amber); stroke: none; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .4s var(--spring); }
.pln__st .c { stroke: var(--mint); stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease) .1s; }
/* Funzioni: in corso nel quadro finito */
.pln__row--b .pln__t { color: var(--ink); font-weight: 600; background-size: 0 1px; }
.pln__row--b .pln__em { opacity: 1; transform: none; }
.pln__row--b .pln__st .o { stroke: var(--amber); }
.pln__row--b .pln__st .d { transform: scale(1); }
.pln__row--b .pln__st .c { stroke-dashoffset: 1; }
/* prima: Sistemi in corso, Funzioni da fare */
.sc-run:not(.s4) .pln__row--a .pln__t { color: var(--ink); font-weight: 600; background-size: 0 1px; }
.sc-run:not(.s4) .pln__row--a .pln__em { opacity: 1; transform: none; }
.sc-run:not(.s4) .pln__row--a .pln__st .o { stroke: var(--amber); }
.sc-run:not(.s4) .pln__row--a .pln__st .d { transform: scale(1); }
.sc-run:not(.s4) .pln__row--a .pln__st .c { stroke-dashoffset: 1; }
.sc-run:not(.s6) .pln__row--b .pln__t { font-weight: 400; }
.sc-run:not(.s6) .pln__row--b .pln__em { opacity: 0; transform: scale(.8); }
.sc-run:not(.s6) .pln__row--b .pln__st .o { stroke: #cdd2d9; }
.sc-run:not(.s6) .pln__row--b .pln__st .d { transform: scale(0); }
/* il momento del cambio: la riga si illumina e il cerchio fa un piccolo salto */
.sc-run.s4 .pln__row--a, .sc-run.s6 .pln__row--b { animation: scFlash 1.7s ease both; }
.sc-run.s4 .pln__row--a .pln__st, .sc-run.s6 .pln__row--b .pln__st { animation: scPop .5s var(--ease) both; }

/* "Spuntato dall'AI · …": la riga si apre sotto l'argomento */
.pln__ev { grid-column: 2; display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s var(--ease); }
.pln__ev > span { min-height: 0; overflow: hidden; }
.pln__ev > span > span { display: block; padding-top: 3px; font-size: 11.5px; line-height: 1.35; color: var(--muted); transition: opacity .45s ease .18s, transform .55s var(--ease) .18s, filter .45s ease .18s; }
.pln__ev b { color: rgb(10 22 40 / .8); }
.pln__ev i { font-style: italic; }
.sc-run:not(.s5) .pln__ev { grid-template-rows: 0fr; }
.sc-run:not(.s5) .pln__ev > span > span { opacity: 0; transform: translateY(-5px); filter: blur(3px); }

/* la nota di fine lezione: il post-it giallo della home, scritto a mano */
/* in basso a destra, dove le righe del piano sono corte: non copre l'intestazione che dice "Leggo le note…" */
.pln-note { position: absolute; z-index: 3; bottom: 16px; right: max(14px, calc(50% - 292px)); width: 214px; padding: 12px 14px 14px;
  border-radius: 3px; background: #fff4b0; color: #3a3420; font: 600 18px/1.08 var(--hand, "Caveat", cursive);
  box-shadow: 0 1px 0 rgb(0 0 0 / .04), 0 20px 34px -16px rgb(80 60 0 / .5);
  opacity: 0; transform: translate(-150px, -74px) rotate(-8deg) scale(.2);
  transition: opacity .3s ease .25s, transform .6s cubic-bezier(.55, 0, .75, .2); }
.pln-note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 74px; height: 20px; margin-left: -37px;
  background: rgb(255 255 255 / .6); box-shadow: 0 0 0 1px rgb(0 0 0 / .04); transform: rotate(-3deg); }
.pln-note > b { display: block; margin-bottom: 4px; font-size: 21px; font-weight: 700; color: #2b2610; }
.pln-note__ln { display: block; clip-path: inset(-20% -4% -20% -4%); transition: clip-path .7s cubic-bezier(.5, .1, .3, 1); }
.pln-note__ln:nth-of-type(1) { transition-delay: .45s; }
.pln-note__ln:nth-of-type(2) { transition-delay: 1s; }
.pln-note__ln:nth-of-type(3) { transition-delay: 1.5s; }
.pln-note__scan { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.pln-note__scan::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 25%, rgb(60 179 113 / .32) 50%, transparent 75%); transform: translateX(-110%); }
.sc-run:not(.s1) .pln-note { opacity: 0; transform: translate(22px, 30px) rotate(10deg) scale(1.08); transition: none; }
.sc-run:not(.s1) .pln-note__ln { clip-path: inset(-20% 104% -20% -4%); }
.sc-run.s1:not(.s3) .pln-note { opacity: 1; transform: rotate(-2.5deg); transition: opacity .3s ease, transform .8s var(--spring); }
.sc-run.s2:not(.s3) .pln-note__scan { opacity: 1; }
.sc-run.s2:not(.s3) .pln-note__scan::after { animation: scShine 1s ease-in-out infinite; }

@container (max-width: 470px) {
  .pln { width: calc(100% - 64px); transform: translate(calc(-50% + 14px), -50%); }
  .pln-note { width: 172px; bottom: 10px; right: 10px; padding: 10px 12px 12px; font-size: 16px; transform: translate(-90px, -60px) rotate(-8deg) scale(.2); }
  .pln-note > b { font-size: 18px; }
  .pln__head { gap: 10px; padding: 0 12px 10px; }
  .pln__row { padding: 8px 12px; }
  .pln__lb { font-size: 12.5px; }
  .pln__opt { display: none; }
}


/* ============================================================ 2. le prenotazioni
   A destra la pagina pubblica "Prenota una lezione" (app/prenota): gli orari si caricano e restano solo quelli
   liberi nel Google Calendar a sinistra, Giulia sceglie le 16:00 e manda la richiesta ("Prenotazione inviata!").
   Poi, dalla parte della prof, arriva la notifica, la prof conferma e la lezione entra nel calendario con il Meet.
   Tappe: s1 orari liberi · s2 il cursore va sulle 16 · s3 clic · s4 il cursore va al bottone · s5 inviata ·
   s6 la notifica alla prof · s7 conferma · s8 la lezione nel calendario */
.bkg { position: absolute; inset: 0 0 0 44px; display: flex; align-items: flex-end; justify-content: center; gap: 22px; padding-bottom: max(18px, 7cqh); }
.bkg .sc-card { position: relative; flex: none; }

.gcal { width: 206px; padding: 12px 12px 10px; }
.gcal__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; white-space: nowrap; }
.gcal__head img { width: 18px; height: 18px; flex: none; }
.gcal__head b { font-size: 13px; } .gcal__head small { color: var(--muted); font-size: 11.5px; }
.gcal__grid { position: relative; height: 176px; margin-left: 24px; }
.gcal__hr { position: absolute; left: -24px; right: 0; border-top: 1px solid var(--line); }
.gcal__hr span { position: absolute; left: 0; top: -7px; font-size: 10px; line-height: 1; color: var(--faint); background: #fff; padding-right: 3px; font-variant-numeric: tabular-nums; }
.gcal__hr:nth-child(1) { top: 0; } .gcal__hr:nth-child(2) { top: 44px; } .gcal__hr:nth-child(3) { top: 88px; } .gcal__hr:nth-child(4) { top: 132px; } .gcal__hr:nth-child(5) { top: 176px; }
.gcal__ev { position: absolute; left: 4px; right: 0; height: 40px; padding: 4px 8px; border-radius: 8px; font-size: 11px; line-height: 1.3; overflow: hidden; }
.gcal__ev b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcal__ev small { display: flex; align-items: center; gap: 4px; opacity: .85; }
.gcal__ev small img { width: 12px; height: 12px; }
.gcal__ev--busy { top: 2px; background: #e8f0fe; color: #1a56c4; box-shadow: inset 3px 0 0 #4285f4; }
.gcal__ev--marco { top: 90px; background: var(--light); color: var(--deep); box-shadow: inset 3px 0 0 var(--mint); }
.gcal__ev--new { top: 46px; background: var(--mint); color: #fff; box-shadow: 0 8px 18px -8px rgb(46 155 94 / .7);
  transition: opacity .35s ease, transform .6s var(--spring); }
.gcal__free { position: absolute; left: 4px; right: 0; height: 40px; display: grid; place-items: center; border-radius: 8px;
  border: 1.5px dashed rgb(60 179 113 / .7); background: rgb(60 179 113 / .07); color: var(--deep); font-size: 10.5px; font-weight: 600;
  opacity: 0; transform: scale(.96); transition: opacity .35s ease, transform .45s var(--ease); }
.gcal__free--16 { top: 46px; } .gcal__free--18 { top: 134px; }
.sc-run.s1:not(.s3) .gcal__free { opacity: 1; transform: none; }
.sc-run.s1:not(.s3) .gcal__free--18 { transition-delay: .12s; }
.sc-run:not(.s8) .gcal__ev--new { opacity: 0; transform: translateY(-8px) scale(.92); }

/* la notifica alla prof, appoggiata sopra il calendario: chi ha prenotato, e sotto il bottone Conferma */
.bkt { position: absolute; z-index: 3; left: -14px; right: -14px; bottom: calc(100% - 16px); display: grid; grid-template-columns: 28px minmax(0, 1fr);
  align-items: center; column-gap: 9px; row-gap: 8px; padding: 10px; border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgb(10 22 40 / .08), 0 18px 36px -16px rgb(10 22 40 / .45); transition: opacity .35s ease, transform .6s var(--spring); }
.bkt__av { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #d8f0e2; color: var(--deep); font-size: 10.5px; font-weight: 700; }
.bkt__txt { min-width: 0; display: grid; line-height: 1.25; }
.bkt__txt b { font-size: 12px; white-space: nowrap; }
.bkt__txt small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkt__act { grid-column: 1 / -1; display: grid; }
.bkt__act > span { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 9px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  transition: opacity .3s ease, transform .45s var(--spring); }
.bkt__ok { background: var(--mint); color: #fff; opacity: 0; transform: scale(.8); }
.bkt__done { background: var(--light); color: var(--deep); }
.bkt__done img { width: 13px; height: 13px; }
.sc-run:not(.s6) .bkt { opacity: 0; transform: translateY(-12px) scale(.96); }
.sc-run:not(.s8) .bkt__ok { opacity: 1; transform: none; }
.sc-run:not(.s8) .bkt__done { opacity: 0; transform: scale(.8); }
.sc-run.s7 .bkt__ok { animation: scPress .4s var(--ease); background: var(--deep); }

/* la pagina pubblica: le misure sono fisse perché il cursore sa dove andare */
.bkp { width: 250px; padding: 14px; display: grid; gap: 10px; }
.bkp__head { display: flex; align-items: center; gap: 10px; height: 36px; }
.bkp__logo { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--mint); color: #fff; box-shadow: 0 8px 16px -8px rgb(60 179 113 / .9); }
.bkp__logo svg.i { width: 17px; height: 17px; }
.bkp__head b { display: block; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
.bkp__head small { display: block; color: var(--muted); font-size: 11.5px; }
.bkp__day { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 10px; background: var(--bg); font-size: 12px; font-weight: 500; }
.bkp__day svg.i { width: 13px; height: 13px; color: var(--deep); }
.bkp__lbl { height: 13px; font-size: 10px; line-height: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.bkp__slots { display: grid; gap: 7px; }
.bkp__slot { position: relative; display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px 0 12px; border-radius: 12px;
  border: 1px solid var(--mint); background: var(--light); color: var(--deep); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 3px rgb(60 179 113 / .14); transition: border-color .3s ease, background-color .3s ease, color .3s ease, box-shadow .3s ease; }
.bkp__slot + .bkp__slot { border-color: var(--line); background: #fff; color: var(--ink); box-shadow: none; }
.bkp__slot::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; opacity: 0; transition: opacity .35s ease;
  background: linear-gradient(90deg, #eef0f3 30%, #f8f9fb 50%, #eef0f3 70%) 0 0 / 300% 100%; }
.bkp__slot + .bkp__slot::after { transition-delay: .12s; }
.bkp__ok { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff; transition: transform .45s var(--spring); }
.bkp__ok svg.i { width: 11px; height: 11px; stroke-width: 3; }
.bkp__btn { height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--mint); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 10px 18px -10px rgb(46 155 94 / .9); transition: background-color .35s ease, color .35s ease, box-shadow .35s ease; }
.sc-run:not(.s1) .bkp__slot::after { opacity: 1; animation: scSkel 1.2s linear infinite; }
.sc-run:not(.s3) .bkp__slot--a { border-color: var(--line); background: #fff; color: var(--ink); box-shadow: none; }
.sc-run.s2:not(.s3) .bkp__slot--a { border-color: rgb(60 179 113 / .55); transition-delay: .7s; }
.sc-run:not(.s3) .bkp__ok { transform: scale(0); }
.sc-run.s3 .bkp__slot--a { animation: scPress .45s var(--ease); }
.sc-run:not(.s3) .bkp__btn { background: #eceef1; color: #a3a9b2; box-shadow: none; }
.sc-run.s5 .bkp__btn { animation: scPress .45s var(--ease); }

/* "Prenotazione inviata!": il riepilogo che copre la pagina */
.bkp__done { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 4px; padding: 16px; border-radius: inherit;
  background: radial-gradient(120% 70% at 50% 0%, #f2fbf6, #fff 70%); text-align: center; transition: opacity .4s ease .12s; }
.bkp__done svg.big { width: 52px; height: 52px; margin-bottom: 8px; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bkp__done .big circle { fill: var(--light); stroke: var(--mint); stroke-width: 2.5; transform-box: fill-box; transform-origin: center; transition: transform .55s var(--spring) .15s; }
.bkp__done .big path { stroke: var(--mint); stroke-width: 3.2; stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease) .45s; }
.bkp__done b { font-size: 15px; letter-spacing: -.01em; }
.bkp__done small { font-size: 11.5px; color: var(--muted); }
.bkp__done .sum { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: var(--light); color: var(--deep); font-size: 11.5px; font-weight: 600; }
.sc-run:not(.s5) .bkp__done { opacity: 0; }
.sc-run:not(.s5) .bkp__done .big circle { transform: scale(.4); }
.sc-run:not(.s5) .bkp__done .big path { stroke-dashoffset: 1; }

/* il cursore di chi prenota: un punto (la punta) che si sposta, con il clic che fa l'onda */
.bkc { position: absolute; z-index: 4; left: 66%; top: 228px; width: 0; height: 0; opacity: 0; pointer-events: none;
  transition: left .8s var(--io), top .8s var(--io), opacity .3s ease .35s; }
.bkc svg { position: absolute; left: -3px; top: -2px; width: 20px; height: 20px; max-width: none; overflow: visible; transform-origin: 3px 2px; filter: drop-shadow(0 3px 4px rgb(10 22 40 / .3)); }
.bkc::after { content: ""; position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: rgb(60 179 113 / .35); opacity: 0; transform: translate(-50%, -50%) scale(.2); }
.sc-run:not(.s2) .bkc { left: 112%; top: 290px; opacity: 0; transition: none; }
.sc-run.s2:not(.s5) .bkc { opacity: 1; transition: left .85s var(--io), top .85s var(--io), opacity .25s ease; }
.sc-run.s2:not(.s4) .bkc { left: 64%; top: 141px; }
.sc-run.s3:not(.s4) .bkc::after, .sc-run.s5 .bkc::after { animation: scRipple .55s ease-out; }
.sc-run.s3:not(.s4) .bkc svg, .sc-run.s5:not(.s6) .bkc svg { animation: scClick .3s ease; }

@container (max-width: 540px) {
  .bkg { inset: 0 0 0 40px; align-items: center; padding-bottom: 0; }
  .gcal { display: none; }
}
@container (max-height: 300px) {
  .bkg { align-items: center; padding-bottom: 0; }
  .bkp { transform: scale(.9); }
}


/* ============================================================ 3. le fatture
   Arriva il pagamento con carta, la fattura n. 42 si compila riga per riga, parte allo SDI (Emessa → Inviata allo
   SDI → Consegnata), il timbro "Consegnata" e il conto delle fatture incluse nel mese sale di uno.
   Tappe: s1 pagamento · s2 e s3 le righe · s4 emessa · s5 in invio · s6 inviata · s7 consegnata */
.fat { left: 50%; top: 50%; width: min(356px, calc(100% - 84px)); transform: translate(calc(-50% + 16px), calc(-50% + 16px)); padding: 14px 16px 12px; }
.fat__head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fat__ico { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--light); color: var(--deep); }
.fat__ico svg.i { width: 16px; height: 16px; }
.fat__head b { display: block; font-size: 14px; letter-spacing: -.01em; }
.fat__head small { display: block; font-size: 11.5px; color: var(--muted); }
.fat__rows { padding: 6px 0 2px; }
.fat__row { display: grid; grid-template-columns: 82px minmax(0, 1fr); align-items: center; height: 26px; }
.fat__row small { font-size: 11px; color: var(--faint); }
.fat__v { position: relative; min-width: 0; justify-self: start; max-width: 100%; }
.fat__v > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .4s ease, filter .4s ease, transform .5s var(--ease); }
.fat__v::before { content: ""; position: absolute; left: 0; top: 50%; width: var(--sk, 120px); height: 9px; margin-top: -4.5px; border-radius: 99px;
  background: linear-gradient(90deg, #eef0f3 30%, #f8f9fb 50%, #eef0f3 70%) 0 0 / 300% 100%; opacity: 0; transition: opacity .3s ease; }
.fat__row--tot { height: 34px; margin-top: 4px; border-top: 1px dashed #dfe3e8; }
.fat__row--tot .fat__v > span { font-size: 16px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.fat__row:nth-child(2) .fat__v > span, .fat__row:nth-child(4) .fat__v > span { transition-delay: .16s; }
.fat__row:nth-child(2) .fat__v::before, .fat__row:nth-child(4) .fat__v::before { transition-delay: .16s; }
.sc-run:not(.s2) .fat__row:nth-child(-n + 2) .fat__v > span, .sc-run:not(.s3) .fat__row:nth-child(n + 3) .fat__v > span { opacity: 0; filter: blur(4px); transform: translateX(-4px); }
.sc-run:not(.s2) .fat__row:nth-child(-n + 2) .fat__v::before, .sc-run:not(.s3) .fat__row:nth-child(n + 3) .fat__v::before { opacity: 1; animation: scSkel 1.2s linear infinite; }

/* Emessa → Inviata allo SDI → Consegnata */
.fat__track { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.fat__rail { position: absolute; left: 16.67%; right: 16.67%; top: 20px; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
.fat__rail i { position: absolute; inset: 0; background: var(--mint); transform-origin: left center; transition: transform .8s var(--ease); }
.fat__step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 5px; font-size: 10.5px; font-weight: 500; color: var(--ink); text-align: center; white-space: nowrap; transition: color .3s ease; }
.fat__dot { position: relative; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #fff;
  box-shadow: 0 0 0 4px #fff; transition: background-color .3s ease, box-shadow .3s ease; }
.fat__dot svg.i { width: 11px; height: 11px; stroke-width: 3; transition: opacity .25s ease, transform .45s var(--spring); }
.fat__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(60 179 113 / .22); border-top-color: var(--mint); opacity: 0; transition: opacity .2s ease; }
.sc-run:not(.s4) .fat__rail i, .sc-run:not(.s5) .fat__rail i { transform: scaleX(0); }
.sc-run.s5:not(.s6) .fat__rail i { transform: scaleX(.5); }
.sc-run:not(.s4) .fat__step--1 .fat__dot, .sc-run:not(.s5) .fat__step--2 .fat__dot, .sc-run:not(.s6) .fat__step--3 .fat__dot,
.sc-run.s5:not(.s6) .fat__step--2 .fat__dot, .sc-run.s6:not(.s7) .fat__step--3 .fat__dot { background: #fff; box-shadow: inset 0 0 0 2px #dfe3e8, 0 0 0 4px #fff; }
.sc-run:not(.s4) .fat__step--1 svg.i, .sc-run:not(.s6) .fat__step--2 svg.i, .sc-run:not(.s7) .fat__step--3 svg.i { opacity: 0; transform: scale(.3); }
.sc-run:not(.s4) .fat__step--1, .sc-run:not(.s5) .fat__step--2, .sc-run:not(.s6) .fat__step--3 { color: var(--faint); }
.sc-run.s5:not(.s6) .fat__step--2 .fat__dot, .sc-run.s6:not(.s7) .fat__step--3 .fat__dot { box-shadow: 0 0 0 4px #fff; }
.sc-run.s5:not(.s6) .fat__step--2 .fat__dot::after, .sc-run.s6:not(.s7) .fat__step--3 .fat__dot::after { opacity: 1; animation: scSpin .7s linear infinite; }
.sc-run.s4 .fat__step--1 .fat__dot, .sc-run.s6 .fat__step--2 .fat__dot, .sc-run.s7 .fat__step--3 .fat__dot { animation: scPop .5s var(--ease) both; }

.fat__foot { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fat__foot .roll { font-weight: 700; color: var(--ink); text-align: right; }
.fat__foot .roll__in { --k: 1; }
.sc-run:not(.s7) .fat__foot .roll__in { --k: 0; }

/* il timbro: arriva dall'alto, grande e storto, e si posa sulla riga del totale, dove c'è spazio */
.fat__row--tot { position: relative; }
.fat__stamp { position: absolute; z-index: 2; right: 2px; top: 50%; margin-top: -17px; display: grid; justify-items: center; gap: 1px; padding: 5px 10px 4px; border-radius: 9px;
  border: 2px solid var(--mint); background: rgb(237 250 244 / .92); color: var(--deep); font: 700 11.5px/1 "Geist", system-ui, sans-serif; letter-spacing: .09em; text-transform: uppercase;
  box-shadow: 0 8px 18px -8px rgb(46 155 94 / .6); transform: rotate(-9deg); transition: opacity .2s ease, transform .5s cubic-bezier(.2, 1.5, .4, 1); }
.fat__stamp small { font-size: 8.5px; letter-spacing: .14em; color: inherit; opacity: .8; }
.fat__stamp::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; box-shadow: 0 0 0 2px var(--mint); opacity: 0; }
.sc-run:not(.s7) .fat__stamp { opacity: 0; transform: rotate(-18deg) scale(1.8); }
.sc-run.s7 .fat__stamp::after { animation: scPing .7s ease-out .25s; }

/* la notifica del pagamento con carta */
.fat-pay { position: absolute; z-index: 3; right: -26px; top: -30px; width: 236px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 14px;
  background: #fff; box-shadow: 0 0 0 1px rgb(10 22 40 / .08), 0 18px 36px -16px rgb(10 22 40 / .45); transition: opacity .35s ease, transform .65s var(--spring); }
.fat-pay__ico { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #efeeff; color: #635bff; }
.fat-pay__ico svg.i { width: 16px; height: 16px; }
.fat-pay__txt { min-width: 0; flex: 1; display: grid; line-height: 1.25; }
.fat-pay__txt b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fat-pay__txt small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.fat-pay time { align-self: flex-start; font-size: 10.5px; color: var(--faint); }
.sc-run:not(.s1) .fat-pay { opacity: 0; transform: translateY(-14px) scale(.95); }

/* pannello basso (320-360px): la fattura si stringe, così la notifica sopra non esce dal pannello */
@container (max-height: 360px) {
  .fat { transform: translate(calc(-50% + 16px), calc(-50% + 12px)); }
  .fat__row { height: 24px; }
  .fat__row--tot { height: 30px; }
  .fat__track { margin-top: 6px; padding-top: 10px; }
  .fat__rail { top: 18px; }
  .fat__foot { margin-top: 6px; }
  .fat-pay { top: -26px; }
}
@container (max-width: 470px) {
  .fat { width: calc(100% - 60px); transform: translate(calc(-50% + 14px), calc(-50% + 16px)); padding: 12px 12px 10px; }
  .fat-pay { right: -8px; top: -38px; width: 214px; }
  .fat__row { grid-template-columns: 70px minmax(0, 1fr); }
  .fat__stamp { right: -6px; transform: rotate(-9deg) scale(.84); }
}


/* ============================================================ 4. gli strumenti che usi
   Tutoro al centro e cinque fili: un impulso alla volta parte (o arriva, da Stripe) e il collegamento dice cosa
   è successo. Le linee le disegna scene.js dai centri veri delle schede, a ogni cambio di misura.
   Tappe (data-step, una sola accesa): 1/2 Calendar · 3/4 Meet · 5/6 Stripe · 7/8 genitori · 9/10 studente · 11 pausa */
.hub__glow { position: absolute; left: var(--cx); top: var(--cy); width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(60 179 113 / .16), rgb(60 179 113 / 0)); pointer-events: none; }
.hub__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hub__svg path { fill: none; stroke-linecap: round; }
/* i fili si disegnano una volta sola, quando la scena entra (una transizione, non un'animazione: il ritorno a
   inizio giro non li fa ripartire) */
.hub__l { stroke: rgb(10 22 40 / .26); stroke-width: 1.5; stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke .4s ease, stroke-dashoffset 1.1s var(--ease); }
.hub__l.k2 { transition-delay: 0s, .08s; } .hub__l.k3 { transition-delay: 0s, .16s; } .hub__l.k4 { transition-delay: 0s, .24s; } .hub__l.k5 { transition-delay: 0s, .32s; }
.hub__svg:not(.is-px) .hub__l { vector-effect: non-scaling-stroke; }
.hub__f, .hub__g { stroke: var(--mint); stroke-dasharray: .16 2; stroke-dashoffset: .16; opacity: 0; }
.hub__f { stroke-width: 2.6; }
.hub__g { stroke-width: 8; stroke: rgb(60 179 113 / .25); }
@keyframes hubGo { 0% { stroke-dashoffset: .16; opacity: 1; } 92% { opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 0; } }
.sc-run:not(.sc-in) .hub__l { stroke-dashoffset: 1; }
.sc-run[data-step="1"] :is(.hub__f, .hub__g).k1, .sc-run[data-step="3"] :is(.hub__f, .hub__g).k2, .sc-run[data-step="5"] :is(.hub__f, .hub__g).k3,
.sc-run[data-step="7"] :is(.hub__f, .hub__g).k4, .sc-run[data-step="9"] :is(.hub__f, .hub__g).k5 { animation: hubGo .85s cubic-bezier(.5, 0, .3, 1) both; }
:is([data-step="1"], [data-step="2"]) .hub__l.k1, :is([data-step="3"], [data-step="4"]) .hub__l.k2, :is([data-step="5"], [data-step="6"]) .hub__l.k3,
:is([data-step="7"], [data-step="8"]) .hub__l.k4, :is([data-step="9"], [data-step="10"]) .hub__l.k5 { stroke: rgb(60 179 113 / .6); }

/* Tutoro al centro, con un alone che gira piano e un battito quando parte o arriva qualcosa */
.hub__core { position: absolute; z-index: 2; left: var(--cx); top: var(--cy); width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 17px; }
.hub__core img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border-radius: inherit; box-shadow: 0 14px 28px -12px rgb(10 22 40 / .6), 0 0 0 4px rgb(255 255 255 / .9); }
.hub__core::before { content: ""; position: absolute; inset: -12px; border-radius: 26px; opacity: 0; transition: opacity .6s ease;
  background: conic-gradient(from 0deg, rgb(60 179 113 / 0), rgb(60 179 113 / .55) 25%, rgb(60 179 113 / 0) 50%, rgb(60 179 113 / .35) 75%, rgb(60 179 113 / 0)); filter: blur(8px); }
.sc-run.sc-in .hub__core::before { opacity: 1; animation: scSpin 7s linear infinite; }
/* l'alone non si ferma al ritorno a inizio giro (sc-reset spegne tutto il resto), sennò farebbe uno scatto */
.sc.sc-reset.sc-in .hub__core::before { animation: scSpin 7s linear infinite !important; transition: none !important; }
@keyframes hubBeat { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hubBeat2 { 0% { transform: scale(1); } 35% { transform: scale(1.08); } 100% { transform: scale(1); } }
.sc-run:is([data-step="1"], [data-step="3"], [data-step="9"]) .hub__core { animation: hubBeat .5s var(--ease); }
.sc-run:is([data-step="6"]) .hub__core { animation: hubBeat .5s var(--ease) .05s; }
.sc-run:is([data-step="7"]) .hub__core { animation: hubBeat2 .5s var(--ease); }

.hub__n { position: absolute; z-index: 2; left: var(--x); top: var(--y); display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 9px; border-radius: 12px;
  background: #fff; white-space: nowrap; font-size: 12px; font-weight: 600; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgb(10 22 40 / .08), 0 10px 24px -14px rgb(10 22 40 / .5); transition: box-shadow .35s ease, transform .5s var(--spring); }
.hub__n > img { width: 18px; height: 18px; flex: none; }
.hub__n > img.w { width: auto; height: 15px; }
.hub__n > svg.i { width: 17px; height: 17px; color: var(--deep); }
.hub__n--stripe { padding: 0 12px; }
.hub__n::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 2px var(--mint); opacity: 0; pointer-events: none; }
/* la didascalia di quello che è successo: una pillola blu notte con la spunta */
.hub__cap { position: absolute; left: 50%; top: calc(100% + 8px); display: flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 99px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 500; font-style: normal; white-space: nowrap; box-shadow: 0 10px 20px -10px rgb(10 22 40 / .7);
  opacity: 0; transform: translate(-50%, -4px) scale(.94); transition: opacity .3s ease, transform .45s var(--spring); pointer-events: none; }
.hub__cap svg.i { width: 12px; height: 12px; color: #7fe0a8; stroke-width: 3; }
.hub__cap--up { top: auto; bottom: calc(100% + 8px); transform: translate(-50%, 4px) scale(.94); }
.hub__cap--r { left: auto; right: 0; transform: translate(0, -4px) scale(.94); transform-origin: right center; }
.hub__cap--l { left: 0; transform: translate(0, -4px) scale(.94); transform-origin: left center; }
.sc-run[data-step="2"] .hub__n.k1, .sc-run[data-step="4"] .hub__n.k2, .sc-run[data-step="6"] .hub__n.k3, .sc-run[data-step="8"] .hub__n.k4, .sc-run[data-step="10"] .hub__n.k5,
.sc-run[data-step="5"] .hub__n.k3 {
  transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 0 1.5px var(--mint), 0 16px 30px -14px rgb(46 155 94 / .6); }
.sc-run[data-step="2"] .hub__n.k1::before, .sc-run[data-step="4"] .hub__n.k2::before, .sc-run[data-step="5"] .hub__n.k3::before,
.sc-run[data-step="8"] .hub__n.k4::before, .sc-run[data-step="10"] .hub__n.k5::before { animation: scPing .8s ease-out; }
.sc-run[data-step="2"] .k1 .hub__cap, .sc-run[data-step="4"] .k2 .hub__cap, .sc-run[data-step="6"] .k3 .hub__cap, .sc-run[data-step="8"] .k4 .hub__cap,
.sc-run[data-step="10"] .k5 .hub__cap { opacity: 1; transform: translate(-50%, 0) scale(1); }
.sc-run[data-step="2"] .k1 .hub__cap:is(.hub__cap--r, .hub__cap--l), .sc-run[data-step="4"] .k2 .hub__cap:is(.hub__cap--r, .hub__cap--l),
.sc-run[data-step="6"] .k3 .hub__cap:is(.hub__cap--r, .hub__cap--l), .sc-run[data-step="8"] .k4 .hub__cap:is(.hub__cap--r, .hub__cap--l),
.sc-run[data-step="10"] .k5 .hub__cap:is(.hub__cap--r, .hub__cap--l) { transform: none; }

.sc-hub { --cx: 54%; --cy: 50%; }
.hub__n.k1 { --x: 31%; --y: 19%; }   /* Google Calendar */
.hub__n.k2 { --x: 80%; --y: 24%; }   /* Google Meet */
.hub__n.k3 { --x: 83%; --y: 68%; }   /* Stripe */
.hub__n.k4 { --x: 61%; --y: 86%; }   /* Portale genitori */
.hub__n.k5 { --x: 27%; --y: 66%; }   /* Portale studente */
@container (max-width: 520px) {
  .hub__n { height: 38px; width: 38px; padding: 0; justify-content: center; border-radius: 13px; }
  .hub__n--stripe { width: auto; padding: 0 10px; }
  .hub__n .hub__lbl { display: none; }
  .hub__n > img { width: 20px; height: 20px; }
  .hub__n > img.w { width: auto; height: 14px; }
  .sc-hub { --cx: 55%; }
  /* stretto: il portale genitori va un po' a sinistra, così la didascalia di Stripe non lo copre */
  .hub__n.k1 { --x: 30%; --y: 18%; } .hub__n.k2 { --x: 84%; --y: 22%; } .hub__n.k3 { --x: 83%; --y: 64%; }
  .hub__n.k4 { --x: 44%; --y: 87%; } .hub__n.k5 { --x: 22%; --y: 60%; }
}

