/* =========================================================
   Guide a stanze — blog.css
   ========================================================= */
body.page { --bg: var(--paper); }
.nav--page { color: var(--ink); }
.nav__links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }
.crumbs { display: flex; gap: .6em; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.crumbs a:hover { color: var(--ink); }

/* ---------- cover: si entra scorrendo ---------- */
.guide { position: relative; z-index: 2; --hp: 0; --sp: 0; }
.cover-runway { position: relative; height: 175svh; }
.cover { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.cover-art { display: grid; place-items: center; padding: 10vh 0 4vh; order: 2; }
.cover-art .house { width: min(100%, 72vh); height: auto; transform-origin: 48% 86%; transform: scale(calc(1 + var(--hp) * 2.2)) translateY(calc(var(--hp) * -6vh)); opacity: calc(1 - var(--hp) * 0.85); will-change: transform, opacity; }
.cover-copy { position: relative; z-index: 2; padding: 10vh 0 6vh; transform: translateY(calc(var(--hp) * -14vh)); opacity: calc(1.1 - var(--hp) * 1.6); will-change: transform, opacity; }
.js .cover-copy > * { animation: rise 1.1s var(--ease) both; }
.js .cover-copy > :nth-child(2) { animation-delay: .1s; } .js .cover-copy > :nth-child(3) { animation-delay: .22s; } .js .cover-copy > :nth-child(4) { animation-delay: .34s; } .js .cover-copy > :nth-child(5) { animation-delay: .46s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
.cover-cue { position: absolute; right: var(--gutter); bottom: 2rem; z-index: 2; display: flex; align-items: center; gap: .8rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); opacity: calc(1 - var(--hp) * 4); }
.cover-cue span { width: 44px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.cover-cue span::after { content: ""; position: absolute; left: -100%; top: 0; width: 100%; height: 100%; background: var(--ink); animation: scrollLine 2s var(--ease) infinite; }
.ghero__title { font-size: clamp(2.3rem, 4.8vw, 4.4rem); margin-top: 1rem; max-width: 18ch; }
.ghero__sub { margin-top: 1.2rem; max-width: 36rem; color: var(--ink-soft); font-size: 1.06rem; }
.ghero__stats { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.4rem; font-size: .88rem; color: var(--mute); }
.ghero__stats b { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ink); margin-right: .25em; }
.ghero__cta { display: flex; align-items: center; gap: 1rem 2.5rem; flex-wrap: wrap; margin-top: 1.8rem; }
.ghero__by { font-size: .86rem; color: var(--mute); }
.ghero__by a { color: inherit; border-bottom: 1px solid transparent; }
.ghero__by a:hover { border-color: var(--ink); }
.ghero__by img { display: inline-block; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; vertical-align: middle; margin-right: .5rem; }
.ghero__by b { color: var(--ink); font-weight: 600; }
.house { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.house__lines path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: housedraw 2.6s var(--ease) forwards; }
.house__lines path:nth-child(2) { animation-delay: .2s; } .house__lines path:nth-child(3) { animation-delay: .5s; }
.house__lines path:nth-child(4), .house__lines path:nth-child(5), .house__lines path:nth-child(6) { animation-delay: .8s; }
.house__lines path:nth-child(n+7) { animation-delay: 1.1s; }
@keyframes housedraw { to { stroke-dashoffset: 0; } }
.house__door { transform-box: fill-box; transform-origin: left center; transition: transform 1s var(--ease); stroke: var(--clay); }
.house.is-open .house__door { transform: perspective(600px) rotateY(-70deg); }
.house__roots { stroke: var(--clay); }
.house--scene .house__lines path { animation: none; stroke-dashoffset: 0; }

/* ---------- story bar ---------- */
.story-bar { position: sticky; top: 3.4rem; z-index: 45; display: flex; justify-content: space-between; align-items: center; gap: 1rem; height: 2.6rem; padding: 0 var(--gutter); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin-top: 0; }
.story-bar__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.story-bar__right { display: flex; gap: 1.6rem; white-space: nowrap; min-width: 0; }
.story-bar__right [data-bar-room] { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.story-bar__right [data-bar-room] { color: var(--ink); font-weight: 600; }
.story-bar__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--clay); transform-origin: 0 50%; transform: scaleX(var(--sp)); }

/* ---------- contents ---------- */
.contents { max-width: 44rem; margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--gutter) clamp(2rem, 6vh, 4rem); }
.contents__label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--clay); font-weight: 600; margin-bottom: 1.2rem; }
.contents ol { max-width: none; }
.contents li + li { border-top: 1px solid var(--line); }
.contents a { display: grid; grid-template-columns: 1fr; align-items: baseline; gap: .15rem 1rem; padding: 1rem 0; color: var(--ink); transition: padding-left .3s var(--ease), color .3s; }
.contents a span { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--clay); font-size: 1.1rem; }
.contents a b { font-family: var(--display); font-weight: 600; letter-spacing: -.015em; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.2; }
.contents a em { display: none; }
.contents a:hover { padding-left: .5rem; }
.contents a.is-done em::after { content: " · letta"; color: var(--clay); }
.disclaimer { width: min(44rem, calc(100% - 2 * var(--gutter))); margin: 0 auto clamp(2rem, 6vh, 4rem); padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--r); font-size: .82rem; line-height: 1.55; color: var(--mute); }
.disclaimer p + p { margin-top: .5rem; }
.disclaimer b { color: var(--ink-soft); font-weight: 600; }

/* ---------- rail: indice laterale (desktop) ---------- */
.rail { position: fixed; left: var(--gutter); top: 7.2rem; max-height: calc(100vh - 8.5rem); overflow: auto; z-index: 44; width: 15rem; font-size: .8rem; opacity: 0; pointer-events: none; transition: opacity .5s; }
.rail.show { opacity: 1; pointer-events: auto; }
.rail__title { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin: 0 0 .8rem; }
.rail__progress { display: grid; grid-template-columns: 40px 1fr; gap: .7rem; align-items: center; padding-bottom: .8rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.rail__progress b { display: block; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1rem; }
.rail__progress small { color: var(--mute); font-size: .76rem; }
.ring { width: 40px; height: 40px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--line); stroke-width: 3; }
.ring circle[data-ring] { stroke: var(--clay); stroke-dasharray: 100.5; stroke-dashoffset: 100.5; transition: stroke-dashoffset .6s var(--ease); stroke-linecap: round; }
.rail__rooms { margin: .6rem 0 1rem; border-left: 1px solid var(--line); }
.rail__rooms a { display: grid; grid-template-columns: 1fr; gap: .4rem; align-items: baseline; padding: .35rem 0 .35rem .8rem; font-weight: 500; margin-left: -1px; border-left: 1px solid transparent; color: var(--mute); transition: color .3s, border-color .3s; line-height: 1.25; }
.rail__rooms a:hover, .rail__rooms a.is-current { color: var(--ink); }
.rail__rooms a.is-current { border-left-color: var(--clay); }
.rail__rooms a.is-done { color: var(--ink-soft); }
.rail__rooms a.is-done::after { content: ""; }
.rail__rooms a i { font-style: italic; font-family: var(--display); font-weight: 500; color: var(--clay); }
.rail__author { display: grid; grid-template-columns: 36px 1fr; gap: .7rem; align-items: center; padding: .8rem 0; margin-bottom: .4rem; border-top: 1px solid var(--line); color: var(--ink); }
.rail__author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.rail__author b { display: block; font-weight: 600; font-size: .86rem; line-height: 1.2; }
.rail__author small { color: var(--mute); font-size: .74rem; }
.rail__author:hover b { text-decoration: underline; text-underline-offset: 3px; }
.rail__foot { display: flex; flex-direction: column; gap: .7rem; align-items: flex-start; }
.rail__reset { font-size: .76rem; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1180px) { .rail { display: none; } }
@media (min-width: 1181px) {
  /* la colonna di lettura non passa mai sotto l'indice laterale */
  .prose, .contents { margin-left: max(calc(var(--gutter) + 17rem), calc((100% - 44rem) / 2)); }
}

/* ---------- scene: si entra nella stanza ---------- */
.rooms { max-width: none; }
.room { position: relative; }
.scene { position: relative; height: 210svh; --p: 0; }
.scene-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; align-items: end; }
.scene-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 6vh 4vw 18vh; }
.scene-art .house { width: min(70vw, 62vh); transform-origin: var(--ox) var(--oy); will-change: transform, opacity; }
.scene[data-fx="zoom"] .scene-art .house { transform: scale(calc(1 + var(--p) * 2.4)); opacity: calc(0.95 - var(--p) * 0.75); }
.scene[data-fx="descend"] .scene-art .house { transform: scale(calc(1 + var(--p) * 1.6)) translateY(calc(var(--p) * 14vh)); opacity: calc(0.95 - var(--p) * 0.7); }
.scene[data-fx="spotlight"] .scene-art .house { transform: scale(calc(1.05 + var(--p) * 1.3)); -webkit-mask-image: radial-gradient(circle at var(--ox) var(--oy), #000 calc(var(--p) * 90%), transparent calc(var(--p) * 90% + 18%)); mask-image: radial-gradient(circle at var(--ox) var(--oy), #000 calc(var(--p) * 90%), transparent calc(var(--p) * 90% + 18%)); opacity: calc(1 - var(--p) * 0.5); }
.scene[data-fx="pan"] .scene-art .house { transform: translateX(calc((50% - var(--ox)) * var(--p) * 1.2)) scale(calc(1 + var(--p) * 1.8)); opacity: calc(0.95 - var(--p) * 0.7); }
.scene-fill { fill: var(--clay); stroke: none; opacity: calc(var(--p) * 0.45); }
.scene-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--paper); opacity: clamp(0, var(--p) * 4 - 3.1, 1); pointer-events: none; }
.scene-copy { position: relative; z-index: 3; max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--gutter) 9vh; opacity: clamp(0, 1.5 - var(--p) * 2.4, 1); transform: translateY(calc(var(--p) * -9vh)); }
.scene-copy::before { content: ""; position: absolute; inset: -40% 0 0; z-index: -1; background: linear-gradient(to top, var(--paper) 50%, transparent); pointer-events: none; }
.room__label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 600; margin: 0; }
.room__label span { color: var(--clay); margin-right: .6em; font-family: var(--display); font-style: italic; font-size: 1rem; letter-spacing: 0; text-transform: none; }
.scene-copy h2 { font-size: clamp(2rem, 5vw, 4.2rem); max-width: 18ch; margin-top: .8rem; }
.room__why { margin-top: 1rem; color: var(--ink-soft); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 34rem; font-style: italic; font-family: var(--display); }

/* ---------- prose ---------- */
.prose { max-width: 44rem; margin: 0 auto; padding: 6vh var(--gutter) 2vh; }
.prose--cta { padding-top: 0; padding-bottom: 8vh; }
.qs { display: grid; gap: clamp(2.2rem, 4vw, 3.4rem); }
.q { font-size: clamp(1.08rem, 1.25vw, 1.2rem); line-height: 1.68; color: var(--ink); }
.js .q > * { opacity: .25; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.js .q.in > * { opacity: 1; transform: none; }
.q__t { font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .7rem; }
.q__t::before { content: ""; display: block; width: 28px; height: 1.5px; background: var(--clay); margin-bottom: .8rem; }
.q__short { margin: 0; }
.q__short b { font-weight: 600; }
.q__more { margin-top: .8rem; color: var(--ink-soft); font-size: .96em; }
.q__more p { margin: 0 0 .6em; }
.term { font: inherit; color: var(--ink); border-bottom: 1.5px dotted var(--clay); position: relative; cursor: help; }
.term.is-on { background: color-mix(in srgb, var(--clay) 18%, transparent); border-radius: 3px; }
.term__pop { position: absolute; left: 0; top: calc(100% + .4rem); z-index: 5; width: min(22rem, 80vw); padding: .8rem 1rem; background: var(--ink); color: var(--paper); font-size: .86rem; line-height: 1.5; border-radius: 10px; text-align: left; font-weight: 400; box-shadow: 0 20px 40px -20px rgba(0,0,0,.4); }

.refs { display: grid; gap: .5rem; margin-top: 1.1rem; }
.ref { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; align-items: baseline; padding: .65rem .9rem; border-radius: 10px; border: 1px solid var(--line); font-size: .88rem; transition: border-color .3s, transform .4s var(--ease), background .3s; }
.ref:hover { border-color: var(--ink); background: var(--paper-2); transform: translateX(3px); }
.ref i { font-style: normal; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; padding: .2em .5em; border-radius: 4px; color: var(--paper); background: var(--ink); grid-row: 1 / span 2; align-self: start; }
.ref--video i { background: var(--clay); } .ref--libro i { background: var(--ink-soft); } .ref--articolo i { background: #4C6C8C; } .ref--guida i { background: var(--clay); }
.ref span { font-weight: 500; color: var(--ink); }
.ref small { color: var(--mute); }

/* video */
.watch { margin: .4rem 0 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper-2); }
.watch__play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); }
.watch__play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .8s var(--ease), opacity .4s; }
.watch__play:hover img { transform: scale(1.04); opacity: 1; }
.watch__btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: .6em; padding: .7em 1.2em; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: .9rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.watch__btn i { width: 0; height: 0; border-left: 10px solid var(--clay); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.watch iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.watch figcaption { padding: .9rem 1rem 1rem; font-size: .88rem; display: grid; gap: .25rem; }
.watch figcaption b { font-weight: 600; color: var(--ink); }
.watch__ch { color: var(--mute); }
.watch__note { font-size: .74rem; color: var(--mute); }
.watch__sum { justify-self: start; margin-top: .3rem; font-size: .8rem; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.watch__text { margin: .4rem 0 0; color: var(--ink-soft); line-height: 1.55; }

/* ---------- beat: una frase che si accende ---------- */
.beat { position: relative; height: 150svh; }
.beat-stage { position: sticky; top: 0; height: 100svh; display: grid; place-content: center; padding: 0 var(--gutter); text-align: center; }
.beat-text { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: clamp(1.7rem, 4.2vw, 3.6rem); line-height: 1.12; max-width: 20ch; margin: 0 auto; text-wrap: balance; color: var(--ink); }
.beat-text .w { transition: opacity .35s ease; }
.js .beat-text .w { opacity: .14; }
.js .beat-text .w.on { opacity: 1; }
.room__cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin: 0; padding: 1rem 1.2rem; border-radius: 14px; background: var(--paper-2); font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; }

/* ---------- resume ---------- */
.resume { position: fixed; left: 50%; bottom: 1.4rem; z-index: 60; display: flex; align-items: stretch; transform: translate(-50%, 20px); opacity: 0; transition: opacity .4s, transform .4s var(--ease); box-shadow: 0 18px 50px -20px rgba(0,0,0,.5); border-radius: 14px; overflow: hidden; }
.resume.show { opacity: 1; transform: translate(-50%, 0); }
.resume[hidden] { display: none; }
.resume__btn { display: flex; flex-direction: column; gap: .15rem; text-align: left; background: var(--ink); color: var(--paper); padding: .7rem 1.1rem; }
.resume__k { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clay-soft); }
.resume__v { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.resume__x { background: var(--night-2); color: var(--paper); padding: 0 .9rem; font-size: 1.2rem; }

/* ---------- widgets ---------- */
.widget { margin-top: 1rem; padding: 1rem 1.1rem 1.1rem; border-radius: 14px; background: var(--paper); border: 1px dashed var(--line); }
.widget__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--mute); margin-bottom: .6rem; }
.widget__hint { margin: 0 0 .7rem; font-size: .82rem; color: var(--mute); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { padding: .35em .9em; border-radius: 999px; font-size: .82rem; font-weight: 500; color: var(--mute); transition: background .3s, color .3s; }
.seg button.is-on { background: var(--ink); color: var(--paper); }
.cz { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cz text { stroke: none; fill: var(--ink); font-family: var(--display); font-weight: 500; font-size: 15px; }
.cz__cap { font-size: 12px !important; fill: var(--mute) !important; font-style: italic; font-weight: 400 !important; }
.cz__a1, .cz__a1h, .cz__a2, .cz__a2h { stroke: var(--clay); transition: opacity .5s, stroke-dashoffset .8s var(--ease); }
.cz__a2, .cz__a2h { opacity: 0; }
.cz__cap--circ { opacity: 0; }
[data-causality].is-circ .cz__a2, [data-causality].is-circ .cz__a2h { opacity: 1; }
[data-causality].is-circ .cz__cap--lin { opacity: 0; } [data-causality].is-circ .cz__cap--circ { opacity: 1; }
[data-causality].is-circ .cz__box rect { stroke: var(--clay); }
.flip { display: grid; gap: .6rem; }
.flip__card { text-align: left; padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-2); font-size: .95rem; line-height: 1.45; position: relative; transition: background .4s, border-color .4s; }
.flip__card::before { content: "Domanda normale"; display: block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-bottom: .3rem; }
.flip__card.is-circ { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flip__card.is-circ::before { content: "Domanda circolare"; color: var(--clay-soft); }
.geno { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.geno__rel { stroke: var(--clay); stroke-width: 4; opacity: .55; cursor: pointer; transition: opacity .3s, stroke-width .3s; }
.geno__rel--cut { stroke-width: 2; stroke-dasharray: 4 6; stroke: var(--mute); }
.geno__rel--conf { stroke-width: 2; }
.geno__rel.is-on { opacity: 1; stroke-width: 5; }
.geno__rel--cut.is-on, .geno__rel--conf.is-on { stroke-width: 3; stroke: var(--clay); }
.geno__legend { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.geno__legend button { padding: .4em .9em; border-radius: 999px; border: 1px solid var(--line); font-size: .82rem; font-weight: 500; transition: background .3s, color .3s; }
.geno__legend button.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.geno__text { margin: .8rem 0 0; font-size: .92rem; color: var(--ink-soft); min-height: 2.8em; }
.signals { display: flex; flex-wrap: wrap; gap: .5rem; }
.signals label { display: inline-flex; align-items: center; gap: .45em; padding: .45em .9em; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.signals label:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.signals input { appearance: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; margin: 0; }
.signals input:checked { background: var(--clay); border-color: var(--clay); }
.signals__out { margin: .9rem 0 0; font-size: .95rem; color: var(--ink); padding: .9rem 1rem; border-radius: 10px; background: var(--paper-2); }
.signals__out b { font-family: var(--display); font-weight: 600; }
.quiz { display: grid; gap: .8rem; margin-top: 1rem; }
.quiz fieldset { border: 0; padding: 1rem 1.1rem; margin: 0; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); }
.quiz legend { float: left; width: 100%; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin-bottom: .6rem; line-height: 1.35; font-size: .98rem; }
.quiz label { display: inline-flex; align-items: center; gap: .5em; margin: 0 .6rem .4rem 0; padding: .4em .85em; border: 1px solid var(--line); border-radius: 999px; font-size: .86rem; cursor: pointer; transition: background .3s, border-color .3s, color .3s; }
.quiz label:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.quiz input { appearance: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; margin: 0; }
.quiz input:checked { background: var(--clay); border-color: var(--clay); }
.quiz__result { padding: 1.2rem 1.4rem; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: .98rem; line-height: 1.55; }
.quiz__result b { display: block; font-family: var(--display); font-size: 1.2rem; margin-bottom: .4rem; letter-spacing: -.015em; }
.quiz__result a { color: var(--clay-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- end ---------- */
.gend { max-width: var(--max); margin: clamp(3rem, 7vw, 6rem) auto clamp(4rem, 8vw, 7rem); padding: 0 var(--gutter); }
.gend__card { display: grid; grid-template-columns: 96px 1fr; gap: 2rem; align-items: center; background: var(--sand); border-radius: calc(var(--r) * 1.3); padding: clamp(1.6rem, 4vw, 3rem); }
.gend__card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.gend__card h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.gend__card p { margin-top: .8rem; color: var(--ink-soft); max-width: 46rem; }
.gend__cta { display: flex; align-items: center; gap: 1.2rem 2rem; flex-wrap: wrap; margin-top: 1.4rem; }
.gend__note { margin-top: 1.4rem; font-size: .82rem; color: var(--mute); max-width: 46rem; }

/* ---------- mobile bar ---------- */

/* ---------- blog index ---------- */
.bindex { position: relative; z-index: 2; max-width: var(--max); margin-inline: auto; padding: 7.5rem var(--gutter) clamp(4rem, 8vw, 7rem); }
.bindex__head { max-width: 46rem; padding-bottom: clamp(2rem, 4vw, 3rem); }
.bindex__head h1 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); margin-top: 1rem; }
.bindex__head p { margin-top: 1.4rem; color: var(--ink-soft); font-size: 1.08rem; max-width: 38rem; }
.grows { border-top: 1px solid var(--line); }
.grow { display: grid; grid-template-columns: 3.5rem 1fr 2.5rem; gap: 1.5rem; align-items: center; padding: clamp(1.6rem, 3vw, 2.4rem) 0; border-bottom: 1px solid var(--line); position: relative; }
.grow::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); z-index: -1; background: var(--sand); opacity: 0; transition: opacity .4s; }
.grow:hover::before { opacity: 1; }
.grow__n { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--clay); font-size: 1.1rem; }
.grow h2 { font-size: clamp(1.5rem, 2.8vw, 2.4rem); max-width: 24ch; transition: transform .5s var(--ease); }
.grow:hover h2 { transform: translateX(.25em); }
.grow p { margin-top: .6rem; color: var(--ink-soft); max-width: 40rem; }
.grow__meta { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: .9rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.grow__meta [data-row-progress] { color: var(--clay); font-weight: 600; }
.grow__arrow { width: 24px; height: 24px; color: var(--clay); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.grow:hover .grow__arrow { transform: translateX(6px); }

/* ---------- home teaser ---------- */
.blogteaser .grows { max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .cover-runway { height: 150svh; }
  .cover { grid-template-columns: 1fr; align-items: end; }
  .cover-art { position: absolute; inset: 0; padding: 9vh 6vw 38vh; order: 0; }
  .cover-art .house { width: min(84vw, 40vh); }
  .cover-copy { padding-bottom: 7svh; }
  .cover-copy::before { content: ""; position: absolute; inset: -30% -6vw 0; z-index: -1; background: linear-gradient(to top, var(--paper) 55%, transparent); pointer-events: none; }
  .story-bar { top: 3rem; }
  .ghero__title { font-size: clamp(2rem, 8.5vw, 3rem); }
  .cover-cue { display: none; }
  .story-bar { font-size: .66rem; }
  .story-bar__right { gap: 1rem; }
  .scene { height: 180svh; }
  .scene-art { padding: 6vh 2vw 36vh; }
  .scene-art .house { width: min(84vw, 40vh); }
  .scene-copy h2 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .beat { height: 120svh; }
  .gend__card { grid-template-columns: 1fr; justify-items: start; }
  .grow { grid-template-columns: 1fr; }
  .grow__n, .grow__arrow { display: none; }
  .resume { left: 1rem; right: 1rem; transform: translate(0, 20px); }
  .resume.show { transform: none; }
  .resume__btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-runway, .scene, .beat { height: auto; }
  .cover, .scene-stage, .beat-stage { position: static; height: auto; }
  .cover-art, .scene-art { position: relative; padding: 2rem 0; }
  .cover-art .house, .scene-art .house { transform: none !important; opacity: 1 !important; mask-image: none !important; -webkit-mask-image: none !important; }
  .scene-stage::after { display: none; }
  .scene-copy, .cover-copy { opacity: 1 !important; transform: none !important; }
  .js .beat-text .w, .js .q > * { opacity: 1; transform: none; }
}

/* =========================================================
   Guida a percorso (route): niente casa, un tragitto che si disegna scendendo
   ========================================================= */
.art { width: 100%; height: auto; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.art .acc { stroke: var(--clay); }
.art text { fill: var(--mute); stroke: none; font-family: var(--display); font-style: italic; font-size: 15px; }
.art [pathLength] { stroke-dasharray: 1 1; }
/* copertina: disegno all'arrivo, tracciato e pallino guidati dallo scroll */
.cover-art .art { width: min(100%, 76vh); transform-origin: 50% 60%; transform: scale(calc(1 + var(--hp) * .35)); opacity: calc(1 - var(--hp) * .8); will-change: transform, opacity; }
.cover-art .art [pathLength] { stroke-dashoffset: 1; animation: artdraw 2.4s var(--ease) .2s forwards; }
.cover-art .art text { opacity: 0; animation: fadein 1s ease 1.6s forwards; }
@keyframes artdraw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
.art .trace { stroke: var(--clay); stroke-width: 2.2; }
.art .traveler { fill: var(--clay); stroke: var(--paper); stroke-width: 3; }
/* scene: le linee si disegnano mentre scendi */
.scene-art .art { width: min(78vw, 64vh); will-change: transform, opacity; }
.scene[data-fx="draw"] .scene-art .art { transform: scale(calc(1 + var(--p) * .3)); opacity: calc(1.15 - var(--p) * .9); }
.scene[data-fx="split"] .scene-art .art { transform: scale(calc(1 + var(--p) * .2)); opacity: calc(1.15 - var(--p) * .9); }
.scene .scene-art .art [pathLength] { stroke-dashoffset: max(0, 1 - var(--p) * 2.6); }
.scene .scene-art .art text { opacity: clamp(0, var(--p) * 4 - .8, 1); }
.split-a { transform: translateX(calc(max(0, 1 - var(--p) * 2.2) * 70px)); }
.split-b { transform: translateX(calc(max(0, 1 - var(--p) * 2.2) * -70px)); }
/* tra una tappa e l'altra: si scende lungo la linea */
.hop { display: grid; justify-items: center; gap: 1rem; padding: 4vh var(--gutter) 2vh; }
.hop__line { position: relative; width: 2px; height: 22vh; background: repeating-linear-gradient(to bottom, var(--line) 0 6px, transparent 6px 12px); }
.hop__line::before { content: ""; position: absolute; inset: 0; background: var(--clay); transform-origin: top; transform: scaleY(0); transition: transform 1.6s var(--ease); }
.hop__line::after { content: ""; position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--clay); box-shadow: 0 0 0 4px var(--paper); transition: top 1.6s var(--ease); }
.hop.in .hop__line::before { transform: scaleY(1); }
.hop.in .hop__line::after { top: calc(100% - 12px); }
.hop p { margin: 0; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
/* indice laterale come una linea con le fermate */
.route-guide .rail__rooms { position: relative; border-left: 0; }
.route-guide .rail__rooms::before { content: ""; position: absolute; left: 5px; top: .9rem; bottom: .9rem; width: 2px; background: var(--line); }
.route-guide .rail__rooms a { position: relative; padding-left: 1.5rem; border-left: 0; margin-left: 0; }
.route-guide .rail__rooms a::before { content: ""; position: absolute; left: 0; top: .62rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); box-sizing: border-box; transition: border-color .3s, background .3s, box-shadow .3s; }
.route-guide .rail__rooms a.is-done::before { background: var(--clay); border-color: var(--clay); }
.route-guide .rail__rooms a.is-current::before { border-color: var(--clay); box-shadow: 0 0 0 4px color-mix(in srgb, var(--clay) 22%, transparent); }
/* widget: confronto, tragitto */
.cmp__tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.cmp__tabs button { padding: .4em .9em; border-radius: 999px; border: 1px solid var(--line); font-size: .84rem; font-weight: 500; transition: background .3s, color .3s, border-color .3s; }
.cmp__tabs button.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cmp__pane { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.cmp__pane[hidden] { display: none; }
.cmp__c { padding: .8rem .9rem; border-radius: 12px; background: var(--paper-2); font-size: .88rem; line-height: 1.45; }
.cmp__c b { display: block; font-family: var(--display); font-weight: 600; font-size: 1rem; }
.cmp__c p { margin: .4rem 0 0; color: var(--ink-soft); }
.cmp__m { display: flex; gap: 4px; margin-top: .45rem; }
.cmp__m i { width: 22px; height: 5px; border-radius: 3px; background: var(--line); }
.cmp__m i:nth-child(-n + 1) { background: var(--clay); }
.cmp__m[style*="--n:2"] i:nth-child(-n + 2), .cmp__m[style*="--n:3"] i { background: var(--clay); }
.range { display: grid; gap: .35rem; margin-bottom: .8rem; font-size: .92rem; }
.range b { font-family: var(--display); font-size: 1.1rem; }
.range input { width: 100%; accent-color: var(--clay); }
.commute__out { margin: .2rem 0 0; padding: .9rem 1rem; border-radius: 10px; background: var(--paper-2); font-size: .95rem; }
.commute__out b { font-family: var(--display); font-weight: 600; }
@media (max-width: 860px) {
  .scene-art .art { width: min(90vw, 44vh); }
  .cover-art .art { width: min(90vw, 42vh); }
  .cmp__pane { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .art [pathLength] { stroke-dashoffset: 0 !important; animation: none !important; }
  .art text { opacity: 1 !important; animation: none !important; }
  .cover-art .art, .scene-art .art { transform: none !important; opacity: 1 !important; }
  .split-a, .split-b { transform: none !important; }
  .hop__line::before { transform: none; } .hop__line::after { top: calc(100% - 12px); }
}
