/* ==========================================================================
   Totaliweb · consensi: banner (primo livello), preferenze (secondo livello),
   avviso, pulsante flottante, tabella cookie e stato nella Cookie policy.
   Autonomo: funziona anche sulle pagine generate che non caricano gli altri
   fogli di stile (token propri con ripiego sui token del marchio).
   ========================================================================== */

:root {
  --tc-text: #F7F2FF;
  --tc-soft: #DCD3F3;
  --tc-muted: #B8ACD8;
  --tc-cream: #F8CB8C;
  --tc-cream-hi: #FFE3B8;
  --tc-orange: #F26A1F;
  --tc-orange-hi: #FF8C42;
  --tc-orange-lo: #CF5116;
  --tc-violet: #6C3FE0;
  --tc-violet-hi: #8E68FF;
  --tc-ink: #1D1336;
  --tc-ok: #3DDC97;
  --tc-warn: #FFB547;
  --tc-card: linear-gradient(165deg, #23174B 0%, #170D31 55%, #120A27 100%);
  --tc-font: var(--font-body, "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --tc-display: var(--font-display, "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
  --tc-mono: var(--font-mono, ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace);
  --tc-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 1. Base comune ---------- */
.tc-banner, .tc-modal, .tc-toast, .tc-fab {
  font-family: var(--tc-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--tc-text);
  text-align: left;
  letter-spacing: normal;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.tc-banner *, .tc-modal *, .tc-toast *, .tc-banner *::before, .tc-modal *::before { box-sizing: border-box; }
.tc-banner :where(h2, h3, p, ul, li), .tc-modal :where(h2, h3, p, ul, li, table, details, summary) { margin: 0; padding: 0; }
.tc-banner :where(h2, h3), .tc-modal :where(h2, h3) { color: var(--tc-text); }
.tc-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tc-sr {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Toti in un piccolo oblò (decorativo) */
.tc-toti {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, rgba(255, 140, 66, .5), rgba(108, 63, 224, .55));
  box-shadow: 0 0 0 1px rgba(255, 227, 184, .25), 0 8px 18px -8px rgba(242, 106, 31, .7);
}
.tc-toti img { display: block; width: 34px; height: 42px; margin-top: 10px; object-fit: contain; }

/* Pulsanti: "Rifiuta" e "Accetta" condividono la stessa classe e lo stesso aspetto */
.tc-btn {
  -webkit-appearance: none; appearance: none;
  margin: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  font: 700 14.5px/1.15 var(--tc-font); letter-spacing: -.005em;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, box-shadow .2s, transform .2s var(--tc-ease), opacity .2s;
}
.tc-btn--choice {
  color: #fff;
  background: var(--tc-violet);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 10px 24px -12px rgba(108, 63, 224, .95), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.tc-btn--choice:hover { background: #7A50EC; border-color: rgba(255, 255, 255, .4); transform: translateY(-1px); }
.tc-btn--choice:active { transform: translateY(0) scale(.98); }
.tc-btn--quiet {
  color: var(--tc-cream-hi);
  background: transparent;
  border: 1px solid rgba(248, 203, 140, .45);
}
.tc-btn--quiet:hover { background: rgba(248, 203, 140, .1); border-color: rgba(248, 203, 140, .8); }
.tc-btn--save {
  color: var(--tc-ink);
  background: linear-gradient(135deg, var(--tc-orange-hi) 0%, var(--tc-orange) 60%, #E35A1A 100%);
  border: 0;
  box-shadow: 0 10px 26px -12px rgba(242, 106, 31, .9), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.tc-btn--save:hover { transform: translateY(-1px); box-shadow: 0 14px 32px -12px rgba(242, 106, 31, 1), inset 0 1px 0 rgba(255, 255, 255, .4); }
.tc-btn:disabled { opacity: .55; cursor: progress; transform: none; }

.tc-x {
  -webkit-appearance: none; appearance: none;
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; margin: 0; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: var(--tc-soft);
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.tc-x:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.tc-x .tc-ico { width: 16px; height: 16px; stroke-width: 2.2; }

.tc-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; font-weight: 600; }
.tc-links a { color: var(--tc-cream); text-decoration: underline; text-decoration-color: rgba(248, 203, 140, .45); text-underline-offset: 3px; border-radius: 4px; }
.tc-links a:hover { color: var(--tc-cream-hi); text-decoration-color: currentColor; }

.tc-btn:focus-visible, .tc-x:focus-visible, .tc-switch:focus-visible, .tc-links a:focus-visible,
.tc-cat__more summary:focus-visible, .tc-fab:focus-visible {
  outline: 3px solid var(--tc-cream-hi);
  outline-offset: 2px;
}
.tc-dialog:focus { outline: none; }
.tc-dialog:focus-visible { box-shadow: 0 0 0 3px rgba(255, 227, 184, .55), 0 40px 100px -30px rgba(0, 0, 0, .9); }

/* ---------- 2. Banner (primo livello) ---------- */
.tc-banner {
  position: fixed; z-index: 80;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 18px 18px 16px;
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(108, 63, 224, .32), transparent 62%),
    radial-gradient(90% 70% at 100% 100%, rgba(242, 106, 31, .14), transparent 60%),
    var(--tc-card);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(142, 104, 255, .1) inset;
  opacity: 0;
  transform: translateY(calc(18px - var(--tc-lift, 0px)));
  transition: transform .45s var(--tc-ease), opacity .3s ease, visibility 0s;
}
.tc-banner::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--tc-orange-hi), var(--tc-cream), transparent);
  opacity: .85; pointer-events: none;
}
.tc-banner.is-in { opacity: 1; transform: translateY(calc(-1 * var(--tc-lift, 0px))); }
.tc-banner.is-out { opacity: 0; transform: translateY(calc(14px - var(--tc-lift, 0px))); pointer-events: none; }
/* chat in uso o nessuna posizione libera: il banner si fa da parte e torna appena può */
.tc-banner.is-tucked {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(calc(100% + 32px));
  transition: transform .35s var(--tc-ease), opacity .2s ease, visibility 0s linear .35s;
}
.tc-banner__head { display: flex; align-items: center; gap: 12px; padding-right: 36px; }
.tc-banner__title { font: 800 17px/1.2 var(--tc-display); letter-spacing: -.015em; }
.tc-banner__text { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--tc-soft); }
.tc-banner .tc-links { margin-top: 8px; }
.tc-banner__actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-banner__actions .tc-btn--quiet { grid-column: 1 / -1; min-height: 40px; }

/* ---------- 3. Preferenze (secondo livello) ---------- */
html.tc-modal-open { overflow: hidden; scrollbar-gutter: stable; }
.tc-modal {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.tc-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 3, 14, .68);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: tcFade .25s ease both;
}
.tc-dialog {
  position: relative;
  width: min(660px, 100%);
  max-height: min(88vh, 800px);
  max-height: min(88dvh, 800px);
  display: flex; flex-direction: column;
  border-radius: 26px;
  background:
    radial-gradient(100% 60% at 0% 0%, rgba(108, 63, 224, .28), transparent 60%),
    radial-gradient(80% 50% at 100% 100%, rgba(242, 106, 31, .1), transparent 60%),
    var(--tc-card);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9);
  overflow: hidden;
  animation: tcPop .35s var(--tc-ease) both;
}
.tc-dialog__head { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tc-dialog__titles { min-width: 0; flex: 1; }
.tc-kicker { font: 800 11px/1 var(--tc-font); letter-spacing: .16em; text-transform: uppercase; color: var(--tc-orange-hi); }
.tc-dialog__title { margin-top: 6px; font: 800 22px/1.15 var(--tc-display); letter-spacing: -.02em; }
.tc-dialog__head .tc-x { position: static; flex: none; align-self: flex-start; }
.tc-dialog__body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 20px 18px;
  display: grid; align-content: start; gap: 14px;
}
.tc-dialog__intro { font-size: 14.5px; line-height: 1.6; color: var(--tc-soft); }
.tc-gpc {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.5; color: var(--tc-text);
  background: rgba(61, 220, 151, .08);
  border: 1px solid rgba(61, 220, 151, .38);
}
.tc-gpc .tc-ico { color: var(--tc-ok); margin-top: 1px; }

.tc-cats { list-style: none; display: grid; gap: 10px; }
.tc-cat { padding: 14px 14px 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .09); }
.tc-cat--required { background: rgba(61, 220, 151, .035); }
.tc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.tc-cat__title { font: 800 16px/1.25 var(--tc-display); letter-spacing: -.01em; }
.tc-cat__desc { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: var(--tc-muted); }
.tc-always {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
  color: var(--tc-ok); background: rgba(61, 220, 151, .1); border: 1px solid rgba(61, 220, 151, .38);
}
.tc-always .tc-ico { width: 15px; height: 15px; stroke-width: 2.4; }

/* interruttore accessibile (role="switch") con stato anche in testo */
.tc-switch {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-height: 40px; margin: 0; padding: 4px 4px 4px 10px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--tc-muted);
  font: 700 13px/1 var(--tc-font);
  cursor: pointer;
}
.tc-switch__track {
  position: relative; display: block;
  width: 48px; height: 28px; border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .45);
  transition: background-color .2s, border-color .2s;
}
.tc-switch__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #D4CCEE;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  transition: transform .25s var(--tc-ease), background-color .2s;
}
.tc-switch:hover .tc-switch__track { border-color: rgba(255, 255, 255, .7); }
.tc-switch[aria-checked="true"] { color: var(--tc-cream-hi); }
.tc-switch[aria-checked="true"] .tc-switch__track { background: linear-gradient(135deg, var(--tc-orange-hi), var(--tc-orange)); border-color: rgba(255, 227, 184, .6); }
.tc-switch[aria-checked="true"] .tc-switch__thumb { transform: translateX(20px); background: #fff; }

.tc-cat__more { margin-top: 8px; }
.tc-cat__more summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 2px; border-radius: 6px;
  list-style: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--tc-cream);
}
.tc-cat__more summary::-webkit-details-marker { display: none; }
.tc-cat__more summary:hover { color: var(--tc-cream-hi); }
.tc-cat__more summary .tc-ico { width: 16px; height: 16px; transition: transform .2s var(--tc-ease); }
.tc-cat__more[open] summary .tc-ico { transform: rotate(180deg); }
.tc-cat__tools { margin-top: 8px; overflow-x: auto; }
.tc-cat__empty { margin-top: 8px; font-size: 12.5px; font-style: italic; color: var(--tc-muted); }

.tc-meta {
  display: grid; gap: 4px;
  padding: 12px 14px; border-radius: 14px;
  font-size: 12.5px; line-height: 1.5; color: var(--tc-muted);
  background: rgba(0, 0, 0, .22);
  border: 1px dashed rgba(255, 255, 255, .16);
}
.tc-meta code { font: 600 12px/1.4 var(--tc-mono); color: var(--tc-cream-hi); overflow-wrap: anywhere; }
.tc-dialog .tc-links { font-size: 13px; }

.tc-dialog__foot {
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px;
  padding: 14px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(10, 6, 22, .55);
}

/* ---------- 4. Tabella degli strumenti (preferenze e Cookie policy) ---------- */
.tc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; line-height: 1.45; }
.tc-table th, .tc-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tc-table th { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tc-muted); background: rgba(255, 255, 255, .04); white-space: nowrap; }
.tc-table td { color: var(--tc-soft); }
.tc-table code { font: 600 .95em/1.3 var(--tc-mono); padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--tc-cream-hi); white-space: nowrap; }

/* Cookie policy: tabella dinamica per categoria (sostituisce quella statica di riserva) */
.tc-ctable { display: grid; gap: 14px; margin: 0 0 1em; }
.tc-ctable .tc-ctable__cat { padding: 16px 16px 14px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); }
.tc-ctable .tc-ctable__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.tc-ctable .tc-ctable__title { margin: 0; font: 800 17px/1.25 var(--tc-display); letter-spacing: -.01em; color: var(--tc-text); }
.tc-ctable .tc-ctable__desc { margin: 8px 0 10px; font-size: 14px; line-height: 1.6; color: var(--tc-muted); }
.tc-ctable .tc-ctable__empty { margin: 0; font-size: 13px; font-style: italic; color: var(--tc-muted); }
.tc-ctable .tc-ctable__wrap { overflow-x: auto; }
.tc-ctable .tc-table { margin: 0; font-size: 13.5px; }
.tc-ctable .tc-table th, .tc-ctable .tc-table td { padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tc-ctable .tc-table th { font-size: 11.5px; color: var(--tc-muted); background: rgba(255, 255, 255, .04); }
.tc-pill {
  display: inline-flex; align-items: center;
  padding: 5px 10px; border-radius: 999px;
  font: 800 12px/1.2 var(--tc-font); white-space: nowrap;
  color: var(--tc-cream-hi); background: rgba(248, 203, 140, .1); border: 1px solid rgba(248, 203, 140, .38);
}
.tc-pill--on { color: var(--tc-ok); background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .38); }

/* stato del consenso scritto nella Cookie policy */
.consent-status, .prose .consent-status {
  margin: 14px 0 0;
  padding: 12px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.6; color: var(--tc-soft);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .1);
}
.consent-status strong { color: var(--tc-text); }
.consent-status code { font: 600 12.5px/1.4 var(--tc-mono); padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: var(--tc-cream-hi); overflow-wrap: anywhere; }
.consent-status[hidden] { display: none; }

/* ---------- 5. Avviso e pulsante flottante ---------- */
.tc-toast {
  position: fixed; z-index: 150;
  left: 50%; top: calc(max(12px, env(safe-area-inset-top)) + var(--header-h, 0px));
  display: flex; align-items: center; gap: 10px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 18px 11px 13px;
  border-radius: 999px;
  font-weight: 700; font-size: 14px; line-height: 1.35;
  background: #1F1440;
  border: 1px solid rgba(61, 220, 151, .5);
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .95);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .25s ease, transform .35s var(--tc-ease);
}
.tc-toast:empty { padding: 0; border: 0; }
.tc-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.tc-toast .tc-ico { color: var(--tc-ok); }
.tc-toast.is-warn { border-radius: 16px; border-color: rgba(255, 181, 71, .6); }
.tc-toast.is-warn .tc-ico { color: var(--tc-warn); }

.tc-fab {
  -webkit-appearance: none; appearance: none;
  position: fixed; z-index: 75;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 48px; height: 48px; margin: 0; padding: 0;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 227, 184, .35);
  background: radial-gradient(circle at 30% 25%, rgba(255, 140, 66, .5), rgba(108, 63, 224, .6)), #1A1033;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .9);
  cursor: pointer;
  transform: translateY(calc(-1 * var(--tc-lift, 0px)));
  transition: transform .35s var(--tc-ease), opacity .25s, box-shadow .2s;
}
.tc-fab:hover { box-shadow: 0 0 0 3px rgba(255, 140, 66, .35), 0 14px 30px -12px rgba(0, 0, 0, .9); }
.tc-fab img { display: block; width: 30px; height: 37px; margin-top: 11px; object-fit: contain; }
.tc-fab.is-tucked { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(90px); }

/* ---------- 6. Telefono ---------- */
@media (max-width: 679px) {
  .tc-banner {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    padding: 14px 14px 12px;
    border-radius: 20px;
  }
  .tc-banner__head { gap: 10px; }
  .tc-banner .tc-toti { width: 36px; height: 36px; }
  .tc-banner .tc-toti img { width: 30px; height: 37px; margin-top: 9px; }
  .tc-banner__title { font-size: 16px; }
  .tc-banner__text { margin-top: 8px; font-size: 13px; line-height: 1.5; }
  .tc-banner .tc-links { margin-top: 6px; }
  .tc-banner__actions { margin-top: 12px; }
  .tc-x { top: 10px; right: 10px; }

  .tc-modal { padding: 0; place-items: end stretch; }
  .tc-dialog {
    width: 100%;
    max-height: 92vh; max-height: 92dvh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    animation-name: tcSheet;
  }
  .tc-dialog__head { padding: 16px 14px 12px 16px; }
  .tc-dialog__title { font-size: 20px; }
  .tc-dialog__body { padding: 14px 16px 16px; }
  .tc-cat { padding: 12px 12px 10px 14px; }
  .tc-dialog__foot { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px max(14px, env(safe-area-inset-bottom)); }
  .tc-dialog__foot .tc-btn--save { grid-column: 1 / -1; }
  .tc-fab { left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) {
  .tc-btn { padding: 0 10px; font-size: 13.5px; }
  .tc-switch__state { display: none; }
}

/* righe della tabella come schede impilate quando lo spazio è poco */
@media (max-width: 720px) {
  .tc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tc-table, .tc-table tbody, .tc-table tr, .tc-table td { display: block; width: 100%; }
  .tc-table tr { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
  .tc-table tr + tr { margin-top: 8px; }
  .tc-table td, .tc-ctable .tc-table td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 4px 0; border: 0; }
  .tc-table td::before { content: attr(data-label); padding-top: 1px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tc-muted); }
  .tc-table code { white-space: normal; overflow-wrap: anywhere; }
}

/* schermi molto bassi (telefono in orizzontale): banner più compatto */
@media (max-height: 520px) {
  .tc-banner__text { font-size: 12.5px; line-height: 1.45; }
  .tc-banner__actions { grid-template-columns: 1fr 1fr 1fr; }
  .tc-banner__actions .tc-btn--quiet { grid-column: auto; min-height: 44px; }
}

/* punto d'arrivo del focus dopo la scelta (contenuto principale): non è un comando, niente contorno */
[data-tc-landing]:focus { outline: none; }

/* ---------- 7. Movimento ridotto, colori forzati, stampa ---------- */
@keyframes tcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tcPop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes tcSheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tc-banner, .tc-banner.is-tucked, .tc-toast, .tc-fab, .tc-btn, .tc-switch__track, .tc-switch__thumb, .tc-cat__more summary .tc-ico { transition: none !important; }
  .tc-modal__backdrop, .tc-dialog { animation: none !important; }
  .tc-btn--choice:hover, .tc-btn--save:hover { transform: none; }
}

@media (forced-colors: active) {
  .tc-banner, .tc-dialog, .tc-toast, .tc-cat, .tc-meta, .consent-status { border: 1px solid CanvasText; }
  .tc-btn, .tc-x, .tc-fab { border: 1px solid ButtonText; }
  .tc-switch__track { border: 1px solid ButtonText; background: Canvas; }
  .tc-switch__thumb { background: ButtonText; }
  .tc-switch[aria-checked="true"] .tc-switch__track { background: Highlight; }
  .tc-switch[aria-checked="true"] .tc-switch__thumb { background: HighlightText; }
}

@media print {
  .tc-banner, .tc-modal, .tc-toast, .tc-fab { display: none !important; }
  html.tc-modal-open { overflow: visible; }
}
