/* Mobile first: gli stili di base sono per il telefono; tablet e desktop si
   aggiungono con min-width. Nessuna risorsa esterna: i font sono in /fonts. */

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2f4ef;
  --bg-tint: #e6ebe2;
  --surface: #fbfcf9;
  --text: #262b26;
  --muted: #596157;
  --accent: #4f7a66;
  --accent-strong: #3c5f4f;
  --on-accent: #f7f9f5;
  --warm: #c67b5c;
  --line: #d5dccf;
  --todo-bg: #fff1b8;
  --todo-text: #5c4a00;
  --c1: #cfdccf;
  --c2: #efc9b4;
  --c3: #e6d6a8;
  --c4: #b9cfd6;
  --c5: #d9b8c4;
  --blend: multiply;
  --band-bg: #3c5f4f;
  --band-text: #f7f9f5;
  --band-deco: rgb(247 249 245 / 7%);
  --shadow: 0 1px 2px rgb(38 43 38 / 6%), 0 8px 24px rgb(38 43 38 / 7%);
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --gutter: 1.1rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1d1a;
    --bg-tint: #212621;
    --surface: #272c27;
    --text: #e9ede6;
    --muted: #aab3a6;
    --accent: #8fbba5;
    --accent-strong: #a9d0bc;
    --on-accent: #142019;
    --warm: #e19b7d;
    --line: #353c35;
    --todo-bg: #4a3f10;
    --todo-text: #ffe99a;
    --c1: #3f5a4d;
    --c2: #6e4a3b;
    --c3: #605a36;
    --c4: #3d5760;
    --c5: #5c4450;
    --blend: screen;
    --band-bg: #23382e;
    --band-text: #e9ede6;
    --band-deco: rgb(169 208 188 / 8%);
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

/* ---------- Base (telefono) ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; scroll-padding-bottom: 5.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); /* spazio per la barra contatti */
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); letter-spacing: -.015em; }
h1 em { font-style: italic; color: var(--accent-strong); }
h2 { font-size: clamp(1.55rem, 5vw, 2.25rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }

a { color: var(--accent-strong); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

.skip { position: fixed; left: -999px; top: 0; z-index: 30; background: var(--surface); padding: .6rem 1rem; }
.skip:focus { left: .75rem; top: calc(.75rem + env(safe-area-inset-top, 0px)); box-shadow: var(--shadow); border-radius: 8px; }

.icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* ---------- Header e menu ---------- */

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; line-height: 1.1; }
.brand > span { min-width: 0; }
.brand small { display: block; font-family: var(--sans); font-size: .7rem; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-top: .15rem; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-dot { fill: var(--accent); }
.brand-dot-warm { fill: var(--warm); }

.site-header .nav-desktop, .site-header .header-cta { display: none; }

.nav-mobile > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: .95rem; background: var(--surface);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.nav-mobile[open] .burger { background: transparent; }
.nav-mobile[open] .burger::before { top: 0; transform: rotate(45deg); }
.nav-mobile[open] .burger::after { top: 0; transform: rotate(-45deg); }
.nav-mobile > nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.nav-mobile ul { list-style: none; margin: 0; padding: .5rem var(--gutter) 1rem; }
.nav-mobile a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 1.1rem; }
.nav-mobile li:last-child a { border-bottom: 0; color: var(--accent-strong); font-weight: 600; }
[aria-current="page"] { color: var(--accent-strong) !important; font-weight: 600; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .8rem 0 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: .4rem; }
.crumbs a { color: var(--muted); }

/* ---------- Bottoni ---------- */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem; border-radius: 999px;
  background: var(--accent-strong); color: var(--on-accent); border: 1px solid var(--accent-strong);
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.button:hover { background: var(--accent); border-color: var(--accent); }
.button .icon { width: 1.2rem; height: 1.2rem; }
.button-ghost { background: transparent; color: var(--accent-strong); }
.button-ghost:hover { background: var(--surface); color: var(--accent-strong); }
.button-small { min-height: 40px; padding: .5rem 1rem; font-size: .95rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* ---------- Hero home ---------- */

.hero { padding-block: 1.75rem 2.5rem; overflow: hidden; }
.hero-inner { display: grid; gap: 1.75rem; }
.kicker { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 1.5rem 0 0; }
.hero-actions .button { width: 100%; }

.portrait { position: relative; margin: 0 auto; width: min(62vw, 270px); aspect-ratio: 1; order: -1; }
.portrait-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait-art circle { mix-blend-mode: var(--blend); }
.c1 { fill: var(--c1); } .c2 { fill: var(--c2); } .c3 { fill: var(--c3); } .c4 { fill: var(--c4); } .c5 { fill: var(--c5); }
.portrait-photo {
  position: absolute; left: 22%; top: 22%; width: 56%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface); border: 6px solid var(--bg); box-shadow: var(--shadow);
  font-family: var(--serif); font-size: clamp(2rem, 9vw, 3rem); color: var(--accent-strong); letter-spacing: .04em;
}
/* Illustrazione del gruppo al centro del cerchio (sostituisce la foto). */
.portrait-group svg { width: 88%; height: 88%; }
.g-halo { fill: var(--bg-tint); }
.g-web { fill: none; stroke: var(--accent); stroke-width: 1.2; stroke-linejoin: round; opacity: .45; }
.g-ring { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .6; }
.g-dot { fill: var(--accent); }
.g-dot-warm { fill: var(--warm); }

/* ---------- In breve ---------- */

.facts { border-block: 1px solid var(--line); background: var(--surface); }
.facts-list { list-style: none; margin: 0 auto; display: grid; gap: 1rem; padding-block: 1.4rem; }
.facts-list li { display: grid; grid-template-columns: 6.6rem 1fr; gap: .9rem; align-items: baseline; }
.facts-list strong { white-space: nowrap; font-family: var(--serif); font-weight: 500; font-size: 1.7rem; color: var(--accent-strong); line-height: 1; }
.facts-list span { color: var(--muted); font-size: .98rem; }

/* ---------- Sezioni ---------- */

.section { padding-block: 2.75rem; }
.tinted { background: var(--bg-tint); }
.two-col { display: grid; gap: 2rem; }

.area-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .9rem; }
.area-card {
  display: grid; grid-template-columns: auto 1fr; column-gap: .9rem; align-items: start; height: 100%;
  padding: 1.2rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.area-card .icon { grid-row: span 2; width: 2.4rem; height: 2.4rem; padding: .45rem; border-radius: 50%; background: var(--bg-tint); color: var(--accent-strong); }
.area-card h3 { margin: .15rem 0 .3rem; color: var(--accent-strong); }
.area-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.area-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.area-card-feature { background: var(--band-bg); border-color: var(--band-bg); }
.area-card-feature h3, .area-card-feature p { color: var(--band-text); }
.area-card-feature .icon { background: color-mix(in srgb, var(--band-text) 16%, transparent); color: var(--band-text); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: .8rem; }
.steps li { counter-increment: step; position: relative; padding: 1rem 1.1rem 1rem 3.7rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.steps li::before {
  content: counter(step); position: absolute; left: 1rem; top: 1rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--c1); color: var(--accent-strong); font-family: var(--serif); font-weight: 600;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Pagine interne ---------- */

.page-hero { padding-block: 1.5rem .25rem; }
.page-hero h1 { max-width: 24ch; }
.page-hero .lead { max-width: 42rem; }
.page-hero h1 { font-size: clamp(2rem, 7vw, 3rem); }
.section-page { padding-top: 1.5rem; }
.page-grid { display: grid; gap: 2rem; }
.prose { max-width: 42rem; min-width: 0; }
.page-aside { display: none; }
.aside-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.aside-title { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .4rem; }
.aside-card > p:not(.aside-title) { color: var(--muted); font-size: .98rem; }
.aside-actions { display: grid; gap: .6rem; }
.aside-actions .button { width: 100%; }
.aside-meta { display: flex; align-items: center; gap: .5rem; }
.aside-meta .icon { width: 1.2rem; height: 1.2rem; color: var(--accent-strong); }
.prose h2 { font-size: clamp(1.35rem, 4.5vw, 1.75rem); margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--warm); }

.timeline { list-style: none; padding: 0 0 0 1rem; margin: 1rem 0 1.5rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; gap: .1rem; padding: .55rem 0 .55rem .9rem; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: -1.45rem; top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--warm); }
.timeline li::marker { content: none; }
.when { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: .3rem 0; }

.info-list { margin: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1.2rem; }
.info-list div { display: grid; gap: .1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.info-list dd { margin: 0; }

.faq { display: grid; gap: .6rem; margin-top: 1.25rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; font-weight: 600; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 1.4rem; line-height: 1; color: var(--accent-strong); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 1.1rem 1.1rem; color: var(--muted); }

.contact-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.contact-card {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; overflow-wrap: anywhere;
}
a.contact-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.contact-card .icon { color: var(--accent-strong); margin-top: .15rem; }
.contact-card strong { display: block; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.note { color: var(--muted); font-size: .95rem; border-left: 3px solid var(--warm); padding-left: 1rem; }

/* ---------- Call to action e "vedi anche" ---------- */

.cta-band {
  position: relative; overflow: hidden; padding-block: 2.25rem;
  background: var(--band-bg); color: var(--band-text);
  /* motivo dei cerchi, discreto */
  background-image:
    radial-gradient(circle at 88% 20%, var(--band-deco) 0 7rem, transparent 7.05rem),
    radial-gradient(circle at 96% 85%, var(--band-deco) 0 5rem, transparent 5.05rem),
    radial-gradient(circle at 78% 95%, var(--band-deco) 0 4rem, transparent 4.05rem);
}
.cta-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 5vw, 1.8rem); line-height: 1.3; color: var(--band-text); margin-bottom: 1rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.cta-actions .button { flex: 1 1 12rem; background: var(--band-text); color: var(--band-bg); border-color: var(--band-text); }
.cta-actions .button:hover { background: color-mix(in srgb, var(--band-text) 88%, var(--band-bg)); }
.cta-actions .button-ghost { background: transparent; color: var(--band-text); border-color: color-mix(in srgb, var(--band-text) 60%, transparent); }
.cta-actions .button-ghost:hover { background: color-mix(in srgb, var(--band-text) 10%, transparent); color: var(--band-text); }
.cta-band :focus-visible { outline-color: var(--band-text); }

.see-also { padding-block: 2.25rem; }
.see-also-title { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.see-also ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.see-also a { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--text); }
.see-also a:hover { border-color: var(--accent); }
.see-also .icon { color: var(--accent-strong); }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 1.5rem; font-size: .95rem; color: var(--muted); }
.footer-grid { display: grid; gap: 1.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: .25rem 0; }
.footer-grid a { color: var(--text); }
.footer-name { font-family: var(--serif); font-size: 1.25rem; color: var(--text); margin-bottom: .4rem; }
.footer-title { font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.footer-note { font-size: .85rem; margin-top: 1.5rem; }

/* ---------- Barra contatti (solo telefono) ---------- */

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-columns: auto; grid-auto-flow: column; gap: .6rem;
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; border-radius: 999px;
  background: var(--accent-strong); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.mobile-cta a + a { background: var(--surface); color: var(--accent-strong); border: 1px solid var(--line); }
.mobile-cta .icon { width: 1.2rem; height: 1.2rem; }

/* Testo solo per i lettori di schermo (es. titoli che danno struttura alla pagina). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Dati ancora da fornire: evidenziati, così non possono passare inosservati. */
.todo { background: var(--todo-bg); color: var(--todo-text); border-radius: 4px; padding: 0 .25em; font-weight: 400; }

/* ---------- Tablet ---------- */

@media (min-width: 640px) {
  :root { --gutter: 1.5rem; }
  .hero-actions .button { width: auto; }
  .facts-list { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .facts-list li { grid-template-columns: 1fr; gap: .4rem; align-content: start; }
  .area-grid { grid-template-columns: repeat(2, 1fr); }
  .see-also ul { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline li { grid-template-columns: 7rem 1fr; gap: 1rem; }
}

/* ---------- Desktop ---------- */

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .mobile-cta, .nav-mobile { display: none; }
  .site-header .nav-desktop { display: block; }
  .nav-desktop ul { list-style: none; display: flex; gap: 1.6rem; margin: 0; padding: 0; }
  .nav-desktop a { color: var(--text); text-decoration: none; font-size: .98rem; }
  .nav-desktop a:hover { color: var(--accent-strong); text-decoration: underline; }
  .site-header .header-cta { display: inline-flex; }
  .header-inner { min-height: 4.5rem; }

  .hero { padding-block: 4rem 5rem; }
  .hero-inner { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem; }
  .portrait { order: 0; width: 100%; max-width: 420px; }
  .page-hero { padding-block: 2.5rem .5rem; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 4rem; align-items: start; }
  .page-grid-single { grid-template-columns: minmax(0, 1fr); }
  .page-aside { display: block; position: sticky; top: 6.5rem; }

  .section { padding-block: 4.5rem; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
  .area-grid { gap: 1.1rem; }
  .area-card { grid-template-columns: 1fr; }
  .area-card .icon { grid-row: auto; margin-bottom: .8rem; }

  .cta-band { padding-block: 3.5rem; }
  .cta-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
  .cta-title { margin: 0; }
  .see-also ul { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------- Cambio lingua ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .6rem;
  color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; border-radius: 999px;
}
.lang-switch:hover { color: var(--accent-strong); background: var(--surface); }
.lang-switch .icon { width: 1.15rem; height: 1.15rem; }
@media (max-width: 420px) { .lang-switch span { display: none; } }

/* Schermi molto stretti (320 px, zoom 400%): etichetta "Menu" solo per i lettori di schermo. */
@media (max-width: 359px) {
  .summary-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-mobile > summary { padding: 0 .75rem; }
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 28px; height: 28px; }
}

/* ---------- Consenso cookie (solo se Google Analytics è configurato) ---------- */
.consent {
  position: fixed; left: 0; right: 0; z-index: 15;
  bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px)); /* sopra la barra contatti */
  padding: 0 var(--gutter) .75rem;
}
.consent-inner {
  max-width: 40rem; margin: 0 auto; padding: 1.1rem 1.2rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); font-size: .95rem;
}
.consent-inner p { margin: 0 0 .9rem; }
.consent-inner strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; margin-bottom: .2rem; }
/* Accetta e Rifiuta con lo stesso peso visivo, come chiede il Garante. */
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 0 !important; }
/* Il banner non deve coprire l'elemento con il focus (WCAG 2.4.11). */
/* Spazio = altezza del banner (~17rem al telefono) + barra contatti (~4.25rem). */
html:has(.consent:not([hidden])) { scroll-padding-bottom: 23rem; }
body:has(.consent:not([hidden])) { padding-bottom: calc(23rem + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 960px) {
  .consent { bottom: 1rem; left: 1rem; right: auto; padding: 0; max-width: 30rem; }
  html:has(.consent:not([hidden])) { scroll-padding-bottom: 14rem; }
  body:has(.consent:not([hidden])) { padding-bottom: 14rem; }
}

/* Chiudi (= Rifiuta) e icona fissa per riaprire le preferenze. */
.consent-inner { position: relative; }
.consent-inner strong { padding-right: 2.5rem; }
.consent-close {
  position: absolute; top: .5rem; right: .5rem; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.consent-close:hover { background: var(--bg-tint); color: var(--text); }
.consent-fab {
  position: fixed; z-index: 14; left: var(--gutter);
  bottom: calc(4.25rem + .6rem + env(safe-area-inset-bottom, 0px)); /* sopra la barra contatti */
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--accent-strong);
  box-shadow: var(--shadow); cursor: pointer;
}
.consent-fab:hover { border-color: var(--accent); }
.consent-fab .icon { width: 1.4rem; height: 1.4rem; }
@media (min-width: 960px) { .consent-fab { bottom: 1rem; left: 1rem; } }
.consent-fab[hidden] { display: none; }

/* Al telefono le preferenze cookie stanno nella barra in basso, non sopra il testo. */
.mobile-cta .mobile-cta-cookie {
  width: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--accent-strong); cursor: pointer;
  display: grid; place-items: center;
}
.mobile-cta .mobile-cta-cookie .icon { width: 1.3rem; height: 1.3rem; }
@media (max-width: 959px) { .consent-fab { display: none !important; } }
