/* La Guida del Tempio: pagine di lettura. Si carica DOPO tempio.css.
   Stesso mondo: basalto e marmo, tessera da 8px, oro come unico accento.
   Modo «Read»: colonna di 68 caratteri, indice a lato, niente ombre. */

:root { --mare: #5e9bb0; --salvia-chiaro: #8fa36b; --colonna: 68ch; }

/* ---------- testata della pagina ---------- */
.guida-testa { padding: clamp(28px, 4.5vw, 64px) clamp(16px, 4vw, 48px) clamp(36px, 5vw, 64px); }
.guida-testa-in { max-width: var(--larghezza); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(20px, 4vw, 56px); align-items: end; }
.briciole { max-width: var(--larghezza); margin: 0 auto 24px; }
.briciole ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .95rem; letter-spacing: .04em; color: var(--fumo); }
.briciole li + li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--oro); transform: rotate(45deg); margin: 0 12px 2px; }
.briciole a { color: var(--fumo); text-decoration-color: var(--oro-scuro); }
.briciole a:hover { color: var(--marmo); }
.briciole [aria-current] { color: var(--oro-chiaro); }
.guida-testa h1 { font-size: clamp(1.9rem, 1.15rem + 2.8vw, 3.4rem); max-width: 18ch; }
.guida-lead { margin-top: 18px; color: var(--fumo); font-size: 1.2em; max-width: 58ch; }
.tess-box { background: var(--basalto); padding: 10px; width: clamp(88px, 13vw, 140px); box-shadow: 0 0 0 2px var(--oro); flex: none; }
.tess { display: block; width: 100%; height: auto; }
.tess .t { fill: var(--oro); }
.tess .r { fill: var(--pompei-chiaro); }

/* ---------- corpo: indice + colonna di lettura ---------- */
.guida-corpo {
  background-color: var(--marmo); color: var(--marmo-ink); background-image: var(--pavimento-chiaro);
  padding: clamp(40px, 6vw, 88px) clamp(16px, 4vw, 48px) clamp(56px, 7vw, 104px);
  --c-fila: var(--marmo-2);
}
.guida-griglia { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.indice { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
.indice summary { list-style: none; cursor: default; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem; padding: 0 0 14px; background: var(--fila) bottom left / 100% 6px no-repeat; --c-fila: var(--marmo-ink); }
.indice summary::-webkit-details-marker { display: none; }
.indice ol { list-style: none; margin: 0; padding: 14px 0 0; display: grid; gap: 2px; counter-reset: voce; }
.indice li { counter-increment: voce; }
.indice a { display: flex; gap: 12px; align-items: baseline; text-decoration: none; padding: 7px 0 7px 12px; border-left: 4px solid var(--marmo-2); font-size: 1rem; line-height: 1.3; color: var(--marmo-muto); transition: color .2s, border-color .2s; }
.indice a:hover { color: var(--marmo-ink); border-color: var(--oro-scuro); }
.indice a[aria-current="true"] { color: var(--marmo-ink); font-weight: 700; border-color: var(--oro-scuro); }

.articolo { min-width: 0; max-width: var(--colonna); font-size: clamp(1.1rem, 1.02rem + .3vw, 1.22rem); line-height: 1.65; }
.articolo > * + * { margin-top: 1.1em; }
.articolo h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin-top: 2.6em; padding-top: 22px; background: var(--fila) top left / 64px 6px no-repeat; --c-fila: var(--oro-scuro); scroll-margin-top: 96px; }
.articolo h2:first-child, .articolo .inbreve + h2 { margin-top: 1.8em; }
.articolo h3 { font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); margin-top: 1.9em; text-transform: none; letter-spacing: .01em; }
.articolo h2 + *, .articolo h3 + * { margin-top: .8em; }
.articolo ul, .articolo ol { padding-left: 0; list-style: none; display: grid; gap: .5em; }
.articolo ul li, .articolo ol.num-lista li { position: relative; padding-left: 26px; }
.articolo ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; background: var(--oro-scuro); transform: rotate(45deg); }
.articolo ol.num-lista { counter-reset: p; }
.articolo ol.num-lista li { counter-increment: p; padding-left: 40px; }
.articolo ol.num-lista li::before { content: counter(p); position: absolute; left: 0; top: .1em; width: 28px; height: 28px; display: grid; place-items: center; background: var(--basalto); color: var(--oro-chiaro); font-family: var(--mono); font-weight: 600; font-size: .9rem; border-radius: 2px; }
.articolo a { text-decoration-color: var(--oro-scuro); text-decoration-thickness: 2px; font-weight: 500; }
.articolo a:hover { background: rgba(200, 160, 72, .22); }
.articolo strong { font-weight: 700; }
.articolo em { font-style: italic; }
.articolo .termine { font-style: italic; white-space: nowrap; }

/* «in breve»: il riassunto che si può citare */
.inbreve { background: var(--basalto); color: var(--marmo); border-top: var(--t) solid var(--oro); padding: clamp(18px, 2.4vw, 28px); font-size: 1.02rem; line-height: 1.55; }
.inbreve h2, .inbreve p.titolo { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 1.1rem; color: var(--oro-chiaro); margin: 0 0 12px; padding: 0; background: none; }
.inbreve ul { gap: .6em; }
.inbreve ul li::before { background: var(--oro); }

/* avvertenze e controindicazioni: una lastra con cornice piena, mai rossa */
.attenzione { border: 2px solid var(--marmo-ink); background: rgba(255, 255, 255, .62); padding: clamp(16px, 2.2vw, 24px) clamp(16px, 2.4vw, 28px); font-size: 1.02rem; line-height: 1.55; position: relative; }
.attenzione::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--t); background: repeating-linear-gradient(180deg, var(--marmo-ink) 0 6px, transparent 6px 8px); }
.attenzione { padding-left: calc(var(--t) + clamp(16px, 2.4vw, 28px)); }
.attenzione .titolo { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem; margin: 0 0 8px; }
.attenzione ul { gap: .4em; }
.avvertenza-medico { font-size: .98rem; color: var(--marmo-muto); padding-top: 18px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--marmo-2); margin-top: 2.4em !important; }

/* foto del centro: cornice d'oro, mai a tutto schermo */
.foto { margin: 1.8em 0 !important; max-width: 420px; }
.foto img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 2px solid var(--marmo-ink); border-top: var(--t) solid var(--oro); background: var(--basalto); }
.foto figcaption { font-size: .92rem; color: var(--marmo-muto); margin-top: 8px; letter-spacing: .02em; }
.foto-larga { max-width: 560px; }
.foto-larga img { aspect-ratio: 4 / 3; }

/* confronto: tessere affiancate per distinguere i tipi */
.confronto { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1.4em 0 !important; padding: 0 !important; }
.confronto > div { background: #fff; border: 2px solid var(--marmo-ink); padding: 16px 18px 18px; font-size: 1.02rem; line-height: 1.5; }
.confronto > div.scuro { background: var(--basalto); color: var(--marmo); border-color: var(--basalto); }
.confronto dt { font-family: var(--display); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.confronto .scuro dt { color: var(--oro-chiaro); }
.confronto .caldo dt { color: var(--pompei); }
.confronto dd { margin: 0; }
.confronto dd + dd { margin-top: 6px; }
.confronto .et { display: block; font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--marmo-muto); }
.confronto .scuro .et { color: var(--fumo); }
.articolo .confronto { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* tappe numerate (percorso, seduta) */
.passi { display: grid; gap: 0; margin: 1.4em 0 !important; padding: 0 !important; counter-reset: passo; }
.passi li { padding: 18px 0 18px 64px !important; position: relative; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--marmo-2); counter-increment: passo; }
.passi li::before { content: counter(passo) !important; position: absolute; left: 0 !important; top: 16px !important; width: 44px !important; height: 44px !important; display: grid; place-items: center; transform: none !important; background: var(--basalto) !important; color: var(--oro-chiaro); font-family: var(--mono); font-weight: 600; font-size: 1.1rem; border-radius: 2px; box-shadow: 0 0 0 2px var(--oro); }
.passi li.caldo::before { background: var(--pompei) !important; color: #fff; box-shadow: 0 0 0 2px var(--marmo-ink); }
.passi strong { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; }
.passi .clima { font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--marmo-muto); margin-left: 10px; vertical-align: middle; }
.passi li.caldo .clima { color: var(--pompei); }

/* domande frequenti */
.faq { margin-top: 1em; }
.faq details { background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--marmo-2); padding-top: 6px; }
.faq details:last-child { background-image: var(--fila), var(--fila); background-position: top left, bottom left; background-size: 100% 6px, 100% 6px; background-repeat: no-repeat; padding-bottom: 6px; }
.faq summary { cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: flex-start; font-weight: 700; padding: 14px 0; min-height: 52px; font-size: 1.08em; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: .45em; background: var(--marmo-ink); transition: transform .2s, background .2s; }
.faq details[open] summary::before { background: var(--oro-scuro); transform: rotate(45deg); }
.faq summary:hover { color: var(--oro-scuro); }
.faq details > div { padding: 0 0 18px 24px; max-width: 62ch; }
.faq details > div > * + * { margin-top: .7em; }

/* ---------- fine pagina: prenota + continua a leggere ---------- */
.guida-fine { padding: clamp(48px, 6vw, 88px) clamp(16px, 4vw, 48px); }
.guida-fine-in { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.guida-fine h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); }
.guida-fine p { color: var(--fumo); margin-top: 12px; max-width: 46ch; }
.guida-fine .azioni { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.guida-fine .azioni a { flex: 1 1 200px; }
.guida-fine h3 { font-size: 1.25rem; color: var(--oro-chiaro); text-transform: uppercase; letter-spacing: .08em; }
.altre { list-style: none; margin: 14px 0 0; padding: 0; }
.altre li { background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--basalto-3); }
.altre a { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 52px; padding: 14px 0; text-decoration: none; font-family: var(--display); font-size: 1.2rem; letter-spacing: .03em; }
.altre a::after { content: ""; width: 8px; height: 8px; background: var(--oro); transform: rotate(45deg); flex: none; transition: transform .2s; }
.altre a:hover { color: var(--oro-chiaro); }
.altre a:hover::after { transform: rotate(45deg) scale(1.5); }
.altre small { display: block; font-family: var(--testo); font-size: .9rem; color: var(--fumo); letter-spacing: 0; margin-top: 2px; }
.guida-nota { max-width: 1060px; margin: clamp(28px, 4vw, 48px) auto 0; padding-top: 18px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--basalto-3); font-size: .95rem; color: var(--fumo); }

/* ---------- indice della guida ---------- */
.argomenti { list-style: none; margin: 0 auto; padding: 0; max-width: 1060px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 5vw, 72px); }
.argomenti li { background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--marmo-2); }
.argomenti a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: center; padding: 24px 0 22px; text-decoration: none; color: var(--marmo-ink); }
.argomenti .tess-box { width: 72px; padding: 6px; box-shadow: 0 0 0 2px var(--basalto); transition: box-shadow .2s; }
.argomenti a:hover .tess-box, .argomenti a:focus-visible .tess-box { box-shadow: 0 0 0 2px var(--oro), 0 0 0 4px var(--basalto); }
.argomenti h2, .argomenti h3 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.7rem); letter-spacing: .04em; text-transform: uppercase; }
.argomenti p { margin-top: 4px; color: var(--marmo-muto); font-size: 1.02rem; line-height: 1.45; }
.argomenti a:hover h2, .argomenti a:hover h3 { text-decoration: underline; text-decoration-color: var(--oro-scuro); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.guida-intro { max-width: 1060px; margin: 0 auto clamp(32px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
.guida-intro h2 { font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.5rem); }
.guida-intro p { color: var(--marmo-muto); font-size: 1.1em; max-width: 50ch; }
.guida-domande { max-width: var(--colonna); margin: clamp(48px, 6vw, 88px) auto 0; }
.guida-domande h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); margin-bottom: 18px; }
.guida-domande .foto { margin-left: 0; }

/* ---------- strumento: il Piatto del Tempio e i tre dosha ---------- */
.strumento { background: var(--basalto-2); color: var(--marmo); border: var(--t) solid var(--oro); padding: clamp(18px, 3vw, 32px); margin: 2.4em 0 !important; font-size: 1.05rem; line-height: 1.55; }
.strumento h2 { margin: 0 !important; padding: 0 !important; background: none !important; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); color: var(--oro-chiaro); }
.strumento > p { color: var(--fumo); margin-top: .6em; }
.strumento .articolo-sotto { color: var(--fumo); }
.scegli { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; padding: 0; border: 0; }
.scegli legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; color: var(--fumo); }
.scegli button {
  font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.2; cursor: pointer; color: var(--marmo);
  background: transparent; border: 2px solid var(--oro); border-radius: 2px; padding: 8px 14px; min-height: 46px;
  display: inline-flex; align-items: center; gap: 10px; transition: background .18s, color .18s;
}
.scegli button::before { content: ""; width: 8px; height: 8px; background: var(--oro); flex: none; transition: transform .18s, background .18s; }
.scegli button:hover { background: var(--basalto-3); }
.scegli button[aria-pressed="true"] { background: var(--oro); color: var(--basalto); }
.scegli button[aria-pressed="true"]::before { background: var(--basalto); transform: rotate(45deg); }

.momento { margin-top: 20px; padding-top: 20px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--basalto-3); }
.momento[hidden] { display: none; }
.momento h3 { font-size: clamp(1.3rem, 1.05rem + .9vw, 1.8rem); color: var(--marmo); margin: 0 0 4px !important; text-transform: uppercase; letter-spacing: .04em; }
.momento .quando { color: var(--oro-chiaro); font-weight: 700; margin: 0 0 14px !important; }
.momento-corpo { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.piatto { width: 188px; }
.piatto svg { display: block; width: 100%; height: auto; }
.piatto rect { transform-box: fill-box; transform-origin: center; animation: posa .5s cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes posa { from { opacity: 0; transform: scale(.2); } }
.legenda { list-style: none; margin: 14px 0 0 !important; padding: 0 !important; display: grid; gap: 6px !important; font-size: .95rem; }
.legenda li { padding-left: 0 !important; display: flex; align-items: center; gap: 10px; }
.legenda li::before { content: none !important; }
.legenda i { width: 12px; height: 12px; flex: none; background: var(--c); }
.legenda .num { margin-left: auto; color: var(--fumo); font-size: .9rem; }
.momento-testo h4 { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--oro-chiaro); margin: 0 0 8px; }
.momento-testo h4:not(:first-child) { margin-top: 18px; }
.momento-testo ul { margin: 0 !important; gap: .4em !important; }
.momento-testo ul li::before { background: var(--oro) !important; }
.momento-testo ul.evita li::before { background: var(--fumo) !important; border-radius: 0; }
.momento-testo ul.evita { color: var(--marmo); }
.momento-testo p { margin: 0 !important; }
.strumento a { color: var(--oro-chiaro); }
.strumento .nota-piatto { margin-top: 20px; padding-top: 16px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--basalto-3); font-size: .95rem; color: var(--fumo); }

.dosha-box { margin-top: 20px; padding-top: 20px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--basalto-3); }
.dosha-box[hidden] { display: none; }
.dosha-box h3 { color: var(--marmo); font-size: clamp(1.3rem, 1.05rem + .9vw, 1.8rem); margin: 0 0 4px !important; text-transform: uppercase; letter-spacing: .04em; }
.dosha-box .elem { color: var(--oro-chiaro); font-weight: 700; margin: 0 0 12px !important; }
.dosha-box .colonne { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 16px; }
.dosha-box h4 { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: var(--oro-chiaro); margin: 0 0 8px; }
.dosha-box ul { margin: 0 !important; gap: .4em !important; }
.dosha-box ul li::before { background: var(--oro) !important; }
.dosha-box p { margin: 0 !important; }
.quiz { margin-top: 26px; padding-top: 22px; background: var(--fila) top left / 100% 6px no-repeat; --c-fila: var(--oro); }
.quiz h3 { font-size: 1.3rem; color: var(--marmo); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px !important; }
.quiz > p { color: var(--fumo); margin: 0 0 10px !important; }
.quiz fieldset { border: 0; margin: 18px 0 0; padding: 0; min-width: 0; }
.quiz legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.quiz .opz { display: grid; gap: 6px; }
.quiz label { position: relative; cursor: pointer; display: block; }
.quiz input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.quiz label span { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; min-height: 46px; border: 2px solid var(--basalto-3); border-radius: 2px; line-height: 1.3; transition: background .15s, border-color .15s; }
.quiz label span::before { content: ""; width: 8px; height: 8px; background: var(--fumo); flex: none; align-self: center; transition: transform .15s, background .15s; }
.quiz label:hover span { border-color: var(--oro-scuro); }
.quiz input:checked + span { border-color: var(--oro); background: var(--basalto-3); }
.quiz input:checked + span::before { background: var(--oro); transform: rotate(45deg); }
.quiz input:focus-visible + span { outline: 3px solid var(--oro); outline-offset: 2px; }
.quiz .bottone-oro { margin-top: 22px; }
.esito { margin-top: 16px; font-weight: 700; color: var(--oro-chiaro); min-height: 1.5em; }

/* ---------- adattamento ---------- */
@media (max-width: 1000px) {
  .guida-griglia { grid-template-columns: 1fr; gap: 28px; }
  .indice { position: static; max-height: none; border: 2px solid var(--marmo-ink); background: rgba(255, 255, 255, .62); }
  .indice summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; min-height: 52px; background: none; }
  .indice summary::after { content: ""; width: 8px; height: 8px; background: var(--marmo-ink); transform: rotate(45deg); transition: transform .2s; }
  .indice[open] summary::after { transform: rotate(225deg); }
  .indice ol { padding: 0 16px 14px; }
  .guida-fine-in { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .guida-testa-in { grid-template-columns: 1fr; align-items: start; }
  .tess-box { width: 84px; order: -1; }
  .confronto, .articolo .confronto { grid-template-columns: 1fr; }
  .argomenti { grid-template-columns: 1fr; }
  .guida-intro { grid-template-columns: 1fr; align-items: start; }
  .momento-corpo { grid-template-columns: 1fr; }
  .piatto { width: min(220px, 70%); }
  .dosha-box .colonne { grid-template-columns: 1fr; }
  .passi li { padding-left: 56px !important; }
  .scegli button { flex: 1 1 calc(50% - 8px); }
  .guida-fine .azioni a { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .piatto rect { animation: none; }
}
