/* Guida del Portale (28/10/2026): pulsante «Guida» nella testata e pannello a destra (mockup approvato, tavola Main).
   Sopra tutto, anche sopra le finestre delle pratiche (z-index 10002-10003). */
.ps-guida-btn { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 10px;
    border-radius: 19px; border: 1px solid var(--ps-notte, #17233A); background: var(--ps-notte, #17233A); color: #fff; cursor: pointer;
    font: 600 13.5px 'Segoe UI', system-ui, sans-serif; transition: background .15s, box-shadow .15s; }
.ps-guida-btn:hover { background: #22324F; box-shadow: 0 6px 16px rgba(23,35,58,.18); }
.ps-guida-btn:focus-visible { outline: 2px solid var(--ps-oro, #C5A059); outline-offset: 2px; }
.ps-guida-btn .ps-guida-q { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ps-oro, #C5A059); color: var(--ps-oro, #C5A059);
    display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.ps-guida-btn kbd { font: 600 10.5px 'Segoe UI', system-ui, sans-serif; color: #A9B6C8; border: 1px solid rgba(169,182,200,.35); border-radius: 5px;
    padding: 1px 5px; margin-left: 2px; }

.ps-guida-velo { position: fixed; inset: 0; z-index: 10010; background: rgba(23,35,58,.35); opacity: 0; pointer-events: none; transition: opacity .25s; }
html[data-ps-guida-aperta] .ps-guida-velo { opacity: 1; pointer-events: auto; }

.ps-guida { position: fixed; top: 0; right: 0; bottom: 0; z-index: 10011; width: min(520px, 100%); display: flex; flex-direction: column;
    background: #FCFBF8; color: #1B2533; box-shadow: -20px 0 60px rgba(0,0,0,.22); font-family: 'Segoe UI', system-ui, sans-serif;
    transform: translateX(102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
html[data-ps-guida-aperta] .ps-guida { transform: none; }
.ps-guida:focus { outline: none; }
.ps-guida[hidden] { display: none; }

.ps-guida-testa { position: relative; background: #17233A; color: #E9EEF5; padding: 22px 70px 20px 26px; }
.ps-guida-etichetta { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #C5A059; }
.ps-guida-testa h2 { margin: 6px 0 4px; font-family: "Bodoni Moda", "Bodoni 72", Didot, "Book Antiqua", Georgia, serif; font-weight: 500;
    font-size: 28px; color: #fff; }
.ps-guida-testa p { margin: 0; font-size: 13.5px; color: #A9B6C8; }
.ps-guida-chiudi { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    border: 1px solid rgba(233,238,245,.25); background: transparent; color: #E9EEF5; cursor: pointer; }
.ps-guida-chiudi:hover { color: #C5A059; border-color: rgba(197,160,89,.6); }
.ps-guida-chiudi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.ps-guida-corpo { flex: 1 1 auto; overflow-y: auto; padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 22px; }
.ps-guida-sez { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8E6A26; margin: 0 0 10px; }
.ps-guida-scopo { margin: 0; font-size: 15px; line-height: 1.55; }
.ps-guida-nota { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #F4EBDA; color: #5f4618; font-size: 13.5px; line-height: 1.45; }
.ps-guida-passi { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: flex; flex-direction: column; gap: 12px;
    font-size: 14.5px; line-height: 1.45; }
.ps-guida-passi li { counter-increment: passo; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.ps-guida-passi li::before { content: counter(passo); width: 28px; height: 28px; border-radius: 50%; background: #17233A; color: #C5A059;
    display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ps-guida-faq { display: flex; flex-direction: column; gap: 8px; }
.ps-guida-faq details { border: 1px solid #E6EAEF; border-radius: 12px; padding: 12px 14px; background: #fff; }
.ps-guida-faq summary { font-weight: 600; cursor: pointer; list-style: none; font-size: 14.5px; }
.ps-guida-faq summary::-webkit-details-marker { display: none; }
.ps-guida-faq summary::before { content: "+"; display: inline-block; width: 16px; color: #8E6A26; font-weight: 700; }
.ps-guida-faq details[open] summary::before { content: "–"; }
.ps-guida-faq p { margin: 8px 0 0; color: #4A5563; font-size: 14px; line-height: 1.5; }

.ps-guida-piede { padding: 14px 26px; border-top: 1px solid #E6EAEF; background: #fff; display: flex; justify-content: space-between;
    align-items: center; gap: 10px; flex-wrap: wrap; }
.ps-guida-piede a { font-weight: 600; font-size: 14px; color: #8E6A26; text-decoration: none; }
.ps-guida-piede a:hover { color: #5f4618; text-decoration: underline; }
.ps-guida-piede .ps-guida-pdf { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #DDE2E8; background: #fff; color: #1B2533;
    display: inline-flex; align-items: center; font-size: 13.5px; }
.ps-guida-piede .ps-guida-pdf:hover { border-color: #C5A059; text-decoration: none; }

@media (max-width: 640px) {
    .ps-guida-btn { padding: 0 10px; }
    .ps-guida-btn .ps-guida-testo, .ps-guida-btn kbd { display: none; }
    .ps-guida-testa { padding: 18px 64px 16px 18px; }
    .ps-guida-corpo, .ps-guida-piede { padding-left: 18px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) { .ps-guida, .ps-guida-velo { transition: none; } }
@media print { .ps-guida, .ps-guida-velo, .ps-guida-btn { display: none !important; } }
