/* FIF · Forza Funzionale Generale — dispensa interattiva
   Palette e tipografia ricavate dal PDF ufficiale (WeasyPrint, ottobre 2026). */
:root {
  color-scheme: light;
  --navy: #13213a;
  --navy-2: #1c2f4f;
  --ink: #1e2633;
  --muted: #5e6b7d;
  --muted-2: #7e92ad;
  --red: #d62631;
  --blue: #1f5ed1;
  --yellow: #f2b316;
  --yellow-ink: #b8860b;
  --green: #1f8e52;
  --rail: #dbe1e8;
  --rail-line: #c9d1dc;
  --card: #edf0f4;
  --chip: #e8ebf0;
  --field: #f4f6f9;
  --field-line: #c7ced8;
  --bar: #9aa5b3;
  --paper: #ffffff;
  --rail-w: 78px;
  --top-h: 56px;
  --col: 41rem;
  --wide: 60rem;
  --f-cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-ui: "Barlow", system-ui, sans-serif;
  --f-serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; } /* niente scroll-behavior: smooth, falsa le misure di ScrollTrigger: lo scorrimento morbido è nei link (app.js) */
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.68 var(--f-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(214, 38, 49, .18); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- barra di avanzamento e barra superiore ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--red); transform-origin: 0 50%; transform: scaleX(0); }

.topbar {
  position: fixed; top: 0; left: var(--rail-w); right: 0; height: var(--top-h); z-index: 50;
  display: flex; align-items: center; gap: 1rem; padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: #fff; border-bottom: 1px solid #e3e7ed;
  font: 600 .8125rem/1 var(--f-ui); color: var(--navy);
  transition: background .35s, color .35s, border-color .35s;
}
.topbar.on-dark { background: var(--navy); color: #fff; border-color: rgba(255, 255, 255, .08); }
.topbar .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; white-space: nowrap; }
.topbar .brand img { width: 26px; height: 26px; border-radius: 3px; background: #fff; }
.topbar .loc { flex: 1; text-align: center; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.on-dark .loc { color: var(--muted-2); }
.topbar .loc b { color: inherit; font-weight: 600; }
.topbar .links { display: flex; align-items: center; gap: 1.1rem; }
.topbar .links a { text-decoration: none; }
.topbar .links a:hover { color: var(--red); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  border: 0; border-radius: 3px; padding: .62rem 1rem;
  background: var(--red); color: #fff; font: 600 .8125rem/1 var(--f-ui); letter-spacing: .01em;
  text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.btn:hover { background: #bd1f29; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(214, 38, 49, .25); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; box-shadow: none; }
.btn.big { padding: 1rem 1.4rem; font-size: 1rem; }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: #f1f3f7; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.menu-btn { display: none; background: none; border: 0; padding: .4rem; margin-left: -.4rem; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- montante (rail) ---------- */
.rail {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--rail-w); z-index: 55;
  background: var(--rail); border-right: 1px solid var(--rail-line);
  display: flex; flex-direction: column; justify-content: center;
}
.rail ol { list-style: none; margin: 0; padding: 0; position: relative; }
.rail li { position: relative; z-index: 1; }
.rail a {
  display: flex; align-items: center; gap: 12px; height: 38px; padding-left: 19px;
  text-decoration: none; font: 600 .78rem/1 var(--f-cond); color: var(--muted); letter-spacing: .02em;
  transition: color .3s;
}
.rail a .dot {
  position: relative; width: 17px; height: 17px; border-radius: 50%; border: 1px solid #c2cad5;
  background: conic-gradient(var(--red) calc(var(--p, 0) * 1turn), #fff 0);
  transition: border-color .3s, transform .3s;
}
.rail a .dot::before { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: #fff; }
.rail a .dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--navy); transform: scale(0); transition: transform .3s; }
.rail a.on .dot { background: conic-gradient(#fff calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .35) 0); }
.rail a.on .dot::before { background: var(--red); }
.rail a:hover .dot { transform: scale(1.12); }
.rail a.off { opacity: .55; cursor: default; }
.rail a.off:hover .dot { transform: none; }
.rail a.on { color: #fff; }
.rail a.on .dot { border-color: #fff; }
.rail a.on .dot::after { transform: scale(1); background: #fff; box-shadow: inset 0 0 0 2.5px var(--navy); }
.rail .hook {
  position: absolute; left: 4px; right: -3px; height: 30px; top: 4px; z-index: 0;
  background: var(--red); border-radius: 2px 4px 4px 2px; pointer-events: none;
  box-shadow: 0 6px 14px rgba(214, 38, 49, .28);
  transition: transform .55s cubic-bezier(.65, .05, .2, 1), opacity .3s;
}
.rail .hook::before { /* il "gancio": piccola linguetta in alto a destra come nel PDF */
  content: ""; position: absolute; right: 0; top: -5px; width: 3px; height: 9px; background: var(--red); border-radius: 2px 2px 0 0;
}
.rail .tip {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translate(-4px, -50%); opacity: 0; pointer-events: none;
  background: var(--navy); color: #fff; font: 500 .75rem/1.2 var(--f-ui); padding: .45rem .6rem; border-radius: 3px; white-space: nowrap;
  transition: opacity .2s, transform .2s;
}
.rail li:hover .tip { opacity: 1; transform: translate(0, -50%); }

main { margin-left: var(--rail-w); overflow-x: hidden; }
@supports (overflow: clip) { main { overflow-x: clip; } }

/* ---------- elementi comuni ---------- */
.page { position: relative; padding: calc(var(--top-h) + clamp(2rem, 4.5vw, 4rem)) clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem); }
.col { max-width: var(--col); }
.wide { max-width: var(--wide); }
.kicker { font: 600 .8125rem/1.3 var(--f-ui); color: var(--muted); letter-spacing: .01em; margin: 0 0 .9rem; }
.dark .kicker { color: var(--muted-2); }
h1, h2, h3, h4 { font-family: var(--f-cond); color: var(--navy); line-height: 1.04; margin: 0; letter-spacing: -.005em; }
.display { font-weight: 700; font-size: clamp(2.8rem, 7.4vw, 6.2rem); line-height: .95; }
.title { font-weight: 700; font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); line-height: 1.6; max-width: 46rem; }
p { margin: 0 0 1rem; }
.dark { background: var(--navy); color: #e9edf4; }
.dark h1, .dark h2, .dark h3 { color: #fff; }

.label { font: 600 .78rem/1.3 var(--f-ui); color: var(--muted); margin: 0 0 .55rem; letter-spacing: .01em; }
.discs { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; list-style: none; padding: 0; margin: 0; font: 600 .875rem/1 var(--f-ui); }
.discs li { display: inline-flex; align-items: center; gap: .5rem; }
.disc { --c: var(--blue); width: 14px; height: 14px; border-radius: 50%; background: var(--c); position: relative; flex: none; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .14); }
.disc::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #dbe1e8; box-shadow: inset 0 0 0 1.4px var(--navy); }
.disc.y { --c: var(--yellow); } .disc.g { --c: var(--green); } .disc.r { --c: var(--red); }
.disc.lg { width: 20px; height: 20px; } .disc.lg::after { inset: 6px; }

/* reveal generico (attivo solo con JS) */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .55s cubic-bezier(.2, .7, .2, 1), transform .55s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv-l { transform: translateX(-28px); } .js .rv-r { transform: translateX(28px); }
.js .rv-l.in, .js .rv-r.in { transform: none; }

/* ---------- copertina ---------- */
.cover {
  min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  overflow: hidden; position: relative;
}
.cover .txt { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top-h) + 3rem) clamp(1.25rem, 5vw, 4.5rem) 3rem; }
.cover .logo { width: 72px; height: 72px; background: #fff; border-radius: 4px; padding: 6px; margin-bottom: 2.2rem; }
.cover .display .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.cover .display .ln > span { display: inline-block; }
.cover .sub { font: 400 clamp(1.05rem, 1.5vw, 1.3rem)/1.45 var(--f-serif); color: #c8d1df; margin: 1.4rem 0 2.2rem; }
.cover .discs { color: #fff; }
.cover .who { margin-top: 3rem; font: 500 .85rem/1 var(--f-ui); color: var(--muted-2); }
.cover .ph { position: relative; min-height: 60vh; overflow: hidden; }
.cover .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.cover .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgba(19, 33, 58, .35) 22%, rgba(19, 33, 58, 0) 50%); }
.scroll-cue { position: absolute; left: clamp(1.25rem, 5vw, 4.5rem); bottom: 1.6rem; z-index: 3; display: flex; align-items: center; gap: .7rem; font: 500 .78rem/1 var(--f-ui); color: var(--muted-2); text-decoration: none; }
.scroll-cue span { width: 1px; height: 34px; background: rgba(255, 255, 255, .25); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cue 1.8s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes cue { to { top: 100%; } }

/* ---------- come si usa ---------- */
.howto { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.howto aside { border-top: 1.5px solid var(--navy); padding-top: 1rem; font: 400 .92rem/1.55 var(--f-ui); }
.howto aside h4 { font: 600 .9rem/1.3 var(--f-ui); margin: 0 0 .4rem; }
.howto aside p { margin-bottom: 1.4rem; }
.howto aside em { font-family: var(--f-serif); font-size: .98rem; }
.thread { margin: 1.6rem 0 .6rem; padding: 1.1rem 1.25rem; background: var(--card); border-left: 3px solid var(--navy); }
.thread .discs { margin: .4rem 0 .8rem; color: var(--navy); }
.thread p { font-style: italic; margin: 0; }
.goals { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 2rem; list-style: none; padding: 0; margin: 1rem 0 0; counter-reset: g; }
.goals li { counter-increment: g; position: relative; padding: .7rem 0 .7rem 2.1rem; border-top: 1px solid #e3e7ed; font: 400 .95rem/1.5 var(--f-ui); }
.goals li::before { content: counter(g, decimal-leading-zero); position: absolute; left: 0; top: .78rem; font: 700 .85rem/1 var(--f-cond); color: var(--red); }

/* ---------- il metodo: bilanciere ---------- */
.method h2 { font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.1rem); }
.barbell { width: 100%; height: auto; margin: clamp(1.5rem, 4vw, 3rem) 0 .5rem; overflow: visible; }
.barbell .plate { cursor: pointer; }
.barbell .plate:focus { outline: none; }
.barbell .plate:focus-visible circle.body { stroke: var(--navy); stroke-width: 4; }
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 2rem); }
.phase { text-align: center; transition: opacity .35s, transform .35s; }
.phase h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; color: var(--c); margin-bottom: .45rem; }
.phase p { font-size: .98rem; line-height: 1.5; margin-bottom: 1rem; }
.phase ul { list-style: none; padding: .8rem 0 0; margin: 0; border-top: 1px solid #dfe3e9; text-align: left; font: 400 .86rem/1.45 var(--f-ui); }
.phase li { margin: 0 0 .35rem; }
.phase li b { color: var(--muted-2); font-weight: 600; margin-right: .3rem; }
.phases.focus .phase { opacity: .28; }
.phases.focus .phase.sel { opacity: 1; transform: translateY(-4px); }
.ph-o { --c: var(--blue); } .ph-i { --c: var(--yellow-ink); } .ph-s { --c: var(--green); } .ph-p { --c: var(--red); }
.hint { font: 500 .8rem/1.4 var(--f-ui); color: var(--muted); margin-top: 1.4rem; }

/* ---------- indice ---------- */
.toc { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 4.5rem); margin-top: 2rem; }
.toc h4 { font: 600 .78rem/1.3 var(--f-ui); color: var(--muted); margin: 1.6rem 0 .4rem; }
.toc a, .toc .soon { display: grid; grid-template-columns: 2rem 1fr auto 4.6rem; align-items: baseline; gap: .6rem; padding: .55rem 0; border-top: 1px solid #e3e7ed; text-decoration: none; font: 500 1rem/1.35 var(--f-ui); }
.toc a b, .toc .soon b { font: 700 1rem/1 var(--f-cond); color: var(--red); }
.toc a { transition: padding .25s, color .25s; }
.toc a:hover { padding-left: .5rem; color: var(--red); }
.toc a i { font-style: normal; font: 600 .72rem/1 var(--f-ui); color: #fff; background: var(--navy); padding: .3rem .45rem; border-radius: 2px; }
.toc .soon { color: #9aa5b3; }
.toc .soon b { color: #c3cad4; }
.toc .soon i { font-style: normal; font: 500 .72rem/1 var(--f-ui); color: #9aa5b3; text-align: right; white-space: nowrap; }
.toc em { font: 600 .85rem/1 var(--f-cond); color: var(--muted); font-style: normal; font-variant-numeric: tabular-nums; }
.toc .soon em { color: #b5bfcb; }
.toc a i { justify-self: end; }

/* ---------- apertura capitolo ---------- */
.opener { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); position: relative; overflow: hidden; }
.opener .txt { position: relative; z-index: 2; padding: calc(var(--top-h) + 3rem) clamp(1.25rem, 5vw, 4.5rem) 3rem; display: flex; flex-direction: column; justify-content: center; }
.bignum { position: absolute; z-index: 0; left: clamp(.5rem, 3vw, 2.5rem); top: 4%; font: 700 clamp(14rem, 34vw, 30rem)/.8 var(--f-cond); color: var(--navy-2); pointer-events: none; user-select: none; }
.opener h1 { font-weight: 700; font-size: clamp(2.6rem, 5.6vw, 4.6rem); position: relative; }
.opener h1 .ln { display: block; overflow: hidden; padding-bottom: .05em; }
.opener h1 .ln > span { display: inline-block; text-wrap: balance; }
.opener .sub { font: 500 1.05rem/1.4 var(--f-ui); color: #c8d1df; margin: 1.1rem 0 .3rem; }
.opener .time { font: 400 .85rem/1 var(--f-ui); color: var(--muted-2); margin-bottom: 2.4rem; }
.opener h1 + .time { margin-top: 1.1rem; }
.incap { position: relative; }
.incap ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.incap li { break-inside: avoid; }
.incap li a { display: grid; grid-template-columns: 2.1rem 1fr; padding: .55rem 0; border-top: 1px solid rgba(255, 255, 255, .12); text-decoration: none; font: 500 .9rem/1.35 var(--f-ui); color: #e3e8f0; transition: color .25s, padding .25s; }
.incap li a:hover { color: #fff; padding-left: .35rem; }
.incap li a b { font-weight: 600; color: var(--muted-2); font-size: .8rem; }
.opener .ph { position: relative; overflow: hidden; }
.opener .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.opener .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgba(19, 33, 58, .25) 30%, rgba(19, 33, 58, 0) 60%); }
.opener .mark { position: absolute; z-index: 2; left: clamp(1.25rem, 5vw, 4.5rem); bottom: 1.8rem; width: 46px; height: 46px; background: #fff; border-radius: 3px; padding: 4px; }

/* ---------- corpo del capitolo ---------- */
.chapter { padding: 0 clamp(1.25rem, 5vw, 4.5rem); }
.chapter .intro { padding-top: clamp(3.5rem, 8vw, 6.5rem); }
.sec { padding: clamp(2.5rem, 5vw, 4rem) 0 .5rem; }
.sec-h { margin-bottom: 1.4rem; max-width: var(--wide); }
.sec-h .rule { height: 1.5px; background: var(--navy); transform-origin: 0 50%; margin-bottom: 1.1rem; }
.sec-h h2 { font-weight: 600; font-size: clamp(1.7rem, 2.8vw, 2.25rem); display: flex; gap: .75rem; align-items: baseline; }
.sec-h h2 .n { color: var(--red); font-weight: 600; min-width: 2.4ch; }
.chapter p { max-width: var(--col); }
.chapter p.strong { font-weight: 600; color: var(--navy); }
.chapter ul.dots { max-width: var(--col); padding-left: 1.2rem; margin: 0 0 1rem; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.8rem, 2vw, 1.6rem); max-width: var(--wide); margin: .4rem 0 2rem; position: relative; }
.card { background: var(--card); padding: 1rem 1.15rem 1.15rem; position: relative; }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--navy); transform-origin: 0 50%; transform: scaleX(var(--k, 1)); transition: transform .6s cubic-bezier(.65, .05, .2, 1) .1s, background .3s; }
.js .card.rv:not(.in) { --k: 0; }
.card h4 { font: 600 1.15rem/1.15 var(--f-cond); margin: .2rem 0 .35rem; }
.card p { font: 400 .92rem/1.5 var(--f-ui); margin: 0; }
.neq { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font: 700 1.6rem/1 var(--f-cond); box-shadow: 0 0 0 6px #fff; z-index: 2; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.5rem, 1.4vw, 1rem); max-width: var(--wide); margin: .3rem 0 2rem; counter-reset: s; }
.step { background: var(--card); padding: .85rem .9rem 1rem; position: relative; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--navy); transform-origin: 0 50%; }
.step b { display: block; font: 700 1.35rem/1 var(--f-cond); color: var(--navy); margin-bottom: .45rem; }
.step span { font: 500 .92rem/1.35 var(--f-ui); }
.step.lit { background: #e2e7ef; }
.step.lit b { color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 1.6rem; max-width: var(--wide); }
.chips span { background: var(--chip); color: var(--navy); font: 600 1rem/1 var(--f-cond); padding: .62rem .8rem; transition: background .35s, color .35s, transform .35s; }
.chips span.lit { background: var(--navy); color: #fff; transform: translateY(-2px); }

.cue { max-width: var(--col); margin: 1rem 0 1.4rem; padding: .2rem 0 .2rem 1.1rem; border-left: 2.5px solid var(--navy); }
.cue .lbl { display: flex; align-items: center; gap: .45rem; font: 500 .75rem/1 var(--f-ui); color: var(--muted); margin-bottom: .5rem; }
.cue .lbl svg { width: 15px; height: 15px; }
.cue q { display: block; font: italic 500 clamp(1.25rem, 2vw, 1.5rem)/1.3 var(--f-cond); color: var(--navy); quotes: "“" "”"; }
.cue q .w { display: inline-block; }
.wrongq { position: relative; display: inline-block; font: italic 500 1.2rem/1.3 var(--f-cond); color: var(--muted); margin: 0 0 .4rem; }
.wrongq::after { content: ""; position: absolute; left: -2%; right: -2%; top: 52%; height: 2px; background: var(--red); transform-origin: 0 50%; transform: scaleX(var(--k, 0)); transition: transform .5s cubic-bezier(.65, .05, .2, 1) .2s; }
.wrongq.in { --k: 1; }

.chart { max-width: var(--wide); margin: 1.4rem 0 2rem; }
.chart svg { width: 100%; height: auto; overflow: visible; display: block; }
.chart .cap { display: grid; grid-template-columns: 55.5fr 39fr 5.5fr; gap: 0; margin-top: .2rem; font: 400 .84rem/1.4 var(--f-ui); color: var(--ink); }
.chart .cap div { padding: .55rem .6rem 0 0; border-top: 1.5px solid var(--navy); margin-right: .8rem; }
.chart .cap div.r { border-color: var(--red); }
.chart .kg { font: 700 15px var(--f-cond); fill: var(--navy); }
.chart .delta { font: 600 12px var(--f-ui); }

.key { max-width: var(--wide); background: var(--navy); color: #fff; padding: 1.2rem 1.4rem 1.35rem; margin: 2rem 0 1rem; position: relative; overflow: hidden; }
.key .lbl { display: flex; align-items: center; gap: .5rem; font: 500 .75rem/1 var(--f-ui); color: var(--muted-2); margin-bottom: .6rem; }
.key .lbl svg { width: 18px; height: 18px; }
.key p { font: 500 clamp(1.08rem, 1.6vw, 1.25rem)/1.4 var(--f-cond); max-width: none; margin: 0; letter-spacing: .005em; }
.key::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .09), transparent); transform: skewX(-18deg); }
.key.in::after { animation: shine 1.1s .25s cubic-bezier(.6, 0, .3, 1) forwards; }
@keyframes shine { to { left: 120%; } }

/* chiusura capitolo: concetto chiave a tutto schermo */
.closer { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--top-h) + 3rem) clamp(1.25rem, 6vw, 5.5rem) 4rem; position: relative; overflow: hidden; }
.closer .bignum { left: auto; right: clamp(1rem, 4vw, 3rem); top: 6%; }
.closer blockquote { position: relative; z-index: 1; margin: 0; max-width: 54rem; font: 600 clamp(1.7rem, 3.4vw, 2.75rem)/1.2 var(--f-cond); color: #fff; }
.closer blockquote .w { opacity: var(--o, 1); transition: opacity .25s linear; }
.closer .back { position: relative; z-index: 1; margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; font: 600 .82rem/1 var(--f-ui); }
.js .closer .back { opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.js .closer.lit .back { opacity: 1; transform: none; }
.closer .back a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); padding-bottom: .25rem; }
.closer .back a:hover { border-color: #fff; }

/* ---------- appunti ---------- */
.notes .head { border-top: 1.5px solid var(--navy); padding-top: 1rem; max-width: var(--wide); }
.notes h2 { font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.notes h2 em { font-style: normal; color: var(--red); font-weight: 700; }
.notes .head p { font: 400 .95rem/1.5 var(--f-ui); margin: .45rem 0 1.1rem; }
.notebox { max-width: var(--wide); position: relative; }
.notebox textarea {
  width: 100%; min-height: 22rem; resize: vertical; display: block;
  background: var(--field) repeating-linear-gradient(180deg, transparent 0 calc(1.9rem - 1px), #e4e8ee calc(1.9rem - 1px) 1.9rem);
  background-position: 0 .55rem; background-attachment: local;
  border: 1px solid var(--field-line); border-radius: 0; padding: .55rem 1rem 1rem;
  font: 400 1.05rem/1.9rem var(--f-ui); color: var(--ink); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.notebox textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(19, 33, 58, .1); }
.savebar { max-width: var(--wide); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; font: 500 .82rem/1.3 var(--f-ui); color: var(--muted); }
.saved { display: inline-flex; align-items: center; gap: .45rem; }
.saved i { width: 8px; height: 8px; border-radius: 50%; background: #b8c1cd; transition: background .3s, transform .3s; }
.saved.ok i { background: var(--green); transform: scale(1.2); }

/* ---------- appendice A ---------- */
.app h1 { font-weight: 600; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.app h1 em { font-style: normal; color: var(--red); font-weight: 700; }
.app .head { border-top: 1.5px solid var(--navy); padding-top: 1.1rem; max-width: var(--wide); }
.app .head p { font: 400 .98rem/1.55 var(--f-ui); margin: .7rem 0 0; max-width: 52rem; }
.fgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .9rem; max-width: var(--wide); margin: 1.6rem 0 .4rem; }
.fld { display: flex; flex-direction: column; gap: .35rem; font: 600 .78rem/1.2 var(--f-ui); color: var(--muted); }
.fld input, .fld textarea, .row-in input {
  width: 100%; border: 0; border-bottom: 1.2px solid var(--bar); background: var(--field); padding: .55rem .6rem; border-radius: 0;
  font: 400 1rem/1.35 var(--f-ui); color: var(--ink); outline: none; transition: border-color .25s, background .25s;
}
.fld textarea { border: 1px solid var(--field-line); min-height: 4.4rem; resize: vertical; }
.fld input:focus, .fld textarea:focus, .row-in input:focus { border-color: var(--navy); background: #eef1f6; }
.app h3 { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.55rem; margin: 2.4rem 0 1rem; }
.app h3 small { font: 600 1.55rem/1 var(--f-cond); color: #8f9bab; }
.checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem 1.2rem; max-width: var(--wide); margin-bottom: 1rem; }
.ck { display: flex; align-items: flex-start; gap: .65rem; cursor: pointer; font: 400 .95rem/1.35 var(--f-ui); color: var(--ink); padding: .15rem 0; user-select: none; }
.ck input { position: absolute; opacity: 0; pointer-events: none; }
.ck .box { flex: none; width: 21px; height: 21px; border: 1.4px solid var(--navy); background: #fff; display: grid; place-items: center; transition: background .2s, transform .2s; margin-top: -1px; }
.ck .box svg { width: 15px; height: 15px; }
.ck .box path { stroke: #fff; stroke-width: 2.6; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s cubic-bezier(.6, 0, .2, 1); }
.ck input:checked + .box { background: var(--navy); }
.ck input:checked + .box path { stroke-dashoffset: 0; }
.ck input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(31, 94, 209, .35); }
.ck:active .box { transform: scale(.9); }
.row-in { display: grid; grid-template-columns: 11rem 1fr; align-items: center; gap: .3rem 1rem; max-width: var(--wide); margin-bottom: .35rem; font: 600 .82rem/1.2 var(--f-ui); color: var(--ink); }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 2.6rem 0 0; font: 600 1.1rem/1 var(--f-cond); color: var(--navy); }
.flow span { padding-bottom: .3rem; border-bottom: 2px solid var(--navy); transition: color .3s, border-color .3s; }
.flow span.lit { color: var(--red); border-color: var(--red); }
.flow i { color: var(--red); font-style: normal; font-size: .9rem; }
.app .tools { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- scarica PDF ---------- */
.dl { text-align: left; }
.dl .inner { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; max-width: var(--wide); }
.dl h2 { font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); }
.dl ul { list-style: none; padding: 0; margin: 1.2rem 0 2rem; font: 400 1rem/1.5 var(--f-ui); color: #d5dce7; }
.dl li { padding: .5rem 0 .5rem 1.6rem; position: relative; border-top: 1px solid rgba(255, 255, 255, .1); }
.dl li::before { content: ""; position: absolute; left: 0; top: .95rem; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.dl .stack { position: relative; aspect-ratio: 1.414; max-width: 26rem; width: 100%; justify-self: center; }
.dl .stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); border-radius: 2px; }
.dl .small { font: 400 .82rem/1.5 var(--f-ui); color: var(--muted-2); margin-top: 1rem; }
.dl .small button { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; cursor: pointer; font: inherit; }

.foot { padding: 2rem clamp(1.25rem, 5vw, 4.5rem) 2.4rem; display: flex; gap: 1.4rem; flex-wrap: wrap; font: 500 .8rem/1.4 var(--f-ui); color: var(--muted); border-top: 1px solid #e3e7ed; }
.foot b { color: var(--navy); }

/* ---------- finestra generazione PDF ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.2rem; background: rgba(12, 20, 36, .62); opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .box { width: min(30rem, 100%); background: #fff; padding: 1.6rem 1.6rem 1.4rem; border-top: 4px solid var(--red); transform: translateY(14px); transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.modal.open .box { transform: none; }
.modal h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: .9rem; }
.modal ol { list-style: none; padding: 0; margin: 0 0 1.2rem; font: 500 .95rem/1.4 var(--f-ui); }
.modal li { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; color: #a3adbb; transition: color .3s; }
.modal li .disc { opacity: .35; transition: opacity .3s, transform .5s; }
.modal li.doing { color: var(--navy); }
.modal li.doing .disc { opacity: 1; animation: spin 1s linear infinite; }
.modal li.done { color: var(--navy); }
.modal li.done .disc { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal .bar { height: 4px; background: #e6eaf0; margin-bottom: 1.2rem; overflow: hidden; }
.modal .bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }
.modal .msg { font: 400 .9rem/1.5 var(--f-ui); color: var(--ink); margin-bottom: 1rem; min-height: 1.4em; }
.modal .acts { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: flex-end; }

.toast { position: fixed; left: 50%; bottom: 1.4rem; z-index: 90; transform: translate(-50%, calc(100% + 2rem)); visibility: hidden; background: var(--navy); color: #fff; padding: .75rem 1.1rem; font: 500 .88rem/1.3 var(--f-ui); border-radius: 3px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: transform .4s cubic-bezier(.2, .7, .2, 1), visibility 0s .4s; max-width: calc(100% - 2rem); }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }

.fab { display: none; }

/* ---------- mobile e tablet ---------- */
@media (max-width: 900px) {
  :root { --rail-w: 0px; --top-h: 52px; }
  .rail { width: 84px; transform: translateX(-100%); transition: transform .4s cubic-bezier(.2, .7, .2, 1); box-shadow: none; }
  .rail.open { transform: none; box-shadow: 0 0 0 100vmax rgba(12, 20, 36, .45); }
  .menu-btn { display: block; }
  .rail:not(.open) .hook { visibility: hidden; }
  .topbar .brand span, .topbar .links .lnk { display: none; }
  .topbar .loc { text-align: left; }
  .topbar .links .btn { padding: .55rem .7rem; }
  .cover, .opener { grid-template-columns: 1fr; }
  .cover .ph, .opener .ph { position: absolute; inset: 0; min-height: 0; }
  .cover .ph::after { background: linear-gradient(0deg, var(--navy) 18%, rgba(19, 33, 58, .82) 55%, rgba(19, 33, 58, .55) 100%); }
  .opener .ph::after { background: linear-gradient(0deg, var(--navy) 30%, rgba(19, 33, 58, .86) 65%, rgba(19, 33, 58, .7) 100%); }
  .cover .txt { justify-content: flex-end; padding-bottom: 5.5rem; }
  .howto { grid-template-columns: 1fr; }
  .goals, .toc { grid-template-columns: 1fr; }
  .incap ol { columns: 1; }
  .phases { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .steps { grid-template-columns: 1fr 1fr; }
  .fgrid { grid-template-columns: 1fr 1fr; }
  .fgrid .fld:first-child { grid-column: 1 / -1; }
  .checks { grid-template-columns: 1fr 1fr; }
  .dl .inner { grid-template-columns: 1fr; }
  .dl .stack { max-width: 18rem; }
}
@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  .topbar .loc { font-size: .75rem; }
  .pair { grid-template-columns: 1fr; }
  .neq { top: 50%; left: auto; right: 1rem; }
  .checks { grid-template-columns: 1fr; }
  .row-in { grid-template-columns: 1fr; }
  .chart .cap { grid-template-columns: 1fr; gap: .6rem; }
  .chart .cap div:last-child { display: none; }
  .chart .kg { font-size: 30px; }
  .chart .delta { font-size: 24px; }
  .chart .pt circle { r: 12px; }
  .phases { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
  .scroll-cue span::after, .key.in::after { animation: none; }
}

@media print {
  .topbar, .rail, .progress, .scroll-cue, .modal, .toast, .tools, .savebar .btn { display: none !important; }
  main { margin: 0; }
  .js .rv { opacity: 1 !important; transform: none !important; }
}


/* ===== migliorie v3 ===== */
[id] { scroll-margin-top: calc(var(--top-h) + 1.2rem); }
.opener[id], .cover[id], .closer[id] { scroll-margin-top: 0; }

/* hover */
@media (hover: hover) {
  .card { transition: transform .3s, box-shadow .3s; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(19, 33, 58, .08); }
  .card:hover::before { background: var(--red); }
  .step { transition: transform .3s, background .3s; }
  .step:hover { transform: translateY(-3px); background: #e2e7ef; }
  .phase { cursor: default; }
}
.barbell .plate { transition: opacity .35s; }
.barbell .plate.dim { opacity: .3; }

/* badge sul pulsante PDF */
.badge { min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 1rem; background: #fff; color: var(--red); font: 700 .7rem/1.25rem var(--f-ui); text-align: center; margin-left: .15rem; }
.badge[hidden] { display: none; }

/* pulsante appunti flottante */
.fab-notes {
  position: fixed; right: clamp(1rem, 2.4vw, 2rem); bottom: clamp(1rem, 2.4vw, 1.8rem); z-index: 70;
  display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.1rem .8rem .95rem; border: 0; border-radius: 2rem; cursor: pointer;
  background: var(--navy); color: #fff; font: 600 .88rem/1 var(--f-ui); box-shadow: 0 10px 28px rgba(19, 33, 58, .3);
  transform: translateY(150%); opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .3s, background .2s;
}
.fab-notes.show { transform: none; opacity: 1; pointer-events: auto; }
.fab-notes:hover { background: #1d3157; }
.fab-notes svg { width: 18px; height: 18px; }
.fab-notes .has { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: none; box-shadow: 0 0 0 2px var(--navy); }
.fab-notes.filled .has { display: block; }
body.drawer-open .fab-notes { opacity: 0; pointer-events: none; }

/* pannello appunti */
.drawer {
  position: fixed; z-index: 80; top: var(--top-h); right: 0; bottom: 0; width: min(27rem, 100vw);
  background: #fff; border-left: 1px solid #e3e7ed; box-shadow: -18px 0 40px rgba(19, 33, 58, .14);
  display: flex; flex-direction: column; padding: 1.2rem 1.3rem 1.1rem; gap: .8rem;
  transform: translateX(105%); visibility: hidden; transition: transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s .45s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.drawer .dhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-top: 1.5px solid var(--navy); padding-top: .8rem; }
.drawer h3 { font-weight: 600; font-size: 1.5rem; }
.drawer h3 em { font-style: normal; color: var(--red); font-weight: 700; }
.dclose { background: none; border: 0; padding: .35rem; margin: -.2rem -.35rem 0 0; cursor: pointer; color: var(--navy); border-radius: 3px; }
.dclose:hover { background: var(--card); }
.dclose svg { width: 20px; height: 20px; display: block; }
.drawer textarea {
  flex: 1; width: 100%; resize: none; min-height: 10rem; border: 1px solid var(--field-line); outline: none; padding: .55rem .9rem;
  background: var(--field) repeating-linear-gradient(180deg, transparent 0 calc(1.85rem - 1px), #e4e8ee calc(1.85rem - 1px) 1.85rem);
  background-position: 0 .55rem; background-attachment: local; font: 400 1rem/1.85rem var(--f-ui); color: var(--ink);
}
.drawer textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(19, 33, 58, .1); }
.dfoot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; font: 500 .78rem/1.3 var(--f-ui); color: var(--muted); }
.dfoot a { color: var(--navy); font-weight: 600; }

/* mini indice dei paragrafi (schermi larghi) */
.minitoc { display: none; }
@media (min-width: 1360px) {
  .minitoc {
    display: block; position: fixed; z-index: 40; right: 1.6rem; top: calc(var(--top-h) + 5rem); width: 13.5rem;
    opacity: 0; transform: translateX(12px); pointer-events: none; transition: opacity .35s, transform .35s;
  }
  .minitoc.show { opacity: 1; transform: none; pointer-events: auto; }
  body.drawer-open .minitoc { opacity: 0; pointer-events: none; }
  .minitoc .kicker { margin-bottom: .6rem; }
  .minitoc ol { list-style: none; margin: 0; padding: 0 0 0 .9rem; position: relative; }
  .minitoc a { display: grid; grid-template-columns: 2rem 1fr; padding: .38rem 0; text-decoration: none; font: 500 .8rem/1.3 var(--f-ui); color: #8d98a8; transition: color .25s; }
  .minitoc a b { font-weight: 600; }
  .minitoc a.past { color: #5e6b7d; }
  .minitoc a.on { color: var(--navy); }
  .minitoc a.on b { color: var(--red); }
  .minitoc a:hover { color: var(--red); }
  .minitoc .mt-line { position: absolute; left: 0; top: 2rem; bottom: 0; width: 2px; background: #e3e7ed; }
  .minitoc .mt-line i { display: block; height: 100%; background: var(--red); transform-origin: 50% 0; transform: scaleY(0); }
}

/* appendice A: disco della sezione "chiuso" quando c'è qualcosa di compilato */
.app h3 .disc { transition: box-shadow .3s; }
.app h3 .disc::before { content: ""; position: absolute; right: -5px; bottom: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.3l2 1.9L9 4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; box-shadow: 0 0 0 2px #fafbfc; transform: scale(0); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); z-index: 1; }
.app h3.done .disc::before { transform: scale(1); }

@media (max-width: 900px) {
  .drawer { top: auto; left: 0; right: 0; width: 100%; height: min(72vh, 34rem); border-left: 0; border-top: 1px solid #e3e7ed; border-radius: 12px 12px 0 0; box-shadow: 0 -18px 40px rgba(19, 33, 58, .18); transform: translateY(105%); padding-bottom: max(1.1rem, env(safe-area-inset-bottom)); }
  .fab-notes span { display: none; }
  .fab-notes { padding: .95rem; }
  .topbar .links .btn .badge { display: none; }
}
@media print { .fab-notes, .drawer, .minitoc { display: none !important; } }

/* ===== componenti dei capitoli 2-12 (v5) ===== */
.chapter p.lead { font-size: 1.16rem; }
.chapter p.indent { padding-left: 2.2rem; }
.sub { font: 600 1.2rem/1.2 var(--f-cond); color: #1f4e9c; margin: 1.8rem 0 .6rem; max-width: var(--col); }
.def { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .3rem 1.6rem; max-width: var(--wide); margin: 1.1rem 0 1.2rem; padding-top: .9rem; border-top: 1px solid #e3e7ed; }
.def h4 { font: 600 1.08rem/1.2 var(--f-cond); color: #1f4e9c; margin: .1rem 0 0; }
.def p { margin: 0 0 .55rem; max-width: var(--col); }
.js .def.rv h4 { transition: transform .55s cubic-bezier(.2, .7, .2, 1) .05s, opacity .55s; }
.js .def.rv:not(.in) h4 { transform: translateX(-12px); opacity: 0; }

ul.dots { list-style: none; padding: 0; margin: .2rem 0 1.2rem; max-width: var(--wide); display: grid; gap: .25rem 2rem; }
ul.dots.cols-1 { max-width: var(--col); }
ul.dots.cols-2, ul.dots.cols-3 { display: block; column-gap: 2rem; }
ul.dots.cols-2 { columns: 2; max-width: 41rem; }
ul.dots.cols-3 { columns: 3; max-width: 46rem; }
ul.dots.cols-2 li, ul.dots.cols-3 li { break-inside: avoid; margin-bottom: .25rem; }
ul.dots li { position: relative; padding-left: 1.1rem; }
ul.dots li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--navy); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1) calc(var(--i, 0) * 40ms), background .3s; }
.js ul.dots.rv:not(.in) li::before { transform: scale(0) rotate(45deg); }
ul.dots li:hover::before { background: var(--red); }
ol.num { list-style: none; padding: 0; margin: .2rem 0 1.2rem; counter-reset: n; max-width: var(--col); }
ol.num li { counter-increment: n; position: relative; padding-left: 1.6rem; margin-bottom: .2rem; }
ol.num li::before { content: counter(n) "."; position: absolute; left: .2rem; top: .05em; font: 700 1rem/1.6 var(--f-cond); color: var(--navy); }
ol.circles { list-style: none; padding: 0; margin: .6rem 0 1.4rem; max-width: var(--col); counter-reset: none; }
ol.circles li { position: relative; padding: 0 0 .6rem 2.4rem; }
ol.circles li::after { content: ""; position: absolute; left: .82rem; top: 1.8rem; bottom: -.2rem; width: 1.5px; background: #dfe3e9; }
ol.circles li:last-child::after { display: none; }
ol.circles .cn { position: absolute; left: 0; top: .1rem; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font: 700 .85rem/1 var(--f-cond); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1), background .3s; }
.js ol.circles li.rv:not(.in) .cn { transform: scale(0); }
ol.circles li:hover .cn { background: var(--red); }
ol.circles h4 { font: 600 1.02rem/1.3 var(--f-ui); color: var(--navy); margin: .1rem 0 .25rem; }
ol.circles p { margin: 0 0 .3rem; }

.keymini { max-width: var(--col); margin: 1.4rem 0 1.4rem; padding: .7rem 0 .8rem 1.1rem; position: relative; }
.keymini::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform-origin: 50% 0; transition: transform .6s cubic-bezier(.65, .05, .2, 1) .1s; }
.js .keymini.rv:not(.in)::before { transform: scaleY(0); }
.keymini .lbl { font: 600 .78rem/1 var(--f-ui); color: var(--muted); margin-bottom: .45rem; }
.keymini p { font: 600 clamp(1.15rem, 1.8vw, 1.4rem)/1.25 var(--f-cond); color: var(--navy); margin: 0; }

.cards { display: grid; gap: clamp(.6rem, 1.6vw, 1.1rem); max-width: var(--wide); margin: .4rem 0 1.8rem; }
.cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards .card:nth-child(2) { --d: .07s; } .cards .card:nth-child(3) { --d: .14s; } .cards .card:nth-child(4) { --d: .21s; } .cards .card:nth-child(5) { --d: .28s; } .cards .card:nth-child(6) { --d: .35s; }
.steps.cols-1 { grid-template-columns: 1fr; } .steps.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.pill { margin: .6rem 0 0; max-width: var(--wide); text-align: center; position: relative; }
.pill span { display: inline-block; background: var(--navy); color: #fff; font: 600 1.05rem/1 var(--f-cond); padding: .75rem 1.2rem; position: relative; z-index: 1; }
.pill::after { content: ""; display: block; height: 1.6rem; width: 1.5px; margin: 0 auto; background: var(--bar); transform-origin: 50% 0; transition: transform .5s .25s; }
.js .pill.rv:not(.in)::after { transform: scaleY(0); }
.pill + .cards { position: relative; padding-top: .9rem; }
.pill + .cards::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 1.5px; background: var(--bar); }

.tblwrap { max-width: var(--wide); margin: .5rem 0 1.6rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font: 400 .92rem/1.4 var(--f-ui); }
.tbl th { background: var(--navy); color: #fff; font-weight: 600; text-align: left; padding: .6rem .8rem; font-size: .82rem; }
.tbl td { padding: .6rem .8rem; border-bottom: 1px solid #dfe3e9; vertical-align: top; }
.tbl tbody tr:nth-child(odd) td { background: #f5f7fa; }
.tbl td:first-child { font-weight: 600; color: var(--navy); }
.tbl tbody tr { transition: opacity .45s, transform .45s; }
.js .tblwrap.rv:not(.in) tbody tr { opacity: 0; transform: translateY(8px); }
.tbl tbody tr:nth-child(2) { transition-delay: .05s; } .tbl tbody tr:nth-child(3) { transition-delay: .1s; } .tbl tbody tr:nth-child(4) { transition-delay: .15s; } .tbl tbody tr:nth-child(5) { transition-delay: .2s; } .tbl tbody tr:nth-child(n+6) { transition-delay: .25s; }

.see { font: 600 .8rem/1.5 var(--f-ui); color: var(--muted); margin: -.6rem 0 1.2rem; max-width: var(--wide); }
.see a { color: #1f5fd1; text-decoration: none; border-bottom: 1px solid rgba(31, 95, 209, .3); margin-right: .5rem; }
.see a:hover { border-color: #1f5fd1; }
.sec-h.warn h2 .n::before { content: ""; display: inline-block; width: .8em; height: .72em; margin-right: .3em; background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%); vertical-align: -.02em; }
.fig[data-todo] { outline: 2px dashed var(--red); padding: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; font: 500 .85rem var(--f-ui); }

/* chiusura: sottotitolo */
.closer .csub { position: relative; z-index: 1; max-width: 46rem; margin: 1.6rem 0 0; font: 400 clamp(1rem, 1.4vw, 1.15rem)/1.55 var(--f-serif); color: #c8d1df; }
.js .closer .csub { opacity: 0; transform: translateY(10px); transition: opacity .5s .1s, transform .5s .1s; }
.js .closer.lit .csub { opacity: 1; transform: none; }

/* mappa del gesto nelle aperture (squat, panca) */
.mappa { margin-top: 2rem; position: relative; }
.msteps { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.mstep { flex: 1 1 0; min-width: 4.6rem; padding: .7rem .7rem .2rem 0; text-decoration: none; color: #fff; position: relative; display: flex; flex-direction: column; gap: .15rem; }
.mstep::before { content: ""; position: absolute; left: 0; right: .7rem; top: -1px; height: 2px; background: #fff; transform-origin: 0 50%; transform: scaleX(.18); transition: transform .35s; }
.mstep:hover::before { transform: scaleX(1); background: var(--red); }
.mstep i { font: 500 .78rem/1 var(--f-cond); font-style: normal; color: var(--muted-2); }
.mstep b { font: 600 1rem/1.1 var(--f-cond); }
.mstep small { font: 500 .68rem/1 var(--f-ui); color: var(--muted-2); }

/* navigazione tra capitoli */
.nextnav { padding-top: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.navrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: var(--wide); }
.navc { position: relative; display: flex; align-items: flex-end; min-height: 9.5rem; overflow: hidden; background: var(--navy); color: #fff; text-decoration: none; padding: 1.1rem 1.2rem; }
.navc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; transition: transform .8s cubic-bezier(.2, .7, .2, 1), opacity .4s; }
.navc:hover img { transform: scale(1.06); opacity: .52; }
.navc span { position: relative; display: flex; flex-direction: column; gap: .3rem; }
.navc small { font: 600 .78rem/1 var(--f-ui); color: #c8d1df; }
.navc b { font: 700 1.45rem/1.05 var(--f-cond); }
.navc em { font: 500 .75rem/1 var(--f-ui); font-style: normal; color: var(--muted-2); }
.navc.off { background: #2a3a58; cursor: default; }
.navc.idx { background: #f1f3f7; color: var(--navy); }
.navc.idx small { color: var(--muted); }
.navc.next b::after { content: " →"; transition: margin .3s; }
.navc.next:hover b::after { margin-left: .3rem; }

/* figura: ciclo a 5 tappe */
.fig-ciclo { max-width: var(--wide); margin: .6rem 0 1.8rem; }
.fig-ciclo svg { width: 100%; height: auto; display: block; overflow: visible; }
.fig-ciclo .lab { font: 600 15px var(--f-cond); fill: var(--navy); }
.fig-ciclo .num { font: 700 14px var(--f-cond); fill: #fff; }
.fig-ciclo .node circle { transition: fill .3s; }
.fig-ciclo .node:hover circle { fill: var(--red); }
.fig-ciclo.static .ringmask { stroke-dashoffset: 0 !important; }
.fig-ciclo svg.round { display: none; max-width: 26rem; margin: 0 auto; }
@media (max-width: 560px) { .fig-ciclo svg.wide { display: none; } .fig-ciclo svg.round { display: block; } }

@media (max-width: 900px) {
  .cards.cols-3, .cards.cols-4 { grid-template-columns: 1fr 1fr; }
  .steps.cols-3, .steps.cols-5 { grid-template-columns: 1fr 1fr; }
  ul.dots.cols-3 { columns: 2; }
}
@media (max-width: 560px) {
  .cards.cols-2, .cards.cols-3, .cards.cols-4 { grid-template-columns: 1fr; }
  ul.dots.cols-2, ul.dots.cols-3 { columns: 1; }
  .def { grid-template-columns: 1fr; }
  .chapter p.indent { padding-left: 1rem; }
  .mstep { min-width: 25%; }
}

/* checkpoint pratico / domanda di controllo / criterio di lavoro */
.cphead { max-width: var(--wide); margin: clamp(2.5rem, 5vw, 4rem) 0 1rem; padding-bottom: .9rem; border-bottom: 1.5px solid var(--navy); }
.cphead .cpk { font: 600 .82rem/1 var(--f-ui); color: var(--red); margin: 0 0 .7rem; }
.cphead .cpt { font: 700 clamp(2rem, 4vw, 3rem)/1 var(--f-cond); color: var(--navy); margin: 0; }
.js .cphead.rv .cpt { transition: transform .6s cubic-bezier(.2, .7, .2, 1) .08s, opacity .6s .08s; }
.js .cphead.rv:not(.in) .cpt { transform: translateY(14px); opacity: 0; }
.keybig { max-width: 48rem; background: var(--navy); color: #fff; padding: 1.4rem 1.6rem 1.3rem; margin: 1.6rem 0 1.4rem; position: relative; overflow: hidden; }
.keybig p { font: 600 clamp(1.25rem, 2.2vw, 1.6rem)/1.3 var(--f-cond); margin: 0 0 .3rem; max-width: none; }
.keybig small { display: block; margin-top: .6rem; font: 400 .85rem/1.4 var(--f-ui); color: #afc0d6; }
.js .keybig.rv p { transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .55s; }
.js .keybig.rv p:nth-child(2) { transition-delay: .12s; } .js .keybig.rv p:nth-child(3) { transition-delay: .24s; }
.js .keybig.rv:not(.in) p { transform: translateY(12px); opacity: 0; }
.keybig::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .08), transparent); transform: skewX(-18deg); }
.keybig.in::after { animation: shine 1.1s .3s cubic-bezier(.6, 0, .3, 1) forwards; }

/* sticking point: barra verticale a zone, dalla partenza (in basso) al lockout (in alto) */
.stick { position: relative; max-width: var(--wide); margin: .4rem 0 2rem; padding: 1.1rem 0 1.1rem 3.6rem; }
.stick .ax { position: absolute; left: 0; font: 500 .72rem/1 var(--f-ui); color: #8a96a6; }
.stick .ax.top { top: 0; } .stick .ax.bot { bottom: 0; }
.stick::before { content: ""; position: absolute; left: 2.5rem; top: 1.1rem; bottom: 1.1rem; width: 2px; background: #c7ced8; }
.stick .zone { position: relative; display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 1fr); gap: .3rem 1.4rem; align-items: start; padding: .85rem 0 .85rem 1.2rem; border-bottom: 1px solid #dfe3e9; }
.stick .zone::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 9px; background: var(--zc, #c2cbd8); transform-origin: 50% 100%; transform: scaleY(var(--sy, 1)); }
.stick .zone:nth-child(1) { --zc: #c2cbd8; } .stick .zone:nth-child(2) { --zc: #7f94b0; } .stick .zone:nth-child(3) { --zc: var(--navy); } .stick .zone:nth-child(4) { --zc: #0b1426; }
.stick .zone h4 { font: 700 1.35rem/1.1 var(--f-cond); color: var(--navy); margin: .1rem 0 0; }
.stick .zone small { display: block; font: 600 .72rem/1.2 var(--f-ui); color: var(--muted); margin-bottom: .25rem; }
.stick .zone p { font: 400 .92rem/1.45 var(--f-ui); margin: 0; }
.stick .zone:hover h4 { color: var(--red); }
@media (max-width: 760px) {
  .stick { padding-left: 2.4rem; }
  .stick::before { left: 1.4rem; }
  .stick .ax { font-size: .62rem; }
  .stick .zone { grid-template-columns: 1fr; }
}
.chapter .flow { margin: .5rem 0 1.4rem; max-width: var(--wide); font-size: 1rem; }
.discrow { margin: .8rem 0 1.4rem; gap: .5rem 1.6rem; font: 600 1.1rem/1 var(--f-cond); color: var(--navy); }
.discrow .disc { transition: transform .7s cubic-bezier(.3, 1.4, .5, 1); }
.js .discrow.rv:not(.in) .disc { transform: rotate(-200deg) scale(.3); }
.discrow li:nth-child(2) .disc { transition-delay: .08s; } .discrow li:nth-child(3) .disc { transition-delay: .16s; } .discrow li:nth-child(4) .disc { transition-delay: .24s; }

/* passi con frecce e passo evidenziato */
.steps.arrows { column-gap: clamp(1rem, 2.2vw, 1.6rem); }
.steps.arrows .step:not(:last-child)::after { content: "›"; position: absolute; right: calc(-1 * clamp(1rem, 2.2vw, 1.6rem) / 2 - .25rem); top: 45%; font: 600 1.1rem/1 var(--f-cond); color: var(--red); }
.step.hl { background: #fbecec; }
.step.hl::before { background: var(--red); }
.step.hl b { color: var(--red); }
@media (max-width: 900px) { .steps.arrows .step::after { display: none; } }

/* cerchi concentrici */
.fig-cerchi { display: grid; grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 2.4rem); align-items: center; max-width: var(--wide); margin: .6rem 0 2rem; }
.fig-cerchi svg { width: 100%; height: auto; overflow: visible; }
.fig-cerchi .ring { transition: opacity .3s, transform .3s; transform-origin: 120px 120px; }
.fig-cerchi .leg ul { list-style: none; padding: 0; margin: 0; }
.fig-cerchi .leg li { display: flex; gap: .65rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid #e3e7ed; font: 400 .95rem/1.4 var(--f-ui); cursor: default; transition: color .25s; }
.fig-cerchi .leg li i { flex: none; width: 12px; height: 12px; border-radius: 50%; transform: translateY(1px); }
.fig-cerchi .leg li b { font: 700 1.05rem/1 var(--f-cond); color: var(--navy); margin-right: .2rem; }
.fig-cerchi.focus .ring { opacity: .25; }
.fig-cerchi.focus .ring.on { opacity: 1; }
.fig-cerchi.focus .leg li { color: #9aa5b3; }
.fig-cerchi.focus .leg li.on { color: var(--ink); }
@media (max-width: 560px) { .fig-cerchi { grid-template-columns: 1fr; } .fig-cerchi svg { max-width: 14rem; margin: 0 auto; } }
.step span { display: block; }

/* barre a gradini (progressione verso la zona critica) */
.fig-barre { max-width: 44rem; margin: .4rem 0 1.8rem; }
.fig-barre .bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; height: 11rem; border-bottom: 1.5px solid #b5bfcb; }
.fig-barre .bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.fig-barre .bar i { display: block; height: calc(var(--h) * 100%); background: var(--c); transform-origin: 50% 100%; }
.fig-barre .bar span { position: absolute; top: 100%; left: 0; right: .4rem; padding-top: .45rem; font: 600 .9rem/1.15 var(--f-cond); color: var(--navy); }
.fig-barre { padding-bottom: 2.6rem; }
.fig-barre .bar:last-child i { animation: none; }
.fig-barre.done .bar:last-child i { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.12); } }
.card p:empty { display: none; } .card:has(p:empty) { padding-bottom: .75rem; } .cards + ul.dots { margin-top: -.9rem; }
mark { background: none; color: var(--red); font-weight: 600; }
.sub2 { font: 600 1rem/1.3 var(--f-ui); color: var(--navy); margin: 1.4rem 0 .6rem; }
.tbl.arw td:empty, .tbl.arw th:empty { width: 2rem; }
.tbl.arw td:nth-child(3) { color: var(--red); font-weight: 700; text-align: center; }
.chapter a.xref { color: #1f5fd1; text-decoration: none; border-bottom: 1px solid rgba(31, 95, 209, .3); font-weight: 600; } .chapter a.xref:hover { border-color: #1f5fd1; }
