/* ITS Milano — foglio di stile unico, scritto a mano. Vedi _dev/DESIGN.md */

/* ---------- Font ---------- */
@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 100%;
  font-style: italic;
  font-display: swap;
}

/* ---------- Token ---------- */
:root {
  --navy: #113559;
  --navy-deep: #0C2743;
  --blue: #346290;
  --red: #CF2E2E;
  --red-dark: #AE2222;
  --ink: #1F2D3A;
  --muted: #566575;
  --line: #D5DEE6;
  --mist: #F3F6F9;
  --paper: #FFFFFF;
  --sky: #C3D3E3;
  --grid: #EAF0F6;                         /* quadretti del quaderno */
  --margin: rgba(207, 46, 46, .38);        /* riga rossa del margine */

  --f-display: "Caveat", "Segoe Script", "Bradley Hand", cursive;
  --f-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --t-xs: 0.9375rem;                      /* 15: note, etichette, interfaccia */
  --t-base: 1.0625rem;                    /* 17: testo */
  --t-sm: 1.1875rem;                      /* 19: domande, attacchi su navy */
  --t-md: 1.3125rem;                      /* 21: h3, attacchi */
  --t-note: 1.75rem;                      /* 28, Caveat: note a penna */
  --t-xl: clamp(2.75rem, 1.55rem + 3.4vw, 4.5rem);  /* 44–72, Caveat: h2 */
  --t-h1: clamp(3.25rem, 1.5rem + 4.8vw, 5.5rem);   /* 52–88, Caveat: h1 interni */
  --t-xxl: clamp(3.5rem, 1.4rem + 6.6vw, 6.5rem);   /* 56–104, Caveat: h1 home */

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --container: 1240px;
  --pad: 24px;
  --gap: 32px;
  --section: 120px;
  --radius: 6px;
  --header-h: 76px;
}
@media (max-width: 899px) {
  :root { --pad: 20px; --gap: 20px; --section: 64px; --header-h: 64px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
address { font-style: normal; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); text-decoration-thickness: 2px; }
strong { font-weight: 700; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--navy); color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--radius); }
.skip:focus { top: 16px; color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Titoli */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-xl);
  line-height: .92;
  letter-spacing: -0.005em;
  color: var(--navy);
  text-wrap: balance;
}
h3 { font-size: var(--t-md); line-height: 1.3; font-weight: 700; color: var(--navy); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 11px 24px;
  font-size: var(--t-xs); font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center;
  color: #fff; background: var(--red);
  border: 2px solid var(--red); border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-color: var(--navy); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn--small { min-height: 44px; padding: 8px 18px; font-size: var(--t-xs); }
.btn--large { min-height: 56px; padding: 14px 28px; font-size: var(--t-base); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--white { background: #fff; color: var(--navy); border-color: #fff; }
.btn--white:hover { background: var(--sky); border-color: var(--sky); color: var(--navy-deep); }
.section--navy .btn:focus-visible, .hero .btn:focus-visible, .footer :focus-visible { outline-color: #fff; }

.more { display: inline-block; padding-block: 10px; margin-block: -10px; font-weight: 600; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Barra superiore e header ---------- */
.topbar { background: var(--navy); color: var(--sky); font-size: var(--t-xs); }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: var(--s-5); min-height: 40px; }
.topbar__contacts { display: flex; gap: var(--s-5); }
.topbar a { color: #fff; text-decoration: none; display: inline-block; padding-block: 8px; }
.topbar a:hover { text-decoration: underline; }

.header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); flex: none; }
.logo img { width: 40px; height: 40px; }
.logo__name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.logo__name span { font-weight: 300; }
.logo:hover { color: var(--navy); }
.logo--light, .logo--light:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__list a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--t-xs); font-weight: 600; color: var(--ink); text-decoration: none;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav__list a:hover { color: var(--blue); border-bottom-color: var(--line); }
.nav__list a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--red); }
.nav__list a, .nav__cta { white-space: nowrap; }
.nav__phone { display: none; }
.menu-btn { display: none; }
@media (min-width: 1180px) and (max-width: 1299px) {
  .nav { gap: 20px; }
  .nav__list { gap: 16px; }
}

@media (max-width: 1179px) {
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 0 12px; margin-right: -12px;
    background: none; border: 0; border-radius: var(--radius);
    font-size: var(--t-xs); font-weight: 600; color: var(--navy); cursor: pointer;
  }
  .menu-btn__bars { position: relative; width: 22px; height: 2px; background: currentColor; transition: background-color .2s ease; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: var(--navy); transition: transform .2s ease; }
  .menu-btn__bars::before { top: -7px; }
  .menu-btn__bars::after { top: 7px; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: block; max-height: 0; overflow: hidden; visibility: hidden;
    background: var(--paper);
    transition: max-height .28s ease, visibility 0s .28s;
  }
  .js .nav.is-open {
    max-height: calc(100vh - var(--header-h)); overflow-y: auto; visibility: visible;
    border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px -16px rgba(17, 53, 89, .25);
    transition: max-height .28s ease, visibility 0s;
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--pad) 0; }
  .nav__list a { display: flex; min-height: 52px; font-size: var(--t-base); border: 0; border-bottom: 1px solid var(--line); }
  .nav__list a[aria-current="page"] { border-bottom-color: var(--line); color: var(--red); }
  .nav__cta { margin: 20px var(--pad) 0; display: flex; min-height: 48px; }
  .nav__phone { display: block; padding: 16px var(--pad) 24px; font-size: var(--t-xs); color: var(--muted); }
  .nav__phone a { font-weight: 700; color: var(--navy); }

  /* Senza JavaScript il menu resta visibile sotto il logo. */
  .no-js .menu-btn { display: none; }
  .no-js .header { position: static; }
  .no-js .header__in { flex-wrap: wrap; padding-block: 12px; }
  .no-js .nav { width: 100%; }
  .no-js .nav__list { padding-inline: 0; }
  .no-js .nav__cta { margin-inline: 0; }
  .no-js .nav__phone { padding-inline: 0; }
}
@media (max-width: 719px) {
  .topbar__hours { display: none; }
  .topbar__in { justify-content: flex-start; }
}

/* ---------- Sezioni ---------- */
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy .display, .section--navy h3 { color: #fff; }
.section--navy a:not(.btn) { color: #fff; }
.section--navy p { color: var(--sky); }

.section-head { max-width: 640px; margin-bottom: var(--s-8); }
.section-head p { margin-top: var(--s-4); color: var(--muted); font-size: var(--t-md); line-height: 1.45; }
.section-head--row { max-width: none; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-7); }

/* ---------- Quaderno: foglio a quadretti e tratti di penna ---------- */
.sheet {
  position: relative; overflow: hidden; background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}
.sheet > .container { position: relative; }
@media (min-width: 1360px) {
  .sheet > .container::before { content: ""; position: absolute; left: -12px; top: -600px; bottom: -600px; width: 2px; background: var(--margin); }
}
.ring { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; pointer-events: none; }
.ring path { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.circled {
  position: relative; display: inline-flex; align-items: baseline; gap: .5rem; padding: .625rem 1.625rem .75rem;
  font-family: var(--f-display); font-weight: 700; line-height: 1; color: var(--red); white-space: nowrap;
  transform: rotate(var(--tilt, -3deg));
}
.circled strong { font-size: 2.5rem; }
.circled span { font-size: var(--t-note); }
@media (prefers-reduced-motion: no-preference) {
  .ink [data-ink] .ring path, .ink [data-ink] .pen path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: none; }
  .ink [data-ink].is-inked .ring path, .ink [data-ink].is-inked .pen path { animation: draw .7s .2s cubic-bezier(.4, 0, .2, 1) both; }
}

/* ---------- Primo schermo ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(560px, 80vh, 780px); background: var(--navy-deep); color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 78% 35%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 36, 62, .94) 0%, rgba(11, 36, 62, .86) 27%, rgba(11, 36, 62, .5) 49%, rgba(11, 36, 62, 0) 72%),
    linear-gradient(0deg, rgba(11, 36, 62, .45) 0%, rgba(11, 36, 62, 0) 35%);
}
.hero__text { max-width: 640px; padding-block: var(--s-9) 72px; }
.hero__title {
  position: relative;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-xxl); line-height: .92; letter-spacing: -0.01em;
  color: #fff; text-wrap: balance; padding-bottom: 22px;
}
.pen { position: absolute; left: 0; bottom: 0; width: min(420px, 72%); height: 16px; overflow: visible; }
.pen path { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hero__lead { margin-top: var(--s-5); max-width: 30em; font-size: var(--t-md); line-height: 1.5; color: #fff; }
.hero .btn { margin-top: var(--s-6); }

@media (prefers-reduced-motion: no-preference) {
  .hero__title { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__lead, .hero .btn { animation: rise .7s .12s cubic-bezier(.2, .7, .2, 1) both; }
  .pen path { animation: draw .8s .65s cubic-bezier(.4, 0, .2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

@media (max-width: 899px) {
  .hero { display: block; min-height: 0; }
  .hero::after { display: none; }
  .hero__img { position: static; aspect-ratio: 5 / 4; height: auto; object-position: 92% 40%; }
  .hero__text { max-width: none; padding-block: var(--s-6) var(--s-7); }
  .hero__lead { font-size: var(--t-base); }
  .hero .btn { width: 100%; }
}

/* ---------- Lingue ---------- */
.lingue__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-5); align-items: end; }
.lingue__head .display { grid-column: 1 / span 7; }
.lingue__head p { grid-column: 8 / -1; }

.saluti { margin-top: var(--s-8); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); }
.saluti__item { display: flex; flex-direction: column; }
.saluti__word {
  display: block; height: 1em; white-space: nowrap;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(2.75rem, 1.9rem + 2.3vw, 3.75rem); line-height: 1; color: var(--blue);
}
.saluti__word svg { display: inline-block; width: auto; max-width: none; font-size: calc(1em * var(--k, 1)); fill: currentColor; }
.saluti__item--casa .saluti__word { color: var(--red); }
.saluti__item strong { margin-top: var(--s-4); color: var(--navy); line-height: 1.35; }
.saluti__note { margin-top: var(--s-1); color: var(--muted); font-size: var(--t-xs); line-height: 1.45; }

.facts { margin-top: var(--s-7); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5) var(--gap); }
.facts dt { font-size: var(--t-xs); color: var(--muted); }
.facts dd { font-weight: 700; color: var(--navy); line-height: 1.35; }
.facts--row { margin-top: var(--s-8); padding-top: var(--s-5); border-top: 2px solid var(--navy); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts--row dd { font-size: var(--t-md); }

@media (max-width: 1099px) {
  .saluti { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .lingue__head .display, .lingue__head p { grid-column: 1 / -1; }
  .saluti { margin-top: var(--s-7); grid-template-columns: 1fr 1fr; row-gap: var(--s-6); }
  .saluti__item strong { margin-top: var(--s-3); }
  .facts--row { margin-top: var(--s-7); grid-template-columns: 1fr 1fr; }
  .facts--row dd { font-size: var(--t-base); }
  .sheet { background-size: 24px 24px; }
}

/* ---------- Aziende / privati ---------- */
.doors { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-7); row-gap: var(--s-8); align-items: start; }
.door--late { margin-top: var(--s-9); }
.door__media img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; border-radius: var(--radius); }
.door__head { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); }
.door > p { margin-top: var(--s-4); max-width: 33em; }
.door__action { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.door__action p { font-size: var(--t-xs); color: var(--muted); }

.ticks { margin-top: var(--s-5); border-top: 1px solid var(--line); }
.ticks li { position: relative; padding: 14px 0 14px 32px; border-bottom: 1px solid var(--line); font-size: var(--t-xs); }
.ticks li::before { content: ""; position: absolute; left: 3px; top: 21px; width: 13px; height: 7px; border: solid var(--red); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

@media (max-width: 899px) {
  .doors { grid-template-columns: 1fr; }
  .door--late { margin-top: 0; }
  .door__head { margin-top: var(--s-5); }
  .door__action .btn { width: 100%; }
  .circled strong { font-size: 2.125rem; }
}

/* ---------- Fascia test ---------- */
.band { padding-block: var(--s-10); overflow: hidden; }
.band__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: center; }
.band__body { grid-column: 1 / span 5; }
.band .display { font-size: clamp(3rem, 1.6rem + 4vw, 5rem); line-height: .9; }
.band__lead { margin-top: var(--s-5); max-width: 36em; font-size: var(--t-sm); line-height: 1.6; }
.band__body .btn { margin-top: var(--s-6); }
.band__aside { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .22); max-width: 40em; }
.band__aside p { margin-top: var(--s-2); font-size: var(--t-xs); }
.band__aside a { font-weight: 700; white-space: nowrap; }

/* Il foglio del test: una domanda vera, la risposta scritta a penna. */
.foglio {
  grid-column: 7 / -1; padding: 40px 48px 44px; color: var(--ink); border-radius: 4px;
  background-color: var(--paper);
  background-image: linear-gradient(#E3EAF2 1px, transparent 1px), linear-gradient(90deg, #E3EAF2 1px, transparent 1px);
  background-size: 24px 24px;
  transform: rotate(1.5deg);
}
.section--navy .foglio p { color: var(--muted); }
.foglio__top { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--t-xs); }
.section--navy .foglio__top strong { color: var(--navy); }
.section--navy .foglio .foglio__q { margin-top: var(--s-6); font-size: clamp(1.25rem, .2rem + 1.9vw, 1.75rem); font-weight: 600; line-height: 1.5; color: var(--navy); }
.foglio__gap {
  display: inline-block; min-width: 2.6em; margin-inline: .1em; padding-inline: .3em; text-align: center; border-bottom: 2px solid var(--navy);
  font-family: var(--f-display); font-weight: 700; font-size: 1.55em; line-height: .95; color: var(--blue);
}
.foglio__opts { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-6); font-size: var(--t-sm); }
.foglio__opts li { position: relative; padding-block: 6px; }
.foglio__opts li span { color: var(--muted); font-weight: 400; }
.foglio__opts .is-ok { padding-inline: 18px; font-weight: 700; color: var(--navy); }
.foglio__opts .ring { inset: -2px 0; height: calc(100% + 4px); }
.foglio__scale { margin-top: var(--s-7); }
.foglio__scale p { position: relative; padding-right: 45%; font-size: var(--t-xs); line-height: 1.4; }
.foglio__here { position: absolute; left: 70%; bottom: 0; font-family: var(--f-display); font-weight: 700; font-size: 1.875rem; line-height: 1; color: var(--red); white-space: nowrap; transform: translateX(-50%) rotate(-3deg); }
.foglio__scale ol { margin-top: var(--s-3); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; overflow: hidden; border: 2px solid var(--navy); border-radius: 4px; background: var(--paper); font-weight: 700; color: var(--navy); text-align: center; }
.foglio__scale li { padding-block: 12px; }
.foglio__scale li + li { border-left: 1px solid var(--navy); }
.foglio__scale .is-here { background: var(--red); color: #fff; }

@media (max-width: 1099px) {
  .band__body, .foglio { grid-column: 1 / -1; }
  .foglio { max-width: 620px; }
}
@media (max-width: 899px) {
  .band { padding-block: var(--s-8); }
  .band__lead { font-size: var(--t-base); }
  .band__body .btn { width: 100%; }
  .foglio { padding: var(--s-5) var(--pad) 28px; transform: rotate(1deg); }
  .foglio__opts { column-gap: var(--s-5); font-size: var(--t-base); }
  .foglio__here { font-size: 1.625rem; }
}

/* ---------- Tappe ---------- */
.steps { --when-h: 2rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--gap); }
.steps__item { position: relative; }
.steps__item::before { content: ""; position: absolute; top: calc(var(--when-h) + 8px); left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--navy); }
.steps__item:last-child::before { background: var(--red); border-color: var(--red); }
.steps__when {
  display: flex; align-items: flex-end; min-height: calc(var(--when-h) + 16px); padding-bottom: 14px; margin-right: calc(var(--gap) * -1);
  border-bottom: 2px solid var(--navy);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-note); line-height: 1.05; color: var(--blue);
}
.steps__item:last-child .steps__when { margin-right: 0; color: var(--red); }
.steps__item h3 { margin-top: var(--s-6); }
.steps__item h3 + p { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--muted); }
@media (min-width: 1024px) and (max-width: 1299px) {
  .steps { --when-h: 3.75rem; }
}

@media (max-width: 1023px) {
  .steps { grid-template-columns: 1fr; margin-left: 6px; padding-left: 2px; background: linear-gradient(var(--navy), var(--navy)) left top / 2px 100% no-repeat; }
  .steps__item { padding: 0 0 var(--s-6) var(--s-6); }
  .steps__item:last-child { padding-bottom: 0; }
  .steps__item::before { top: 8px; left: -8px; }
  .steps__when, .steps__item:last-child .steps__when { display: block; min-height: 0; padding-bottom: 0; margin-right: 0; border-bottom: 0; }
  .steps__item h3 { margin-top: var(--s-1); }
  .steps__item h3 + p { max-width: 36em; }
}

/* ---------- Articoli ---------- */
.posts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; }
.post--lead { grid-column: 1 / span 7; }
.posts__side { grid-column: 8 / -1; display: grid; row-gap: var(--s-6); }
.post--side + .post--side { padding-top: var(--s-6); border-top: 1px solid var(--line); }
.post__media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.post__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.post:hover .post__media img { transform: scale(1.025); }
.post__meta { font-size: var(--t-xs); color: var(--muted); }
.post__meta strong { color: var(--blue); }
.post__title { margin-top: var(--s-1); text-wrap: balance; }
.post__title a { color: var(--navy); text-decoration: none; }
.post__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.post__title + p { margin-top: var(--s-3); color: var(--muted); font-size: var(--t-xs); }
.post--lead .post__meta { margin-top: var(--s-5); }
.post--lead .post__title { margin-top: var(--s-2); font-size: clamp(1.3125rem, 1rem + 1.1vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; max-width: 22em; }
.post--lead .post__title + p { font-size: var(--t-base); max-width: 38em; }
.post--side .post__media img { aspect-ratio: 21 / 9; }
.post--side .post__meta { margin-top: var(--s-4); }
.post--side .post__title { font-size: var(--t-md); line-height: 1.3; }

@media (max-width: 899px) {
  .post--lead, .posts__side { grid-column: 1 / -1; }
  .post--lead .post__title { font-size: var(--t-md); }
  .post--side .post__media img { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .post__media img { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- FAQ ---------- */
.faq-home { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: start; }
.faq-home__head { grid-column: 1 / span 4; }
.faq-home__head p { margin-block: var(--s-5); color: var(--muted); }
.faq-home .faq { grid-column: 6 / -1; }

.faq { border-top: 2px solid var(--navy); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  position: relative; display: block; cursor: pointer; list-style: none;
  padding: 22px 48px 22px 0; min-height: 44px;
  font-size: var(--t-sm); font-weight: 700; line-height: 1.35; color: var(--navy);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::before, .faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 2px; margin-top: -1px; background: var(--red);
  transition: transform .2s ease;
}
.faq__item summary::after { transform: rotate(90deg); }
.faq__item[open] summary::after { transform: rotate(0deg); }
.faq__item summary:hover { color: var(--blue); }
.faq__answer { padding: 0 48px 24px 0; max-width: 44em; color: var(--ink); }
.faq__answer p + p { margin-top: var(--s-3); }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .faq__item { interpolate-size: allow-keywords; }
    .faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .25s ease, content-visibility .25s allow-discrete; }
    .faq__item[open]::details-content { block-size: auto; }
  }
}
@media (max-width: 899px) {
  .faq-home__head, .faq-home .faq { grid-column: 1 / -1; }
  .faq__item summary { font-size: var(--t-base); padding-block: 16px; }
  .faq__answer { padding-right: 0; }
}

/* ---------- Contatto in home ---------- */
.contact-home { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; }
.contact-home__text { grid-column: 1 / span 5; }
.contact-home__text > p { margin-top: var(--s-5); max-width: 32em; }
.contact-home .panel { grid-column: 7 / -1; }
.contact-list { margin-top: var(--s-7); border-top: 1px solid var(--line); }
.contact-list > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); column-gap: var(--s-4); padding-block: 14px; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--muted); font-size: var(--t-xs); }
.contact-list dd { font-weight: 600; color: var(--navy); }
.contact-list dd a { color: var(--navy); }
@media (max-width: 899px) {
  .contact-home__text, .contact-home .panel { grid-column: 1 / -1; }
  .contact-list > div { grid-template-columns: 6em minmax(0, 1fr); }
  .section-head { margin-bottom: var(--s-6); }
  .section-head p { font-size: var(--t-base); line-height: 1.6; }
}

/* ---------- Scheda e modulo ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-7); }
@media (max-width: 899px) { .panel { padding: var(--s-5) var(--pad); } }

.form { display: grid; row-gap: var(--s-5); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s-5); row-gap: var(--s-5); }
.field label, .choice legend { display: block; margin-bottom: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px;
  font-size: var(--t-base); line-height: 1.4; color: var(--ink);
  background: var(--paper); border: 1px solid #A9B8C6; border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #7A8794; }
.field input:hover, .field textarea:hover { border-color: var(--blue); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(52, 98, 144, .3); }
.field [aria-invalid="true"] { border-color: var(--red); border-width: 2px; }
.field__error { margin-top: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--red-dark); }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__alert { padding: 12px 16px; border: 1px solid #E3A9A9; background: #FBEDED; color: #7D1717; font-weight: 600; font-size: var(--t-xs); border-radius: var(--radius); }

.choice { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.choice legend { float: left; width: 100%; padding: 0; }
.choice__item { position: relative; flex: 1 1 120px; }
.choice__item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__item span {
  height: 100%; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 16px;
  border: 1px solid #A9B8C6; border-radius: var(--radius); font-weight: 600; font-size: var(--t-xs); color: var(--navy); text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.choice__item:hover span { border-color: var(--navy); }
.choice__item input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.choice__item input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s-3); align-items: start; }
.check input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }
.check label { font-size: var(--t-xs); line-height: 1.5; color: var(--ink); cursor: pointer; }
.check .field__error { grid-column: 2; }
.form .btn { min-width: 220px; }
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); }
.form__note { font-family: var(--f-display); font-weight: 700; font-size: 1.625rem; line-height: 1; color: var(--blue); transform: rotate(-3deg); }
.form-done { padding-block: var(--s-4); }
.form-done:focus { outline: none; }
.form-done__title { position: relative; padding-left: 40px; font-size: var(--t-md); line-height: 1.2; }
.form-done__title::before { content: ""; position: absolute; left: 4px; top: 6px; width: 20px; height: 11px; border: solid var(--red); border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.form-done p { margin-top: var(--s-4); }
@media (max-width: 599px) {
  .form__row { grid-template-columns: 1fr; }
  .form .btn { width: 100%; }
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: var(--sky); font-size: var(--t-xs); }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__bye {
  position: relative; display: inline-block; margin-top: var(--s-9); padding-bottom: 18px;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 1.4rem + 5vw, 6rem); line-height: .9; letter-spacing: -0.005em; color: #fff; text-wrap: balance;
}
.footer__bye .pen { width: min(300px, 38%); }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); padding-block: var(--s-8) var(--s-8); }
.footer__brand { grid-column: 1 / span 4; }
.footer__brand p { margin-top: var(--s-5); max-width: 22em; }
.footer__grid > div:nth-child(2) { grid-column: 6 / span 2; }
.footer__grid > div:nth-child(3) { grid-column: 8 / span 2; }
.footer__grid > div:nth-child(4) { grid-column: 10 / -1; }
.footer__title { font-size: var(--t-xs); font-weight: 600; color: var(--sky); margin-bottom: var(--s-3); }
.footer__list li a { display: inline-block; padding-block: 6px; }
.footer__address { line-height: 1.8; }
.footer__hours { margin-top: var(--s-3); line-height: 1.8; }
.footer__grid + .container { padding-inline: var(--pad); }
.footer__bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-6); padding-block: var(--s-5) var(--s-6); border-top: 1px solid rgba(255, 255, 255, .18); font-size: var(--t-xs); }
.footer__bottom p { max-width: 46em; }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); justify-content: flex-end; flex: none; max-width: 30em; }
.footer__legal a, .footer__legal button { display: inline-block; padding-block: 4px; color: #fff; }
.footer__legal a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (max-width: 899px) {
  .footer__bye { margin-top: var(--s-8); }
  .footer__grid { padding-block: var(--s-7) var(--s-7); grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__grid > div:nth-child(2), .footer__grid > div:nth-child(3) { grid-column: auto; }
  .footer__grid > div:nth-child(4) { grid-column: 1 / -1; }
  .footer__list li a { padding-block: 10px; }
  .footer__bottom { flex-direction: column; }
  .footer__legal { justify-content: flex-start; max-width: none; }
  .footer__legal a, .footer__legal button { padding-block: 10px; }
}

/* ---------- Cookie ---------- */
.cookie {
  position: fixed; z-index: 60; left: var(--pad); bottom: var(--pad); width: min(420px, calc(100vw - var(--pad) * 2));
  padding: var(--s-5); background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(12, 39, 67, .22); font-size: var(--t-xs); line-height: 1.5;
}
.cookie[hidden] { display: none; }
.cookie__title { font-size: var(--t-base); font-weight: 700; color: var(--navy); margin-bottom: var(--s-2); }
.cookie__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.cookie__actions .btn { flex: 1 1 140px; }
@media (prefers-reduced-motion: no-preference) { .cookie:not([hidden]) { animation: rise .35s ease both; } }

/* ====================================================================
   Pagine interne
   ==================================================================== */

/* ---------- Testata di pagina ---------- */
.head { padding-block: var(--s-9) var(--s-7); }
.head__title { font-family: var(--f-display); font-weight: 700; font-size: var(--t-h1); line-height: .95; letter-spacing: -0.01em; color: var(--navy); max-width: 15em; text-wrap: balance; }
.head__lead { margin-top: var(--s-5); max-width: 36em; font-size: var(--t-md); line-height: 1.5; color: var(--muted); }
.head--compact { padding-bottom: var(--s-7); }
.head.sheet { padding-bottom: var(--s-8); margin-bottom: var(--s-8); border-bottom: 1px solid var(--line); }

.head--navy { background: var(--navy); padding-bottom: calc(var(--s-9) + var(--s-10)); }
.head--navy .head__title { color: #fff; }
.head--navy .head__lead { color: var(--sky); margin-top: 0; }
.head__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-5); align-items: end; }
.head__grid .head__title { grid-column: 1 / span 6; }
.head__grid .head__lead { grid-column: 8 / -1; padding-bottom: 6px; }
.head-photo { margin-top: calc(var(--s-10) * -1); }
.head-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); }
.section--tight-top { padding-top: var(--s-9); }
.section--compact { padding-block: var(--s-9); }

.head--split { background: var(--mist); padding-block: var(--s-9) 0; }
.head-split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: center; }
.head-split__text { grid-column: 1 / span 4; padding-bottom: var(--s-9); }
.head-split__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.head-split__media { grid-column: 6 / -1; margin-bottom: calc(var(--s-8) * -1); }
.head-split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.head--split + .section { padding-top: calc(var(--section) + var(--s-7)); }

@media (max-width: 899px) {
  .head { padding-block: var(--s-7) var(--s-6); }
  .head.sheet { padding-bottom: var(--s-7); margin-bottom: var(--s-7); }
  .head__lead { font-size: var(--t-base); }
  .head--navy { padding-bottom: calc(var(--s-7) + var(--s-8)); }
  .head__grid .head__title, .head__grid .head__lead { grid-column: 1 / -1; }
  .head-photo { margin-top: calc(var(--s-8) * -1); }
  .head-photo img { aspect-ratio: 3 / 2; }
  .section--tight-top { padding-top: var(--s-7); }
  .section--compact { padding-block: var(--s-7); }
  .head--split { padding-top: var(--s-7); }
  .head-split__text, .head-split__media { grid-column: 1 / -1; }
  .head-split__text { padding-bottom: 0; }
  .head-split__media { margin-bottom: calc(var(--s-7) * -1); }
  .head--split + .section { padding-top: calc(var(--section) + var(--s-6)); }
}

/* ---------- Listini ---------- */
.table-wrap { overflow-x: auto; }
.table-wrap + .table-wrap { margin-top: var(--s-8); }
.prices { width: 100%; border-collapse: collapse; text-align: left; }
.prices caption { text-align: left; font-size: var(--t-md); font-weight: 700; color: var(--navy); padding-bottom: var(--s-4); }
.prices thead th { font-size: var(--t-xs); font-weight: 600; color: var(--muted); padding: 0 var(--s-5) var(--s-3) 0; border-bottom: 2px solid var(--navy); }
.prices caption + thead.visually-hidden + tbody tr:first-child > * { border-top: 2px solid var(--navy); }
.prices tbody th, .prices tbody td { padding: 20px var(--s-5) 20px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prices tbody th { width: 26%; font-weight: 700; color: var(--navy); }
.prices tbody td { color: var(--muted); }
.prices .prices__num { width: 22%; padding-right: 0; text-align: right; white-space: nowrap; color: var(--muted); }
.prices__num strong { font-size: var(--t-md); color: var(--navy); line-height: 1.2; }
.prices__num span { display: block; font-size: var(--t-xs); }
.prices--exams tbody td:last-child { width: 18%; white-space: nowrap; color: var(--navy); font-weight: 600; }
.prices--legal tbody th { width: 22%; font-size: var(--t-xs); word-break: break-word; }
.table-note { margin-top: var(--s-5); max-width: 52em; font-size: var(--t-xs); color: var(--muted); }

@media (max-width: 719px) {
  .prices, .prices tbody, .prices tr, .prices tbody th, .prices tbody td { display: block; width: auto; }
  .prices caption { display: block; }
  .prices thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .prices { border-top: 2px solid var(--navy); }
  .prices caption { border-bottom: 0; }
  .prices tr { padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
  .prices tbody th, .prices tbody td, .prices caption + thead.visually-hidden + tbody tr:first-child > * { padding: 0; border: 0; }
  .prices tbody td { margin-top: 4px; }
  .prices .prices__num { width: auto; text-align: left; margin-top: var(--s-2); }
  .prices__num span { display: inline; }
  .prices--exams tbody td:last-child { width: auto; }
  .prices--legal tbody th { width: auto; }
}

/* ---------- Due colonne: titolo + contenuto ---------- */
.duo { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; }
.duo__head { grid-column: 1 / span 5; }
.duo__head .display, .faq-home__head .display { font-size: clamp(2.5rem, 1.6rem + 3vw, 3.5rem); line-height: 1; }
.duo__head p { margin-top: var(--s-5); max-width: 30em; color: var(--muted); }
.duo__head .duo__more { color: inherit; }
.duo > :last-child { grid-column: 7 / -1; }
.duo--wide-right .duo__head { grid-column: 1 / span 4; }
.duo--wide-right > :last-child { grid-column: 6 / -1; }

.defs { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); border-top: 2px solid var(--navy); }
.defs > div { padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 700; color: var(--navy); }
.defs dd { margin-top: 6px; font-size: var(--t-xs); line-height: 1.55; color: var(--muted); }
.defs--single { grid-template-columns: 1fr; margin-top: var(--s-6); }
.defs--single > div { padding-block: var(--s-4); }

.rows { border-top: 2px solid var(--navy); }
.rows li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); column-gap: var(--s-5); row-gap: 2px; padding-block: 18px; border-bottom: 1px solid var(--line); align-items: baseline; }
.rows strong { color: var(--navy); }
.rows span { color: var(--muted); font-size: var(--t-xs); line-height: 1.55; }
.rows--dates li { grid-template-columns: minmax(0, 12em) minmax(0, 1fr) auto; }
.rows--dates span { color: var(--ink); font-size: var(--t-base); font-weight: 600; }
.rows--dates em { font-style: normal; font-size: var(--t-xs); color: var(--muted); text-align: right; }
.rows--text li { grid-template-columns: minmax(0, 14em) minmax(0, 1fr); padding-block: var(--s-5); }
.rows--text span { font-size: var(--t-base); color: var(--ink); line-height: 1.6; }
.rows--links { margin-top: var(--s-6); }
.rows--links li { grid-template-columns: minmax(0, 1fr) auto; }
.rows--links a { color: var(--navy); text-decoration: none; display: inline-block; padding-block: 4px; }
.rows--links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.facts--stack { grid-template-columns: 1fr; gap: var(--s-4); margin-top: var(--s-6); }
.steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section--mist .steps__item::before { background: var(--mist); }
.section--mist .steps__item:last-child::before { background: var(--red); }

@media (max-width: 1023px) {
  .steps--4 { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .duo__head, .duo > :last-child, .duo--wide-right .duo__head, .duo--wide-right > :last-child { grid-column: 1 / -1; }
  .defs { grid-template-columns: 1fr; }
  .rows li, .rows--dates li, .rows--text li { grid-template-columns: 1fr; padding-block: var(--s-4); }
  .rows--dates em { text-align: left; }
  .rows--links li { grid-template-columns: 1fr; }
}

/* ---------- Invito finale ---------- */
.cta { background: var(--blue); color: #fff; padding-block: var(--s-9); }
.cta__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: center; }
.cta__text { grid-column: 1 / span 7; }
.cta .display { color: #fff; }
.cta__text p { margin-top: var(--s-4); max-width: 32em; font-size: var(--t-md); line-height: 1.5; color: #fff; }
.cta__actions { grid-column: 9 / -1; }
.cta__actions .btn { width: 100%; }
.cta__actions p { margin-top: var(--s-4); color: #fff; font-size: var(--t-xs); text-align: center; }
.cta__actions a:not(.btn) { color: #fff; font-weight: 700; white-space: nowrap; }
.cta .btn:focus-visible, .cta a:focus-visible { outline-color: #fff; }
@media (max-width: 899px) {
  .cta { padding-block: var(--s-8); }
  .cta__text, .cta__actions { grid-column: 1 / -1; }
  .cta__text p { font-size: var(--t-base); }
  .cta__actions p { text-align: left; }
}

/* ---------- Testo lungo ---------- */
.prose { max-width: 42.5rem; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { margin-top: var(--s-7); font-size: var(--t-md); line-height: 1.3; font-weight: 700; color: var(--navy); }
.prose h2 + * { margin-top: var(--s-3); }
.prose h3 { font-size: var(--t-base); }
.prose ul:not(.plain):not(.timeline) li { position: relative; padding-left: 22px; }
.prose ul:not(.plain):not(.timeline) li + li { margin-top: var(--s-2); }
.prose ul:not(.plain):not(.timeline) li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: var(--red); }
.prose .plain li + li { margin-top: var(--s-2); }
.prose__lead { font-size: var(--t-md); line-height: 1.5; color: var(--muted); }
.prose__figure { margin-bottom: var(--s-7); }
.prose__figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.prose--flush > :first-child { margin-top: 0; }
.prose .table-wrap { margin-block: var(--s-5); }
.prose .btn { margin-block: var(--s-2); }
.note { margin-top: var(--s-6) !important; padding: var(--s-5); background: var(--mist); border-radius: var(--radius); font-size: var(--t-xs); line-height: 1.6; }
.section--mist .note { background: var(--paper); }

.compare { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); row-gap: var(--s-5); margin-top: var(--s-5) !important; }
.compare > div { border-top: 2px solid var(--navy); padding-top: var(--s-4); }
.compare > div + div { border-top-color: var(--line); }
.compare ul { margin-top: var(--s-3); font-size: var(--t-xs); line-height: 1.55; }
.timeline { margin-left: 6px; padding-left: 2px; margin-top: var(--s-5) !important; background: linear-gradient(var(--navy), var(--navy)) left top / 2px 100% no-repeat; }
.timeline li { position: relative; padding: 0 0 var(--s-5) var(--s-5); display: grid; row-gap: 2px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--navy); }
.timeline strong { color: var(--navy); }
.timeline span { color: var(--muted); font-size: var(--t-xs); }

.article-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; padding-bottom: var(--section); }
.article-grid .prose { grid-column: 1 / span 7; max-width: none; }
.article-grid .aside { grid-column: 9 / -1; position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.aside__box { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); background: var(--paper); }
.aside__title { font-size: var(--t-base); font-weight: 700; color: var(--navy); }
.aside__box p { margin-top: var(--s-2); font-size: var(--t-xs); line-height: 1.55; color: var(--muted); }
.aside__box p + .aside__title { margin-top: var(--s-5); }
.aside__list { margin-top: var(--s-3); }
.aside__list > div { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.aside__list dt { font-size: var(--t-xs); color: var(--muted); }
.aside__list dd { font-weight: 700; color: var(--navy); }
.aside__box .btn { width: 100%; margin-top: var(--s-5); }
.aside__box .aside__more { margin-top: var(--s-4); }
@media (max-width: 899px) {
  .article-grid .prose, .article-grid .aside { grid-column: 1 / -1; position: static; }
  .compare { grid-template-columns: 1fr; }
  .aside__box { padding: var(--s-5); }
}

/* ---------- Chi siamo ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-5); align-items: end; }
.gallery__main { grid-column: 1 / span 8; }
.gallery__side { grid-column: 9 / -1; }
.gallery img { width: 100%; object-fit: cover; border-radius: var(--radius); }
.gallery__main img { aspect-ratio: 3 / 2; }
.gallery__side img { aspect-ratio: 4 / 5; }
.gallery figcaption { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--muted); }
.teachers { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: start; }
.teachers__media { grid-column: 1 / span 5; }
.teachers__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.teachers__body { grid-column: 7 / -1; }
.teachers__body > p { margin-top: var(--s-5); max-width: 34em; }
@media (max-width: 899px) {
  .gallery__main, .gallery__side, .teachers__media, .teachers__body { grid-column: 1 / -1; }
  .gallery__side img { aspect-ratio: 3 / 2; }
  .teachers__media img { aspect-ratio: 1 / 1; object-position: 50% 20%; }
}

/* ---------- Test ---------- */
.quiz-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; padding-bottom: var(--section); }
.quiz { grid-column: 1 / span 7; }
.quiz-grid .aside { grid-column: 9 / -1; position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.quiz__list { counter-reset: q; border-top: 2px solid var(--navy); }
.quiz__item { counter-increment: q; padding-block: var(--s-5); border-bottom: 1px solid var(--line); }
.quiz__item legend { display: block; width: 100%; padding: 0 0 var(--s-3) 2.2em; position: relative; font-weight: 700; color: var(--navy); }
.quiz__item legend::before { content: counter(q) "."; position: absolute; left: 0; font-weight: 600; color: var(--blue); }
.quiz__options { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-4); padding-left: 2.2em; }
.quiz__option { position: relative; display: block; }
.quiz__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.quiz__option span { display: flex; align-items: center; min-height: 46px; padding: 8px 14px 8px 42px; border: 1px solid #A9B8C6; border-radius: var(--radius); position: relative; transition: border-color .15s ease, background-color .15s ease; }
.quiz__option span::before { content: ""; position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid #8496A8; background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease; }
.quiz__option:hover span { border-color: var(--navy); }
.quiz__option input:checked + span { border-color: var(--navy); background: var(--mist); }
.quiz__option input:checked + span::before { border-color: var(--navy); box-shadow: inset 0 0 0 4px var(--paper); background: var(--navy); }
.quiz__option input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.quiz__submit { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); margin-top: var(--s-6); }
.quiz__submit p { font-size: var(--t-xs); color: var(--muted); }
.result:not(:empty) { margin-top: var(--s-6); }
.result__box { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s-6); background: var(--mist); }
.result__box:focus, .form__alert:focus { outline: none; }
.result__label { font-size: var(--t-xs); color: var(--muted); }
.result__level { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.result__code { font-family: var(--f-display); font-weight: 700; font-size: var(--t-xxl); line-height: 1; color: var(--navy); }
.result__name { font-size: var(--t-md); font-weight: 700; color: var(--navy); }
.result__score { font-size: var(--t-xs); color: var(--muted); margin-bottom: var(--s-4); }
.result__actions { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
@media (max-width: 899px) {
  .quiz, .quiz-grid .aside { grid-column: 1 / -1; position: static; }
  .quiz__item legend { padding-left: 1.8em; }
  .quiz__options { padding-left: 0; column-gap: var(--s-2); }
  .quiz__option span { padding-left: 38px; padding-right: 8px; line-height: 1.3; height: 100%; }
  .quiz__option span::before { left: 10px; }
  .quiz__submit .btn, .result__actions .btn { width: 100%; }
  .result__box { padding: var(--s-5); }
}
@media (max-width: 359px) { .quiz__options { grid-template-columns: 1fr; } }

/* ---------- Elenco articoli e articolo ---------- */
.index { border-top: 2px solid var(--navy); margin-bottom: var(--section); }
.index__item { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-4); align-items: center; padding-block: var(--s-7); border-bottom: 1px solid var(--line); }
.index__media { grid-column: 1 / span 5; display: block; overflow: hidden; border-radius: var(--radius); }
.index__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.index__item:hover .index__media img { transform: scale(1.025); }
.index__body { grid-column: 7 / -1; }
.index__title { margin-top: var(--s-2); font-size: var(--t-md); line-height: 1.3; font-weight: 700; text-wrap: balance; }
.index__title a { color: var(--navy); text-decoration: none; }
.index__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.index__body > p:not(.post__meta) { margin-block: var(--s-3) var(--s-4); color: var(--muted); max-width: 34em; }
@media (max-width: 899px) {
  .index__media, .index__body { grid-column: 1 / -1; }
  .index__item { padding-block: var(--s-6); }
}
@media (prefers-reduced-motion: reduce) { .index__media img { transition: none; } }

.article__head { padding-block: var(--s-8) var(--s-6); }
.article__back { font-size: var(--t-xs); font-weight: 600; }
.article__title { margin-block: var(--s-4) var(--s-4); max-width: 17em; }
.article__figure img { width: 100%; max-width: 1030px; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); }
.article__grid { padding-top: var(--s-7); }
@media (max-width: 899px) {
  .article__head { padding-block: var(--s-6) var(--s-5); }
  .article__figure img { aspect-ratio: 3 / 2; }
  .article__grid { padding-top: var(--s-6); }
}

/* ---------- FAQ ---------- */
.faq-page { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: start; padding-bottom: var(--section); }
.faq-page__nav { grid-column: 1 / span 3; position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.faq-page__nav ul { border-top: 2px solid var(--navy); }
.faq-page__nav li a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--navy); text-decoration: none; }
.faq-page__nav li a:hover { color: var(--blue); text-decoration: underline; }
.faq-page__nav p { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--muted); }
.faq-page__groups { grid-column: 5 / -1; }
.faq-group + .faq-group { margin-top: var(--s-8); }
.faq-group__title { font-size: var(--t-md); font-weight: 700; color: var(--navy); margin-bottom: var(--s-4); }
@media (max-width: 899px) {
  .faq-page__nav, .faq-page__groups { grid-column: 1 / -1; position: static; }
  .faq-page__nav p { display: none; }
  .faq-group + .faq-group { margin-top: var(--s-7); }
}

/* ---------- Contatti ---------- */
.contact-page { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-7); align-items: start; padding-bottom: var(--section); }
.contact-page__info { grid-column: 1 / span 5; }
.contact-page__form { grid-column: 7 / -1; }
.contact-list--top { margin-top: 0; border-top: 2px solid var(--navy); }
.contact-list dd a[target] { font-weight: 600; color: var(--blue); }
.panel__title { font-size: var(--t-md); font-weight: 700; color: var(--navy); line-height: 1.3; }
.panel__lead { margin-top: var(--s-1); margin-bottom: var(--s-5); color: var(--muted); font-size: var(--t-xs); }
.reach { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: var(--s-6); align-items: center; }
.reach__media { grid-column: 1 / span 7; }
.reach__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.reach__body { grid-column: 9 / -1; }
.reach__body > p { margin-top: var(--s-5); }
.company { margin-top: var(--s-5); max-width: 46em; color: var(--muted); }
@media (max-width: 899px) {
  .contact-page__info, .contact-page__form, .reach__media, .reach__body { grid-column: 1 / -1; }
}

/* ---------- Legali e 404 ---------- */
.legal { padding-block: var(--s-9) var(--section); }
.legal__head { max-width: 42.5rem; margin-bottom: var(--s-6); padding-bottom: var(--s-5); border-bottom: 2px solid var(--navy); }
.legal__head .post__meta { margin-top: var(--s-4); }
.legal .prose h2:first-child { margin-top: 0; }
.legal .table-wrap { width: min(880px, calc(100vw - var(--pad) * 2)); }
.legal .prices--legal { min-width: 620px; }
.notfound { padding-block: var(--s-9) var(--section); }
.notfound__code { font-size: var(--t-xs); font-weight: 600; color: var(--blue); margin-bottom: var(--s-3); }
.notfound__links { max-width: 42.5rem; margin-top: var(--s-7); }
@media (max-width: 899px) {
  .legal, .notfound { padding-top: var(--s-7); }
  .legal .prices--legal { min-width: 0; }
  .legal .table-wrap { width: auto; }
}
