/* ═══════════════════════════════════════════════════════════
   manuale.css — "chrome" delle pagine del Manuale (/manuale/...):
   layout con sidebar, foglio di carta strappata, header parallasse,
   titolo hero, briciole, indice della pagina (TOC), area annunci.

   RICHIEDE base.css (palette/font) e tdl.css (layout comune).
   Il CSS del CONTENUTO degli articoli è in articolo.css (condiviso con
   l'editor TinyMCE del DM Screen).
═══════════════════════════════════════════════════════════ */

:root {
    --side-w: 290px;         /* sidebar aperta */
    --side-w-min: 60px;      /* sidebar chiusa (solo icone) */
    --tdl-toc-h: 3.5rem;     /* barra bassa del telefono: stessa altezza della barra compatta (--tdl-nav-h) */
}

/* ── Layout: sidebar + corpo ──────────────────────────────── */
.manuale-wrap {
    padding: .5rem; margin: 0;
    display: flex; flex-direction: column;
    min-height: 100vh; height: 100%;
}
.manuale-body {
    padding-left: 275px;
    transition: padding-left .3s ease;
    height: 100%;
    margin-top: 4rem; margin-bottom: 4rem;
}
.manuale-wrap.side-collapsed .manuale-body { padding-left: var(--side-w-min); }
@media (max-width: 991.98px) {
    .manuale-body, .manuale-wrap.side-collapsed .manuale-body { padding-left: 0; }   /* il cassetto: vedi sotto */
    /* sotto la barra compatta il foglio sale: 3rem è il minimo perché il bordo
       strappato (.tdl-sheet::before, alto 3rem) non finisca sotto la barra.
       Le pagine con header hanno il loro margine (.manual.has-header). */
    .manuale-body { margin-top: 3rem; }
}

/* ── Sidebar (menu del manuale) ───────────────────────────── */
.tdl-side {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--side-w); max-width: var(--side-w);
    margin-left: .5rem; margin-top: var(--tdl-nav-h);   /* subito sotto la navbar: lo spazio lo fa la testa alta 7rem */
    display: flex; flex-direction: column;
    z-index: 999; text-align: left;
    background-color: rgba(13, 13, 13, .97);
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .45);
    font-family: 'minor-headers', Georgia, serif;
    transition: width .3s ease, max-width .3s ease, margin-top .3s ease;
}
/* navbar nascosta scorrendo → la sidebar sale. La nav sta dentro <header>, non è
   sorella di <main>: il vecchio selettore «.tdl-nav.is-hide ~ main» non
   combaciava mai e la sidebar restava giù lasciando il vuoto in alto. */
body:has(.tdl-nav.is-hide) .tdl-side { margin-top: .5rem; }
.side-collapsed .tdl-side { width: var(--side-w-min); max-width: var(--side-w-min); }
.tdl-side-scroll {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent;
}
.tdl-side-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.tdl-side-scroll::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 0; }
.tdl-side-scroll::-webkit-scrollbar-track { background: transparent; }

.tdl-side-menu { list-style: none; margin: 0; padding: 0; }
.tdl-side-level-1 > .tdl-side-item:first-child { margin-top: .75rem; }   /* sopra c'è la testa (brand + ricerca) */
.tdl-side-item { display: block; width: 100%; }
/* riga: link + freccia dei gruppi come fratelli (sidebar.php); colore, sfondo e
   bordo stanno sulla riga così la freccia segue lo stato del link */
.tdl-side-row {
    display: flex; align-items: center;
    color: var(--text-muted); user-select: none; transition: .3s;
    border-left: 3px solid transparent;
}
.tdl-side-row:hover { color: var(--gold); background: var(--gold-glow); }
.tdl-side-item.is-active > .tdl-side-row { color: var(--gold); background: var(--gold-glow); border-left-color: var(--gold); }
.tdl-side-item.is-open > .tdl-side-row { color: var(--gold-light); background: rgba(50, 37, 35, 1); }
.tdl-side-link {
    flex: 1 1 auto; min-width: 0; display: flex; align-items: center;
    padding: 10px 15px; line-height: 35px; font-size: 16px; font-weight: 400;
    color: inherit; text-decoration: none; white-space: nowrap;
}
/* specificità > .fas di FontAwesome (che imposta display:inline-block) */
.tdl-side-link > .tdl-side-icon {
    flex-shrink: 0; width: 35px; height: 35px; margin-right: 15px; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    background: #161616; color: var(--gold); font-size: 16px; line-height: 1; text-align: center;
}
.tdl-side-item.is-active > .tdl-side-row .tdl-side-icon,
.tdl-side-item.is-open > .tdl-side-row .tdl-side-icon { background: rgba(201, 168, 76, .15); }
.tdl-side-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tdl-side-arrow {
    flex-shrink: 0; width: 30px; height: 30px; padding: 0; margin-right: 10px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 0; color: inherit; cursor: pointer;
}
.tdl-side-arrow:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 3px; }
.tdl-side-arrow::before {
    content: ""; width: 6px; height: 6px;
    border-left: 2px solid; border-bottom: 2px solid;
    transform: rotate(-135deg); transition: transform .3s;
}
.tdl-side-item.is-open > .tdl-side-row .tdl-side-arrow::before { transform: rotate(-45deg); }
/* sottomenu */
.tdl-side-level-2 { display: none; background: rgba(8, 8, 8, .97); }
.tdl-side-item.is-open > .tdl-side-level-2 { display: block; }
.tdl-side-level-2 .tdl-side-link { padding-left: 62px; line-height: 30px; font-size: .92em; }
.tdl-side-level-3 .tdl-side-link { padding-left: 80px; }
/* chiusa: solo icone */
.side-collapsed .tdl-side-title,
.side-collapsed .tdl-side-arrow,
.side-collapsed .tdl-side-level-2 { display: none !important; }
.side-collapsed .tdl-side-link { padding: 10px 11px; justify-content: center; }
.side-collapsed .tdl-side-link > .tdl-side-icon { margin-right: 0; }
/* testa della sidebar: la ricerca (layout/sidebar.php, pages/cerca.php) */
/* Alta 7rem (il doppio della sola riga di ricerca) con la ricerca ancorata in
   fondo: quando la navbar si nasconde e la sidebar sale a .5rem, la testa
   finisce comunque sotto la fascia della navbar (4rem), e la riga di ricerca
   non si ritrova mai sotto la barra che rientra. */
.tdl-side-head {
    flex-shrink: 0; min-height: 7rem; padding: 10px 15px;
    display: flex; flex-direction: column; justify-content: flex-end;
    border-bottom: 1px solid var(--border-dim);
    background: linear-gradient(180deg, rgba(50, 37, 35, .15) 0%, rgba(50, 37, 35, .45) 100%);
}
.tdl-side-cerca { display: flex; align-items: center; gap: 15px; margin: 0; padding: 0; }
/* stesso quadratino delle icone del menu (.tdl-side-link > .tdl-side-icon non vale qui: è un <button> fuori dal link) */
.tdl-side-cerca .tdl-side-icon {
    flex-shrink: 0; width: 35px; height: 35px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: #161616; color: var(--gold); transition: background .2s;
}
.tdl-side-cerca .tdl-side-icon:hover, .tdl-side-cerca .tdl-side-icon:focus-visible { background: rgba(201, 168, 76, .15); outline: 0; }
.tdl-side-cerca-input {
    flex: 1 1 auto; min-width: 0; padding: .45rem .2rem; background: none; border: 0; border-bottom: 1px solid transparent;
    color: var(--text-main); font-family: 'Celestia', Georgia, serif; font-size: 1rem; outline: 0;
}
.tdl-side-cerca-input::placeholder { color: var(--text-muted); font-family: 'minor-headers', Georgia, serif; font-size: .95rem; letter-spacing: .04em; }
.tdl-side-cerca-input:focus { border-bottom-color: var(--gold); }
/* la «x» nativa dei campi di ricerca (grigio-blu del browser) → rosso del tema, disegnata noi */
.tdl-side-cerca-input::-webkit-search-cancel-button, .tdl-cerca-input::-webkit-search-cancel-button {
    -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-left: .4rem; cursor: pointer;
    background: var(--danger-text);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.side-collapsed .tdl-side-head { padding: 10px 11px; }
.side-collapsed .tdl-side-cerca-input { display: none; }   /* chiusa: resta la lente */
.side-collapsed .tdl-side-cerca { justify-content: center; }
/* pulsante apri/chiudi in fondo */
.tdl-side-toggle {
    flex-shrink: 0; width: 100%; height: 65px;
    display: flex; align-items: center; justify-content: center;
    border: 0; cursor: pointer;
    color: var(--gold); background-color: rgba(13, 13, 13, .97);
}
.tdl-side-toggle:hover, .tdl-side-toggle:focus { color: var(--gold); background-color: rgba(13, 13, 13, .97); outline: 0; }
.tdl-side-toggle-icon { position: relative; width: 12px; height: 12px; display: inline-block; transition: transform .3s; }
.tdl-side-toggle-icon::before { content: ""; position: absolute; left: 0; top: 0; height: 12px; border-left: 2px solid; }
.tdl-side-toggle-icon::after {
    content: ""; position: absolute; left: 4px; top: 2px; width: 6px; height: 6px;
    border-left: 2px solid; border-bottom: 2px solid; transform: rotate(45deg);
}
.side-collapsed .tdl-side-toggle-icon { transform: rotate(180deg); }

/* Sotto i 992 px niente colonna di icone: il menu è un cassetto da sinistra
   (.tdl-side.is-open, aperto da «Menu» nella barra bassa, manuale.js) sotto
   la barra compatta e sopra la barra bassa, con l'overlay del menu del sito.
   Dopo le regole base della sidebar: a pari specificità vince l'ultima. */
@media (max-width: 991.98px) {
    .tdl-side, .side-collapsed .tdl-side {
        top: var(--tdl-nav-h); bottom: var(--tdl-toc-h); margin: 0;
        width: min(var(--side-w), 85vw); max-width: none;
        z-index: 2002; box-shadow: none;
        transform: translateX(-100%);
        transition: transform .35s ease, top .3s ease;
    }
    body:has(.tdl-nav.is-hide) .tdl-side { top: 0; margin-top: 0; }
    .tdl-side.is-open { transform: translateX(0); box-shadow: 10px 0 40px rgba(0, 0, 0, .6); }
    .tdl-side .tdl-side-head { min-height: 0; }
    .tdl-side > .tdl-side-toggle { display: none; }
}

/* ── Header parallasse + foglio ───────────────────────────── */
.manuale-semiwrap { height: 100%; }
/* NB: nessun position:relative sugli antenati (.manuale-wrap/.manuale-body/
   .manuale-semiwrap): .manuale-parallax si ancora al contenitore iniziale
   (viewport in cima alla pagina), come nella SPA. */
.manuale-parallax {
    position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 50%, transparent);
            mask-image: linear-gradient(#000 50%, transparent);
    mask-size: 100% 100%;
}
.manuale-parallax-bg { width: 100%; height: 100%; opacity: .5; will-change: transform; }
.manuale-parallax-bg img {
    position: absolute; width: 100%; object-fit: cover;
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
            mask-image: linear-gradient(#000 70%, transparent);
    mask-size: 100% 100%;
}

/* .manual è una .tdl-sheet (tdl.css: carta + bordi strappati); qui solo layout */
.manual {
    width: 100%; margin: 4rem auto auto;
    background-position-x: 80%;
    min-height: 80vh;
    display: flex; flex-direction: column;
}
.manual.has-header { margin-top: 4rem; }    /* telefono: l'header è solo una fascia decorativa (niente titolo hero) */
@media (min-width: 768px)  { .manual.has-header { margin-top: 8rem; } }
@media (min-width: 992px)  { .manual.has-header { margin-top: 15rem; } }
@media (min-width: 1200px) { .manual.has-header { margin-top: 20rem; } }
@media (min-width: 1400px) { .manual { width: 80% !important; } }
/* titolo decorativo sopra l'header (non è un h1: quello SEO resta nel contenuto).
   Sotto i 768 px non c'è: con la fascia bassa starebbe a 100 px dall'h1 del
   contenuto, stesso testo due volte nella prima schermata (audit 2026-09-16). */
.manual-hero-title {
    position: absolute; top: -4rem; left: 0; right: 0;
    z-index: 2; pointer-events: none;
}
@media (max-width: 767.98px) { .manual-hero-title { display: none; } }
@media (min-width: 768px)  { .manual-hero-title { top: -5rem; } }
@media (min-width: 992px)  { .manual-hero-title { top: -6.5rem; } }
@media (min-width: 1200px) { .manual-hero-title { top: -11rem; } }
.manual-hero-title span {
    display: block; text-align: left;
    font-family: 'Ringbearer', Georgia, serif;
    font-size: clamp(1.8rem, 6vw, 4rem);
    color: var(--text-main); letter-spacing: .02em;
}

.manual-wrapper {
    width: 100%; margin: auto; min-height: inherit;
    display: flex; flex-direction: column; flex: 1 1 auto;
    justify-content: space-evenly;
}
.manual-body { flex: 1 1 auto; }
/* con l'indice (assoluto a destra, 16rem + 2rem dal bordo) la colonna di
   lettura si stringe: niente testo sotto il TOC. .has-toc lo mette page.php
   (contenuto .manual-txt con h1-h3) e lo conferma/toglie manuale.js. */
@media (min-width: 992px) { .manual.has-toc .manual-body { padding-right: 19rem; } }
.manual-txt {
    display: flex; flex-direction: column; justify-content: flex-start;
    height: 100%; width: 100%; max-width: 62rem;   /* colonna di lettura ~70ch */
    margin: 1rem auto; position: relative;
}
@media (max-width: 767px) { .manual-txt { margin: 1rem 0; } }

/* ── Intro / 404 (testo narrativo) ────────────────────────── */
.manual-intro .section-title { font-family: 'Ringbearer', Georgia, serif; color: var(--text-main); }
.manual-intro .text {
    display: block; line-height: 1.6; text-align: justify;
    font-family: 'Celestia', Georgia, serif; color: var(--text-main);
}
.manual-intro .text-action { font-style: italic; color: #c08a52; }   /* narrazione PNG: ambra */
.manual-intro .text-decision { color: var(--text-muted); }
.manual-intro .text-decision a { color: var(--gold); border-bottom: 1px solid var(--gold-dim); }
.manual-txt-inner { z-index: 1; }

/* ── Articolo, tavola 3 (2026-09-16): metadati, «In breve», precedente/successiva ── */
.manual-txt .art-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: -.4rem 0 1.6rem; font-family: 'minor-headers', Georgia, serif; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); text-align: left; }
.manual-txt .art-meta b { color: var(--gold); font-weight: normal; font-family: inherit; letter-spacing: inherit; }
.manual-txt .art-meta a { color: inherit; border: 0; }
.manual-txt .art-meta a:hover { color: var(--gold); }
/* telefono: la riga stava su tre righe (69 px) per informazioni secondarie */
@media (max-width: 575.98px) {
    .manual-txt .art-meta { gap: .25rem .8rem; font-size: .72rem; letter-spacing: .06em; margin-bottom: 1.1rem; }
    .manual-txt .art-meta .art-meta-lettura { display: none; }
}
/* «In breve» è un <details open>: sul desktop il riassunto è solo il titolo del
   pannello (marker via, niente click); sotto i 768 px manuale.js lo chiude e
   il riassunto mostra i quattro numeri in una riga (era un pannello da 475 px
   prima della prima riga di testo). */
   Selettori con .manual-txt .art-breve > … perché articolo.css veste ogni
   `.manual-txt details` (accordion di TinyMCE: bordo, chevron ::before,
   padding sui figli) e qui va tutto neutralizzato. */
.manual-txt .sheet-panel.art-breve { margin: 0 0 2rem; padding: 0; border: 1px solid var(--border); background: rgba(14, 14, 14, .97); font-family: 'Celestia', Georgia, serif; letter-spacing: 0; text-transform: none; text-align: left; }
.manual-txt .art-breve > .art-breve-title { display: flex; align-items: center; gap: .8rem; padding: .6rem 1rem; font-family: 'minor-headers', Georgia, serif; font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); background: linear-gradient(180deg, rgba(50, 37, 35, .7) 0%, rgba(255, 255, 255, 0) 100%); list-style: none; cursor: default; }
.manual-txt .art-breve > .art-breve-title::-webkit-details-marker { display: none; }
.manual-txt .art-breve > .art-breve-title::before { display: none; }
.manual-txt .art-breve > .art-breve-title::after { content: ""; display: none; flex: 0 0 auto; width: .5rem; height: .5rem; margin: -.3rem .2rem 0 0; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); transition: transform .2s; }
.manual-txt .art-breve[open] > .art-breve-title::after { transform: rotate(-135deg); margin: .3rem .2rem 0 0; }
.art-breve-k { flex: 0 0 auto; white-space: nowrap; }
.art-breve-sum { display: none; flex: 1 1 auto; min-width: 0; font-family: 'Ringbearer', Georgia, serif; font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-breve-sum i { font-style: normal; color: var(--text-muted); padding: 0 .25rem; }
.manual-txt .art-breve > .art-breve-grid { padding: 0; }
.art-breve-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.art-breve-cell { display: flex; flex-direction: column; gap: .2rem; padding: .8rem 1rem; }
.art-breve-cell + .art-breve-cell { border-left: 1px solid var(--border-dim); }
.art-breve-cell .k, .art-breve-row .k { font-family: 'minor-headers', Georgia, serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.art-breve-cell .v { font-family: 'Ringbearer', Georgia, serif; font-size: 1.5rem; line-height: 1.1; color: var(--text-main); }
.art-breve-cell .v-small { font-size: 1.1rem; }
.art-breve-cell .s { font-size: .85rem; color: var(--text-muted); }
.art-breve-row, .manual-txt .art-breve > .art-breve-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .3rem 1rem; padding: .6rem 1rem; border-top: 1px solid var(--border-dim); font-size: .98rem; line-height: 1.5; }
.art-breve-row .k { color: var(--gold); padding-top: .2rem; }
.manual-txt .art-breve-row a { color: var(--gold); border-bottom: 1px solid var(--gold-dim); }
@media (max-width: 767.98px) {
    .manual-txt .art-breve > .art-breve-title { cursor: pointer; }
    .manual-txt .art-breve > .art-breve-title::after { display: block; }
    .art-breve:not([open]) .art-breve-sum { display: block; }
    .art-breve-grid { grid-template-columns: 1fr 1fr; }
    .art-breve-cell { padding: .55rem .8rem; }
    .art-breve-cell .v { font-size: 1.25rem; }
    .art-breve-cell .v-small { font-size: 1rem; }
    .art-breve-cell:nth-child(3) { border-left: 0; }
    .art-breve-cell:nth-child(n+3) { border-top: 1px solid var(--border-dim); }
    .art-breve-row, .manual-txt .art-breve > .art-breve-row { grid-template-columns: 1fr; gap: .1rem; padding: .5rem .8rem; font-size: .95rem; }
}
.art-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.2rem auto 0; max-width: 100%; }
.art-nav a { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border: 1px solid var(--border-dim); background: var(--bg-card); text-decoration: none; color: var(--text-main); transition: border-color .2s; }
.art-nav a:hover { border-color: var(--border); }
.art-nav a.art-nav-next { flex-direction: row-reverse; text-align: right; }
.art-nav img { width: 3.5rem; height: 4.75rem; object-fit: cover; object-position: top; border: 1px solid var(--border-dim); display: block; flex: 0 0 auto; }
.art-nav a > span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.art-nav-k { font-family: 'minor-headers', Georgia, serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.art-nav-t { font-family: 'Ringbearer', Georgia, serif; font-size: 1.2rem; line-height: 1.15; color: var(--gold); }
.art-nav a:hover .art-nav-t { color: var(--gold-light); }
@media (max-width: 575.98px) { .art-nav { grid-template-columns: 1fr; } .art-nav a.art-nav-next { flex-direction: row; text-align: left; } }

/* ── Pagine incorporate in fondo alla classe (varianti, privilegi alternativi) ── */
.manual-extra { margin-top: 3.5rem; }
/* bozza: banner dell'anteprima riservata ai webmaster (pages/articolo.php) */
.manual-bozza {
    margin: 0 0 1.5rem; padding: .7rem 1rem; border-left: 4px solid #d97706;
    background: rgba(217, 119, 6, .12); color: var(--text-main); font-size: .95rem;
}
.manual-bozza strong { color: #f0a848; letter-spacing: .04em; text-transform: uppercase; }
.manual-embed { padding: .5rem 0 1.5rem; }
.manual-embed + .manual-embed { margin-top: 1.5rem; border-top: 1px solid var(--border-dim); padding-top: 2rem; }
.manual-embed > h2:first-child { margin-top: 0; }

/* ── Briciole ─────────────────────────────────────────────── */
.tdl-crumbs { margin: 16px 0 0; font-family: 'minor-headers', Georgia, serif; font-size: .85rem; letter-spacing: .06em; }
@media (max-width: 767.98px) { .tdl-crumbs { margin-top: 6px; font-size: .8rem; } }
.tdl-crumbs-list { list-style: none; margin: 0; padding: 0; }
.tdl-crumbs-item { display: inline; }
.tdl-crumbs a { color: var(--text-muted); text-decoration: none; transition: color .2s; }
.tdl-crumbs a:hover { color: var(--gold); }
.tdl-crumbs-sep { padding: 0 6px; color: var(--text-faint); }
.tdl-crumbs-current { color: var(--gold); }

/* ── Indice della pagina (TOC) ────────────────────────────── */
/* .manual-toc NON è posizionato: .tdl-toc (absolute) si ancora a .manual
   (position:relative) e lo sticky lavora sull'altezza del foglio, come nella SPA. */
.tdl-toc {
    color: var(--text-muted); font-family: 'minor-headers', Georgia, serif;
    height: 100%; position: absolute; z-index: 1; right: 2rem;
}
.tdl-toc-desktop {
    position: -webkit-sticky; position: sticky; top: 6rem;
    width: 16rem; max-height: 80vh;
    display: flex; flex-direction: column;
    background: rgba(13, 13, 13, .97);
    border: 1px solid var(--border);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
@media (max-width: 991.98px) { .tdl-toc-desktop { display: none; } }
.tdl-toc-body {
    position: relative; overflow-y: auto; padding: .7rem .9rem .7rem 1.2rem;
    scrollbar-width: thin; scrollbar-color: rgba(201, 168, 76, .4) transparent;
}
.tdl-toc-body::-webkit-scrollbar { width: 6px; }
.tdl-toc-body::-webkit-scrollbar-thumb { background: rgba(201, 168, 76, .4); border-radius: 0; }
.tdl-toc-body::-webkit-scrollbar-track { background: transparent; }
/* rail + riempimento = progresso di lettura */
.tdl-toc-rail { position: absolute; left: .5rem; top: .7rem; bottom: .7rem; width: 2px; background: var(--gold-dim); }
.tdl-toc-rail-fill { position: absolute; left: 0; top: 0; width: 2px; background: var(--gold); transition: height .12s linear; }
.tdl-toc-list { list-style: none; margin: 0; padding: 0; }
.tdl-toc-list a {
    display: block; padding: .3rem 0; color: var(--text-muted); text-decoration: none;
    font-size: .9rem; line-height: 1.35; transition: color .2s;
}
.tdl-toc-list a:hover { color: var(--gold-light); }
.tdl-toc-list a.active { color: var(--gold); }
.tdl-toc-item { display: flex; align-items: center; gap: .25rem; }
.tdl-toc-item > a { flex: 1 1 auto; }
.tdl-toc-toggle {
    flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
    width: 1.4rem; height: 1.4rem; margin: auto; padding: 0;
    background: none; border: 0; outline: none; appearance: none;
    color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer;
    transition: transform .25s ease, color .2s;
}
.tdl-toc-toggle:hover, .tdl-toc-toggle:focus { color: var(--gold); background: none; box-shadow: none; }
.tdl-toc-toggle.open { transform: rotate(45deg); color: var(--gold); }   /* "+" → "×" */
.tdl-toc-sub { list-style: none; margin: .1rem 0 .4rem; padding-left: .9rem; overflow: hidden; }
.tdl-toc-sub a { font-size: .82rem; opacity: .92; }
/* mobile: barra bassa fissa (manuale.js) — «Menu» (cassetto del menu) e
   sezione corrente (pannello dei titoli, solo con un indice). Niente «Cerca»:
   c'è la lente nella barra compatta, e a destra il badge Iubenda coprirebbe
   il bottone. Sopra l'overlay (1001): resta cliccabile a cassetto aperto. */
.tdl-toc-mobile {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background-color: rgba(13, 13, 13, .97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .5);
    z-index: 2001;
    font-family: 'minor-headers', Georgia, serif;
}
@media (min-width: 992px) { .tdl-toc-mobile { display: none; } }
.tdl-toc-mobile .toc-selector { height: var(--tdl-toc-h); display: flex; align-items: stretch; }
/* il badge «preferenze cookie» di Iubenda (bottone fisso in basso a destra,
   margine 16px suo) sale sopra la barra bassa invece di coprirla. Le sue
   regole sono !important con 4 selettori: qui 5 (:has conta l'argomento). */
@media (max-width: 991.98px) {
    body:has(.tdl-toc-mobile) .iubenda-tp-btn[data-tp-float="bottom-right"][data-tp-icon] { bottom: var(--tdl-toc-h) !important; }
}
.tdl-toc-mobile .toc-selector > * {
    flex: 0 0 auto; min-width: 0; padding: 0 1.1rem;
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    background: none; border: 0; border-left: 1px solid var(--border-dim); cursor: pointer;
    color: var(--gold); text-decoration: none; font: inherit;
    letter-spacing: .12em; text-transform: uppercase; font-size: .8rem;
}
.tdl-toc-mobile .toc-selector > :first-child { border-left: 0; }
.tdl-toc-mobile .toc-selector > *[aria-expanded="true"] { background: var(--gold-glow); }
.tdl-toc-mobile .toc-selector > *:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.tdl-toc-mobile .toc-sezione { flex: 1 1 auto; justify-content: flex-start; color: var(--text-muted); }
.tdl-toc-mobile .toc-sezione > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-transform: none; letter-spacing: .02em; font-size: .95rem;
    font-family: 'Celestia', Georgia, serif; color: var(--text-main);
}
.tdl-toc-mobile .toc-sezione::before { content: "§"; flex-shrink: 0; color: var(--gold); }
.tdl-toc-mobile .toc-selector > [hidden] { display: none; }
.tdl-toc-mobile .toc-selector > .toc-vuoto { flex: 1 1 auto; cursor: default; }   /* senza indice: spazio vuoto */
.tdl-toc-mobile .toc-menu { max-height: 50vh; overflow-y: auto; padding: .5rem 1rem; }
.tdl-toc-mobile .toc-menu ul { list-style: none; margin: 0; padding: 0; }
.tdl-toc-mobile .toc-menu ul ul { padding-left: 1rem; }
.tdl-toc-mobile .toc-menu a { display: block; padding: .4rem 0; color: var(--text-muted); font-size: .9rem; }
.tdl-toc-mobile .toc-menu li.active > a { color: var(--gold); }

/* ── Annunci ──────────────────────────────────────────────── */
.manual-ads {
    margin: 2rem auto 0; flex-shrink: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    overflow-y: hidden; min-height: 280px; min-width: 250px;
}

/* ── Schede singole: incantesimo, talento, dominio, divinità ──
   (porting degli stili scoped di Show*.vue, unificati) */
.manual-scheda {
    max-width: 900px; margin: 1rem auto; padding: 2rem;
    background: rgba(14, 14, 14, .97); color: var(--text-main);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(201, 168, 76, .06);
    font-family: 'Celestia', Georgia, serif;
}
.manual-scheda-head {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 1rem; margin-bottom: 1.5rem; text-align: center;
}
.manual-scheda-head-col { flex-direction: column; gap: .25rem; margin-bottom: 1rem; }
/* incantesimo: glifo della scuola nella prima colonna, allineato a destra come
   le etichette di .scheda-grid (stessa griglia 1fr/2fr e stesso gap), titolo
   nella seconda dove iniziano i valori (2026-09-11) */
.manual-scheda-head--incantesimo {
    display: grid; grid-template-columns: 1fr 2fr; gap: .5rem 1rem;
    align-items: center; text-align: left;
}
.manual-scheda-head--incantesimo .scheda-glifo { justify-self: end; display: flex; }
.manual-scheda-head--incantesimo .scheda-glifo .glifo-scuola { filter: drop-shadow(0 0 10px rgba(0, 0, 0, .6)); }
.manual-scheda-head--incantesimo .scheda-titolo { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; min-width: 0; }
@media (max-width: 768px) {
    .manual-scheda-head--incantesimo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .manual-scheda-head--incantesimo .scheda-glifo { justify-self: center; }
    .manual-scheda-head--incantesimo .scheda-titolo { justify-content: center; }
}
.manual-scheda-icon { width: 48px; height: 48px; object-fit: contain; border-radius: .25rem; }
.manual-scheda h1 {
    font-family: 'Ringbearer', Georgia, serif; font-size: 2rem;
    color: var(--text-main); margin: 0; line-height: 1.2;
}
.manual-scheda h2 {
    font-family: 'minor-headers', Georgia, serif;
    font-size: 1rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold); border-bottom: 1px solid var(--border);
    padding-bottom: .4rem; margin: 0 0 .8rem;
}
.manual-scheda p { margin: 0 0 1rem; }
.manual-scheda a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--gold-dim); transition: color .2s, border-color .2s; }
.manual-scheda a:hover { color: var(--gold-light); border-bottom-color: var(--gold); }
.manual-scheda strong, .manual-scheda b, .manual-scheda .deity-label { color: var(--gold); }
.manual-scheda strong, .manual-scheda b { font-family: 'minor-headers', Georgia, serif; font-weight: normal; }
.manual-scheda-sub { font-size: 1.1rem; color: var(--text-muted); margin: 0; }
.scheda-descr { font-size: 1.1rem; line-height: 1.6; }
.scheda-descr img { max-width: 100%; height: auto; }

/* incantesimo: griglia etichetta/valore */
.scheda-grid { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem 1rem; margin: 0; }
.scheda-grid dt {
    font-family: 'minor-headers', Georgia, serif; font-size: .85rem;
    letter-spacing: .06em; text-transform: uppercase; color: var(--gold); text-align: right;
}
.scheda-grid dd { margin: 0; overflow-wrap: break-word; white-space: pre-line; }
@media (max-width: 768px) {
    .scheda-grid { grid-template-columns: 1fr; }
    .scheda-grid dt { text-align: left; }
    .scheda-grid dd { margin-bottom: .5rem; }
}
.scheda-classi { margin-top: 2rem; }
.scheda-classi-list { display: flex; flex-direction: column; gap: 1rem; }
.scheda-classi-group { display: flex; align-items: baseline; flex-wrap: wrap; gap: .75rem; }
.scheda-lvl {
    flex: 0 0 auto; min-width: 5.5rem;
    font-family: 'minor-headers', Georgia, serif; font-size: .78rem;
    letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
}
.scheda-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.scheda-chip {
    font-family: 'minor-headers', Georgia, serif; font-size: .8rem; letter-spacing: .04em;
    padding: .25rem .6rem; color: var(--text-main);
    border: 1px solid rgba(201, 168, 76, .25); background: rgba(201, 168, 76, .06);
    text-decoration: none; transition: background .2s, color .2s, border-color .2s;
}
.scheda-chip.is-link { color: var(--gold); cursor: pointer; }
.scheda-chip.is-link:hover { background: var(--gold); color: #080808; border-color: var(--gold); }

/* ── Scheda incantesimo, tavola 5 (2026-09-16) ─────────────── */
.manual-scheda.scheda-v5 { max-width: 960px; padding: 0; overflow: hidden; }
.scheda-testa {
    display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 1.2rem; align-items: center;
    padding: 1.6rem 1.8rem;
    background: linear-gradient(180deg, rgba(50, 37, 35, .55) 0%, rgba(255, 255, 255, 0) 100%);
}
.scheda-testa .scheda-glifo { display: flex; line-height: 0; }
.scheda-testa .scheda-glifo .glifo-scuola { filter: drop-shadow(0 0 12px rgba(0, 0, 0, .6)); }
.scheda-testa .scheda-titolo { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; min-width: 0; }
.scheda-testa h1 { font-size: 2.2rem; flex: 1 1 100%; }
.scheda-testa .manual-scheda-icon { order: -1; }
.scheda-tag { display: flex; flex-wrap: wrap; gap: .4rem; }
.scheda-livelli { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.scheda-livelli .scheda-chips { justify-content: flex-end; max-width: 22rem; }
.scheda-chip b { font-weight: normal; color: var(--gold-light); margin-left: .1rem; }
.scheda-chip.is-link:hover b { color: #080808; }
.scheda-eyebrow { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.scheda-blocco { display: grid; grid-template-columns: 1fr 1fr; }
.scheda-blocco .scheda-kv { padding: 1.2rem 1.8rem; }
.scheda-kv { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .55rem .9rem; margin: 0; font-size: 1.02rem; }
.scheda-kv dt { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); text-align: right; padding-top: .2rem; }
.scheda-kv dd { margin: 0; overflow-wrap: break-word; }
.scheda-comp { display: flex; flex-wrap: wrap; gap: .35rem; }
.scheda-comp span { display: inline-flex; align-items: center; gap: .35rem; height: 1.6rem; padding: 0 .5rem; border: 1px solid var(--border); font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .06em; }
.scheda-comp span i { font-style: normal; color: var(--gold); }
.scheda-effetto { padding: 1.4rem 1.8rem; border-top: 1px solid var(--border-dim); }
.scheda-effetto h2 { border: 0; padding: 0; margin: 0 0 .8rem; font-size: .8rem; letter-spacing: .24em; }
.scheda-effetto-testo { white-space: pre-line; }
.scheda-danni { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .7rem; margin: 0 0 1rem; padding: .5rem .9rem; border: 1px solid var(--border); background: rgba(201, 168, 76, .06); }
.scheda-danni-big { font-family: 'Ringbearer', Georgia, serif; font-size: 1.7rem; color: var(--text-main); line-height: 1; }
.scheda-danni-max { font-size: 1.2rem; color: var(--gold-light); }
.scheda-danni-s { font-family: 'minor-headers', Georgia, serif; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.scheda-hr { margin: .2rem 1.8rem 1.2rem; padding: .9rem 1.1rem; border-left: 3px solid var(--amber, #c08a52); background: rgba(192, 138, 82, .08); font-size: 1rem; line-height: 1.55; }
.scheda-hr-label { display: block; margin-bottom: .4rem; font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber, #c08a52); }
.scheda-hr-testo p:last-child { margin-bottom: 0; }
.scheda-hr-testo h3, .scheda-hr-testo h4 { font-family: 'minor-headers', Georgia, serif; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: .6rem 0 .3rem; }
.scheda-hr-testo blockquote { margin: .6rem 0; padding-left: .8rem; border-left: 1px solid var(--border-dim); color: var(--text-muted); }
.scheda-hr-testo img { max-width: 100%; height: auto; }
.scheda-hr-link { display: inline-block; margin-top: .6rem; font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.scheda-vedi { display: flex; flex-direction: column; gap: .45rem; margin: 1.2rem 1.8rem 1.6rem; padding: .9rem 1rem; border: 1px solid var(--border-dim); background: rgba(22, 22, 22, .6); }
.scheda-vedi .scheda-eyebrow { color: var(--gold); margin-bottom: .2rem; }
.manual-scheda .scheda-vedi a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border: 0; color: var(--text-main); font-size: 1rem; }
.manual-scheda .scheda-vedi a:hover { color: var(--gold-light); }
.scheda-vedi a span { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .08em; color: var(--text-muted); white-space: nowrap; }
.scheda-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; max-width: 960px; margin: 1rem auto 0; font-family: 'minor-headers', Georgia, serif; font-size: .82rem; letter-spacing: .1em; }
.manual-txt .scheda-nav a, .scheda-nav a { color: var(--text-muted); border: 0; text-decoration: none; }
.scheda-nav a b { font-weight: normal; color: var(--gold); }
.scheda-nav a:hover, .scheda-nav a:hover b { color: var(--gold-light); }
@media (max-width: 768px) {
    /* telefono: glifo piccolo accanto al titolo (non impilato sopra), classi e
       livelli su una riga propria sotto, tutto allineato a sinistra */
    .scheda-testa { grid-template-columns: 44px minmax(0, 1fr); gap: .8rem 1rem; padding: 1.1rem 1rem; }
    .scheda-testa .scheda-glifo .glifo-scuola { width: 44px; height: 44px; }
    .scheda-testa h1 { font-size: 1.7rem; }
    .scheda-testa .manual-scheda-icon { width: 36px; height: 36px; }
    .scheda-livelli { grid-column: 1 / -1; align-items: flex-start; }
    .scheda-livelli .scheda-chips { justify-content: flex-start; max-width: none; }
    .scheda-blocco { grid-template-columns: 1fr; }
    .scheda-blocco .scheda-kv, .scheda-effetto { padding-left: 1rem; padding-right: 1rem; }
    .scheda-kv { grid-template-columns: 1fr; gap: .15rem .9rem; }
    .scheda-kv dt { text-align: left; padding-top: .5rem; }
    .scheda-hr, .scheda-vedi { margin-left: 1rem; margin-right: 1rem; }
    .scheda-nav { flex-direction: column; align-items: stretch; text-align: center; }
}

/* talento: prerequisiti e tipo */
.scheda-info { font-size: 1rem; margin-bottom: 1.5rem; }
.scheda-info > div { margin-bottom: .5rem; }

/* dominio: incantesimi associati */
.scheda-lista ul { list-style: disc; padding-left: 1rem; margin: 0; color: var(--gold-dim); }
.scheda-lista li { margin: .4rem 0; }
.scheda-descr + .scheda-lista { margin-top: 2rem; }

/* divinità: simbolo + info */
.scheda-divinita-body { display: flex; flex-direction: column; align-items: center; }
.scheda-divinita-img { max-width: 300px; border: 1px solid var(--border); overflow: hidden; }
.scheda-divinita-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.scheda-divinita-info { width: 100%; font-size: 1.1rem; }
.scheda-divinita-info .scheda-descr { margin-top: 1rem; font-size: inherit; }
ul.deity-domini { list-style: disc; padding-left: 1.2rem; margin: .5rem 0 1rem; }
ul.deity-domini li { margin-bottom: .25rem; }

/* ── Liste filtrate (incantesimi, talenti, domini, divinità) ──
   porting degli stili scoped di ManualIncantesimi/Talenti/Domini/Deities.vue */
.manual-lista-filtri > h1 { margin-bottom: 1.2rem; }

/* barra della lista (tavola 4): campo unico + «Tutti i filtri» + pannello */
.manual-txt form.tdl-lista-form { margin: 0 0 1rem; font-family: inherit; }
.tdl-lista-barra { display: flex; align-items: stretch; gap: .8rem; }
.tdl-lista-barra .tdl-cerca-campo { flex: 1 1 20rem; min-width: 0; }
.tdl-lista-barra .tdl-cerca-input { font-size: 1.05rem; }
.tdl-lista-barra .tdl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.tdl-lista-toggle { flex: 0 0 auto; }
.tdl-lista-toggle svg { flex: 0 0 auto; }
.tdl-lista-toggle-n {
    min-width: 1.4em; height: 1.4em; padding: 0 .35em; display: inline-flex; align-items: center; justify-content: center;
    background: var(--gold); color: #080808; font-size: .8em; line-height: 1;
}
.tdl-lista-toggle[aria-expanded="true"] { color: var(--gold-light); border-color: var(--gold); background: var(--gold-glow); }
@media (max-width: 575.98px) {
    .tdl-lista-barra { flex-wrap: wrap; }
    .tdl-lista-barra .tdl-lista-cerca-btn { display: none; }   /* sul telefono basta Invio */
    .tdl-lista-toggle { flex: 1 1 auto; }
}
.tdl-filtri-pannello { margin-top: .8rem; padding: 1rem 1.1rem .2rem; background: var(--bg-deep); border: 1px solid var(--border); }
.tdl-row-stretta { margin: 0 -.35rem; }
.tdl-row-stretta > * { padding: 0 .35rem; }
.tdl-row-stretta .tdl-filter { padding-bottom: .5rem; }
/* chip dei filtri attivi */
.tdl-chip-attivi { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; margin: 0 0 .5rem; }
.tdl-chip-attivi-label { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-right: .2rem; }
.manual-txt a.tdl-chip-attivo {
    display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .6rem; border: 1px solid rgba(201, 168, 76, .35);
    background: rgba(201, 168, 76, .08); color: var(--gold); font-family: 'minor-headers', Georgia, serif; font-size: .82rem; letter-spacing: .04em;
    text-decoration: none; transition: background .2s, border-color .2s;
}
.manual-txt a.tdl-chip-attivo span { color: var(--text-muted); }
.manual-txt a.tdl-chip-attivo:hover { border-color: var(--gold); background: rgba(201, 168, 76, .16); }
.manual-txt a.tdl-chip-attivo:hover span { color: var(--gold-light); }
.manual-txt a.tdl-chip-azzera { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); border: 0; margin-left: .3rem; }
.manual-txt a.tdl-chip-azzera:hover { color: var(--gold); }
/* ordinamento */
.tdl-ordina { display: inline-flex; gap: .9rem; font-family: 'minor-headers', Georgia, serif; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.manual-txt .tdl-ordina a { color: var(--text-muted); border: 0; border-bottom: 1px solid transparent; }
.manual-txt .tdl-ordina a:hover { color: var(--gold); }
.manual-txt .tdl-ordina a.is-on { color: var(--gold); border-bottom-color: var(--gold); }
.tdl-ordina-verso { font-size: .6em; margin-left: .3em; vertical-align: .15em; }
/* colonne: lista + anteprima (da 1200 px) */
.tdl-lista-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.tdl-anteprima { display: none; }
@media (min-width: 1200px) {
    .manual-lista--incantesimi .tdl-lista-cols { grid-template-columns: minmax(0, 1fr) 19rem; }
    /* .sheet-panel nel selettore: articolo.css (caricato dopo) mette padding 0 su
       .manual-txt .sheet-panel con la stessa specificità, e vinceva */
    .manual-txt .sheet-panel.tdl-anteprima { display: flex; flex-direction: column; gap: .9rem; position: sticky; top: 6rem; padding: 1rem; font-family: 'Celestia', Georgia, serif; letter-spacing: 0; text-transform: none; }
    .manual-txt .sheet-panel.tdl-anteprima[hidden] { display: none; }
}
.tdl-anteprima-dati { display: none; }   /* i dati della riga: solo per il pannello */
.tdl-anteprima-corpo { display: flex; flex-direction: column; gap: .7rem; }
.tdl-anteprima-head { display: flex; align-items: center; gap: .7rem; }
.tdl-anteprima-glifo { flex: 0 0 auto; line-height: 0; filter: drop-shadow(0 0 8px rgba(0, 0, 0, .6)); }
.tdl-anteprima-nome { display: block; font-family: 'Ringbearer', Georgia, serif; font-size: 1.35rem; line-height: 1.15; color: var(--text-main); }
.tdl-anteprima-sub { display: block; margin-top: .2rem; font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .08em; color: var(--text-muted); }
.tdl-anteprima-dl { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .3rem .7rem; margin: 0; font-size: .92rem; line-height: 1.4; }
.tdl-anteprima-dl dt { font-family: 'minor-headers', Georgia, serif; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); text-align: right; padding-top: .15rem; }
.tdl-anteprima-dl dd { margin: 0; color: var(--text-main); }
.tdl-anteprima-testo { display: block; font-size: .95rem; line-height: 1.55; color: var(--text-main); }
.tdl-anteprima-foot { display: flex; justify-content: center; padding-top: 1rem; border-top: 1px solid var(--border-dim); }
.manual-txt .tdl-anteprima .tdl-btn { padding: .45rem 1.4rem; font-size: .78rem; }
/* riga evidenziata (anteprima) */
.tdl-lst-row.is-on { background: rgba(201, 168, 76, .08); box-shadow: inset 3px 0 0 var(--gold); }
.tdl-lst-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
/* livelli per classe e componenti come sigle */
/* (:not(.tdl-lst-label): l'etichetta della cella, visibile solo sul telefono, non è una sigla) */
.tdl-lst-livelli { display: flex; flex-wrap: wrap; gap: .25rem; }
.tdl-lst-livelli > span:not(.tdl-lst-label) {
    display: inline-flex; align-items: center; min-height: 1.4rem; padding: 0 .4rem; border: 1px solid var(--border);
    font-family: 'minor-headers', Georgia, serif; font-size: .7rem; letter-spacing: .04em; color: var(--text-main); line-height: 1.3;
}
.tdl-lst-livelli > .tdl-lst-piu { color: var(--text-muted); border-style: dashed; cursor: help; }
.tdl-lst-comp { display: flex; flex-wrap: wrap; gap: .25rem; }
.tdl-lst-comp > span:not(.tdl-lst-label) {
    min-width: 1.5rem; height: 1.4rem; padding: 0 .3rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-dim); color: var(--text-faint); font-family: 'minor-headers', Georgia, serif; font-size: .68rem;
}
.tdl-lst-comp > span.is-on { color: var(--gold); border-color: var(--border); }
.tdl-section-label {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 0 0 10px; margin: 0; background: none; border: 0; border-bottom: 1px solid rgba(201, 168, 76, .12);
    font-family: 'minor-headers', Georgia, serif; font-size: .78rem; letter-spacing: .38em; text-transform: uppercase;
    color: var(--gold); cursor: pointer; user-select: none; text-align: left;
}
.tdl-section-label::after { content: ""; flex: 1; height: 1px; background: var(--gold-dim); }
.tdl-filter-caret { flex: 0 0 auto; transition: transform .25s; }
.tdl-section-label[aria-expanded="true"] .tdl-filter-caret { transform: rotate(180deg); }
.tdl-filters { margin-top: 18px; }
.tdl-filter { padding-bottom: .9rem; }
.tdl-filter .tdl-label { color: var(--gold); font-size: .74rem; letter-spacing: .06em; }
.tdl-label-hint { font-family: 'base-text', Georgia, serif; text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: .7rem; }
.tdl-filters-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.2rem; }
.tdl-filters-actions .tdl-btn { min-width: 150px; }
/* chip dei livelli */
.tdl-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.tdl-chip {
    min-width: 2.1rem; height: 2.1rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); background: rgba(201, 168, 76, .06); color: var(--text-muted);
    font-family: 'minor-headers', Georgia, serif; font-size: .9rem; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.tdl-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tdl-chip:hover { color: var(--gold); border-color: var(--gold); }
.tdl-chip.is-active { background: var(--gold); border-color: var(--gold); color: #080808; }
.tdl-chip:focus-within { box-shadow: 0 0 0 2px var(--gold-glow); }
/* per pagina + conteggio + ordinamento */
.tdl-list-tools { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 .5rem; }
.tdl-perpage { display: flex; align-items: center; gap: .6rem; }
.tdl-perpage .tdl-label { margin: 0; }
.tdl-perpage .tdl-select { width: auto; padding-right: 1.6rem; }
.tdl-count { font-family: 'minor-headers', Georgia, serif; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

/* aggiornamento in place (fetch del frammento): risultati attenuati nel frattempo */
.manual-lista-filtri [data-lista-risultati] { transition: opacity .2s; }
.manual-lista-filtri.is-loading [data-lista-risultati] { opacity: .45; pointer-events: none; }

/* risultati: griglia fluida (div + grid con fr) */
.manual-txt .tdl-results { margin-top: 1.5rem; min-height: 30rem; padding: .5rem 0; }
.tdl-lst { width: 100%; }
.tdl-lst-head, .tdl-lst-row { display: grid; gap: .9rem; align-items: start; padding: .7rem .95rem; }
/* nome / scuola / livelli per classe / componenti (6 sigle su due righe da 3) */
.tdl-lst--incantesimi .tdl-lst-head, .tdl-lst--incantesimi .tdl-lst-row { grid-template-columns: 2rem minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 2fr) 5.4rem; }
/* colonna del glifo di scuola prima del nome (2026-09-11) */
.tdl-lst-glifo { display: flex; align-items: center; justify-content: center; line-height: 0; }
.tdl-lst-row .tdl-lst-glifo { margin-top: -.15rem; opacity: .85; transition: opacity .2s; }
.tdl-lst-row:hover .tdl-lst-glifo { opacity: 1; }
.tdl-lst--talenti .tdl-lst-head,     .tdl-lst--talenti .tdl-lst-row     { grid-template-columns: 1.4fr .8fr 2.4fr; gap: 1rem; }
.tdl-lst-head {
    font-family: 'minor-headers', Georgia, serif; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold); border-bottom: 1px solid var(--border);
}
.manual-txt a.tdl-lst-row { border: 0; border-top: 1px solid rgba(201, 168, 76, .12); color: var(--text-main); text-decoration: none; transition: background .2s; }
.tdl-lst-row:nth-of-type(odd) { background: rgba(255, 255, 255, .015); }
.tdl-lst-row:hover { background: rgba(201, 168, 76, .06); }
.tdl-lst-name { font-family: 'minor-headers', Georgia, serif; font-size: 1.05rem; color: var(--gold); line-height: 1.3; }
.tdl-lst-row:hover .tdl-lst-name { color: var(--gold-light); }
.tdl-lst-cell { font-size: .92rem; line-height: 1.5; }
.tdl-lst-label { display: none; }
.tdl-lst-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); }
@media (max-width: 767.98px) {
    .tdl-lst-head { display: none; }
    .tdl-lst-row, .tdl-lst--incantesimi .tdl-lst-row, .tdl-lst--talenti .tdl-lst-row { grid-template-columns: 1fr; gap: .25rem; padding: .9rem .95rem; }
    /* incantesimi: il glifo resta a sinistra, in alto, accanto a tutte le righe */
    .tdl-lst--incantesimi .tdl-lst-row { grid-template-columns: 2rem 1fr; column-gap: .6rem; }
    .tdl-lst--incantesimi .tdl-lst-row .tdl-lst-glifo { grid-row: 1 / span 4; align-self: start; margin-top: 0; }
    .tdl-lst-livelli, .tdl-lst-comp { display: flex; }   /* le sigle restano in riga anche in colonna */
    .tdl-lst-label {
        display: inline-block; margin-right: .45rem; opacity: .8;
        font-family: 'minor-headers', Georgia, serif; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
    }
}

/* paginatore */
.tdl-pagination { margin-top: 1.5rem; border-top: 1px solid var(--border); padding: 1.1rem .5rem 0; }
.tdl-pagination-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.tdl-pagination-list li { margin: 0; }
.manual-txt .tdl-page-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .4rem;
    background: rgba(201, 168, 76, .06); border: 1px solid var(--border); color: var(--text-muted);
    font-family: 'minor-headers', Georgia, serif; font-size: .9rem; line-height: 1; text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.manual-txt a.tdl-page-btn:hover { color: var(--gold); border-color: var(--gold); }
.tdl-page-btn.is-active { background: var(--gold); border-color: var(--gold); color: #080808; }
.tdl-page-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.tdl-page-dots { color: var(--text-muted); padding: 0 .2rem; }
@media (max-width: 575.98px) { .tdl-pagination-list li.is-far { display: none; } }

/* domini: riquadri */
.tdl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.manual-txt a.tdl-tile {
    display: flex; align-items: center; padding: .9rem 1rem; border: 1px solid var(--border-dim); background: var(--bg-card);
    text-decoration: none; transition: border-color .2s, background .2s;
}
.manual-txt a.tdl-tile:hover { border-color: var(--border); background: var(--bg-slot-h); }
.tdl-tile-name { font-family: 'minor-headers', Georgia, serif; font-size: 1.05rem; color: var(--text-main); line-height: 1.4; transition: color .2s; }
.tdl-tile:hover .tdl-tile-name { color: var(--gold); }

/* divinità: accordion per pantheon + card */
.manual-txt .tdl-acc > summary h2 { display: inline; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.tdl-deities { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; padding: 1.1rem 0; }
.tdl-deity {
    display: flex; flex-direction: column; width: 100%; padding: 1rem; text-align: center; color: var(--text-main);
    background: var(--bg-surface); border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
    transition: border-color .2s, box-shadow .2s;
}
.tdl-deity:hover { border-color: var(--gold); box-shadow: 0 0 16px rgba(201, 168, 76, .12); }
.tdl-deity-img { width: 100%; max-height: 180px; object-fit: cover; margin-bottom: .5rem; }
.manual-txt .tdl-deity-name { font-family: 'Ringbearer', Georgia, serif; font-size: 1.3rem; letter-spacing: 0; text-transform: none; margin: .2rem 0 .4rem; }
.manual-txt .tdl-deity-name a { color: var(--gold); border: 0; }
.manual-txt .tdl-deity-name a:hover { color: var(--gold-light); }
.tdl-deity span { font-size: .95rem; }

/* ── Ricerca globale (pages/cerca.php) e radice (pages/intro.php) ── */
.tdl-cerca-form { margin: 0 0 1.5rem; }
.tdl-cerca-campo { display: flex; align-items: center; gap: .8rem; padding: 0 0 0 1rem; background: rgba(8, 8, 8, .92); border: 1px solid var(--border); }
.tdl-cerca-campo svg { flex: 0 0 auto; color: var(--gold); }
.tdl-cerca-campo:focus-within { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.tdl-cerca-input {
    flex: 1 1 auto; min-width: 0; height: 3em; background: none; border: 0; outline: 0;
    color: var(--text-main); font-family: 'Celestia', Georgia, serif; font-size: 1.2rem;
}
.tdl-cerca-input::placeholder { color: var(--text-muted); }
.tdl-cerca-campo .tdl-btn { flex: 0 0 auto; align-self: stretch; height: auto; border: 0; border-left: 1px solid var(--border); }
.tdl-cerca-opzione { display: inline-flex; align-items: center; gap: .5rem; margin-top: .7rem; font-family: 'minor-headers', Georgia, serif; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); cursor: pointer; }
.tdl-cerca-opzione input { accent-color: var(--gold); }
.tdl-cerca-hint { margin: .8rem 0 0; font-size: .95rem; line-height: 1.6; color: var(--text-muted); }
.tdl-cerca-hint b { color: var(--gold); font-weight: normal; }
.tdl-cerca-hint kbd { font-family: 'minor-headers', Georgia, serif; font-size: .8rem; border: 1px solid var(--border); padding: 0 .4rem; color: var(--text-main); }
.tdl-cerca-esito { margin-bottom: 1rem; }
.tdl-cerca-vuoto { color: var(--text-main); }
.tdl-cerca-vuoto b { color: var(--gold); }
.tdl-cerca-cols { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 767.98px) { .tdl-cerca-cols { grid-template-columns: 1fr; gap: 1.5rem; } }
.tdl-cerca-facet h2 { font-size: .78rem; letter-spacing: .3em; margin: 0 0 .4rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border-dim); }
.tdl-cerca-facet h2 + ul + h2 { margin-top: 1.4rem; }
.tdl-cerca-facet ul { list-style: none; margin: 0; padding: 0; }
.tdl-cerca-facet li { display: flex; justify-content: space-between; gap: .5rem; padding: .35rem 0; font-family: 'minor-headers', Georgia, serif; font-size: .95rem; }
.manual-txt .tdl-cerca-facet a { color: var(--text-muted); border: 0; }
.manual-txt .tdl-cerca-facet li.is-on a, .manual-txt .tdl-cerca-facet a:hover { color: var(--gold); }
.tdl-cerca-facet li span { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.tdl-cerca-facet li.is-on span { color: var(--gold); }
@media (max-width: 767.98px) { .tdl-cerca-facet ul { display: flex; flex-wrap: wrap; gap: .3rem .9rem; } .tdl-cerca-facet li { gap: .3rem; } }
.tdl-cerca-eyebrow { display: block; font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.tdl-cerca-bozza { color: #f0a848; }
.manual-txt a.tdl-cerca-esatta {
    display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem;
    border: 0; box-shadow: 0 8px 40px rgba(0, 0, 0, .4), 0 0 0 1px rgba(201, 168, 76, .06); color: var(--text-main);
}
.tdl-cerca-esatta-titolo { font-family: 'Ringbearer', Georgia, serif; font-size: 1.6rem; color: var(--text-main); line-height: 1.2; }
/* .sheet-panel imposta il font a maiuscoletto: lo snippet della corrispondenza esatta torna al corpo del testo */
.tdl-cerca-esatta .tdl-cerca-snippet { font-family: 'Celestia', Georgia, serif; letter-spacing: 0; text-transform: none; }
.manual-txt a.tdl-cerca-esatta:hover .tdl-cerca-esatta-titolo { color: var(--gold-light); }
.tdl-cerca-lista { list-style: none; margin: 0; padding: 0; }
.tdl-cerca-voce { display: flex; flex-direction: column; gap: .25rem; padding: 1rem .2rem; border-top: 1px solid rgba(201, 168, 76, .12); }
.tdl-cerca-voce:first-child { border-top: 0; }
.manual-txt a.tdl-cerca-titolo { font-family: 'minor-headers', Georgia, serif; font-size: 1.15rem; color: var(--gold); border: 0; line-height: 1.3; }
.manual-txt a.tdl-cerca-titolo:hover { color: var(--gold-light); }
.tdl-cerca-snippet { font-size: 1rem; line-height: 1.55; color: var(--text-main); }
.tdl-cerca-snippet mark, .tdl-cerca-titolo mark, .tdl-cerca-esatta mark { background: rgba(201, 168, 76, .25); color: var(--gold-light); padding: 0 .1em; }
.tdl-cerca-data { font-family: 'minor-headers', Georgia, serif; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

/* radice: racconto + ricerca, sezioni, recenti */
/* titolo, racconto e ricerca sono tre figli della griglia: da 992 px la ricerca
   sta a destra su entrambe le righe; sotto, in colonna, va fra titolo e
   racconto (prima si arrivava al campo dopo tutta la narrazione, y ≈ 1100). */
.manual-intro-top { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; grid-template-areas: "titolo cerca" "testo cerca"; column-gap: 2.5rem; align-items: start; }
.manual-intro-top > .section-title { grid-area: titolo; }
.manual-intro-top > .manual-txt-inner { grid-area: testo; }
.manual-intro-top > .manual-intro-cerca { grid-area: cerca; }
@media (max-width: 991.98px) {
    .manual-intro-top { grid-template-columns: 1fr; grid-template-areas: "titolo" "cerca" "testo"; }
    .manual-txt form.manual-intro-cerca { margin: .2rem 0 1.4rem; }
}
.manual-txt form.manual-intro-cerca { display: flex; flex-direction: column; gap: .8rem; padding: 1.2rem 1.3rem; margin-top: 1rem; overflow: visible; font-family: inherit; }
.manual-intro-cerca .tdl-cerca-campo { padding-right: .8rem; }   /* senza bottone: un po' d'aria anche a destra */
.manual-intro-cerca .tdl-cerca-input { font-size: 1.05rem; }
.manual-intro-cerca .tdl-cerca-hint { margin: 0; font-size: .9rem; }
.manual-intro-sezioni, .manual-intro-recenti { margin-top: 2.8rem; }
.manual-intro .tdl-section-label { cursor: default; margin-bottom: 1rem; }
.manual-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .8rem; }
.manual-tile { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem .9rem; background: var(--bg-card); border: 1px solid var(--border-dim); min-height: 6.5rem; transition: border-color .2s; }
.manual-tile:hover { border-color: var(--border); }
.manual-tile.has-figli { grid-column: span 2; }
/* telefono: due colonne strette, senza descrizione (in una colonna sola le
   tile facevano 1250 px in tutto); i gruppi con sotto-voci tengono la riga intera */
@media (max-width: 575.98px) {
    .manual-tiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
    .manual-tile { min-height: 0; padding: .8rem .9rem .7rem; }
    .manual-tile-desc { display: none; }
    .manual-tile-n { font-size: 1.5rem; }
}
.manual-txt a.manual-tile-nome { font-family: 'minor-headers', Georgia, serif; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); border: 0; }
.manual-tile-n { font-family: 'Ringbearer', Georgia, serif; font-size: 1.8rem; line-height: 1; color: var(--text-main); font-variant-numeric: tabular-nums; }
.manual-tile-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.45; }
.manual-tile-figli { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: auto; padding-top: .5rem; font-family: 'minor-headers', Georgia, serif; font-size: .78rem; letter-spacing: .06em; }
.manual-txt .manual-tile-figli a { color: var(--text-main); border: 0; }
.manual-txt .manual-tile-figli a:hover { color: var(--gold); }
.manual-tile-figli a span, .manual-tile-altri { color: var(--text-muted); }
.manual-recenti { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .8rem; }
.manual-txt a.manual-recente { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .9rem; padding: .9rem; border: 1px solid var(--border-dim); background: var(--bg-card); color: var(--text-main); transition: border-color .2s; }
.manual-txt a.manual-recente:hover { border-color: var(--border); }
.manual-recente img, .manual-recente-noimg { width: 3.5rem; height: 4.75rem; object-fit: cover; object-position: top; border: 1px solid var(--border-dim); display: block; background: var(--bg-surface); }
.manual-recente > span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.manual-recente-titolo { font-family: 'minor-headers', Georgia, serif; font-size: 1rem; color: var(--gold); line-height: 1.3; }
.manual-recente-meta { font-family: 'minor-headers', Georgia, serif; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.manual-recente-testo { font-size: .9rem; line-height: 1.45; color: var(--text-main); }

/* ── Liste a card (classi, cdp, razze, archetipi) ─────────── */
/* La pagina usa la stessa colonna .manual-txt.manual-intro dell'intro e degli
   articoli: nessuna larghezza propria (prima era chiusa al 66% come col-lg-8). */
.tdl-card-container { display: flex; flex-wrap: wrap; justify-content: center; }

/* accordion "Modificatore di Livello" (Razze/Archetipi) */
/* come nella SPA: solo la barra del titolo, niente riquadro attorno alle card
   (.manual-txt nel selettore: batte `.manual-txt details` di articolo.css) */
.tdl-acc, .manual-txt .tdl-acc { margin: 0 0 3rem; border: 0; background: none; }
.manual-txt .tdl-acc > .tdl-card-container { padding: 1rem 0; }
.tdl-acc > summary {
    list-style: none; cursor: pointer; padding: .7rem 1rem;
    font-family: 'minor-headers', Georgia, serif; letter-spacing: .2em; text-transform: uppercase;
    color: var(--gold);
    background: linear-gradient(180deg, rgba(50, 37, 35, .7) 0%, rgba(255, 255, 255, 0) 100%);
    border-bottom: 1px solid transparent;
}
.tdl-acc[open] > summary { border-bottom-color: var(--border); color: var(--gold-light); }
.tdl-acc > summary::-webkit-details-marker { display: none; }
.tdl-acc > summary::before {
    content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 .8rem .2rem 0;
    border-left: 2px solid; border-bottom: 2px solid; transform: rotate(-135deg); transition: transform .3s;
}
.tdl-acc[open] > summary::before { transform: rotate(-45deg); }
.tdl-acc > summary h2 { display: inline; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.tdl-acc .tdl-card-container { padding: 1rem; }

/* card 3D: .tdl-card* in assets/tdl/tdl.css, tilt in assets/tdl/tdl-cards.js (condivisi con la creazione PG) */
