/* OPLYO · pagine LEGALI e 404 "premium" (staging 03/11/2026)
   Stesso tema della home: oplyo-metrik.css (token, header, pulsanti, footer completo con fascia pagamenti, nota marchi, scala laptop) si carica PRIMA di
   questo foglio, cosi' header e footer sono identici alla home. Qui: solo (1) le due regole tipografiche del footer che in home stanno in oplyo-type.css
   e (2) la presentazione del documento. I corpi in legal/*.html non cambiano (classi storiche). Sotto `html:root body` come il tema. */

/* 1 · footer: stessa scala tipografica della home (da oplyo-type.css, sezione "footer e note") */
html:root { --ty-ft: calc(15px * var(--vs)); --ty-ft-h: calc(14px * var(--vs)); --ty-ft-lh: 1.5; }
html body .ft_col p, html body .ft_col a, html body .ft_brand p, html body .ft_id, html body .ft_low, html body .ft_low *, html body .ft_trust, html body .ft_trust * { font-size: var(--ty-ft); line-height: var(--ty-ft-lh); }
html body .ft_brand p { line-height: 1.6; }
html body .ft_col p { font-size: var(--ty-ft-h); font-weight: 600; }
html:root body .ft_disc { font-size: calc(13.5px * var(--vs)); line-height: 1.7; color: #9a9a9a; }

/* 2 · documento ------------------------------------------------------------------------------------------------------------------------ */
html:root body .section-legal:not(.oplyo-404) { background: radial-gradient(60rem 22rem at 50% 0, rgba(255,255,255,.95), rgba(245,245,245,0) 70%); padding: calc(var(--hd) + clamp(2.25rem, 1.5rem + 3vw, 4.5rem)) 0 clamp(3.5rem, 3rem + 3vw, 6rem); }
html:root body .section-legal:not(.oplyo-404) .legal-wrapper { max-width: calc(54rem + 2 * var(--gut)); }
html:root body .legal-content { display: block; }
html:root body .section-legal:not(.oplyo-404) .legal-bottom { grid-template-columns: minmax(0, 1fr); }
html:root body .section-legal .legal-item, html:root body .section-legal .legal-item * { overflow-wrap: anywhere; }
html:root body .section-legal .legal-table * { overflow-wrap: normal; }

/* testata: dentro la card (spostata da js/oplyo-legal.js), a sinistra, titolo su una riga e filetto sotto */
html:root body .section-legal:not(.oplyo-404) .legal-top { display: block; gap: 0; margin: 0; padding: clamp(1.9rem, 1.2rem + 2.4vw, 3.1rem) 0 clamp(1.4rem, 1rem + 1.4vw, 2.1rem); border: 0; border-bottom: 1px solid var(--line); text-align: left; }
html:root body .legal-top::before { display: none; }
html:root body .legal-top .legal-headline { display: block; width: 100%; max-width: none; margin: 0; text-align: left !important; }
html:root body .section-legal:not(.oplyo-404) .legal-top .heading-h2 {
  font-family: var(--mk-head); font-weight: 600; color: var(--ink); text-transform: none; text-align: left !important; margin: 0; max-width: none;
  font-size: clamp(1.35rem, .9rem + 1.9vw, 2.4rem); line-height: 1.12; letter-spacing: -.03em; white-space: normal; text-wrap: balance; overflow-wrap: break-word; }
@media (min-width: 768px) { html:root body .section-legal:not(.oplyo-404) .legal-top .heading-h2 { white-space: nowrap; } }

/* corpo: una sola superficie bianca, morbida */
html:root body .section-legal:not(.oplyo-404) .legal-bottom {
  background: var(--mk-card); border-radius: clamp(1.4rem, 1rem + 1.6vw, 2.25rem); padding: 0 clamp(1.25rem, .6rem + 3.4vw, 3.5rem) clamp(.25rem, .1rem + .6vw, .75rem);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .03), 0 30px 60px -44px rgba(0, 0, 0, .22); }
html:root body .legal-item { padding: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem) 0; gap: .95rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--hd) + 1rem); }
html:root body .legal-item:first-child { border-top: 0; }
html:root body .legal-item .text-xl_2 { display: flex; align-items: baseline; gap: .7rem; }
html:root body .legal-item_text { gap: .85rem; }
html:root body .legal-item .text-xl_2 { font-family: var(--mk-head); font-weight: 600; font-size: clamp(1rem, .92rem + .3vw, 1.18rem); line-height: 1.3; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; }
html:root body .section-legal .text-sm { font-size: clamp(.98rem, .94rem + .15vw, 1.04rem); line-height: 1.75; color: #474747; letter-spacing: -.002em; text-wrap: pretty; }
html:root body .section-legal .legal-item_text > .text-sm strong { color: var(--ink); font-weight: 600; }
html:root body .section-legal .text-lg { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
html:root body .legal-item_points-list { gap: .5rem; padding-left: 1.3rem; }
html:root body .legal-item_point-list-item::marker { color: #a3a3a3; }
html:root body .section-legal a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(0, 0, 0, .28); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color .15s ease; }
html:root body .section-legal a:not(.btn):hover { text-decoration-color: var(--ink); }

/* tabelle (cookie policy) */
html:root body .legal-table_wrap { border: 0; border-radius: 1rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); background: #fff; }
html:root body .legal-table th, html:root body .legal-table td { padding: .8rem 1rem; border-top: 1px solid var(--line-2); }
html:root body .legal-table thead th { background: #f3f3f3; color: var(--ink); font-weight: 600; font-size: .85rem; letter-spacing: .01em; }

/* nota "documento in italiano" sulle versioni tradotte */
html:root body .oplyo-legal_note { max-width: calc(54rem); margin: calc(var(--hd) + 1.25rem) auto -1.25rem; padding: .85rem 1.1rem; border-radius: 1rem; background: #fff; border: 0; color: #474747; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }

/* indice laterale (costruito da js/oplyo-legal.js, solo desktop largo; senza intestazione di testo) */
.legal-toc { display: none; }
@media (min-width: 1180px) {
  html:root body .legal-content.has-toc { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); column-gap: clamp(2rem, 3vw, 3.25rem); align-items: start; }
  html:root body .legal-content.has-toc .legal-top { grid-column: 1 / -1; }
  html:root body .section-legal:not(.oplyo-404) .legal-wrapper:has(.has-toc) { max-width: calc(76rem + 2 * var(--gut)); }
  html:root body .legal-toc { display: block; position: sticky; top: calc(var(--hd) + var(--promo-vis, 0px) + 1.25rem); max-height: calc(100vh - var(--hd) - 2.5rem); overflow: auto; padding: .35rem 0; scrollbar-width: thin; }
  html:root body .legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
  html:root body .legal-toc a { display: block; padding: .5rem .85rem; border-radius: .8rem; color: #737373; font-size: .9rem; line-height: 1.35; text-decoration: none; text-transform: none; transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }
  html:root body .section-legal .legal-toc a:not(.btn) { text-decoration: none; color: #737373; }
  html:root body .section-legal .legal-toc a:not(.btn):hover { color: var(--ink); }
  html:root body .section-legal .legal-toc a[aria-current="true"] { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04); font-weight: 600; }
}

/* 3 · 404 ------------------------------------------------------------------------------------------------------------------------------ */
html:root body .oplyo-404 .legal-top { min-height: 56vh; }
html:root body .oplyo-404 .legal-top::before { display: none; }
html:root body .oplyo-404_code { font-family: var(--mk-head); font-weight: 600; letter-spacing: -.05em; background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--ink); }
html:root body .oplyo-404 .legal-top .heading-h2 { font-family: var(--mk-head); font-weight: 600; letter-spacing: -.025em; }
