/* Tema chiaro di default, scuro solo con [data-theme="dark"] su <html>
   (impostato dallo script inline in <head> di login.html prima del primo
   paint, per evitare il flash del tema sbagliato — stesso principio del
   fix FOUC su #authView, vedi app.js). Interruttore manuale (non solo
   prefers-color-scheme): richiesta esplicita, l'utente deve poter scegliere
   e la scelta deve restare tra una visita e l'altra (localStorage). */
:root {
  color-scheme: light;
  --bg: #f3f5fb;
  --card: #ffffff;
  --border: #e4e8f1;
  --text: #1c2333;
  --muted: #6b7280;
  --accent: #4f7cff;
  --accent-soft: #ecf0ff;
  --danger: #e5484d;
  --ok: #1c9d63;
  --warn: #b8720a;
  --input-bg: #ffffff;
  --hover-bg: rgba(20, 30, 60, .045);
  --sidebar-w: 230px;
  --topbar-h: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2e38;
  --text: #e6e8eb;
  --muted: #9aa0ab;
  --accent: #4f7cff;
  --accent-soft: rgba(79, 124, 255, .16);
  --danger: #ff5c5c;
  --ok: #3ecf8e;
  --warn: #f5a623;
  --input-bg: #0f1115;
  --hover-bg: rgba(255, 255, 255, .04);
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; }

[hidden] { display: none !important; }

/* --- schermata di login/registrazione: niente sidebar, solo una card centrata --- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-card { width: 100%; max-width: 380px; }
.auth-title { font-size: 1.1rem; margin: 0 0 1.25rem; }
.auth-back-link { text-align: center; margin: 1.25rem 0 0; font-size: .85rem; }
.auth-back-link a { color: var(--muted); text-decoration: none; }
.auth-back-link a:hover { color: var(--text); }

/* --- shell con sidebar, per tutto cio' che sta dopo il login ---
   Niente min-width sulla pagina: c'era (1280px) per non schiacciare le
   tabelle larghe del founder, ma faceva scorrere di lato *tutta* la pagina
   su tablet e finestre strette. Ora ogni tabella scorre per conto suo
   dentro .table-scroll, e le due tabelle del cliente diventano schede sotto
   i 700px (vedi .cards-on-mobile). */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand { font-size: .95rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.3; }
.sidebar-brand span { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }

.sidebar-nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .6rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
}
.nav-icon { font-size: 1rem; width: 1.1rem; text-align: center; flex-shrink: 0; }
.nav-link:hover { background: var(--hover-bg); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }

.sidebar-footer { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.sidebar-footer .muted { display: block; margin-bottom: .5rem; word-break: break-all; }
.sidebar-footer button { width: 100%; margin-top: 0; }

.main-content { flex: 1; min-width: 0; padding: 2rem; }
.content-inner { width: 100%; }
.content-header { margin-bottom: 1.25rem; }
.content-header h1 { font-size: 1.3rem; margin: 0; }

/* --- topbar: sempre visibile (hamburger solo su mobile, vedi media query
   sotto) — ricerca prodotti a sinistra, interruttore tema a destra. */
.topbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: var(--topbar-h);
  padding: 0 1.5rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-search { flex: 1; min-width: 0; max-width: 480px; padding: .45rem .75rem; font-size: .9rem; }

/* Sincronizzazione in corso (app.js, watchSync): rotellina nel bottone e
   barra — indeterminata finche' il negozio non ha detto quanti elementi ci sono. */
.spinner {
  display: inline-block; width: .9em; height: .9em; vertical-align: -.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sync-progress { margin: 0 0 1rem; max-width: 520px; }
.sync-progress-label { font-size: .85rem; margin-bottom: .35rem; }
.progress-track { height: 8px; border-radius: 999px; background: var(--hover-bg); border: 1px solid var(--border); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .4s ease; }
.progress-fill.indeterminate { width: 35%; animation: indeterminate 1.2s ease-in-out infinite; }
@keyframes indeterminate { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* Firma del progetto: sotto il contenuto nel pannello, sotto la card nella
   schermata di accesso. */
.app-footer {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: space-between;
  padding: 1rem 2rem 1.5rem; color: var(--muted); font-size: .8rem;
}
.app-footer a { color: var(--muted); }
.app-footer a:hover { color: var(--accent); }
.auth-screen .app-footer { justify-content: center; text-align: center; padding: 1.25rem 0 0; }

/* Changelog (app.js, renderMarkdown): testo lungo, non una tabella. */
.changelog { max-width: 760px; line-height: 1.55; }
.changelog h3 { margin: 1.75rem 0 .5rem; font-size: 1rem; }
.changelog h3:first-child, .changelog h2:first-child { margin-top: 0; }
.changelog h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.changelog h4 { margin: 1rem 0 .35rem; font-size: .92rem; }
.changelog p { margin: .5rem 0; }
.changelog ul { margin: .5rem 0; padding-left: 1.2rem; }
.changelog li { margin: .35rem 0; }

/* Finestra "Venduto" (app.js, openSoldDialog) — <dialog> nativo. */
.modal {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--text);
  padding: 1.25rem; width: min(380px, calc(100vw - 32px));
}
.modal::backdrop { background: rgba(0, 0, 0, .5); }
.modal h3 { margin: 0; font-size: 1rem; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }
.modal-actions button { margin-top: 0; }

/* Avviso laterale (app.js, showToast). */
.toast {
  position: fixed; top: calc(var(--topbar-h) + 12px); right: 16px; z-index: 40;
  width: min(360px, calc(100vw - 32px));
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: 10px;
  padding: .85rem 1rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toast-in .25s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast-body { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.45; }
.toast-title { display: block; margin-bottom: .2rem; }
.toast-close { background: none; color: var(--muted); margin: 0; padding: 0 .2rem; font-size: 1.2rem; line-height: 1; }
.toast-close:hover { color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Filtri sopra la tabella Ordini (app.js, ordiniFiltrati). */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; margin-bottom: 1rem; }
.filter-field { display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; max-width: 220px; }
.filter-field label { margin: 0 0 .25rem; }
.filter-bar button { margin: 0; }
@media (max-width: 700px) { .filter-field { flex-basis: 100%; max-width: none; } .filter-bar button { width: 100%; } }

/* Paginazione della tabella Prodotti (app.js, renderProductsPage). */
.pager { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.pager button, .pager label { margin: 0; }
.pager select { width: auto; padding: .35rem .5rem; }
.pager button:disabled { opacity: .45; cursor: default; }
.mobile-menu-btn {
  background: none; border: none; color: var(--text);
  font-size: 1.3rem; line-height: 1; padding: .4rem; margin: 0; cursor: pointer;
}
@media (min-width: 1025px) { .mobile-menu-btn { display: none; } }

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 36px; height: 36px; padding: 0; margin: 0 0 0 auto; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text); cursor: pointer;
}
.theme-toggle:hover { background: var(--hover-bg); }
.theme-toggle .icon-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-light { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-dark { display: inline; }

.sidebar-overlay { display: none; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

h2 { margin-top: 0; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

label { display: block; font-size: .85rem; color: var(--muted); margin: .75rem 0 .25rem; }

input, select, textarea {
  width: 100%;
  padding: .6rem .7rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
}
textarea { resize: vertical; }
input:disabled { opacity: .6; }

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: .6rem 1rem;
  font-size: .9rem;
  background: var(--accent);
  color: white;
  margin-top: 1rem;
}

button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
/* Solo icona (es. il cestino in Prodotti): il testo sta nel title/aria-label. */
button.icon-btn { padding: .45rem .6rem; font-size: 1rem; line-height: 1; }
button.icon-btn:hover { border-color: var(--danger); color: var(--danger); }
button.link { background: none; color: var(--accent); padding: 0; margin: 0; }

.error { color: var(--danger); font-size: .85rem; margin-top: .5rem; min-height: 1.2em; }
.muted { color: var(--muted); font-size: .85rem; }

.tabs { display: flex; gap: 1rem; margin-bottom: 1rem; }
.tabs button { background: none; color: var(--muted); margin: 0; padding: .3rem 0; border-bottom: 2px solid transparent; border-radius: 0; }
.tabs button.active { color: var(--text); border-color: var(--accent); }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; white-space: nowrap; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; }

.badge { padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; }
.badge.active { background: rgba(62,207,142,.15); color: var(--ok); }
.badge.expired, .badge.cancelled { background: rgba(255,92,92,.15); color: var(--danger); }
.badge.invalid { background: rgba(245,166,35,.15); color: var(--warn); }
.badge.free, .badge.inactive { background: rgba(154,160,171,.15); color: var(--muted); }

code { background: var(--input-bg); padding: .1rem .35rem; border-radius: 4px; }

/* --- Sync: scheda del plugin WordPress (app.js, renderPluginCard) --- */
.plugin-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 1rem;
  max-width: 560px; margin-top: 1rem;
}
.plugin-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.plugin-card-actions .btn { font-size: .85rem; }

/* --- Sync: box canali (Hub multi-canale) --- */
.channel-grid { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.channel-box { border: 1px solid var(--border); border-radius: 10px; padding: .75rem; flex: 1 1 160px; max-width: 220px; min-width: 0; cursor: pointer; }
.channel-box-name, .channel-box-status { overflow-wrap: anywhere; }
.channel-box.selected { border-color: var(--accent); background: var(--accent-soft); }
.channel-box-header { display: flex; align-items: center; gap: .6rem; }
.channel-logo { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: .78rem; flex-shrink: 0; }
.channel-box-name { font-size: .88rem; font-weight: 500; }
.channel-box-status { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.status-ok { color: var(--ok); font-weight: 600; }
/* Pannello unico sotto la griglia (non piu' annidato in ogni box): un solo
   canale aperto alla volta, stesso principio di un accordion — vedi app.js,
   renderChannelDetailPanel(). */
.channel-detail-panel { margin-top: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: 10px; background: var(--card); max-width: 420px; }
.channel-account-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .85rem; }

/* --- Dashboard: riepilogo Hub multi-canale (prodotti/canali/ordini/
   fatturato, andamento vendite, ordini per canale, attivita' recente) —
   vedi /api/v1/hub/dashboard e app.js, loadDashboardPage(). Tutto onesto:
   finche' nessun adapter scrive ordini (fase 4, vedi DESIGN.md) i grafici
   restano a zero con un messaggio, non con dati finti. */
.dash-greeting {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem; margin-bottom: 1rem; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-soft), var(--card) 70%);
  border: 1px solid var(--border);
}
.dash-greeting-title { margin: 0 0 .35rem; font-size: 1.3rem; color: var(--text); text-transform: none; letter-spacing: normal; }

/* minmax(0, ...) ovunque, non 1fr secco: con `1fr` una colonna non scende
   mai sotto la larghezza minima del suo contenuto, e una riga lunga (il
   feed attivita') allargava tutta la pagina oltre lo schermo del telefono. */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: .9rem; margin-bottom: 1rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.1rem; display: flex; align-items: center; gap: .8rem; margin: 0; }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.stat-value { font-size: 1.35rem; font-weight: 600; line-height: 1.25; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--muted); }

.dash-charts-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin: 0; }
.donut-card { text-align: center; }

/* Avviso "funzione in fase di sviluppo" (Dashboard). */
.dev-notice { color: var(--warn); font-size: .85rem; margin: .5rem 0 0; }

/* Grafico vendite: intestazione con il menu "⋯" (periodo e tipo) e
   tooltip che segue il punto sotto il mouse — vedi renderTrendChart(). */
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.chart-head h2 { margin: 0; }
.chart-menu-wrap { position: relative; }
.chart-menu-wrap .icon-btn { margin: 0; padding: .1rem .5rem; line-height: 1; }
.chart-menu {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 15;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: .35rem; min-width: 150px;
}
.chart-menu-title { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: .4rem .6rem .2rem; }
.chart-menu-item {
  display: block; width: 100%; text-align: left; background: none; color: var(--text);
  margin: 0; padding: .4rem .6rem; border-radius: 6px; font-size: .85rem;
}
.chart-menu-item:hover { background: var(--hover-bg); }
.chart-menu-item.active { color: var(--accent); font-weight: 600; }

.trend-wrap { position: relative; margin-top: .75rem; }
.trend-svg { width: 100%; height: 160px; display: block; }
.trend-bar { fill: var(--accent); opacity: .75; }
.trend-bar.on { opacity: 1; }
.trend-dot { fill: var(--accent); }
.trend-hit { fill: transparent; cursor: pointer; }
.trend-hit:hover { fill: var(--hover-bg); }
.chart-tooltip {
  position: absolute; z-index: 10; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: .35rem .6rem; font-size: .8rem; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.chart-tooltip strong { display: block; font-size: .9rem; }
.trend-area { fill: var(--accent); opacity: .15; }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2; }

.donut { width: 140px; height: 140px; border-radius: 50%; margin: .5rem auto 0; position: relative; }
.donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--card); }
.donut-legend { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; font-size: .82rem; text-align: left; }
.donut-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .4rem; flex-shrink: 0; }
.donut-legend-item { display: flex; align-items: center; }

.dash-bottom-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.activity-card, .recent-orders-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin: 0; }
.activity-list { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.activity-item { display: flex; align-items: center; gap: .6rem; font-size: .85rem; flex-wrap: wrap; }
.activity-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.activity-text { flex: 1 1 60%; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.activity-time { font-size: .72rem; white-space: nowrap; }
.link-more { display: inline-block; margin-top: .5rem; color: var(--accent); text-decoration: none; font-size: .85rem; }
.link-more:hover { text-decoration: underline; }

@media (max-width: 980px) {
  .dash-charts-row, .dash-bottom-row { grid-template-columns: minmax(0, 1fr); }
}

/* --- Impostazioni: icona "tieni premuto per vedere" sulla nuova password --- */
.password-field { position: relative; }
.password-field input { padding-right: 2.4rem; }
.password-toggle {
  position: absolute; right: .2rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; margin: 0; padding: .3rem .5rem;
  cursor: pointer; color: var(--muted); font-size: 1rem; line-height: 1;
  user-select: none;
}
.password-toggle:hover { color: var(--text); }

/* Su schermo stretto le tabelle "del cliente" (Prodotti, Ordini) diventano
   schede impilate: 6-7 colonne su un telefono si leggono solo scorrendo di
   lato. L'intestazione sparisce e ogni cella si porta dietro il suo nome in
   data-label (vedi renderHubProducts/renderOrderRows in app.js). Le tabelle
   del founder restano tabelle: sono da scrivania. */
@media (max-width: 700px) {
  .cards-on-mobile { overflow-x: visible; }
  .cards-on-mobile table, .cards-on-mobile tbody, .cards-on-mobile tr, .cards-on-mobile td { display: block; width: 100%; }
  .cards-on-mobile thead { display: none; }
  .cards-on-mobile tr {
    border: 1px solid var(--border); border-radius: 10px;
    padding: .6rem .8rem; margin-bottom: .75rem;
  }
  .cards-on-mobile td {
    border: none; padding: .3rem 0; white-space: normal;
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between;
  }
  .cards-on-mobile td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
  .cards-on-mobile td:empty { display: none; }
  .cards-on-mobile td input { width: auto; max-width: 45%; }
  .cards-on-mobile td button { margin-top: 0; }
}

/* --- telefono e tablet: la sidebar diventa un drawer che scorre da sinistra.
   Soglia a 1024px (era 860): a 1000px la sidebar fissa lasciava al contenuto
   una striscia troppo stretta. --- */
@media (max-width: 1024px) {
  .topbar { padding: 0 1rem; }

  .app-shell { flex-direction: column; min-width: 0; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,.3);
  }
  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 25;
  }
  .sidebar-overlay.open { display: block; }

  .main-content { padding: 1.25rem 1rem; }
  .card, .chart-card, .activity-card, .recent-orders-card { padding: 1rem; }
  .dash-greeting { padding: 1.1rem; flex-wrap: wrap; gap: .75rem; }
  .app-footer { padding: 1rem; }
  .channel-box { max-width: none; }
  .channel-detail-panel { padding: 1rem; }
  /* La finestra Venduto e il pannello canale sono form: a schermo stretto
     il bottone "Annulla" non deve finire su una riga sua mezza vuota. */
  .modal-actions button { flex: 1; }

  /* colonne meno importanti fuori dalla vista stretta: restano
     raggiungibili scorrendo (.table-scroll), niente perso, solo compresso. */
  th, td { padding: .45rem .5rem; }
}

/* ==========================================================================
   Landing pubblica (frontend/index.html, landing-en.html): stili in
   frontend/landing.css, caricato dopo questo file. Qui restano solo i
   link-bottone (.btn), usati anche fuori dalla landing.
   ========================================================================== */

.btn { display: inline-block; text-decoration: none; }
a.btn { cursor: pointer; border-radius: 6px; padding: .6rem 1.1rem; font-size: .9rem; background: var(--accent); color: white; }
a.btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ==========================================================================
   Pagine legali (frontend/privacy.html, terms.html, +-en.html) — testo
   lungo, colonna piu' stretta della landing per restare leggibile.
   ========================================================================== */

.legal { max-width: 42rem; margin: 0 auto; padding: 3rem 1.5rem 5rem; line-height: 1.6; }
.legal .back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: .85rem; margin-bottom: 1.5rem; }
.legal .back-link:hover { color: var(--text); }
.legal h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
.legal .updated { color: var(--muted); font-size: .85rem; margin: 0 0 2rem; }
.legal h2 { font-size: 1.05rem; color: var(--text); text-transform: none; letter-spacing: normal; margin: 2rem 0 .75rem; }
.legal p, .legal li { color: var(--muted); font-size: .92rem; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal a { color: var(--accent); }
.legal strong { color: var(--text); }
.legal footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.legal footer a { color: inherit; }
