/* =====================================================================
   Artsupp — Pagine Legali / Tecniche Dark v2
   Fonte di verità: mockup https://6a96dc814c272887dcfc1dbe--candid-malabi-58f42e.netlify.app/termini-condizioni-dark-v2
   ===================================================================== */
:root{
  --nero:#011218; --blu_dark:#031F30; --blu:#052C43; --azzuro:#479FD3; --verde:#32D583;
  --as-teal:#01D8C0; --as-teal-hover:#008576; --as-teal-subtle:rgba(1,216,192,0.12);
  --as-maize:#FEC84B;
  --border:rgba(255,255,255,.08); --border-strong:rgba(255,255,255,.16);
  --surface:rgba(255,255,255,.03); --surface-2:rgba(255,255,255,.06);
  --surface-hover:rgba(255,255,255,.07);
  --text-main:rgba(255,255,255,.92);
  --text-dim:rgba(255,255,255,.76);
  --text-faint:rgba(255,255,255,.45);
  --r-sm:8px; --r-md:12px; --r-lg:16px;
  --fd:'Fira Sans',system-ui,-apple-system,sans-serif;
  --fu:'Inter',system-ui,-apple-system,sans-serif;
  --page-max:1180px; --page-pad:24px;
}

.legal-page-wrap {
  min-height: 70vh;
  background: var(--nero);
  color: var(--text-main);
  font-family: var(--fu);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

/* Colonna documento, centrata e proporzionata */
.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
  margin: 24px 0 20px;
  flex-wrap: wrap;
}
.crumb a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.crumb a:hover {
  color: #fff;
}
.crumb svg {
  width: 13px;
  height: 13px;
  opacity: .6;
}

/* DOCUMENTI LEGALI cliccabili in alto */
.legal-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.legal-tabs a {
  font-family: var(--fd);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: all .15s ease;
  text-decoration: none;
}
.legal-tabs a:hover {
  color: #fff;
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.legal-tabs a.active {
  background: #fff;
  color: #00201d;
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.doc h1 {
  font-family: var(--fd);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -.015em;
  color: #fff;
}

.updated {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

/* INTRODUZIONE STILIZZATA */
.doc-intro {
  margin: 24px 0 28px;
  padding: 20px 22px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(3, 31, 48, 0.45) 0%, rgba(1, 18, 24, 0.6) 100%);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.doc-intro p {
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.8;
  margin: 0 0 14px;
  white-space: pre-line;
}
.doc-intro p:last-child {
  margin-bottom: 0;
}
.doc-intro b, .doc-intro strong {
  color: #fff;
  font-weight: 600;
}
.doc-intro a {
  color: var(--as-teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(1,216,192,.4);
}
.doc-intro a:hover {
  color: #fff;
  border-color: var(--as-teal);
}

/* INDICE COMPATTO 2 COLONNE */
.toc-box {
  margin: 28px 0 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--blu_dark);
  padding: 20px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.toc-box .t {
  font-family: var(--fd);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.toc-box ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
.toc-box li {
  margin-bottom: 10px;
  break-inside: avoid;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}
.toc-box li::before {
  display: none !important;
}
.toc-box a {
  font-size: 14px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1.4;
}
.toc-box a:hover {
  color: var(--as-teal);
  transform: translateX(2px);
}
.toc-box a .n {
  color: var(--as-teal);
  font-weight: 700;
  font-family: var(--fd);
  min-width: 18px;
  flex-shrink: 0;
}

/* CORPO DELLE SEZIONI */
section.s {
  margin-bottom: 42px;
  scroll-margin-top: 80px;
}
section.s h2 {
  font-family: var(--fd);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
section.s h2 .n {
  color: var(--as-teal);
  font-weight: 700;
  font-family: var(--fd);
}
section.s h3,
section.s .sub {
  font-family: var(--fd);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  margin: 22px 0 10px;
  color: #fff;
  display: block;
}
section.s p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.82;
  margin: 0 0 16px;
  white-space: pre-line;
}
section.s p:last-child {
  margin-bottom: 0;
}
section.s b, section.s strong {
  color: #fff;
  font-weight: 600;
}
section.s a {
  color: var(--azzuro);
  border-bottom: 1px solid rgba(71,159,211,.4);
  text-decoration: none;
  transition: all .15s ease;
}
section.s a:hover {
  color: #fff;
  border-color: var(--as-teal);
}

/* =====================================================================
   ELENCHI PUNTATI (UL) — Card/Badge Moderni con Teal Accents
   ===================================================================== */
.doc ul {
  list-style: none;
  padding-left: 0;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc ul li {
  position: relative;
  padding: 12px 18px 12px 38px;
  line-height: 1.7;
  color: var(--text-dim);
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: all 0.15s ease;
}
.doc ul li:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.doc ul li::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--as-teal);
  box-shadow: 0 0 8px rgba(1,216,192,0.65);
}
.doc ul li b,
.doc ul li strong {
  color: #fff;
  font-weight: 600;
}

/* =====================================================================
   ELENCHI NUMERATI (OL) — Badge Circolari Numerati in Teal
   ===================================================================== */
.doc ol:not(.toc-box ol) {
  list-style: none;
  counter-reset: legal-item-counter;
  padding-left: 0;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc ol:not(.toc-box ol) > li {
  counter-increment: legal-item-counter;
  position: relative;
  padding: 12px 18px 12px 50px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-dim);
  transition: all 0.15s ease;
}
.doc ol:not(.toc-box ol) > li:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-main);
}
.doc ol:not(.toc-box ol) > li::before {
  content: counter(legal-item-counter);
  position: absolute;
  left: 14px;
  top: 11px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--as-teal-subtle);
  border: 1px solid rgba(1,216,192,0.35);
  color: var(--as-teal);
  font-family: var(--fd);
  font-weight: 700;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   BOX APPROVAZIONE CLAUSOLE VESSATORIE
   ===================================================================== */
.approve {
  border: 1px solid rgba(1, 216, 192, 0.25);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(1, 216, 192, 0.04) 0%, rgba(3, 31, 48, 0.5) 100%);
  padding: 22px 24px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-top: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.approve ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  margin: 14px 0 0;
  list-style: none;
  padding: 0;
}
.approve li {
  background: transparent !important;
  border: none !important;
  padding: 4px 0 4px 22px !important;
  font-size: 13.5px;
  color: #fff;
  line-height: 1.5;
}
.approve li::before {
  content: '✓' !important;
  position: absolute;
  left: 0 !important;
  top: 3px !important;
  color: var(--as-teal) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
}

/* =====================================================================
   TABELLE GDPR / COOKIE DARK
   ===================================================================== */
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.doc table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-strong);
  background: var(--blu_dark);
  color: #fff;
  font-family: var(--fd);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
}
.doc table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.65;
}
.doc table tr:last-child td {
  border-bottom: none;
}
.doc table tr:hover td {
  background: rgba(255,255,255,.025);
}
.doc table code {
  font-family: 'Roboto Mono', monospace, sans-serif;
  color: var(--as-teal);
  background: rgba(1,216,192,0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12.5px;
  border: 1px solid rgba(1,216,192,0.2);
}

/* BOTTONE GESTISCI COOKIE */
.doc-btn-pref {
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  border: 1px solid var(--as-teal);
  background: var(--as-teal);
  color: #00201d;
  margin: 18px 0 24px;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.doc-btn-pref:hover {
  background: var(--as-teal-hover);
  border-color: var(--as-teal-hover);
  color: #fff;
  transform: translateY(-1px);
}

.doc-foot {
  border-top: 1px solid var(--border);
  margin-top: 36px;
  padding: 24px 0 60px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.7;
}
.doc-foot a {
  color: var(--azzuro);
  text-decoration: none;
  border-bottom: 1px solid rgba(71,159,211,.4);
}
.doc-foot a:hover {
  color: #fff;
  border-color: var(--azzuro);
}

@media(max-width: 640px) {
  .toc-box ol { columns: 1; }
  .approve ul { grid-template-columns: 1fr; }
  .doc h1 { font-size: 26px; }
  .doc table { display: block; overflow-x: auto; }
  .legal-tabs { gap: 6px; }
  .legal-tabs a { font-size: 12px; padding: 6px 12px; }
  .doc ul li { padding: 10px 14px 10px 32px; }
  .doc ol:not(.toc-box ol) > li { padding: 10px 14px 10px 44px; }
}
