/* assets/legali/legale.css · Modello Legale canonico (griglia 1312px, .twg-ph, indice sticky) */
.twg-legal-main { padding: 0 0 84px; }
.twg-ph--legal .twg-ph-h1 { max-width: 24ch; }
.twg-ph--legal .twg-ph-lead { margin-bottom: 0; max-width: 64ch; }
.twg-ph--legal .twg-ph-lead a { color: var(--accent-cyan); text-decoration: underline; text-underline-offset: 3px; }
.twg-legal-hero { margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--border-subtle); background: var(--bg-card); box-shadow: var(--shadow-card); }
.twg-legal-hero picture, .twg-legal-hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.twg-legal-img--light { display: none !important; }
:root[data-theme="light"] .twg-legal-img--dark { display: none !important; }
:root[data-theme="light"] .twg-legal-img--light { display: block !important; }
.twg-legal-body { padding-top: 40px; }
.twg-legal-layout { display: grid; grid-template-columns: minmax(0, 820px) minmax(240px, 310px); justify-content: space-between; gap: clamp(28px, 3.6vw, 56px); align-items: start; }
.twg-legal-prose { display: grid; gap: 22px; min-width: 0; }
.twg-legal-prose > section.spec-tile { scroll-margin-top: 132px; padding: 26px 28px !important; min-width: 0; }
.twg-legal-prose > section.spec-tile:focus { outline: none; }
.twg-legal-prose > section.spec-tile:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 3px; }
.twg-legal-prose p, .twg-legal-prose li { max-width: 70ch; }
.twg-legal-prose .twg-legal-tab { max-width: 100%; }
.twg-legal-toc-col { position: sticky; top: 128px; min-width: 0; }
.twg-legal-toc { scroll-target-group: auto; padding: 20px; border-radius: 16px; border: 1px solid var(--border-subtle); background: var(--bg-card); }
.twg-legal-toc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-cyan); }
.twg-legal-toc-head svg { width: 15px; height: 15px; flex: none; }
.twg-legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.twg-legal-toc a { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px; border-radius: 9px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--fg-secondary); text-decoration: none; transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.twg-legal-toc a:hover { color: var(--fg-primary); background: var(--bg-subtle); }
.twg-legal-toc a:focus-visible { outline: 2px solid var(--accent-cyan); outline-offset: 2px; }
.twg-legal-toc a:is(:target-current, .target-current) { color: var(--fg-primary); font-weight: 650; background: var(--bg-subtle); border-left-color: var(--accent-cyan); }
.twg-legal-toc-num { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--fg-muted); flex: none; }
.twg-legal-toc a:is(:target-current, .target-current) .twg-legal-toc-num { color: var(--accent-cyan); }
.twg-legal-toc-siblings { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); display: grid; gap: 6px; }
.twg-legal-toc-siblings a { font-size: 12.5px; padding: 5px 8px; }
@media (max-width: 1040px) { .twg-legal-layout { grid-template-columns: minmax(0, 1fr); } .twg-legal-toc-col { position: static; order: -1; } .twg-legal-toc ol { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }
@media (max-width: 640px) { .twg-legal-body { padding-top: 24px; } .twg-legal-prose > section.spec-tile { padding: 18px 16px !important; } .twg-legal-toc { padding: 16px; } .twg-legal-toc ol { grid-template-columns: 1fr; } }
