@charset "UTF-8";
/* ==========================================================================
   carenzadiferro.it — foglio di stile principale
   Indice
   1.  Token di design
   2.  Reset e basi
   3.  Utility e accessibilità
   4.  Layout (container, sezioni, griglie)
   5.  Header e navigazione
   6.  Hero e pannello dati
   7.  Tipografia dei contenuti (.prose)
   8.  Componenti (card, callout, stadi, tabelle, FAQ, TOC, breadcrumb)
   9.  Pulsanti e link
   10. Footer e torna su
   11. Preferenze utente e stampa
   ========================================================================== */

/* ==========================================================================
   1. Token di design
   ========================================================================== */

:root {
  /* Colore — tema chiaro */
  --bg:            #faf8f5;
  --bg-alt:        #f2ede6;
  --surface:       #ffffff;
  --surface-2:     #f6f2ec;
  --border:        #e4ddd3;
  --border-strong: #cfc5b8;
  --text:          #1e2024;
  --text-muted:    #5a6067;
  --accent:        #8f2533;
  --accent-strong: #731c28;
  --accent-soft:   #fbeef0;
  --accent-border: #edcdd2;
  --on-accent:     #ffffff;
  --info:          #1d5a78;
  --info-soft:     #e9f3f8;
  --info-border:   #c2dde9;
  --warn:          #7c5306;
  --warn-soft:     #fcf3e0;
  --warn-border:   #ecd7a6;
  --focus:         #1d4ed8;
  --shadow-sm:     0 1px 2px rgba(24, 20, 16, .06), 0 1px 3px rgba(24, 20, 16, .05);
  --shadow-md:     0 2px 4px rgba(24, 20, 16, .05), 0 8px 20px rgba(24, 20, 16, .07);
  --shadow-lg:     0 12px 34px rgba(24, 20, 16, .10);

  /* Tipografia */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --step--1: clamp(.82rem, .79rem + .14vw, .89rem);
  --step-0:  clamp(1rem, .96rem + .2vw, 1.075rem);
  --step-1:  clamp(1.15rem, 1.09rem + .3vw, 1.3rem);
  --step-2:  clamp(1.36rem, 1.25rem + .55vw, 1.65rem);
  --step-3:  clamp(1.6rem, 1.4rem + 1vw, 2.15rem);
  --step-4:  clamp(1.95rem, 1.6rem + 1.75vw, 3rem);

  /* Spaziatura e forme */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;
  --container: 74rem;
  --measure: 68ch;
  --header-h: 4.25rem;
}

/* Colore — tema scuro automatico (rispetta una scelta esplicita "light") */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #14161a;
    --bg-alt:        #191c21;
    --surface:       #1c1f25;
    --surface-2:     #232730;
    --border:        #313640;
    --border-strong: #454c58;
    --text:          #e9e7e4;
    --text-muted:    #a6adb7;
    --accent:        #e59aa4;
    --accent-strong: #f0b6be;
    --accent-soft:   #2a1c20;
    --accent-border: #4a2e34;
    --on-accent:     #1a0f12;
    --info:          #8fc6de;
    --info-soft:     #16242b;
    --info-border:   #2c4653;
    --warn:          #e5bd76;
    --warn-soft:     #2a2115;
    --warn-border:   #4d3d20;
    --focus:         #8ab4ff;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md:     0 2px 4px rgba(0, 0, 0, .35), 0 8px 20px rgba(0, 0, 0, .35);
    --shadow-lg:     0 12px 34px rgba(0, 0, 0, .45);
  }
}

/* Colore — tema scuro scelto esplicitamente */
:root[data-theme="dark"] {
  --bg:            #14161a;
  --bg-alt:        #191c21;
  --surface:       #1c1f25;
  --surface-2:     #232730;
  --border:        #313640;
  --border-strong: #454c58;
  --text:          #e9e7e4;
  --text-muted:    #a6adb7;
  --accent:        #e59aa4;
  --accent-strong: #f0b6be;
  --accent-soft:   #2a1c20;
  --accent-border: #4a2e34;
  --on-accent:     #1a0f12;
  --info:          #8fc6de;
  --info-soft:     #16242b;
  --info-border:   #2c4653;
  --warn:          #e5bd76;
  --warn-soft:     #2a2115;
  --warn-border:   #4d3d20;
  --focus:         #8ab4ff;
  --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md:     0 2px 4px rgba(0, 0, 0, .35), 0 8px 20px rgba(0, 0, 0, .35);
  --shadow-lg:     0 12px 34px rgba(0, 0, 0, .45);
}

/* ==========================================================================
   2. Reset e basi
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
h4 { font-size: var(--step-0); }

p, ul, ol, dl, table, figure, blockquote { margin: 0; }
ul, ol { padding-left: 1.35em; }

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-strong); }

input, button, textarea, select { font: inherit; color: inherit; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:target { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

main { flex: 1 0 auto; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-6) 0; }

/* ==========================================================================
   3. Utility e accessibilità
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--on-accent); }

.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.18em; }

.eyebrow {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* Indicatore per i link che escono dal sito */
.ext::after {
  content: "";
  display: inline-block;
  width: .68em; height: .68em;
  margin-left: .35em;
  vertical-align: baseline;
  background: currentColor;
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 2H2v12h12v-4M9.5 1.5H15V7M14.5 1.5 7 9' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 2H2v12h12v-4M9.5 1.5H15V7M14.5 1.5 7 9' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
@media (min-width: 48em) {
  .container { width: min(100% - 4rem, var(--container)); }
}

.section {
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
}
.section:first-child { border-top: 0; }
.section > h2 { margin-bottom: var(--space-4); }
.section__intro {
  color: var(--text-muted);
  max-width: var(--measure);
  margin-bottom: var(--space-5);
}
.section__more { margin-top: var(--space-5); }

.grid { display: grid; gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
@media (min-width: 34em) { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

/* Impaginazione articolo con indice laterale */
.article-layout {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-6) var(--space-7);
  align-items: start;
}
@media (min-width: 62em) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr) 17rem;
    gap: var(--space-7);
  }
  .article-layout > .toc { order: 2; }
}

/* ==========================================================================
   5. Header e navigazione
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--bg); } }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-h);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.015em;
  margin-right: auto;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 1.9rem; height: 1.9rem; color: var(--accent); }
.brand__text { white-space: nowrap; }
.brand__tld { color: var(--text-muted); font-weight: 400; }

/* Variante del marchio nel piè di pagina */
.brand--footer { font-size: 1.05rem; }
.brand--footer .brand__mark { width: 1.6rem; height: 1.6rem; }

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav__list a {
  display: block;
  padding: .5rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--text); background: var(--surface-2); }
.nav__list a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem .85rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 3px; width: 1.05rem; }
.nav-toggle__bars span {
  display: block; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.theme-toggle__icon { width: 1.15rem; height: 1.15rem; grid-area: 1 / 1; }
.theme-toggle__icon--moon { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
:root[data-theme="dark"] .theme-toggle__icon--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: block; }
}

/* Navigazione compatta su schermi stretti */
@media (max-width: 61.99em) {
  .nav-toggle { display: inline-flex; order: 3; }
  .theme-toggle { order: 2; }
  .nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    padding-bottom: var(--space-3);
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__list a { padding: .75rem .8rem; font-size: var(--step-0); }
}

/* ==========================================================================
   6. Hero e pannello dati
   ========================================================================== */

.hero {
  background:
    radial-gradient(60rem 26rem at 12% -18%, var(--accent-soft), transparent 62%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-7) var(--space-7);
}
@media (min-width: 62em) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: var(--space-7);
    align-items: center;
    padding-block: var(--space-8);
  }
}
.hero__content > * + * { margin-top: var(--space-4); }
.lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 58ch;
  line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero__note {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: 52ch;
  margin-top: var(--space-5);
}
.hero__note .icon { color: var(--accent); margin-top: .18em; }

.hero__panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}
.hero__panel-title {
  font-size: var(--step--1);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.stats { display: grid; gap: var(--space-4); }
.stat { padding-left: var(--space-4); border-left: 3px solid var(--accent-border); }
.stat dt { font-size: var(--step--1); color: var(--text-muted); }
.stat dd { margin: .15rem 0 0; font-size: var(--step-1); font-family: var(--font-serif); }
.stat strong { color: var(--accent); font-weight: 600; }
.hero__panel-foot {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* Intestazione delle pagine interne */
.page-head {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding-block: var(--space-6);
}
.page-head h1 { margin-top: var(--space-3); max-width: 22ch; }
.page-head .lede { margin-top: var(--space-4); }
.page-head__meta {
  margin-top: var(--space-4);
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ==========================================================================
   7. Tipografia dei contenuti
   ========================================================================== */

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose h2 + p, .prose h3 + p, .prose h2 + ul, .prose h3 + ul { margin-top: var(--space-3); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: var(--space-2); }
.prose strong { font-weight: 650; }
.prose figcaption, .prose small { font-size: var(--step--1); color: var(--text-muted); }

.prose blockquote {
  border-left: 3px solid var(--accent-border);
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  color: var(--text-muted);
  font-style: italic;
}

.definition-list { display: grid; gap: var(--space-4); }
.definition-list dt { font-weight: 650; color: var(--text); }
.definition-list dd { margin: .2rem 0 0; color: var(--text-muted); }

/* ==========================================================================
   8. Componenti
   ========================================================================== */

/* Card */
.cards { margin-top: var(--space-5); }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card__title { margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); font-size: var(--step--1); }
.cards--linked .card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cards--linked .card:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md); }
.card__link { text-decoration: none; color: var(--text); }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:hover { color: var(--accent); }
.cards--linked .card__title::after {
  content: " →";
  color: var(--accent);
  white-space: nowrap;
}

/* Stadi numerati */
.stages {
  list-style: none;
  padding: 0;
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-4);
  counter-reset: stage;
}
@media (min-width: 60em) { .stages { grid-template-columns: repeat(3, 1fr); } }
.stage {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-border);
  border-radius: var(--radius);
  padding: var(--space-5);
}
.stage__num {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.stage h3 { margin-bottom: var(--space-2); }
.stage p { color: var(--text-muted); font-size: var(--step--1); }

/* Callout */
.callout {
  --callout-accent: var(--info);
  --callout-bg: var(--info-soft);
  --callout-border: var(--info-border);
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
  border-left: 4px solid var(--callout-accent);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-top: var(--space-5);
}
.callout__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--step-0);
  font-family: var(--font-sans);
  font-weight: 650;
  color: var(--callout-accent);
  margin-bottom: var(--space-2);
}
.callout__title::before {
  content: "";
  width: 1.15em; height: 1.15em;
  flex: none;
  background: currentColor;
  -webkit-mask: no-repeat center / contain var(--callout-icon);
  mask: no-repeat center / contain var(--callout-icon);
  --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='8.4' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M10 9v5.2' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='6.1' r='1.05' fill='%23000'/%3E%3C/svg%3E");
}
.callout > * + * { margin-top: var(--space-3); }
.callout ul, .callout ol { padding-left: 1.3em; }
.callout li + li { margin-top: var(--space-2); }
.callout--info {
  --callout-accent: var(--info);
  --callout-bg: var(--info-soft);
  --callout-border: var(--info-border);
}
.callout--warn {
  --callout-accent: var(--warn);
  --callout-bg: var(--warn-soft);
  --callout-border: var(--warn-border);
}
.callout--danger {
  --callout-accent: var(--accent);
  --callout-bg: var(--accent-soft);
  --callout-border: var(--accent-border);
}
.callout--warn .callout__title::before,
.callout--danger .callout__title::before {
  --callout-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.9 18.7 17.4H1.3L10 1.9Z' fill='none' stroke='%23000' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M10 7.6v4.2' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.4' r='1.05' fill='%23000'/%3E%3C/svg%3E");
}

/* Tabelle */
.table-wrap {
  margin-top: var(--space-5);
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-4) var(--space-4) var(--space-2);
  color: var(--text-muted);
  font-size: var(--step--1);
}
th, td { padding: .7rem var(--space-4); text-align: left; vertical-align: top; }
thead th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
  font-weight: 650;
  white-space: nowrap;
}
tbody tr + tr th, tbody tr + tr td { border-top: 1px solid var(--border); }
tbody th { font-weight: 600; }

/* FAQ */
.faq { margin-top: var(--space-5); display: grid; gap: var(--space-3); }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq__item summary {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  min-height: 3rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 1rem; height: 1rem;
  margin-top: .3em;
  background: currentColor;
  color: var(--accent);
  -webkit-mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3.5 6 4.5 4.5L12.5 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(180deg); }
.faq__item summary:hover { background: var(--surface-2); }
.faq__body {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--text-muted);
}
.faq__body > * + * { margin-top: var(--space-3); }

/* Indice della pagina */
.toc {
  position: static;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
}
@media (min-width: 62em) {
  .toc { position: sticky; top: calc(var(--header-h) + 1rem); }
}
.toc__title {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: .38rem .6rem;
  border-left: 2px solid var(--border);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--step--1);
}
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.is-current {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

/* Briciole di pane */
.breadcrumbs { padding-top: var(--space-4); font-size: var(--step--1); }
.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  color: var(--text-muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* Elenco fonti */
.sources { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.sources li { padding-left: 1.1rem; position: relative; }
.sources li::before {
  content: "";
  position: absolute;
  left: 0; top: .68em;
  width: .38rem; height: .38rem;
  border-radius: 50%;
  background: var(--accent-border);
}

/* Navigazione fra pagine correlate */
.next-links { display: grid; gap: var(--space-3); margin-top: var(--space-6); }
@media (min-width: 34em) { .next-links { grid-template-columns: repeat(2, 1fr); } }
.next-links a {
  display: block;
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}
.next-links a:hover { border-color: var(--accent-border); background: var(--surface-2); }
.next-links span { display: block; font-size: var(--step--1); color: var(--text-muted); }
.next-links strong { font-family: var(--font-serif); font-weight: 600; }

/* ==========================================================================
   9. Pulsanti e link
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.9rem;
  padding: .7rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ==========================================================================
   10. Footer e torna su
   ========================================================================== */

.site-footer {
  margin-top: var(--space-7);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  font-size: var(--step--1);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--space-7) var(--space-6);
}
@media (min-width: 48em) {
  .site-footer__inner { grid-template-columns: 1.6fr 1fr 1.6fr; gap: var(--space-7); }
}
.site-footer p { color: var(--text-muted); }
.site-footer__brand .brand { margin-right: 0; margin-bottom: var(--space-3); }
.site-footer__brand p { max-width: 34ch; }
.site-footer__heading {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
  margin-bottom: var(--space-3);
}
.site-footer__nav ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.site-footer__nav a { color: var(--text-muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--accent); text-decoration: underline; }
.site-footer__legal > * + * { margin-top: var(--space-3); }
.site-footer__legal p { max-width: 46ch; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.site-footer__bottom p { margin: 0; }

.to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 2.9rem; height: 2.9rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity .2s ease, transform .2s ease;
}
.to-top svg { width: 1.15rem; height: 1.15rem; }
.to-top.is-visible { opacity: 1; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   11. Preferenze utente e stampa
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root { --border: var(--border-strong); --text-muted: var(--text); }
  .card, .callout, .toc, .faq__item { border-width: 2px; }
}

@media print {
  .site-header, .to-top, .toc, .nav-toggle, .theme-toggle, .next-links, .hero__actions { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero, .page-head { background: none; border: 0; }
  a { color: #000; text-decoration: underline; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  .card, .callout, .stage { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}
