/* T2.9 — Legal pages (/it/privacy.html, /it/cookie-policy/). Uses tokens from site.css. */

.legal__head { border-bottom: 1px solid var(--line); }
.legal__kicker {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.legal__sub { margin-top: 14px; color: var(--muted); max-width: 60ch; }

.legal__grid {
  display: grid; gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(32px, 5vw, 64px) var(--band);
}
@media (min-width: 1024px) {
  .legal__grid { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
  .legal__aside { position: sticky; top: calc(var(--header-h) + 24px); }
}

.legal__body { max-width: 72ch; min-width: 0; overflow-wrap: break-word; }
.legal__body h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-top: 2em; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 { font-size: 1.0625rem; margin-top: 1.75em; }
.legal__body code { font-size: .875em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.legal__address { font-style: normal; }

.legal__update {
  margin-block: 2em; padding: clamp(20px, 3vw, 28px);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ink);
  border-radius: var(--radius);
}
.legal__update > * + * { margin-top: 1em; }
.legal__update h2 { margin-top: 0; }

.legal__table {
  margin-top: 1em; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.legal__table:focus-visible { outline-offset: 2px; }
.legal__table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: var(--fs-small); line-height: 1.45; }
.legal__table th, .legal__table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal__table tr:last-child td { border-bottom: 0; }
.legal__table thead th { background: var(--paper-2); font-weight: 600; white-space: nowrap; }
.legal__table td:nth-child(3) { white-space: nowrap; }
.legal__table code { overflow-wrap: normal; white-space: nowrap; }
/* Phones: each cookie becomes a small card (provider · duration, name, purpose)
   instead of a 560px table squeezed into a scroller with very tall rows. */
@media (max-width: 639px) {
  .legal__table { overflow: visible; }
  .legal__table table { min-width: 0; }
  .legal__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal__table tbody, .legal__table td { display: block; }
  .legal__table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .legal__table tr:last-child { border-bottom: 0; }
  .legal__table td { padding: 0; border: 0; }
  .legal__table td:nth-child(1) { color: var(--muted); }
  .legal__table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-weight: 600; }
  .legal__table td:nth-child(2) code { white-space: normal; overflow-wrap: anywhere; }
  .legal__table td:nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; color: var(--muted); }
  .legal__table td:nth-child(3)::before { content: "Durata "; }
  .legal__table td.is-days::after { content: " giorni"; }
  .legal__table td.is-one::after { content: " giorno"; }
  .legal__table td:nth-child(4) { grid-column: 1 / -1; margin-top: 4px; }
  .legal__table td[colspan] { grid-column: 1 / -1; }
}

.legal__aside { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.legal__aside > * + * { margin-top: 12px; }
.legal__aside-h { font-size: 1rem; }
.legal__links li + li { margin-top: 4px; }
.legal__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.legal__links a[aria-current="page"] { text-decoration-thickness: 2.5px; }
