:root {
  --green-dark: #337f37;
  --green-darker: #154734;
  --green-mid: #337f37;
  --green-lime: #337f37;
  --green-lime-soft: #337f37;
  --green-lime-bg: #337f37;
  --yellow: #f5d31a;
  --orange: #c8281e;
  --pink: #e89a8b;
  --blue: #4a90c8;
  --bg: #ffffff;
  --r: 0.3em;
}

.green{color: var(--green-dark);}
/* ===================================================================
   WCAG 2.2 — 2.4.11 Focus Appearance + 1.4.11 Non-text Contrast
   Indicatore di focus da tastiera ad alto contrasto, valido su QUALSIASI
   sfondo del libro (bianco, verdi scuri --green-dark/--green-darker,
   verde lime, ecc.). Doppio bordo concentrico di 2px ciascuno: anello
   interno BIANCO (a contatto con l'elemento) + anello esterno NERO. I due
   colori hanno fra loro un contrasto di 21:1, quindi l'indicatore resta
   sempre visibile e almeno uno dei due colori mantiene un contrasto >= 3:1
   con lo sfondo. Si usa :focus-visible (anello solo da tastiera, non al clic).
   !important: l'indicatore di focus non deve mai essere rimosso o indebolito
   da regole piu' specifiche (reset di in5/Bootstrap, outline native, ecc.).
   =================================================================== */
:focus-visible {
  outline: 2px solid #000 !important;     /* anello esterno: nero */
  outline-offset: 2px !important;          /* lo spazio e' riempito dall'anello bianco */
  box-shadow: 0 0 0 2px #fff !important;    /* anello interno: bianco, a contatto con l'elemento */
}

/* Visibile solo agli screen reader (es. live region role="alert"). */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  font-family: "Ubuntu", sans-serif;
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
}

/* ---------- Landscape orientation warning ---------- */
.orientation-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--green-dark);
  color: #fff;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-family: "Ubuntu", sans-serif;
}
.orientation-warning .orientation-content { max-width: 420px; }
.orientation-warning .orientation-icon {
  width: 90px; height: 90px;
  margin: 0 auto 22px;
  display: block;
  animation: rotate-hint 2.4s ease-in-out infinite;
  transform-origin: 50% 50%;
}
.orientation-warning h2 {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 10px;
}
.orientation-warning p {
  font-size: 17px;
  line-height: 1.4;
  margin: 0;
}
@keyframes rotate-hint {
  0%, 35% { transform: rotate(-90deg); }
  65%, 100% { transform: rotate(0deg); }
}
@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .orientation-warning { display: none; }
  /* #stage { display: none; } */
}

/* ---------- Stage / responsive scaling ---------- */
#stage {
  position: fixed;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#book {
  width: 100%;
  height: 100%;
  position: relative;
  background: #fff;
  flex-shrink: 0;
}
.page {
 position: relative;
  display: none;
  background: #fff;
  margin: 60px 60px 0px 60px;
  border-radius: 0px 45px 45px 45px;
      height: calc(100% - 60px);
}
.page.active { display: block; }



/* ---------- Inline page arrows (bottom-right) ---------- */
.page-arrows {
  position: absolute;
  right: 30px; bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-dark);
  padding: 6px 17px;
  border-radius: 32px;
  z-index: 20;
}
.page-arrows a {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  padding: 0;
  text-decoration: none;
  transition: background 0.15s;
}
.page-arrows a:hover {
  background: rgba(255,255,255,0.18);
}
.page-arrows a[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.page-arrows a svg {
  width: 30px; height: 30px;
  fill: #fff;
}

/* ===================================================================
   PAGE 1 — COVER
   =================================================================== */
.page-1 { background: var(--green-dark) url(../img/img-step-1.png) no-repeat left 40px bottom; background-size: 48%;z-index: 1;border-radius: 45px;    height: calc(100% - 120px);}
.p1-pocket {
  position: absolute;
  top: 240px; right: 0;
  width: 1130px; height: 580px;
  background: #fff;
  border-top-left-radius: 90px;
  border-bottom-left-radius: 90px;
}
.p1-pocket-2 {
  position: absolute;
  top: 820px; right: 0;
  width: 690px; height: 220px;
  background: #fff;
  border-top-left-radius: 90px;
  border-bottom-left-radius: 90px;
}



.p1-logo {
  position: relative;
  background-color: #ffffff;
  padding: 0 50px 35px 0px;
  position: absolute;
  top: -1px; left: 0;
  display: flex; align-items: center; gap: 0;border-bottom-right-radius: 45px;
}
.p1-logo .mascot { width: 90px; height: 110px; flex-shrink: 0; }
.p1-logo .brand { display: flex; flex-direction: column; }
.p1-logo .brand img{ width: 320px;max-width: 100%;}
.p1-logo::after{
content: '';
    position: absolute;
    top: 0;
    width: 45px;
    height: 45px;
    background: white;
    pointer-events: none;
    right: calc(-1 * 45px);
    -webkit-mask: radial-gradient(45px at top right, transparent 99%, #000 100%);
    mask: radial-gradient(45px at top right, transparent 99%, #000 100%);
    transform: rotate(90deg);
}
.p1-logo::before{
content: '';
    position: absolute;
    left: 0;
    bottom: -45px;
    width: 45px;
    height: 45px;
    background: white;
    pointer-events: none;
    right: calc(-1 * 45px);
    -webkit-mask: radial-gradient(45px at top right, transparent 99%, #000 100%);
    mask: radial-gradient(45px at top right, transparent 99%, #000 100%);
    transform: rotate(90deg);
}


.p1-house { position: absolute; left: 320px; top: 460px; width: 460px; height: 520px; }
.p1-bubble {
  position: absolute;
  background: var(--green-lime);
  border-radius: 36px;
  display: flex; align-items: center; justify-content: center;
}
.p1-bubble::after { content: ""; position: absolute; width: 0; height: 0; }
.p1-bubble--pie { left: 200px; top: 360px; width: 200px; height: 200px; }
.p1-bubble--pie::after {
  border-style: solid; border-width: 30px 0 0 50px;
  border-color: var(--green-lime) transparent transparent transparent;
  bottom: -22px; left: 60px; transform: rotate(-10deg);
}
.p1-bubble--piggy { left: 600px; top: 280px; width: 230px; height: 200px; }
.p1-bubble--piggy::after {
  border-style: solid; border-width: 0 0 30px 50px;
  border-color: transparent transparent var(--green-lime) transparent;
  bottom: -22px; left: 80px; transform: rotate(10deg);
}
.p1-bubble--umbrella { left: 760px; top: 720px; width: 220px; height: 200px; }
.p1-bubble--umbrella::after {
  border-style: solid; border-width: 30px 50px 0 0;
  border-color: var(--green-lime) transparent transparent transparent;
  bottom: -22px; left: 30px;
}
.p1-bubble svg { width: 70%; height: 70%; }

.p1-title { position: absolute; top: 30%; right: 0px;  }
.p1-title h1 {
  font-family: "Ubuntu", sans-serif;
  font-size: 4.5vw; line-height: 1;
  color: var(--green-dark);
  letter-spacing: -0.01em;
  text-align: right;
}
.p1-title h1 .l1 { font-weight: 400;  }
.p1-title h1 .l2 { font-weight: 700; }
.p1-title h1>span {
  position: relative;
  display: inline-block;
    background-color: #ffffff;
    padding: 0.2em 0.4em;          /* padding orizzontale e verticale */
    border-radius: 16px 0 0 16px;
    -webkit-box-decoration-break: clone;   /* per Safari/Chrome */
            box-decoration-break: clone;   /* la chiave di tutto */
  }
  .p1-title h1>span:nth-child(1){
    border-bottom-left-radius: 0px;
  }

  .p1-title h1>span:nth-child(1)::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: var(--r);
    height: var(--r);
    background: white;
    pointer-events: none;
  }

  .p1-title h1>span:nth-child(1)::before {                /* angolo basso-sinistro */
    left: calc(-1 * var(--r));
    -webkit-mask: radial-gradient(var(--r) at top left,
                  transparent 99%, #000 100%);
            mask: radial-gradient(var(--r) at top left,
                  transparent 99%, #000 100%);
  }



.p1-subtitle {
  margin-top: 60px;
  margin-right: 60px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-size: 2.6vw; line-height: 1.2;
  color: #ffffff;
  text-align: right;
}


.p1-cta {

  background: #ffffff;
  color: var(--green-darker);
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  padding: 8px 40px;
  margin: 60px 60px 0 auto;
  border-radius: 22px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: block;
  width: fit-content;
  text-align: center;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  z-index: 10;
}
.p1-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }

.pos-rel{position: relative;}
/* ===================================================================
   PAGE INTRO — INTRODUZIONE
   =================================================================== */
.page-intro { background: #fff; }

.inner-page-sol-cover {
      background: linear-gradient(180deg, #a2c246 0%, rgba(214, 239, 177, 0) 60%)!important;

}
.page-intro .inner-page {
    background: linear-gradient(180deg, #a2c246 0%, rgba(214, 239, 177, 0) 60%);

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 120px;
}

.intro-wrap {
  height: calc(100% - 60px);
  margin-top: 30px;
  padding: 0 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.intro-bubble {
  position: relative;
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  background:#fff;
  border: 2px solid var(--green-dark);
  border-radius: 36px;
  padding: 50px 38px;
  margin-top: 30px;
}

.intro-bubble::before {
  content: "";
  position: absolute;
left: 33px;
    bottom: -46px;
    width: 61px;
    height: 45px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 55.86 44.07" preserveAspectRatio="none"><path d="M55.36.36v35.57c0,2.87-1.91,5.74-4.78,7.33-.95.32-1.91.32-3.19.32-1.91,0-3.83-.64-5.42-2.24L.35.36" fill="white" stroke="%23337f37" stroke-width="2" vector-effect="non-scaling-stroke" stroke-linecap="butt"/></svg>') no-repeat;
  background-size: 100% 100%;
  z-index: 1;
}

.intro-bubble::after {
  content: "";
  position: absolute;
  left: 35px;
  bottom: -3px;
  width: 58px;
  height: 7px;
  background: #fff;
  z-index: 2;
}

.intro-bubble-text {
  position: relative;
  z-index: 3;
  text-align: center;
  font-family: "Ubuntu", sans-serif;
  font-size: 19px;
  line-height: 1.45;
  color: var(--green-dark);
  max-width: 100%;
  margin: 0 auto;
}

.intro-bubble-text p {
  margin-bottom: 14px;
}

.intro-bubble-text p:last-child {
  margin-bottom: 0;
}

.intro-bubble-highlight {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1.25;
  margin: 16px 0 18px !important;
}

@media (max-width: 1200px) {
  .intro-bubble-text { font-size: 17px; }
  .intro-bubble-highlight { font-size: 20px; }
}

@media (max-width: 768px) {
  .intro-wrap {
    height: calc(100% - 40px);
    margin-top: 10px;
    padding: 0 0 70px;
  }
  .page-intro .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 80px;
  }
  .intro-bubble {
    padding: 30px 22px;
    border-radius: 30px;
  }
  .intro-bubble-text { font-size: 15px; line-height: 1.4; }
  .intro-bubble-highlight { font-size: 17px; line-height: 1.2; margin: 12px 0 !important; }
  /* .intro-bubble::before {
    left: 26px;
    bottom: -36px;
    width: 42px;
    height: 34px;
  }
  .intro-bubble::after {
    left: 25px;
    bottom: -3px;
    width: 44px;
    height: 7px;
  } */
}

/* ===================================================================
   PAGE TOC — INDICE DEI CONTENUTI
   =================================================================== */
.page-toc { background: #fff; }
.page-toc .p2-title .fw-400 { font-weight: 400; }

.page-toc .inner-page,
.inner-page-toc {
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-toc .inner-page .row {
  height: auto !important;
  align-items: flex-start !important;
}
.page-toc .inner-page .col-12 {
  height: auto !important;
  padding: 24px 28px 0 28px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: "Ubuntu", sans-serif;
}

.toc-item { margin: 0; line-height: 1.5; }

.toc-item a {
  text-decoration: none;
  color: #222;
  display: inline-block;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.toc-item a:hover,
.toc-item a:focus-visible {
  background: var(--green-lime-bg);
  color: var(--green-darker);
}

.toc-section { margin-top: 14px; }
.toc-section:first-child { margin-top: 0; }

.toc-section a,
.toc-chapter a {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1.25;
}

.toc-chapter { margin-top: 24px; }

.toc-sub { margin-top: 4px; }
.toc-sub a {
  font-size: 17px;
  position: relative;
  padding-left: 22px;
  line-height: 1.35;
}
.toc-sub a::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: 2px;
  color: #222;
  font-weight: 700;
}

.toc-activity { margin-top: 10px; }
.toc-activity a {
  font-weight: 700;
  font-size: 17px;
  color: #222;
}

@media (max-width: 1200px) {
  .toc-section a,
  .toc-chapter a { font-size: 20px; }
  .toc-sub a,
  .toc-activity a { font-size: 15px; }
}

@media (max-width: 768px) {
  .page-toc .inner-page .col-12 { padding: 16px 14px 0 14px; }
  .toc-section a,
  .toc-chapter a { font-size: 17px; }
  .toc-sub a,
  .toc-activity a { font-size: 13px; }
  .toc-chapter { margin-top: 16px; }
  .toc-section { margin-top: 10px; }
}

/* ===================================================================
   PAGE 2 — I PROTAGONISTI
   =================================================================== */
.page-2 { background: #fff; }
.p2-title {
  display: block;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 60px;
  color: var(--green-dark);
  top: 0;
  line-height: 1;
}

.inner-page{
    background: linear-gradient(180deg, #a2c246 0%, rgba(214, 239, 177, 0) 60%);
    display: block;
    width: 100%;
    height: calc(100% - 50px);
    border-radius: 45px 45px 0 0;
    border: 1px solid var(--green-dark);
    margin-top: 30px;
    padding-right: 20px;
    padding-left: 20px;
    position: relative;
}

.inner-page-2{background: #ffffff;padding-top: 30px;border-radius: 30px!important;}
.background-white{background-color: #ffffff!important;}
.box-page-2{
  background: linear-gradient(180deg, #a2c246 0%, rgba(214, 239, 177, 0) 60%);
    display: block;
    width: 100%;
    min-height: 195px;
    border-radius: 30px;
    padding: 10px 10px 0px 10px;
    border: 1px solid var(--green-dark);
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;

}

.box-page-2-1::after {
  content:"";
  position:absolute;
  background: url(../img/nonni-page-2.png);background-repeat: no-repeat;background-size: 150px;background-position:center center;overflow: hidden;
  left:10px;
  bottom:0;
  width:150px;
  height:113px;
}
.box-page-2-2::after {content:"";
  position:absolute;
background-image: url(../img/chira-antonio-page-2.png);background-repeat: no-repeat;background-size: 180px;background-position: center center;
  left:-5px;
  bottom:0;
  width:180px;
  height:113px;
}

.box-page-2-3::after {content:"";
  position:absolute;
  background-image: url(../img/Edo&Sofia-pagina-2.png);background-repeat: no-repeat;background-size: 150px;background-position: center center;
  left:10px;
  bottom:0;
  width:150px;
  height:140px;
}

.box-page-2-4::after {content:"";
  position:absolute;
  background-image: url(../img/davide-pagina-2.png);background-repeat: no-repeat;background-size: 114px;background-position: center center;
  left:10px;
  bottom:0;
  width:150px;
  height:140px;
}

.box-page-2-5::after {content:"";
  position:absolute;
  background-image: url(../img/camilla-pagina-2.png);background-repeat: no-repeat;background-size: 173px;background-position: center center;
  left:10px;
  bottom:0;
  width:150px;
  height:140px;
}

/* ---------- Protagonist clickable bubble (mobile page 2) ---------- */
.protagonist-bubble {
  position: relative;
  margin-right: 0;
  margin-bottom: 10px;
  margin-left: auto;
  z-index: 100;
  background: var(--green-dark);
  color: #fff;
  border: none;
  max-width: 75%;
  border-radius: 22px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 5;
  font-family: "Ubuntu", sans-serif;
  transition: background 0.15s;
}
/* .protagonist-bubble:hover { background: var(--green-darker); } */
.protagonist-bubble .protagonist-name {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.15;
}
.protagonist-bubble .protagonist-role {
  font-weight: 400;
  font-size: 13px;
  line-height: 1.2;
}

.inner-page-4{background: #ffffff;}
.inner-page-curve {
      position: fixed;
  bottom: 0;
  right: 60.2px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}
@media (max-width: 768px) {
  .inner-page-curve {
bottom: 0px;
    right: 20.2px;

}
}

.inner-page-curve-left {
  position: absolute;
  bottom: -1px;
  left: -1px;
  width: 220px;
  height: 220px;
  pointer-events: none;
  z-index: 4;
  overflow: visible;
}
.inner-page-curve .curve-fill,
.inner-page-curve-left .curve-fill { fill: #fff; }
.inner-page-curve .curve-line,
.inner-page-curve-left .curve-line {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 1;
}
.page-arrows .arr-prev svg { transform: scaleX(-1); }

.bubble-card {
  position: absolute;
  background: var(--green-dark);
  color: #fff;
  border-radius: 28px;
  padding: 26px 38px;
  z-index: 3;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}
.bubble-card{
  top: -200px;
    left: calc(50% - 150px);
}

.bubble-card .name {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 38px;
  line-height: 1.1;
}
.bubble-card .role {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  margin-top: 6px;
}
.p2-img img{width: 100%;}

.connector { position: absolute; width: 5px; background: var(--green-dark); z-index: 2; }
.p2-card-nonni .connector{height: 240px;left: 144px;}
.p2-card-cea .connector{height: 240px;left: 144px;}

/* Up to 991.98px the stacked (mobile) layout of page 2 is shown — see the
   d-lg-none / d-lg-flex split on the two .inner-page blocks — so the inner
   page must scroll and its row must grow with the stacked cards. (The
   .p2-title 40px is already set at <=1200px below, so it's a harmless
   duplicate here.) The desktop 5-column variant takes over at >=992px. */
@media (max-width: 991.98px) {
  .p2-title{font-size: 40px;}

  /* .inner-page-curve, .inner-page-curve-left { display: none; } */

  .page-2 .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-2 .inner-page .row {
    height: auto !important;
    /* align-items: flex-start !important; */
  }

  .page-2 .h-calc-100,
  .page-2 .h-calc-90 {
    max-height: none;
  }

}

/* ---------------------------------------------------------------
   PAGE 2 — desktop variant: 5 clickable protagonist boxes.
   Mirrors the mobile layout (.inner-page-2) but lays the five
   cards out in a single row. Reuses .box-page-2 / .protagonist-bubble
   so the existing JS toggle (script.js) binds automatically.
   Shown at >=992px (d-lg-flex); below that the stacked mobile layout
   takes over (d-lg-none + the @media(max-width:991.98px) block above),
   so the two never overlap.
   --------------------------------------------------------------- */
@media (min-width: 992px) {
  .page-2 .inner-page-2-desktop {
    background: #ffffff;
    overflow: hidden;
    padding-top: 22px;
    /* leave room at the bottom for the fixed prev/next arrow pill so the
       figures sit above it instead of being covered */
    padding-bottom: 96px;
  }
  /* the decorative white/green corner curve was there to round off the
     green inner-page; with the white box layout it just draws a stray
     line across Camilla's card, so hide it on the desktop variant */
  /* .page-2 .inner-page-curve { display: none; } */
  .page-2 .inner-page-2-desktop .row {
    height: 100% !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
  }
  /* min-width:0 lets the 5 equal columns shrink below their content size
     instead of wrapping to a second row on narrower viewports (e.g. 768px) */
  .page-2 .inner-page-2-desktop .col {
    min-width: 0;
  }
  .page-2 .inner-page-2-desktop .box-page-2 {
    height: 100%;
    min-height: 0;
    margin-bottom: 0;
    padding: 18px 12px 0;
    overflow: hidden;
  }
  /* character illustration anchored to the card bottom. Per-card widths
     mirror the hand-tuned mobile background-size values (relative to the
     widest, Chiara e Antonio = 100%) so every figure reads at a similar
     scale; using % keeps it fluid as the book width changes. */
  .page-2 .inner-page-2-desktop .box-page-2::after {
    left: 0;
    right: 0;
    width: 100%;
    height: 60%;
    background-position: bottom center;
    background-repeat: no-repeat;
  }
  .page-2 .inner-page-2-desktop .box-page-2-1::after { background-size: 90%; }
  .page-2 .inner-page-2-desktop .box-page-2-2::after { background-size: 100%; }
  .page-2 .inner-page-2-desktop .box-page-2-3::after { background-size: 90%; }
  .page-2 .inner-page-2-desktop .box-page-2-4::after { background-size: 70%; }
  .page-2 .inner-page-2-desktop .box-page-2-5::after { background-size: 96%; }
  /* bubble centered at the top of the card */
  .page-2 .inner-page-2-desktop .protagonist-bubble {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    width: fit-content;
    text-align: center;
    align-items: center;
  }
  /* desktop: testi nome/ruolo dei protagonisti piu' grandi (piu' spazio in riga) */
  .page-2 .inner-page-2-desktop .protagonist-name { font-size: 32px; }
  .page-2 .inner-page-2-desktop .protagonist-role { font-size: 22px; }
}

/* ===================================================================
   FUMETTO "CAPITOLO" (pagine 3 / 14 / 29)
   Sostituisce le immagini-di-testo capitolo-1.png / capitolo-2-img-1.png /
   capitolo-3-vignetta.png con TESTO REALE (WCAG 1.4.5) dentro un fumetto CSS
   con coda a sinistra rivolta verso il personaggio.
   =================================================================== */
.cap-bubble {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
  background: #fff;
  border: 3px solid var(--green-dark);
  border-radius: 30px;
  padding: 30px 34px;
  color: var(--green-dark);
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.18;
}
.cap-bubble::before {   /* coda: bordo verde (dietro) */
  content: "";
  position: absolute;
  left: -19px;
  top: 52%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-right: 19px solid var(--green-dark);
}
.cap-bubble::after {    /* coda: riempimento bianco (davanti), lascia il bordo */
  content: "";
  position: absolute;
  left: -14px;
  top: 52%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-right: 15px solid #fff;
}
/* Mobile (<768px): il fumetto sta SOPRA il personaggio (layout impilato),
   quindi la coda va rivolta verso il BASSO invece che a sinistra. */

   @media (max-width: 991px) {
  .cap-bubble {           /* testo un po' più piccolo, come l'immagine originale */
    font-size: 28px;
    padding: 22px 26px;
  }
}
@media (max-width: 767.98px) {
  .cap-bubble {           /* testo un po' più piccolo, come l'immagine originale */
    font-size: 34px;
    padding: 22px 26px;
  }
  .cap-bubble::before {   /* coda giù: bordo verde */
    left: 30%; right: auto; top: 100%; bottom: auto;
    margin-top: 0px;
    transform: translateX(-50%);
    border-top: 18px solid var(--green-dark);
    border-right: 16px solid transparent;
    border-bottom: 0;
    border-left: 16px solid transparent;
  }
  .cap-bubble::after {    /* coda giù: riempimento bianco (copre il bordo, lascia il filo verde) */
    left: 30%; right: auto; top: 100%; bottom: auto;
    margin-top: 0px;
    transform: translateX(-50%);
    border-top: 14px solid #fff;
    border-right: 12px solid transparent;
    border-bottom: 0;
    border-left: 12px solid transparent;
  }
}

/* ===================================================================
   PAGE 3 — CAPITOLO 1
   =================================================================== */
.page-3 { background: #fff; }
.p3-title {
  position: absolute;
  top: 90px; left: 100px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 70px;
  color: var(--green-dark);
}
.p3-stage {
  position: absolute;
  top: 220px; left: 60px;
  width: 1800px; height: 760px;
  background: linear-gradient(180deg, #d6efb1 0%, rgba(214,239,177,0) 60%);
  border-radius: 70px;
  z-index: 1;
}
.p3-img { position: absolute; left: 200px; top: 360px; height: 700px; z-index: 2; }
.p3-img img { height: 100%; width: auto; display: block; }
.p3-quote {
  position: absolute;
  right: 120px; top: 360px;
  width: 800px;
  background: #fff;
  border: 4px solid var(--green-dark);
  border-radius: 36px;
  padding: 56px 64px;
  z-index: 3;
}
.p3-quote p {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 64px;
  line-height: 1.1;
  color: var(--green-dark);
}
.p3-quote::before {
  content: "";
  position: absolute;
  left: -50px; top: 130px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 30px 50px 30px 0;
  border-color: transparent var(--green-dark) transparent transparent;
}
.p3-quote::after {
  content: "";
  position: absolute;
  left: -42px; top: 134px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 26px 44px 26px 0;
  border-color: transparent #fff transparent transparent;
}

/* ===================================================================
   PAGE 4 — EDUCAZIONE FINANZIARIA, QUESTA (S)CONOSCIUTA
   =================================================================== */
.page-4 { background: #fff; }
.p4-title {
  position: absolute;
  top: 90px; left: 100px;
  font-family: "Ubuntu", sans-serif;
  color: var(--green-dark);
  line-height: 1.05;
  width: 800px;
}
.p4-title .l1 { font-weight: 700; font-size: 64px; display: block; }
.p4-title .l2 { font-weight: 400; font-size: 64px; display: block; }
.p4-data {
  width: 100%;
  border: 3px solid var(--green-lime);
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 30px;
}
.p4-data-head {
  background: var(--green-lime);
  color: #fff;
  padding: 14px 36px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 32px;
}
.p4-data-body {
  padding: 24px 36px 30px;
  font-family: "Ubuntu", sans-serif;
  font-size: 26px;
  line-height: 1.5;
  color: #1d1d1d;
}
.p4-data-body p { margin-bottom: 4px; }
.p4-data-body ul { margin: 4px 0 0 24px; list-style: none; padding: 0; }
.p4-data-body ul li { position: relative; padding-left: 28px; margin-top: 2px; }
.p4-data-body ul li::before {
  content: "•";
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: #1d1d1d;
}
.p4-data-body strong { font-weight: 700; }
.p4-img { position: absolute; left: 80px; bottom: 110px; height: 440px; }
.p4-img img { height: 100%; width: auto; display: block; }
.p4-text,p,li {
    font-family: "Ubuntu", sans-serif;
  font-size: 20px; line-height: 1.2;
  color: #1d1d1d;
  margin-bottom: 20px;
}
.p4-text p { margin-bottom: 12px; }
.p4-text strong { font-weight: 700; }
.p4-callout {
  font-family: "Ubuntu", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 26px; line-height: 1.2;
  color: var(--green-dark);
  display: flex; gap: 14px; align-items: flex-start;
  position: relative;
  margin-bottom: 100px;
}
.p4-callout::after {content:"";
  position:absolute;
  background:url(../img/freccia-verde.png) no-repeat center center;
  background-size:30px;
  top:0;
  left:0;
  width:30px;
  height:30px;
  left: -40px;
    top: -2px;
}
.page-4 .h-calc-100,
  .page-4 .h-calc-90 {
    max-height: none;
  }




  .page-4 .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-4 .inner-page .row {
    height: auto !important;
    align-items: flex-start !important;
  }
  .page-4 .inner-page .col-12 {
    height: auto !important;
    align-items: flex-start !important;
    padding: 15px 15px 0 15px;
  }





/* ===================================================================
   PAGE 5 — PERCHÉ L'EDUCAZIONE FINANZIARIA È IMPORTANTE?
   =================================================================== */
.page-5 { background: #fff; }
.p5-title {
  position: absolute;
  top: 90px; left: 100px;
  font-family: "Ubuntu", sans-serif;
  color: var(--green-dark);
  line-height: 1.05;
  width: 1300px;
  z-index: 4;
}
.p5-title .l1 { font-weight: 400; font-size: 60px; display: block; }
.p5-title .l2 { font-weight: 700; font-size: 60px; display: block; }
.p5-stage {
  position: absolute;
  top: 280px; left: 60px;
  width: 1800px; height: 760px;
  background: linear-gradient(180deg, #d6efb1 0%, #e8f5d1 100%);
  border-radius: 70px;
  z-index: 1;
}
.p5-icon { position: absolute; z-index: 3; }
.p5-piggy { left: 120px; top: 480px; width: 220px; height: 180px; }
.p5-umbrella-icon { left: 380px; top: 410px; width: 200px; height: 220px; }
.p5-cart  { left: 620px; top: 460px; width: 200px; height: 180px; }
.p5-nonna { position: absolute; left: 320px; bottom: 30px; height: 600px; z-index: 3; }
.p5-nonna img { height: 100%; width: auto; display: block; }
.p5-calc  { left: 130px; top: 760px; width: 180px; height: 200px; }
.p5-purse { left: 800px; top: 770px; width: 200px; height: 180px; }
.p5-text {
  position: absolute;
  top: 360px; right: 100px;
  width: 880px;
  font-family: "Ubuntu", sans-serif;
  font-size: 28px; line-height: 1.45;
  color: #1d1d1d;
  z-index: 3;
}
.p5-text p { margin-bottom: 14px; }
.p5-text strong { font-weight: 700; }
.p5-callout {

  background: var(--green-dark);
  color: #fff;
  border-radius: 30px;
  padding: 24px 40px;
  margin-top: 20px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 24px; line-height: 1.2;
  text-align: center;
  z-index: 3;
}
  .page-5 .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-5 .inner-page .row {
    height: auto !important;
    align-items: flex-start !important;
  }
  .page-5 .inner-page .col-12 {
    height: auto !important;
    align-items: flex-start !important;
    padding: 15px 15px 0 15px;
  }


.inner-page-5{background: #edf8d0;}

/* ===================================================================
   PAGES 6–11 — CAPITOLO 1 contenuti aggiuntivi
   =================================================================== */
.page-6, .page-7, .page-8, .page-9, .page-10, .page-11 { background: #fff; }

.page-6 .inner-page,
.page-7 .inner-page,
.page-8 .inner-page,
.page-9 .inner-page,
.page-10 .inner-page,
.page-11 .inner-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-6 .inner-page .row,
.page-7 .inner-page .row,
.page-8 .inner-page .row,
.page-9 .inner-page .row,
.page-10 .inner-page .row,
.page-11 .inner-page .row {
  height: auto !important;
  align-items: flex-start !important;
}
.page-6 .inner-page .col-12,
.page-7 .inner-page .col-12,
.page-8 .inner-page .col-12,
.page-9 .inner-page .col-12,
.page-10 .inner-page .col-12,
.page-11 .inner-page .col-12 {
  height: auto !important;
  align-items: flex-start !important;
  padding: 15px 15px 0 15px;
}
.page-6 .h-calc-100,
.page-7 .h-calc-100,
.page-8 .h-calc-100,
.page-9 .h-calc-100,
.page-10 .h-calc-100,
.page-11 .h-calc-100 { max-height: none; }

.p4-data .p4-text, p, li { font-size: 20px; line-height: 1.35; }
.p4-data .p4-text p { margin-bottom: 8px; }
.p4-data .p4-text .p4-source {
  font-style: italic;
  font-size: 18px;
  color: #1d1d1d;
  margin-top: 8px;
  margin-bottom: 0;
}
.p4-data .p4-text .contenuto-scrollabile {
  max-height: 230px;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-gutter: stable;
}
.p4-data .p4-text .contenuto-scrollabile::-webkit-scrollbar {
  width: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.p4-data .p4-text .contenuto-scrollabile::-webkit-scrollbar-track {
  background-color: #fff;
  border: 1px solid var(--green-dark);
  border-radius: 999px !important;
}
.p4-data .p4-text .contenuto-scrollabile::-webkit-scrollbar-thumb {
  background-color: var(--green-lime);
  border-radius: 999px;
  min-height: 40px;
  max-height: 90px;
}
.p4-data .p4-text .contenuto-scrollabile::-webkit-scrollbar-thumb:hover {
  background-color: var(--green-mid);
}

.p11-list { list-style: none; padding: 0; margin: 0 0 14px 0; }
.p11-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;

}
.p11-list li::before {
  content: "•";
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: #1d1d1d;
}
.p11-strong {
  font-weight: 700;

  display: block;
  margin-top: 14px;
}



/* ===================================================================
   PAGE 12 — ATTIVITÀ VERO/FALSO
   =================================================================== */
.page-12 { background: #fff; }
.p6-title-block {
  position: absolute;
  top: 90px; left: 100px;
  font-family: "Ubuntu", sans-serif;
  color: var(--green-dark);
  line-height: 1.05;
  z-index: 3;
}
.p6-title-block .l1 { font-weight: 700; font-size: 70px; display: block; }
.p6-title-block .l2 { font-weight: 400; font-size: 50px; display: block; margin-top: 8px; }
.p6-stage {
  position: absolute;
  top: 280px; left: 60px;
  width: 1800px; height: 760px;
  border: 3px solid var(--green-lime);
  border-radius: 70px;
  background: #fff;
  z-index: 1;
}
.quiz-list {
  padding: 40px;
  z-index: 3;
  display: flex; flex-direction: column;
  list-style: none;
  margin: 0;
}
.quiz-row {
  display: flex; align-items: center;
  padding: 18px 0;
  gap: 30px;
  border-bottom: 1.5px solid #c5d3aa;
}
.quiz-row:last-child { border-bottom: none; }
.quiz-num {
  flex-shrink: 0;
  width: 80px; height: 90px;
  background: var(--green-lime-soft);
  border-radius: 18px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 48px;
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
}
.quiz-q {
  flex: 1;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.25;
  color: #1d1d1d;
}
.quiz-buttons {
  display: flex; flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.qb {
  width: 130px; height: 44px;
  border-radius: 22px;
  border: 2px solid;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.qb[data-answer="vero"]  { border-color: var(--green-lime); color: var(--green-lime); }
.qb[data-answer="falso"] { border-color: var(--orange);     color: var(--orange); }
.qb:hover:not(.locked) { transform: scale(1.04); }
.qb.selected[data-answer="vero"]  { background: var(--green-lime); color: #fff; }
.qb.selected[data-answer="falso"] { background: var(--orange);     color: #fff; }
.qb.correct   { background: var(--green-lime) !important; color: #fff !important; border-color: var(--green-lime) !important; }
.qb.incorrect { background: var(--orange) !important;     color: #fff !important; border-color: var(--orange) !important; }
.qb.locked    { cursor: default; opacity: 0.55; }
.qb.locked.selected, .qb.locked.correct { opacity: 1; }
/* Icona (oltre al colore) per distinguere corretto/errato — WCAG 1.4.1 */
.qb.correct::after   { content: " ✓"; font-weight: 700; color: #ffffff; }
.qb.incorrect::after { content: " ✗"; font-weight: 700; color: #ffffff; }

.quiz-feedback {
  padding-left: 40px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--green-dark);
  z-index: 4;
  opacity: 0;
  transition: opacity 0.3s;
}
.quiz-feedback.visible { opacity: 1; }

  .page-12 .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-12 .inner-page .row {
    height: auto !important;
    align-items: flex-start !important;
  }
  .page-12 .inner-page .col-12 {
    height: auto !important;
    align-items: flex-start !important;
    padding: 15px 15px 0 15px;
  }



/* ===================================================================
   PAGE 13 — ATTIVITÀ COMPLETA IL TESTO (drag & drop)
   =================================================================== */
.page-13 { background: #fff; }
.p7-title-block {
  position: absolute;
  top: 90px; left: 100px;
  font-family: "Ubuntu", sans-serif;
  color: var(--green-dark);
  line-height: 1.05;
  z-index: 3;
}
.p7-title-block .l1 { font-weight: 700; font-size: 70px; display: block; }
.p7-title-block .l2 { font-weight: 400; font-size: 50px; display: block; margin-top: 8px; }
.p7-prompt {

  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #1d1d1d;
  text-align: left;
  z-index: 3;
}
.p7-stage {
  position: absolute;
  top: 280px; left: 60px;
  width: 1800px; height: 760px;
  border: 3px solid var(--green-lime);
  border-radius: 70px;
  background: #fff;
  z-index: 1;
}
.p7-sentences {
  font-family: "Ubuntu", sans-serif;
  font-size: 24px; line-height: 2.2;
  color: #1d1d1d;
  z-index: 3;
}
.p7-sentences p { margin-bottom: 4px; }
.blank {
  display: inline-block;
  vertical-align: middle;
  min-width: 220px;
  height: 44px;
  margin: 0 6px;
  padding: 0 18px;
  border: 2px solid var(--green-lime);
  border-radius: 26px;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  font-size: 22px;
  color: #ffffff;
  line-height: 40px;
  text-align: center;
  transition: background 0.2s, border 0.2s;
  position: relative;
  cursor: pointer;
}
.blank::before {
  content: "·············";
  color:var(--green-darker) ;
  letter-spacing: 0.1em;
}
.blank.filled::before { content: ""; }
.blank.filled { background: var(--green-lime-soft); }
.blank.drag-over { background: #e7f3c0; border-style: dashed; }
.blank.correct   { background: var(--green-lime); color: #fff; border-color: var(--green-lime); }
.blank.incorrect { background: var(--orange);     color: #fff; border-color: var(--orange); }
/* Icona (oltre al colore) per distinguere corretto/errato — WCAG 1.4.1 "Uso del colore" */
.blank.correct::after   { content: " ✓"; font-weight: 700; margin-left: 4px; color:  #ffffff; }
.blank.incorrect::after { content: " ✗"; font-weight: 700; margin-left: 4px; color: #ffffff; }

.p7-divider {
  margin: 30px 0px;
  height: 1.5px;
  background: #c5d3aa;
  z-index: 3;
}
.word-bank {

  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 40px;
}
.word {
  height: 50px;
  background: var(--green-lime-soft);
  border-radius: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Ubuntu", sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #ffffff;
  cursor: grab;
  user-select: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.word:hover:not(.used) { transform: scale(1.04); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.word.dragging { opacity: 0.4; cursor: grabbing; }
.word.used { opacity: 0.25; cursor: default; pointer-events: none; }
.word.selected { outline: 3px solid var(--green-dark); outline-offset: 2px; }
/* I controlli dell'esercizio "completa il testo" sono veri <button> (accessibili da
   tastiera): azzero il rendering nativo dei pulsanti per mantenerli identici a prima. */
.word, .blank, .p7-modal-body .modal-word {
  appearance: none;
  -webkit-appearance: none;
}
.word { border: none; }
.word:disabled, .blank:disabled { cursor: default; }

.p7-actions {
 margin-top: 40px;
  display: flex; align-items: center; gap: 18px;
  z-index: 4;
}
.p7-check {
  background: var(--green-dark);
  color: #fff;
  border: none;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 10px 24px;
     border-radius: 42px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.p7-reset {
  background: #fff;
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 8px 22px;
      border-radius: 42px;
  cursor: pointer;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .p7-check,.p7-reset {
    font-size: 16px;
    padding: 10px 14px;}
}
.p7-feedback {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--green-dark);
}
.p7-feedback.error { color: var(--orange); }

  .page-13 .inner-page {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .page-13 .inner-page .row {
    height: auto !important;
    align-items: flex-start !important;
  }
  .page-13 .inner-page .col-12 {
    height: auto !important;
    align-items: flex-start !important;
    padding: 15px 15px 0 15px;
  }

/* ---------- Mobile small adjustments ---------- */

/* ===================================================================
   FILL-IN-BLANKS MODAL — shared between desktop and mobile
   =================================================================== */
.p7-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.p7-modal.open { display: flex; }
.p7-modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  max-width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  width: 460px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.p7-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.p7-modal-header h3 {
  margin: 0;
  font-size: 22px;
  color: var(--green-dark);
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
}
.p7-modal-close {
  border: none;
  background: transparent;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  color: var(--green-dark);
  padding: 0 6px;
}
.p7-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p7-modal-body .modal-word {
  padding: 10px 20px;
  background: #fff;
  border-radius: 22px;
  border: 2px solid var(--green-lime);
  cursor: pointer;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--green-darker);
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.p7-modal-body .modal-word:hover {
  background: var(--green-lime-soft);
  transform: translateY(-1px);
    color: #ffffff;

}
.p7-modal-body .modal-word:active {
  background: var(--green-lime);
  color: #fff;
}

@media (max-width: 1200px) {
  .p4-text, p, li{font-size: 20px;}
  .p4-data-head{font-size: 25px;padding: 9px 26px;}
  .p2-title {font-size: 40px;}
  .p4-callout{font-size: 20px;}
}


@media (max-width: 768px) {
  .p4-text,.p4-data .p4-text, p,li{ font-size: 16px; }
    .p4-callout{font-size: 17px;}
    .p4-callout>span{padding-left: 35px;}
    .p4-callout::after{left: 2px;background-size: 20px;width: 20px;height: 20px;}

  .inner-page{border-radius: 30px 30px 0 0;    margin-top: 10px;}
  .page-3{height: auto;}
  .page-3 .inner-page{border-radius: 30px;}
  .blank{font-size: 18px;font-weight: 700;}
  .page-arrows {
    background: transparent;
    padding: 0;
    gap: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    z-index: 50;
  }
  .page-arrows a {
    pointer-events: auto;
    background: var(--green-dark);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  .page-arrows a:hover {
    background: var(--green-dark);
  }
  .page-arrows .arr-prev { left: -33px; }
  .page-arrows .arr-next { right: -33px; }
  .page-arrows a svg {width: 18px;height: 18px;}
  .page{margin: 20px 35px 0px 35px;height: calc(100% - 42px);border-radius: 30px;}

    .page-4, .page-5, .page-7, .page-8, .page-9, .page-10, .page-11, .page-12, .page-13, .page-15, .page-16, .page-17, .page-18, .page-19, .page-21, .page-22, .page-23, .page-24, .page-25, .page-26, .page-27, .page-28 , .page-30, .page-32, .page-35, .page-36, .page-38, .page-39, .page-40, .page-41 , .page-42 , .page-43 , .page-44 , .page-45, .page-46 {
      height: calc(100% - 70px);
    }
    .page-6, .page-20 {
      height: calc(100% - 98px);
    }
    .page-37{
      height: calc(100% - 5px);
    }
    .page-4 .inner-page,.page-5 .inner-page,.page-6 .inner-page,.page-7 .inner-page,.page-8 .inner-page,.page-9 .inner-page,.page-10 .inner-page,.page-11 .inner-page,.page-12 .inner-page,.page-13 .inner-page{border-radius: 30px;}

  .page-arrows a {
    width: 30px;
    height: 27px;border-radius: 60px;
  }

  .page-1{background: var(--green-dark) url(../img/img-step-1.png) no-repeat center bottom; background-size: calc(90% - 40px);height: calc(100% - 55px);border-radius: 30px;}
  .p1-logo .brand img{width: 210px;}
  .p1-logo{width: 210px;padding: 0 30px 39px 0px;}
  .p1-title h1 {font-size: 7vw;}
  .p1-subtitle {
    margin-top: 30px;
    margin-right: 30px;
    font-size: 5.5vw;
  }
  .p1-cta {
    font-size:1rem;
    padding: 8px 30px;
    margin: 30px 40px 0 auto;
    border-radius: 10px;
  }
  .laura-luigi{max-width: 80%;margin: 0 auto 30px auto;}
  .chiara-antonio{max-width: 100%;margin: 0 auto 30px auto;}
    .p2-title {
        font-size: 25px;
        letter-spacing: -1.4px;
        line-height: 1.1;
    }
  .p5-callout{font-size: 18px;padding: 24px 20px;}
  .p4-callout {margin-bottom: 0px;}

  .quiz-list {padding: 10px;}
  .quiz-q {font-size: 16px;}
  .quiz-num {
    width: 100px;
    height: 45px;
    font-size: 28px;}
  .page-12 .quiz-row {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .qb {width: 110px;height: 36px;}
  .page-12 .quiz-row .quiz-num { order: 1; align-self: flex-start; }
  .page-12 .quiz-row .quiz-q { order: 2; }
  .page-12 .quiz-row .quiz-buttons { order: 3; flex-direction: row; }

  .quiz-feedback {padding-left: 10px;font-size: 19px;}
  .p7-prompt {font-size: 21px;}
  .p7-sentences {font-size: 17px;line-height: 1.5;}
  .word-bank, .p7-divider { display: none; }
  .blank { cursor: pointer; margin-bottom: 2px;}
  .p7-modal-content {
    padding: 20px;
    width: 400px;
  }
  .p7-modal-header h3 { font-size: 20px; }
  .p7-modal-body .modal-word { padding: 10px 18px; font-size: 16px; }
  .p7-feedback{
        font-size: 18px;
  }
  .inner-page-curve{display: none!important;}
}
  .p7-feedback{
        margin-top: 30px;
  }
.h-perc-100{height: 100%;}
.h-calc-100{
      max-height: calc(100% - 40px);
}
.h-calc-90{
      max-height: calc(100% - 100px);
}

.fw-400{font-weight: 400;}

.pb-150{padding-bottom: 150px!important;}

/* ===================================================================
   CAPITOLO 2 — PAGES 15..27 (shared layout rules)
   =================================================================== */
.page-c2 { background: #fff; }

.page-c2 .inner-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-c2 .inner-page .row {
  height: auto !important;
  align-items: flex-start !important;
}
.page-c2 .inner-page .col-12 {
  height: auto !important;
  align-items: flex-start !important;
  padding: 15px 15px 0 15px;
}
.page-c2 .h-calc-100 { max-height: none; }

/* ===================================================================
   PAGE 25 — MATCHING ACTIVITY
   =================================================================== */
.match-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 14px;
  align-items: stretch;
}
.match-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.match-item {
  width: 100%;
  min-height: 80px;
  border-radius: 22px;
  border: 2px solid var(--green-lime);
  background: #fff;
  color: #1d1d1d;
  font-family: "Ubuntu", sans-serif;
  font-size: 19px;
  line-height: 1.3;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border 0.15s, transform 0.12s, box-shadow 0.15s;
  position: relative;
}
.match-item:hover:not(.locked) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.match-item.selected {
  background: var(--green-lime-soft);
  border-color: var(--green-dark);
  color: #ffffff;
}
.match-item.matched {
  background: var(--green-lime-bg);
  border-color: var(--green-dark);
  color: #ffffff;
  cursor: default;
}
.match-item.matched::after {
  content: attr(data-match-num);
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px; height: 28px;
  background: var(--green-darker);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.match-item.correct {
  background: var(--green-lime);
  color: #fff;
  border-color: var(--green-lime);
}
.match-item.incorrect {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
/* Icona (oltre al colore) per distinguere corretto/errato — WCAG 1.4.1 */
.match-item.correct::before   { content: "✓ "; font-weight: 700; color: #ffffff }
.match-item.incorrect::before { content: "✗ "; font-weight: 700; color: #ffffff; }
.match-item.locked { cursor: default; }

@media (max-width: 768px) {
  .match-item { font-size: 15px; min-height: 56px; padding: 10px 12px; }
  .match-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .match-col-left { gap: 8px; }
  .match-col-right { gap: 8px; padding-top: 12px; border-top: 1px dashed #c5d3aa; }
  .match-col-right::before {
    content: "Continuazioni:";
    display: block;
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    color: var(--green-dark);
    font-size: 15px;
    margin-bottom: 4px;
  }
  .match-col-left::before {
    content: "Inizia da:";
    display: block;
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    color: var(--green-dark);
    font-size: 15px;
    margin-bottom: 4px;
  }
}

/* ===================================================================
   PAGE 27 — BIANCHI FAMILY BUDGET ACTIVITY
   =================================================================== */
.bianchi-intro {
  font-family: "Ubuntu", sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #1d1d1d;
}
.bianchi-intro p { margin-bottom: 0; }

.bianchi-table {
  border: 2px solid #b5cce0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin-top: 12px;
}
.bianchi-table-head {
  background: #d9e3ee;
  color: #1d1d1d;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  padding: 8px 12px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #b5cce0;
}
.bianchi-table-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
}
.bianchi-col {
  padding: 10px 0;
}
.bianchi-col + .bianchi-col {
  border-left: 1px solid #b5cce0;
}
.bianchi-col-head {
  background: #eaf1f8;
  padding: 6px 14px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #1d1d1d;
  text-align: center;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #b5cce0;
  margin-bottom: 6px;
}
.bianchi-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bianchi-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 14px;
  font-family: "Ubuntu", sans-serif;
  font-size: 14px;
  color: #1d1d1d;
  border-bottom: 1px dotted #e2e2e2;
}
.bianchi-list li:last-child { border-bottom: none; }
.bianchi-list li > span:last-child {
  font-weight: 600;
  white-space: nowrap;
}
.bianchi-list li.bianchi-cat {
  display: block;
  font-weight: 700;
  color: var(--green-darker);
  background: #eaf1f8;
  padding: 6px 14px;
  border-top: 1px solid #b5cce0;
  border-bottom: 1px solid #b5cce0;
  margin-top: 4px;
}
.bianchi-list li.bianchi-cat:first-child { margin-top: 0; border-top: none; }
.bianchi-list li:not(.bianchi-cat) > span:first-child {
  padding-left: 12px;
}
.bianchi-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  margin-top: 6px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--green-darker);
  background: #f3f8e6;
  border-top: 1px solid #b5cce0;
}
/* Tabella bilancio resa semantica (<table>/<th>/<td>) mantenendo l'aspetto */
.bianchi-tbl { width: 100%; border-collapse: collapse; font-family: "Ubuntu", sans-serif; font-size: 14px; color: #1d1d1d; }
.bianchi-tbl caption {
  caption-side: top;
  background: #eaf1f8; padding: 6px 14px; font-weight: 700; font-size: 14px; color: #1d1d1d;
  text-align: center; letter-spacing: 0.04em; border-bottom: 1px solid #b5cce0;
}
.bianchi-tbl td, .bianchi-tbl tbody th {
  padding: 5px 14px; border-bottom: 1px dotted #e2e2e2; text-align: left; font-weight: 400;
}
.bianchi-tbl tbody td:first-child { padding-left: 26px; }
.bianchi-tbl td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.bianchi-tbl tr.bianchi-cat th {
  font-weight: 700; color: var(--green-darker); background: #eaf1f8;
  padding: 6px 14px; border-top: 1px solid #b5cce0; border-bottom: 1px solid #b5cce0; text-align: left;
}
.bianchi-tbl tfoot th, .bianchi-tbl tfoot td {
  font-weight: 700; color: var(--green-darker); background: #f3f8e6; border-top: 1px solid #b5cce0; padding: 8px 14px;
}
.bianchi-tbl tfoot th { text-align: left; }
.bianchi-tbl tfoot td { text-align: right; white-space: nowrap; }

.bianchi-img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 560px;
  height: auto;
  border-radius: 14px;
}

.bianchi-questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}
.bianchi-q {
  background: #fff;
  border: 2px solid var(--green-lime);
  border-radius: 18px;
  padding: 12px 16px;
}
.bianchi-q-text {
  font-family: "Ubuntu", sans-serif;
  font-size: 17px;
  line-height: 1.3;
  color: #1d1d1d;
  margin-bottom: 10px;
}
.bianchi-q-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bq-opt {
  flex: 1 1 30%;
  min-width: 90px;
  height: 38px;
  border-radius: 19px;
  border: 2px solid var(--green-lime);
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--green-darker);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0 10px;
}
.bq-opt:hover:not(.locked) { transform: scale(1.03); }
.bq-opt.selected {
  background: var(--green-lime-soft);
  border-color: var(--green-dark);
}
.bq-opt.correct {
  background: var(--green-lime) !important;
  color: #fff !important;
  border-color: var(--green-lime) !important;
}
.bq-opt.incorrect {
  background: var(--orange) !important;
  color: #fff !important;
  border-color: var(--orange) !important;
}
.bq-opt.locked { cursor: default; opacity: 0.55; }
.bq-opt.locked.selected, .bq-opt.locked.correct { opacity: 1; }

.bianchi-feedback {
  margin-top: 12px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--green-dark);
  opacity: 0;
  transition: opacity 0.3s;
}
.bianchi-feedback.visible { opacity: 1; }

@media (max-width: 1200px) {
  .bianchi-intro { font-size: 16px; }
  .bianchi-q-text { font-size: 15px; }
}
@media (max-width: 768px) {
  .bianchi-table-cols { grid-template-columns: 1fr; }
  .bianchi-col + .bianchi-col { border-left: none; border-top: 1px solid #b5cce0; }
  .bq-opt { font-size: 13px; }
}

/* ===================================================================
   PAGE 29 — CLICCA SULLA CASELLA GIUSTA (CHECKBOX QUIZ)
   =================================================================== */
.cb-callout {
  position: absolute;
  top: 30px;
  right: 30px;
  background: #fff;
  border: 2px solid var(--green-lime);
  border-radius: 30px;
  padding: 16px 32px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: #1d1d1d;
  z-index: 5;
  max-width: 38%;
  text-align: center;
}

.cb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 30px 30px 0 30px;
}
.cb-col {
  padding: 20px 30px;
}
.cb-col + .cb-col {
  border-left: 2px solid var(--green-lime);
}

.cb-q + .cb-q {
  margin-top: 36px;
}

.cb-q-text {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.3;
  color: #1d1d1d;
  margin-bottom: 14px;
  position: relative;
  padding-left: 22px;
}
.cb-q-text::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--green-darker);
  font-size: 24px;
  line-height: 1;
}

.cb-opts {
  list-style: none;
  padding: 0 0 0 22px;
  margin: 0;
}
.cb-opts li { margin: 8px 0; }

.cb-opt {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 4px 8px 4px 0;
  cursor: pointer;
  font-family: "Ubuntu", sans-serif;
  font-size: 16px;
  color: #1d1d1d;
  transition: opacity 0.15s;
}
.cb-opt:hover:not(.locked) .cb-box { background: var(--green-lime-soft); }

.cb-box {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--green-lime);
  border-radius: 6px;
  background: #fff;
  position: relative;
  flex-shrink: 0;
  transition: all 0.15s;
}
.cb-opt.selected .cb-box {
  background: var(--green-lime);
}
.cb-opt.selected.correct .cb-box {
  background: var(--green-lime);
  border-color: var(--green-lime);
}
.cb-opt.selected.correct .cb-box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 7px; height: 12px;
  border: solid var(--green-darker);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.cb-opt.selected.incorrect .cb-box {
  background: var(--orange);
  border-color: var(--orange);
}
.cb-opt.selected.incorrect .cb-box::after {
  content: "";
  position: absolute;
  left: 4px; top: 4px;
  width: 10px; height: 10px;
  background:
    linear-gradient(45deg, transparent 45%, var(--green-darker) 45%, var(--green-darker) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--green-darker) 45%, var(--green-darker) 55%, transparent 55%);
}
.cb-opt.correct:not(.selected) .cb-box {
  background: var(--green-lime);
  border-color: var(--green-lime);
}
.cb-opt.correct:not(.selected) .cb-box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 7px; height: 12px;
  border: solid var(--green-darker);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.cb-opt.locked { cursor: default; }
.cb-opt.locked:not(.selected):not(.correct) { opacity: 0.55; }
/* Radio accessibili (pag.28): input nascosto ma focusabile + focus visibile sulla casella */
.cb-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
/* La radio reale e' nascosta: l'anello di focus va sulla casella visibile, non
   sull'input (che sarebbe invisibile o lascerebbe un artefatto di 1px). Stesso
   doppio bordo nero+bianco ad alto contrasto della regola globale :focus-visible. */
.cb-input:focus-visible { outline: none !important; box-shadow: none !important; }
.cb-input:focus-visible + .cb-opt .cb-box {
  outline: 2px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

.cb-feedback {
  margin: 24px 30px 0 30px;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--green-dark);
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
}
.cb-feedback.visible { opacity: 1; }

@media (max-width: 1200px) {
  .cb-callout { font-size: 18px; padding: 12px 22px; }
  .cb-q-text { font-size: 15px; }
  .cb-opt { font-size: 14px; }
}
@media (max-width: 768px) {
  .cb-callout {
    position: static;
    max-width: none;
    margin: 12px 16px 0 16px;
    font-size: 17px;
    padding: 10px 18px;
  }
  .cb-grid { grid-template-columns: 1fr; padding: 16px; }
  .cb-col { padding: 16px 8px; }
  .cb-col + .cb-col {
    border-left: none;
    border-top: 2px solid var(--green-lime);
  }
}

/* ===================================================================
   PAGE 17 — BILANCIO FAMILIARE TABLE
   =================================================================== */
.bil-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  font-size: 14px;
  color: #1d1d1d;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.bil-table th,
.bil-table td {
  padding: 8px 10px;
  vertical-align: top;
  border-bottom: 1px solid #c8d6e2;
}
.bil-table thead th {
  font-weight: 700;
  background: #eaf1f8;
  font-size: 12px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #b5cce0;
}
.bil-th-sub {
  display: inline-block;
  font-weight: 400;
  font-size: 12px;
}
.bil-table tbody tr:nth-child(even) td { background: #f6f9fc; }
.bil-table .bil-num {
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.bil-table tfoot th,
.bil-table tfoot td {
  font-weight: 700;
  background: #f3f8e6;
  border-top: 2px solid var(--green-dark);
  border-bottom: none;
}
.bil-table .bil-total-num { color: var(--green-darker); }

@media (max-width: 1200px) {
  .bil-table { font-size: 13px; }
  .bil-table th, .bil-table td { padding: 6px 8px; }
}
@media (max-width: 768px) {
  .bil-table ,.bil-table thead th{ font-size: 11px; }
  .bil-table th, .bil-table td { padding: 5px 4px; }
  .bil-th-sub { font-size: 10px; }
  .inner-page-5{padding-left: 15px;padding-right: 15px;}
  .bil-table thead th{letter-spacing: 0;}
}


.inner-page{        border-radius: 45px;}
@media (max-width: 768px) {
  .inner-page{        border-radius: 30px;}

}
/* ===================================================================
   MOBILE — Capitolo 2 pages
   =================================================================== */
@media (max-width: 768px) {
  .page-c2 .inner-page { border-radius: 30px; }
}

/* ---------- Custom scrollbar ---------- */
.inner-page,
.p7-modal-content {
  scrollbar-gutter: stable both-edges;
}
.inner-page {
  border-color: transparent;
  border-right-width: 7px;
  outline: 1px solid var(--green-dark);
  outline-offset: -1px;
}
.inner-page::-webkit-scrollbar,
.p7-modal-content::-webkit-scrollbar {
  width: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.inner-page::-webkit-scrollbar-track,
.p7-modal-content::-webkit-scrollbar-track {
  background-color: #fff;
  border: 1px solid var(--green-dark);
  border-radius: 999px!important;
  margin: 50px 0 150px;
}
.inner-page::-webkit-scrollbar-thumb,
.p7-modal-content::-webkit-scrollbar-thumb {
  background-color: var(--green-lime);
  border-radius: 999px;
  min-height: 40px;
  max-height: 90px;
}
.inner-page::-webkit-scrollbar-thumb:hover,
.p7-modal-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--green-mid);
}

/* ===================================================================
   CAPITOLO 3 — Pages 28..35 (shared layout rules)
   =================================================================== */
.page-c3 { background: #fff; }

.page-c3 .inner-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-c3 .inner-page .row {
  height: auto !important;
  align-items: flex-start !important;
}
.page-c3 .inner-page .col-12 {
  height: auto !important;
  align-items: flex-start !important;
  padding: 15px 15px 0 15px;
}
.page-c3 .h-calc-100 { max-height: none; }

/* Italic green quote with arrow used in chapter 3 */
.c3-quote {
  color: var(--green-dark);
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  padding-left: 42px;
  position: relative;
  margin-top: 18px;
  margin-bottom: 12px;
}
.c3-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 28px;
  height: 24px;
  background-image: url('../img/freccia-verde.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: left center;
}
@media (max-width: 768px) {
  .c3-quote { font-size: 18px; padding-left: 32px; }
  .c3-quote::before { width: 22px; height: 18px; top: 3px; }
}

/* Self-assessment SI / NO checklist (chapter 3 activities) */
.c3-check {
  list-style: none;
  margin: 0;
  padding: 0;
}
.c3-check li {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 4px;
  border-bottom: 1.5px solid #c5d3aa;
  font-family: "Ubuntu", sans-serif;
  font-size: 22px;
  line-height: 1.3;
  color: #1d1d1d;
}
.c3-check li:last-child { border-bottom: none; }
.c3-check-num {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--green-lime-soft);
  color: #ffffff;
  font-weight: 700;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c3-check-q {
  flex: 1;
  font-weight: 700;
}
.c3-check-buttons {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}
.c3-check-btn {
  width: 90px;
  height: 44px;
  border-radius: 22px;
  border: 2px solid;
  background: #fff;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.c3-check-btn[data-answer="si"] { border-color: var(--green-lime); color: var(--green-lime); }
.c3-check-btn[data-answer="no"] { border-color: var(--orange); color: var(--orange); }
.c3-check-btn:hover { transform: scale(1.04); }
.c3-check-btn.selected[data-answer="si"] { background: var(--green-lime); color: #fff; }
.c3-check-btn.selected[data-answer="no"] { background: var(--orange); color: #fff; }

@media (max-width: 768px) {
  .c3-check li { font-size: 16px; gap: 10px; padding: 14px 2px; flex-wrap: wrap; }
  .c3-check-num { width: 34px; height: 34px; font-size: 17px; border-radius: 9px; }
  .c3-check-btn { width: 64px; height: 36px; font-size: 14px; }
}

/* "Mettersi nei panni" activity (chapter 3 last page) */
.c3-role-title {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #1d1d1d;
  margin: 0 0 14px 0;
}
.c3-role-intro {
  font-family: "Ubuntu", sans-serif;

  color: #1d1d1d;
  margin-bottom: 12px;
}
.c3-role-list {
  list-style: none;
  margin: 0 0 14px 0;
  padding-left: 24px;
}
.c3-role-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-family: "Ubuntu", sans-serif;
  color: #1d1d1d;
}
.c3-role-list li::before {
  content: "•";
  position: absolute; left: 0; top: 0;
  color: #1d1d1d;
  font-weight: 700;
}
.c3-divider {
  height: 1.5px;
  background: #1d1d1d;
  margin: 24px 0;
}
@media (max-width: 768px) {
  .c3-role-list { padding-left: 4px; }
}

/* Highlighted helpline block in "Come uscirne" */
.c3-helpline {
  margin-top: 16px;
  padding: 4px 0 4px 0;
}
.c3-helpline-head {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  color: #1d1d1d;
  margin-bottom: 12px;
}


/* ===================================================================
   PAGES 37–46 — SOLUZIONI (Cover, Cap 1, Cap 2, Cap 3, Grazie)
   =================================================================== */
.page-sol { background: #fff; }

.page-sol .inner-page,
.inner-page-sol {
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.page-sol .inner-page .row {
  height: auto !important;
  align-items: flex-start !important;
}
.page-sol .inner-page .col-12 {
  height: auto !important;
  padding: 30px 36px 0 36px;
}

.sol-title {
  font-size: 38px !important;
  line-height: 1.05;
}
.sol-title .fw-400 { font-weight: 400; }

.sol-subtitle {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;

  color: #1d1d1d;
  margin: 6px 0 22px;
}

.sol-text {
  font-family: "Ubuntu", sans-serif;

  color: #1d1d1d;
}
.sol-text p { margin-bottom: 14px; }
.sol-text strong { font-weight: 700; }
.sol-text-foot {
  font-family: "Ubuntu", sans-serif;
  color: var(--green-dark);
  margin-top: 22px;
}

/* ---------- Cover (page 37) ---------- */
.inner-page-sol-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sol-cover-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sol-cover-img {
  width: 100%;
  max-width: 760px;
  border-radius: 35px;
  height: auto;
  display: block;
}
@media (max-width: 768px) {
  .inner-page-sol-cover { padding: 10px; }
  .sol-cover-img { max-width: 100%; }
}
/* Page 37: immagine "Soluzioni..." sostituita da fumetto HTML (.cap-bubble).
   Nessun personaggio → coda SEMPRE verso il basso (a sinistra), sia desktop
   che mobile (override della coda-sinistra di default di .cap-bubble). */
.page-sol-cover .cap-bubble { max-width: 760px; }
.page-sol-cover .cap-bubble::before {   /* coda giù: bordo verde */
  left: 18%; right: auto; top: 100%; bottom: auto;
  margin-top: 0px;
  transform: translateX(-50%);
  border-top: 18px solid var(--green-dark);
  border-right: 16px solid transparent;
  border-bottom: 0;
  border-left: 16px solid transparent;
}
.page-sol-cover .cap-bubble::after {    /* coda giù: riempimento bianco */
  left: 18%; right: auto; top: 100%; bottom: auto;
  margin-top: 0px;
  transform: translateX(-50%);
  border-top: 14px solid #fff;
  border-right: 12px solid transparent;
  border-bottom: 0;
  border-left: 12px solid transparent;
}

/* ---------- Cap 1 Vero/Falso (page 38) ---------- */
.sol-vf-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: "Ubuntu", sans-serif;
}
.sol-vf-row {
  display: grid;
  grid-template-columns: 40px 1fr 2.2fr;
  grid-gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--green-lime-soft);
  font-size: 14px;
  line-height: 1.35;
  color: #1d1d1d;
}
.sol-vf-row:last-child { border-bottom: none; }
.sol-vf-num {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--green-lime-soft);
  color: #ffffff;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.sol-vf-q { font-weight: 700; }
.sol-vf-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--green-lime);
  background: #fff;
  height: 110px;
  box-sizing: border-box;
}
.sol-vf-box.sol-vf-falso { border-color: var(--orange); }
.sol-vf-box.sol-vf-vero  { border-color: var(--green-lime); }
.sol-vf-a {
  flex: 0 0 auto;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  text-align: center;
  background: #fff;
  line-height: 1.2;
  align-self: center;
}
.sol-vf-box.sol-vf-falso .sol-vf-a { color: var(--orange); }
.sol-vf-box.sol-vf-vero  .sol-vf-a { color: var(--green-dark); }
.sol-vf-exp {
  color: #1d1d1d;
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 10px;
  scrollbar-gutter: stable;
}
.sol-vf-exp::-webkit-scrollbar {
  width: 8px;
  -webkit-appearance: none;
  appearance: none;
}
.sol-vf-exp::-webkit-scrollbar-track {
  background-color: #fff;
  border: 1px solid var(--green-dark);
  border-radius: 999px !important;
}
.sol-vf-exp::-webkit-scrollbar-thumb {
  background-color: var(--green-lime);
  border-radius: 999px;
  min-height: 40px;
  max-height: 90px;
}
.sol-vf-exp::-webkit-scrollbar-thumb:hover {
  background-color: var(--green-mid);
}

/* ---------- Cap 2 Abbinamenti (page 40) ---------- */
.sol-match-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  font-family: "Ubuntu", sans-serif;
}
.sol-match-row {
  display: grid;
  grid-template-columns: 40px 1fr 1.6fr;
  grid-gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--green-lime-soft);
  font-size: 14px;
  line-height: 1.35;
  color: #1d1d1d;
}
.sol-match-row:last-child { border-bottom: none; }
.sol-match-num {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--green-lime-soft);
  color: #ffffff;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.sol-match-left { font-weight: 700; }
.sol-match-right {
  border: 2px solid var(--green-lime);
  border-radius: 14px;
  padding: 10px 16px;
  background: #fff;
}

.sol-text-foot-pos { color: var(--green-dark); }
.sol-text-foot-neg { color: #b32121; margin-top: 14px; }

/* ---------- Cap 2 Completa il testo (page 41) ---------- */
.sol-fill-list {
  margin: 0;
  padding-left: 22px;
  font-family: "Ubuntu", sans-serif;

  color: #1d1d1d;
}
.sol-fill-list li { margin-bottom: 10px; }
.sol-fill-list strong { font-weight: 700; }

/* ---------- Cap 2 Clicca sulla casella (page 42) ---------- */
.sol-family-wrap {
  display: flex;
  gap: 20px;
  align-items: center;
}
.sol-family-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  font-family: "Ubuntu", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #1d1d1d;
}
.sol-family-list li { margin-bottom: 16px; }
.sol-family-q {
  font-weight: 700;
  margin: 0 0 4px;
  position: relative;
  padding-left: 16px;
}
.sol-family-q::before {
  content: "•";
  position: absolute;
  left: 0; top: 0;
  color: var(--green-dark);
  font-weight: 700;
}
.sol-family-a {
  margin: 0;
  padding-left: 16px;
}
.sol-family-img {
  max-width: 38%;
  width: 220px;
  height: auto;
  flex-shrink: 0;
  align-self: flex-start;
}

/* ---------- Cap 3 Roles (pages 44–45) ---------- */
.sol-roles-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: "Ubuntu", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1d1d1d;
}
.sol-roles-list > li { margin-bottom: 18px; }
.sol-role-q {
  margin: 0 0 6px;
  color: var(--green-dark);
}
.sol-role-tip {
  margin: 6px 0 0;
  color: var(--green-dark);
  font-size: 13px;
}
.sol-role-sub {
  margin: 6px 0 0 18px;
  padding: 0;
  list-style: disc;
}
.sol-role-sub li { margin-bottom: 4px; }

/* ---------- Grazie (page 46) ---------- */

.inner-page-thanks {
background: linear-gradient(180deg, #a2c246 0%, rgba(214, 239, 177, 0) 30%)!important;  display: flex;
  align-items: center;
  height: calc(100% - -10px)!important;
  justify-content: center;
}
.thanks-wrap {
  text-align: center;
  padding: 40px;
}
.thanks-logo {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 30px;
}
.thanks-text {
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 44px;
  color: var(--green-dark);
  margin: 0;
}

@media (max-width: 1200px) {
  .sol-title { font-size: 32px !important; }
  .sol-subtitle { font-size: 21px; }
}

@media (max-width: 768px) {
  .page-sol .inner-page .col-12 { padding: 18px 18px 0 18px; }
  .sol-title { font-size: 24px !important; }
  .sol-subtitle { font-size: 17px; margin: 4px 0 16px; }


  .sol-vf-row {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "num q"
      ".   box";
    grid-gap: 6px 10px;
    padding: 12px 0;
  }
  .sol-vf-num { grid-area: num; width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
  .sol-vf-q { grid-area: q; }
  .sol-vf-box {
    grid-area: box;
    height: 130px;
    padding: 10px 12px;
    gap: 10px;
  }
  .sol-vf-a { font-size: 13px; padding: 3px 12px; }

  .sol-match-row {
    grid-template-columns: 32px 1fr;
    grid-template-areas:
      "num left"
      ".   right";
    grid-gap: 4px 10px;
  }
  .sol-match-num { grid-area: num; width: 28px; height: 28px; font-size: 15px; border-radius: 8px; }
  .sol-match-left { grid-area: left; }
  .sol-match-right { grid-area: right; }

  .sol-family-wrap { flex-direction: column-reverse; }
  .sol-family-img { max-width: 60%; width: 160px; align-self: center; }

  .thanks-logo { width: 160px; margin-bottom: 20px; }
  .thanks-text { font-size: 32px; }
}

/* ===================================================================
   WCAG 2.2 — 1.4.10 Ridimensionamento del contenuto (Reflow)
   Il reader è una "slide fissa" per schermata (html/body/#stage con
   overflow:hidden e altezza bloccata): se la viewport è bassa — come con
   zoom 200% su finestra 640x512 = 320x256 px CSS, o con zoom elevato in
   generale — i contenuti vengono tagliati e alcune funzioni spariscono
   (es. il link "Scopri di più" in copertina), senza poter scorrere.
   Quando l'altezza è ridotta passiamo a scorrimento VERTICALE del documento:
   le pagine crescono in base al contenuto, nulla viene tagliato e non serve
   lo scorrimento orizzontale.
   Soglia 480px: scatta solo con zoom forte / viewport molto basse (il revisore
   l'ha testato a 320x256), NON sulle finestre/laptop normali (>480px), dove
   resta lo slide fisso con scorrimento interno di .inner-page come prima.
   =================================================================== */
@media (max-height: 480px) {
.page {
    margin: 30px 30px 0px 30px;
}
.page-1{
      height: calc(100% - 70px);
}
.p1-title {top: 20%;}
.p1-subtitle {margin-top: 30px;}
.p1-cta {margin: 20px 60px 0 auto;font-size: 1.3rem;
    letter-spacing: 0.05em;
    padding: 8px 30px;}
.inner-page-curve {right: 30.2px;}
.page-arrows {
    bottom: -10px;}
}
