/* FERMENTA — pagine d'esempio della Diagnosi Digitale: stile condiviso */
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/lora.woff2) format('woff2'); }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/lora-italic.woff2) format('woff2'); }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(/assets/fonts/outfit.woff2) format('woff2'); }

:root {
  --verde: #0B5E3A; --verde-scuro: #084A2D; --verde-notte: #062C1B; --verde-chiaro: #8FD6AE;
  --rosso: #E03A3E; --rosso-testo: #B8262B; --rosso-light: #F6DADA;
  --ambra: #9A6212; --ambra-light: #F3E5C9;
  --crema: #F4EFE6; --carta: #ECE5D8; --carta-scura: #E2D9C8;
  --inchiostro: #1B1E1A; --grigio-700: #3F443E; --grigio-500: #5A5F58;
  --linea: rgba(27,30,26,.12); --linea-chiara: rgba(244,239,230,.16);
  /* post-it */
  --pi-giallo: #F6E59A; --pi-rosa: #F5CFC6; --pi-menta: #CFE7D4; --pi-testo: #2B2A20;
  --serif: 'Lora', Georgia, serif; --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --wrap: 1280px; --gutter: 40px; --margine: 290px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--inchiostro); background: var(--crema); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a, button { touch-action: manipulation; }
button, .btn { -webkit-user-select: none; user-select: none; }
::selection { background: var(--rosso); color: var(--crema); }
:focus-visible { outline: 2px solid var(--rosso); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--verde); color: var(--crema); padding: 10px 16px; border-radius: 999px; transition: top .4s var(--ease); }
.skip:focus { top: 16px; }

.noise { position: relative; isolation: isolate; }
.noise::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .05; mix-blend-mode: multiply;
}
.on-dark { background: var(--verde-notte); color: var(--crema); }
.on-dark.noise::before { mix-blend-mode: overlay; opacity: .08; }

/* tipografia */
.label { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--grigio-500); display: inline-flex; align-items: center; gap: 12px; }
.label::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.label .num { color: var(--verde); }
.on-dark .label { color: rgba(244,239,230,.66); }
.on-dark .label .num { color: var(--verde-chiaro); }
.h1, .h2, .h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.h1 { font-size: clamp(2.8rem, 7.4vw, 6.6rem); line-height: .96; }
.h2 { font-size: clamp(2.1rem, 4.2vw, 3.6rem); line-height: 1.04; }
.h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.15; letter-spacing: -.01em; }
.h1 em, .h2 em { font-style: italic; color: var(--verde); }
.on-dark .h1 em, .on-dark .h2 em { color: var(--verde-chiaro); }
.lead { font-size: clamp(1.05rem, 1.35vw, 1.18rem); line-height: 1.55; color: var(--grigio-700); max-width: 36em; font-weight: 300; }
.on-dark .lead { color: rgba(244,239,230,.8); }

/* bottoni */
.btn { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 8px 8px 26px; border-radius: 999px; font-size: 15px; font-weight: 500; transition: background .5s var(--ease), border-color .5s var(--ease), transform .16s var(--ease); }
.btn .ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; transition: transform .7s var(--ease); }
.btn .ico svg { width: 16px; height: 16px; }
.btn:active { transform: scale(.97); }
.btn-verde { background: var(--verde); color: var(--crema); }
.btn-verde .ico { background: rgba(244,239,230,.14); }
.btn-rosso { background: var(--rosso); color: #fff; }
.btn-rosso .ico { background: rgba(255,255,255,.18); }
.btn-ghost { min-height: 44px; padding: 8px 16px; border: 1px solid var(--linea); color: var(--inchiostro); gap: 10px; font-size: 14px; }
.btn-ghost svg { width: 16px; height: 16px; }
.btn-linea { border: 1px solid var(--linea-chiara); color: var(--crema); padding-right: 8px; }
.btn-linea .ico { background: rgba(244,239,230,.1); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .ico { transform: translateX(3px) rotate(-45deg); }
  .btn-verde:hover { background: var(--verde-scuro); }
  .btn-rosso:hover { background: #C92F33; }
  .btn-ghost:hover { border-color: var(--inchiostro); }
  .btn-linea:hover { background: rgba(244,239,230,.06); }
}

/* double-bezel */
.bezel { padding: 7px; border-radius: 30px; background: linear-gradient(160deg, rgba(255,255,255,.7), rgba(226,217,200,.55)); border: 1px solid var(--linea); }
.bezel > .core { border-radius: 23px; background: #FBF8F2; border: 1px solid rgba(27,30,26,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); height: 100%; }
.on-dark .bezel { background: linear-gradient(160deg, rgba(244,239,230,.1), rgba(244,239,230,.03)); border-color: var(--linea-chiara); }
.on-dark .bezel > .core { background: rgba(6,44,27,.55); border-color: rgba(244,239,230,.1); box-shadow: inset 0 1px 0 rgba(244,239,230,.08); }

/* nav (come in "Chi c'è dietro") */
.nav { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 100; transition: transform .8s var(--ease); }
.nav.is-hidden { transform: translateY(-130%); }
.nav-bar {
  max-width: calc(var(--wrap) - 2 * var(--gutter) + 32px); margin: 0 auto; width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 8px 8px 8px 22px; border-radius: 999px; background: rgba(244,239,230,.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--linea);
}
.nav-logo { display: flex; align-items: center; gap: 12px; min-height: 44px; font-family: var(--serif); letter-spacing: .08em; color: var(--verde); }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--grigio-700); padding: 6px 0; transition: color .5s var(--ease); }
.nav-links a[aria-current] { color: var(--verde); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--verde); } }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav .btn-verde { min-height: 44px; padding: 5px 5px 5px 20px; font-size: 14px; }
.nav .btn-verde .ico { width: 34px; height: 34px; }
/* interruttore appunti */
.toggle-note[hidden] { display: none; }
.toggle-note .swatch { width: 18px; height: 18px; border-radius: 2px 2px 7px 2px; background: var(--pi-giallo); transform: rotate(-6deg); box-shadow: 0 1px 2px rgba(60,40,0,.25); transition: transform .25s var(--ease), opacity .25s var(--ease); }
.toggle-note[aria-pressed="false"] .swatch { opacity: .35; transform: rotate(0) scale(.85); }

.avviso { background: var(--carta); border-bottom: 1px solid var(--linea); font-size: 14px; color: var(--grigio-700); }
.avviso .wrap { display: flex; align-items: flex-start; gap: 12px; padding-top: calc(104px + env(safe-area-inset-top, 0px)); padding-bottom: 16px; }
.avviso .swatch { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; border-radius: 2px 2px 6px 2px; background: var(--pi-giallo); transform: rotate(-6deg); box-shadow: 0 1px 2px rgba(60,40,0,.25); }
.avviso strong { color: var(--inchiostro); font-weight: 500; }

/* ============ POST-IT ============ */
.nota {
  --rot: -1.6deg; --pi: var(--pi-giallo);
  position: relative; color: var(--pi-testo); padding: 30px 24px 26px;
  background-color: var(--pi);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 38%),
    repeating-linear-gradient(180deg, transparent 0 27px, rgba(43,42,32,.07) 27px 28px);
  background-position: 0 0, 0 14px;
  border-radius: 2px 2px 22px 2px / 2px 2px 8px 2px;
  box-shadow: 0 1px 1px rgba(60,40,0,.08), 0 14px 22px -14px rgba(60,40,0,.38), 0 2px 6px -2px rgba(60,40,0,.12);
  transform: rotate(var(--rot));
  max-width: 420px;
}
.nota.rosa { --pi: var(--pi-rosa); --rot: 1.4deg; }
.nota.menta { --pi: var(--pi-menta); --rot: -.8deg; }
.nota.dx { --rot: 2deg; }
/* nastro adesivo */
.nota::before {
  content: ''; position: absolute; top: -13px; left: 50%; width: 96px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: linear-gradient(90deg, rgba(255,255,255,.62), rgba(255,255,255,.42));
  border-left: 1px dashed rgba(43,42,32,.08); border-right: 1px dashed rgba(43,42,32,.08);
  box-shadow: 0 1px 2px rgba(60,40,0,.08);
}
/* angolo che si solleva */
.nota::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px;
  background: linear-gradient(135deg, transparent 50%, rgba(43,42,32,.1) 50%, rgba(255,255,255,.35) 100%);
  border-radius: 0 0 20px 0;
}
.nota-k { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(43,42,32,.62); display: flex; justify-content: space-between; gap: 12px; }
.nota-t { font-family: var(--serif); font-size: 1.32rem; line-height: 1.2; letter-spacing: -.01em; margin: 10px 0 10px; }
.nota-t u { text-decoration: none; background: linear-gradient(transparent 62%, rgba(224,58,62,.28) 62%, rgba(224,58,62,.28) 90%, transparent 90%); }
.nota p:not(.nota-k):not(.nota-t) { font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.6; }
.nota p + p:not(.nota-t) { margin-top: 10px; }
.nota .firma-nota { display: block; margin-top: 14px; font-family: var(--serif); font-style: italic; font-size: .95rem; text-align: right; color: rgba(43,42,32,.7); }
.nota .legenda { list-style: none; margin-top: 12px; display: grid; gap: 6px; font-size: 14px; font-family: var(--sans); }
.nota .legenda li { display: flex; align-items: center; gap: 10px; }
.nota .legenda i { width: 22px; height: 6px; border-radius: 999px; flex-shrink: 0; }
/* freccia a mano verso il documento */
.nota .freccia { position: absolute; left: -58px; top: 46px; width: 54px; height: 40px; color: rgba(27,30,26,.45); display: none; }
.on-dark .nota .freccia { color: rgba(244,239,230,.5); }

/* layout: documento + margine con gli appunti */
.con-nota { display: grid; grid-template-columns: minmax(0, 1fr) var(--margine); gap: 40px 72px; align-items: start; }
.margine { position: sticky; top: 104px; display: grid; gap: 40px; padding-top: 18px; }
.margine .nota .freccia { display: block; }
/* sezione lunga con più appunti: si distribuiscono lungo il margine invece di restare fermi */
.margine.sparso { position: static; gap: 42vh; }
.no-note .nota, .no-note .margine { display: none; }
.no-note .con-nota { grid-template-columns: minmax(0, 1fr); }

/* COPERTINA */
@keyframes riga { from { transform: translateY(110%); clip-path: inset(0 0 110% 0); } to { transform: none; clip-path: inset(-.3em -.3em -.4em -.3em); } }
@keyframes affiora { from { opacity: 0; transform: translateY(22px); } }
@keyframes anello { from { stroke-dashoffset: 339.3; } }
@keyframes attacca { from { opacity: 0; transform: translateY(-28px) rotate(calc(var(--rot) + 7deg)) scale(1.04); } }
.cover { padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 104px); overflow: hidden; }
.cover-mark { position: absolute; right: -8vw; top: -6%; width: min(52vw, 640px); opacity: .06; pointer-events: none; z-index: -1; }
.cover-kicker { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.doc-tag { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--linea-chiara); color: rgba(244,239,230,.8); }
.cover .h1 { margin: 34px 0 18px; }
.cover .line { display: block; }
.cover .line > span { display: block; animation: riga 1.4s var(--ease) both; }
.cover .line:nth-child(2) > span { animation-delay: .12s; }
.fantasia { font-family: var(--sans); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(244,239,230,.66); vertical-align: super; margin-left: 10px; white-space: nowrap; }
.cover-sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 1.8vw, 1.45rem); color: rgba(244,239,230,.84); animation: affiora 1.2s var(--ease) .4s both; }
.cover-grid { display: grid; grid-template-columns: 1.25fr 1fr var(--margine); gap: 40px clamp(32px, 4vw, 64px); align-items: end; margin-top: clamp(48px, 6vw, 80px); }
.no-note .cover-grid { grid-template-columns: 1.4fr 1fr; }
.meta { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--linea-chiara); animation: affiora 1.2s var(--ease) .55s both; }
.meta div { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--linea-chiara); }
.meta div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--linea-chiara); }
.meta dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,239,230,.66); }
.meta dd { font-family: var(--serif); font-size: 1.25rem; margin-top: 4px; }
.indice { animation: affiora 1.3s var(--ease) .7s both; }
.indice .core { padding: 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.gauge { position: relative; width: 128px; height: 128px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 8; }
.gauge .track { stroke: rgba(244,239,230,.12); }
.gauge .val { stroke: #E0A33A; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 173; animation: anello 2s var(--ease) 1s both; }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.gauge-num small { display: block; font-family: var(--sans); font-size: 13px; color: rgba(244,239,230,.66); margin-top: 4px; }
.indice-txt p { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(244,239,230,.66); }
.indice-txt strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.25; margin: 4px 0 14px; }
.urgenza { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: rgba(143,214,174,.14); color: var(--verde-chiaro); }
.urgenza::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--verde-chiaro); }
.cover .nota { align-self: center; animation: attacca 1.3s var(--ease) 1.4s both; }
.cover .nota .freccia { display: block; }

/* INDICE DEL DOCUMENTO */
.toc { border-bottom: 1px solid var(--linea); background: var(--crema); }
.toc ol { list-style: none; display: flex; gap: 4px 28px; flex-wrap: wrap; padding: 14px 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: inline-flex; gap: 10px; min-height: 44px; align-items: center; font-size: 15px; color: var(--grigio-700); transition: color .5s var(--ease); }
.toc a::before { content: '0' counter(t); font-size: 12px; letter-spacing: .1em; color: var(--verde); }
@media (hover: hover) and (pointer: fine) { .toc a:hover { color: var(--inchiostro); } }

/* SEZIONI */
.sez { padding: clamp(80px, 10vw, 136px) 0; scroll-margin-top: 24px; }
.sez-head { margin-bottom: clamp(40px, 5vw, 64px); }
.sez-head .h2 { margin: 20px 0 18px; max-width: 16em; }

/* 01 quadro */
.quadro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px 40px; align-items: start; }
.scheda .core { padding: clamp(24px, 3vw, 36px); }
.scheda h3 { margin-bottom: 4px; }
.scheda .sub { color: var(--grigio-500); font-size: 15px; margin-bottom: 20px; }
.scheda dl div { display: grid; grid-template-columns: 118px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linea); font-size: 15px; }
.scheda dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--grigio-500); padding-top: 3px; }
.scheda dd .warn { color: var(--rosso-testo); font-weight: 500; }
.scheda dd .ok { color: var(--verde); font-weight: 500; }
.prodotti h3 { margin: 14px 0 18px; }
.prodotti ul { list-style: none; counter-reset: p; }
.prodotti li { counter-increment: p; display: flex; align-items: baseline; gap: 18px; padding: 12px 0; border-top: 1px solid var(--linea); font-family: var(--serif); font-size: 1.25rem; }
.prodotti li:last-child { border-bottom: 1px solid var(--linea); }
.prodotti li::before { content: counter(p, lower-roman) '.'; font-style: italic; color: var(--verde); font-size: 1rem; width: 32px; }

/* 02 aree */
.aree { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.area .core { padding: clamp(22px, 2.6vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.area-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.area-n { font-size: 12px; letter-spacing: .14em; color: var(--grigio-500); }
.area h3 { margin-top: 6px; }
.voto { text-align: right; flex-shrink: 0; }
.voto b { font-family: var(--serif); font-weight: 400; font-size: 2.5rem; line-height: 1; color: var(--rosso-testo); }
.voto small { font-size: 14px; color: var(--grigio-500); margin-left: 2px; }
.stato { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--rosso-light); color: var(--rosso-testo); }
.stato.debole { background: var(--ambra-light); color: var(--ambra); }
.stato.buono { background: rgba(11,94,58,.12); color: var(--verde); }
.area.debole .voto b { color: var(--ambra); }
.area.buono .voto b { color: var(--verde); }
.sbar { height: 6px; border-radius: 999px; background: var(--carta); overflow: hidden; }
.sbar i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--rosso); transform-origin: left; }
.area.debole .sbar i { background: #C98A2B; }
.area.buono .sbar i { background: var(--verde); }
.forza { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(11,94,58,.28); background: rgba(255,255,255,.5); font-size: 15px; }
.forza svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--verde); }
.forza strong, .racc strong { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); font-weight: 500; margin-bottom: 2px; }
.crit { list-style: none; }
.crit li { position: relative; padding: 9px 0 9px 26px; border-top: 1px dashed var(--linea); font-size: 15px; color: var(--grigio-700); }
.crit li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 10px; height: 2px; background: var(--rosso); }
.racc { padding: 16px 18px; border-radius: 16px; background: rgba(11,94,58,.07); font-size: 15px; color: var(--inchiostro); margin-top: auto; }
.area.wide { grid-column: 1 / -1; }
.bench { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--linea); background: rgba(255,255,255,.5); }
.bench table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.bench caption { text-align: left; padding: 14px 16px 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grigio-500); }
.bench th, .bench td { padding: 10px 16px; text-align: left; border-top: 1px solid var(--linea); }
.bench thead th { font-weight: 500; color: var(--grigio-500); font-size: 13px; border-top: 0; }
.bench tbody tr:first-child td { color: var(--rosso-testo); font-weight: 500; }
.bench td:not(:first-child), .bench th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* 03 opportunità */
.opp { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.opp li { padding: 28px 0; border-top: 1px solid var(--linea-chiara); }
.opp .n { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--verde-chiaro); }
.opp h3 { margin: 8px 0 10px; }
.opp p { font-size: 15px; color: rgba(244,239,230,.78); max-width: 34em; }
.opp li.big { grid-column: 1 / -1; }
.opp li.big h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* 04 heritage */
.heritage-text p { font-family: var(--serif); font-size: clamp(1.22rem, 1.9vw, 1.5rem); line-height: 1.45; letter-spacing: -.01em; max-width: 34em; }
.heritage-text p + p { margin-top: 22px; }
.heritage-text p em { color: var(--verde); }
.fatti { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(48px, 6vw, 72px); border-top: 1px solid var(--linea); }
.fatti > div { padding: 26px 24px 0 0; }
.fatti > div + div { padding-left: 24px; border-left: 1px solid var(--linea); }
.fatti strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--verde); }
.fatti span { display: block; margin-top: 8px; font-size: 14px; color: var(--grigio-500); }

/* 05 piano */
.piano { list-style: none; }
.piano li { display: grid; grid-template-columns: 56px 1fr 160px; gap: 20px; align-items: start; padding: 28px 0; border-top: 1px solid var(--linea); }
.piano li:last-child { border-bottom: 1px solid var(--linea); }
.piano .n { font-family: var(--serif); font-style: italic; font-size: 2.2rem; line-height: 1; color: var(--verde); }
.piano h3 { margin-bottom: 8px; }
.piano p { color: var(--grigio-700); font-size: 16px; max-width: 38em; }
.piano-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.prio { font-size: 12px; font-weight: 500; padding: 5px 12px; border-radius: 999px; }
.prio.urgente { background: var(--rosso-light); color: var(--rosso-testo); }
.prio.alta { background: var(--ambra-light); color: var(--ambra); }
.prio.media { background: rgba(11,94,58,.1); color: var(--verde); }
.tempo { font-size: 14px; color: var(--grigio-500); display: inline-flex; align-items: center; gap: 6px; }
.tempo svg { width: 14px; height: 14px; }

/* firma + CTA */
.firma { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--linea); font-size: 14px; color: var(--grigio-500); }
.firma strong { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1.5rem; color: var(--verde); }
.cta { padding: clamp(80px, 10vw, 128px) 0; overflow: hidden; }
.cta-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px clamp(40px, 6vw, 96px); align-items: center; }
.cta .h2 { margin: 20px 0 22px; }
.cta-card .core { padding: clamp(28px, 3.5vw, 44px); }
.cta-card .prezzo { display: flex; align-items: flex-start; gap: 6px; font-family: var(--serif); color: var(--crema); }
.cta-card .prezzo sup { font-size: 1.6rem; margin-top: 12px; }
.cta-card .prezzo span { font-size: clamp(4.5rem, 8vw, 6.5rem); line-height: .9; letter-spacing: -.04em; }
.cta-card .nota-prezzo { font-size: 14px; color: rgba(244,239,230,.66); margin: 8px 0 26px; }
.cta-card .btn { width: 100%; justify-content: space-between; }
.cta-card .btn + .btn { margin-top: 12px; }
.cta-mark { position: absolute; left: -6vw; bottom: -18%; width: min(40vw, 480px); opacity: .06; pointer-events: none; z-index: -1; }

.footer { background: var(--verde-notte); color: rgba(244,239,230,.66); font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 26px; padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--linea-chiara); }
.footer a { display: inline-block; padding: 6px 0; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--crema); } }

/* RESPONSIVE: sotto i 1100px gli appunti escono dal margine e si attaccano sopra la sezione */
@media (max-width: 1100px) {
  .con-nota { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .margine, .margine.sparso { position: static; order: -1; grid-auto-flow: column; grid-auto-columns: minmax(260px, 340px); gap: 28px; overflow-x: auto; padding: 22px 6px 34px; margin: 0 -6px 16px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .margine::-webkit-scrollbar { display: none; }
  .margine .nota { scroll-snap-align: start; }
  .margine .nota .freccia, .cover .nota .freccia { display: none; }
  .cover-grid, .no-note .cover-grid { grid-template-columns: 1fr 1fr; }
  .cover .nota { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1000px) {
  .nav-links { display: none; }
}
@media (max-width: 767px) {
  .nav-bar { padding-left: 16px; gap: 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); background: rgba(244,239,230,.92); }
  .nav-logo img { height: 32px; }
  .nav-logo span { display: none; }
  .nav .btn-verde { padding: 0 16px; }
  .nav .btn-verde .ico { display: none; }
  .toggle-note { padding: 8px 12px; }
}
@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .cover-grid, .no-note .cover-grid, .quadro, .cta-grid { grid-template-columns: minmax(0, 1fr); }
  .aree { grid-template-columns: minmax(0, 1fr); }
  .piano li { grid-template-columns: 44px 1fr; }
  .piano-meta { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .meta { grid-template-columns: 1fr; }
  .meta div:nth-child(even) { padding-left: 0; border-left: 0; }
  .scheda dl div { grid-template-columns: 1fr; gap: 2px; }
  .opp { grid-template-columns: 1fr; }
  .fatti { grid-template-columns: 1fr; }
  .fatti > div, .fatti > div + div { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--linea); }
  .fantasia { display: block; margin: 12px 0 0; vertical-align: baseline; }
  .margine { grid-auto-columns: 82%; }
  .nota { padding: 28px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* stampa / salva come PDF: il report pulito, senza appunti */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 12pt; }
  .nav, .avviso, .toc, .cta, .footer, .skip, .nota { display: none !important; }
  .con-nota, .cover-grid { grid-template-columns: 1fr !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sez { padding: 32px 0; }
  .area, .piano li, .opp li { break-inside: avoid; }
}

/* SELETTORE: linguette del ricettario, una per settore */
.schede { background: var(--carta); padding-top: 18px; }
.schede-k { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--grigio-500); margin-bottom: 12px; }
.schede ul { list-style: none; display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--gutter)); padding: 8px var(--gutter) 0; }
.schede ul::-webkit-scrollbar { display: none; }
.schede li { flex-shrink: 0; }
.schede a {
  --tab: var(--pi-giallo);
  position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 58px; min-width: 132px; padding: 10px 20px 12px;
  background: var(--tab); color: var(--pi-testo); border-radius: 14px 14px 0 0;
  box-shadow: inset 0 -8px 10px -8px rgba(60,40,0,.22), 0 -1px 0 rgba(255,255,255,.6) inset;
  transform: translateY(8px); transition: transform .25s var(--ease), background .25s var(--ease);
}
.schede li:nth-child(2) a { --tab: var(--pi-rosa); }
.schede li:nth-child(3) a { --tab: var(--pi-menta); }
.schede li:nth-child(4) a { --tab: #E9DCC2; }
.schede a span { font-family: var(--serif); font-size: 1.12rem; line-height: 1.1; }
.schede a small { font-size: 12px; letter-spacing: .06em; color: rgba(43,42,32,.62); margin-top: 3px; font-variant-numeric: tabular-nums; }
.schede a[aria-current] { background: var(--verde-notte); color: var(--crema); transform: none; box-shadow: none; min-height: 66px; }
.schede a[aria-current] small { color: rgba(244,239,230,.66); }
.schede a:active { transform: translateY(6px) scale(.98); }
@media (hover: hover) and (pointer: fine) { .schede a:not([aria-current]):hover { transform: translateY(3px); } }
@media print { .schede { display: none !important; } }
@media (max-width: 640px) {
  .schede a { min-width: 112px; padding: 9px 16px 11px; min-height: 54px; }
  .schede a[aria-current] { min-height: 62px; }
  .schede a span { font-size: 1.02rem; }
}
