/* =========================================================
   BandiTipo24 – foglio di stile del sito (www.banditipo.it)
   Studio Albonet – colori derivati dal logo (#9A1D55)
   ========================================================= */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* colore del marchio (logo Studio Albonet) */
  --brand: #9a1d55;
  --brand-ink: #7c1444;
  --brand-deep: #45102a;
  --brand-night: #2c0a1b;
  --brand-50: #fcf4f8;
  --brand-100: #f7e3ec;
  --brand-200: #eec5d7;
  --brand-300: #dd94b4;
  /* evidenziatore degli approfondimenti */
  --hl: #f6d4e3;
  --hl-strong: #eab0ca;
  /* neutri tinti col marchio */
  --ink: #241a20;
  --ink-2: #5d4f57;
  --ink-3: #786a72;
  --line: #e9dfe4;
  --line-2: #d9cbd2;
  --paper: #ffffff;
  --paper-2: #f9f5f7;
  --paper-3: #f3edf0;

  --ff-sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --hh: 64px;            /* altezza barra di navigazione */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --shadow-sheet: 0 1px 0 rgba(69, 16, 42, .06), 0 18px 40px -22px rgba(69, 16, 42, .45);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--hh);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}
.contact :focus-visible, .site-footer :focus-visible, .tel:focus-visible, .btn-primary:focus-visible { outline-color: var(--brand-deep); box-shadow: 0 0 0 5px #fff; }
.contact :focus-visible, .site-footer :focus-visible { outline-color: #fff; box-shadow: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #fff; padding: .6em 1em; border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 10px; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

h1, h2, h3, h4 { font-family: var(--ff-sans); line-height: 1.12; margin: 0; letter-spacing: -.01em; }

/* ---------------------------------------------------------
   Pulsanti
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: .7em 1.25em;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.1 var(--ff-sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand-ink); border-color: var(--brand-200); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.btn-light { background: #fff; color: var(--brand-deep); }
.btn-light:hover { background: var(--brand-50); color: var(--brand-deep); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); background: transparent; }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------------------------------------------------------
   Barra di navigazione
   --------------------------------------------------------- */
/* Barra fissa (non sticky): così mettere il focus su logo, menu o telefono non fa scorrere la pagina */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--hh);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(10px); }
}
body { padding-top: var(--hh); }
/* Logo, voci e telefono si riducono in proporzione alla larghezza (da 960 a 1280 px):
   la barra resta completa fino a 960 px, anche con la barra di scorrimento di Windows */
.site-header .wrap {
  height: 100%; display: flex; align-items: center; gap: clamp(10px, 3.125vw - 20px, 20px);
}

.brand {
  display: inline-flex; align-items: center; text-decoration: none; flex: none;
  font-family: var(--ff-sans); font-weight: 700; font-size: clamp(1.06rem, .28rem + 1.3vw, 1.32rem); letter-spacing: -.02em;
  line-height: 1; color: var(--brand);
}
.brand:hover { color: var(--brand); }
.brand .b-name { padding: .3em .12em .3em 0; }
.brand .b-num {
  background: var(--brand); color: #fff; padding: .3em .3em .28em; margin-left: .06em;
  border-radius: 3px; font-weight: 700;
}
.brand .b-by {
  display: block; font-size: .5rem; letter-spacing: .02em; font-weight: 500; color: var(--ink-3);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .5em clamp(6px, 1.44vw - 7.8px, 10.6px); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: clamp(.84rem, .51rem + .55vw, .95rem); font-weight: 500; white-space: nowrap;
}
.nav-links a:hover { background: var(--brand-50); color: var(--brand-ink); }
.nav-links a[aria-current="page"] { color: var(--brand); background: var(--brand-50); }

.tel {
  display: inline-flex; align-items: center; gap: .5em; flex: none;
  padding: .45em .95em .45em .75em; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .98rem; white-space: nowrap; letter-spacing: .01em;
  margin-left: 8px;
}
.tel:hover { background: var(--brand-ink); color: #fff; }
.tel svg { width: 1.05em; height: 1.05em; }
.tel .tel-l { font-weight: 400; opacity: .85; font-size: .85em; }

.menu-btn {
  display: none; align-items: center; justify-content: center; gap: .4em;
  min-width: 44px; min-height: 44px; padding: 0 .7em;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink);
  font: 600 .95rem var(--ff-sans); cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 1140px) {
  .tel { margin-left: 0; font-size: .92rem; padding: .45em .85em .45em .7em; }
  .tel .tel-l { display: none; }
}
@media (max-width: 959.98px) {
  .site-header .wrap { gap: 20px; }
  .brand { font-size: 1.25rem; }
  .tel { font-size: .98rem; padding: .45em .95em .45em .75em; }
  .tel .tel-l { display: inline; }
  .menu-btn { display: inline-flex; }
  .nav { gap: 8px; }
  .nav-links {
    display: none; position: absolute; top: var(--hh); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    box-shadow: 0 20px 30px -24px rgba(69, 16, 42, .5);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .85em .6em; border-radius: var(--radius); font-size: 1.02rem; }
  .nav { order: 3; margin-left: 0; }
  .tel { margin-left: auto; }
}
@media (max-width: 600px) {
  :root { --hh: 58px; }
  .brand { font-size: 1.12rem; }
  .tel { padding: .45em .7em; font-size: .9rem; }
  .tel .tel-l { display: none; }
  .menu-btn .mb-l { display: none; }
  .site-header .wrap { gap: 10px; }
}
@media (max-width: 370px) {
  .tel .tel-n { font-size: .85rem; }
}

/* ---------------------------------------------------------
   Home – hero
   --------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(36px, 6vw, 84px) 0 clamp(40px, 6vw, 72px);
  background:
    linear-gradient(180deg, var(--paper-2) 0, #fff 78%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  font-weight: 650; line-height: 1.02; letter-spacing: -.028em;
  color: var(--brand-deep);
  text-wrap: balance;
}
.hero .lead {
  margin: 1.1em 0 0; max-width: 34em;
  font-size: clamp(1.06rem, 1.25vw, 1.2rem); color: var(--ink-2); line-height: 1.55;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8em; }
.hero-note {
  margin: 1.4em 0 0; font-size: .93rem; color: var(--ink-3); max-width: 36em;
}
.hero-note strong { color: var(--ink-2); font-weight: 600; }

/* foglio annotato */
.sheet-fig { margin: 0; }
.sheet {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: 4px; box-shadow: var(--shadow-sheet);
  padding: 10px;
}
.sheet img { width: 100%; border-radius: 2px; }
.sheet-img { position: relative; }
.pin {
  position: absolute; border: 2.5px solid var(--brand); border-radius: 7px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 6px rgba(154, 29, 85, .16);
  pointer-events: none;
}
.pin::after {
  content: attr(data-n); position: absolute; right: -13px; top: -13px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font: 700 .78rem/1 var(--ff-sans); border: 2px solid #fff;
}
.sheet-legend {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px;
}
.sheet-legend li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: .92rem; line-height: 1.35; color: var(--ink-2); }
.sheet-legend .k {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font: 700 .78rem/1 var(--ff-sans);
}
.sheet-legend strong { display: block; color: var(--ink); font-weight: 600; font-size: 1rem; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .sheet-legend { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pin { border-width: 2px; border-radius: 5px; }
  .pin::after { width: 20px; height: 20px; right: -10px; top: -11px; font-size: .7rem; }
  .sheet { padding: 6px; }
}

/* ---------------------------------------------------------
   Home – sezioni
   --------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 650; color: var(--brand-deep);
  letter-spacing: -.022em; text-wrap: balance;
}
.section-head p { margin: .9em 0 0; color: var(--ink-2); font-size: 1.1rem; }

/* La norma: due voci */
.norm-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 72px); align-items: start;
}
.norm-quote {
  margin: 0; position: relative;
  font-family: var(--ff-serif); font-size: clamp(1.35rem, 2.1vw, 1.75rem); line-height: 1.45;
  color: var(--ink); font-weight: 400;
  padding-left: clamp(18px, 2.4vw, 32px); border-left: 3px solid var(--brand);
}
.norm-quote p { margin: 0 0 .6em; }
.norm-quote footer {
  font-family: var(--ff-sans); font-size: .95rem; color: var(--ink-3); margin-top: 1.1em;
}
.norm-quote footer a { color: var(--ink-2); }
.norm-comment p { margin: 0 0 1em; color: var(--ink-2); }
.norm-comment p:first-child { color: var(--ink); font-size: 1.15rem; line-height: 1.5; }
.gap-list { list-style: none; padding: 0; margin: 1.2em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gap-list li {
  font-size: .9rem; font-weight: 500; color: var(--brand-ink);
  background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 999px; padding: .3em .8em;
}

.pillars {
  margin-top: clamp(40px, 6vw, 72px); padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px);
}
.pillar h3 { font-size: 1.3rem; font-weight: 600; color: var(--brand); margin-bottom: .5em; }
.pillar p { margin: 0; color: var(--ink-2); }
.pillar .big { display: block; font-size: 2.6rem; font-weight: 650; color: var(--brand-deep); line-height: 1; margin-bottom: .2em; letter-spacing: -.03em; }

@media (max-width: 900px) {
  .norm-grid, .pillars { grid-template-columns: 1fr; }
}

/* Matrice dei contenuti */
.matrix-wrap { overflow-x: auto; }
.matrix {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); font-size: .98rem;
}
.matrix caption { text-align: left; caption-side: bottom; padding-top: 12px; font-size: .9rem; color: var(--ink-3); }
.matrix th, .matrix td { padding: .85em .9em; border-bottom: 1px solid var(--line); text-align: center; }
.matrix thead th {
  background: var(--brand-deep); color: #fff; font-weight: 600; font-size: .92rem; border-bottom: 0;
}
.matrix thead th:first-child, .matrix tbody th { text-align: left; }
.matrix tbody th { font-weight: 600; color: var(--ink); }
.matrix .master { background: var(--brand-50); }
.matrix thead th.master { background: var(--brand); }
.matrix .yes svg { width: 22px; height: 22px; margin: 0 auto; color: var(--brand); }
.matrix .no { color: var(--line-2); }
.matrix-side {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 28px;
}
.side-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.side-item h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .35em; color: var(--brand-deep); }
.side-item p { margin: 0; font-size: .95rem; color: var(--ink-2); }

@media (max-width: 760px) {
  .matrix-side { grid-template-columns: 1fr; }
  .matrix, .matrix thead, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; }
  .matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .matrix tr { border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .matrix tbody th { padding: 0 0 8px; border: 0; }
  .matrix td { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 0; border: 0; text-align: left; font-size: .9rem; }
  .matrix td.no { display: none; }
  .matrix td::after { content: attr(data-l); color: var(--ink-2); }
  .matrix .yes svg { width: 18px; height: 18px; margin: 0; }
  .matrix .master { background: none; }
  .matrix caption { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
}

/* Dentro uno schema */
.legend {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px;
}
.legend li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; align-items: start; }
.legend h3 { font-size: 1.08rem; font-weight: 600; margin: 0 0 .25em; }
.legend p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.sw {
  height: 34px; border-radius: 4px; display: grid; place-items: center;
  font: 600 .85rem/1 var(--ff-sans); border: 1px solid var(--line);
  background: #fff; color: var(--ink);
}
.sw-fill { background: #ffff00; border-color: #e6e600; font-family: var(--ff-sans); }
.sw-sector { background: linear-gradient(90deg, #f8cbad 0 33%, #b4c7e7 33% 66%, #a9d18e 66%); border: 0; }
.sw-red { color: #d00000; font-weight: 700; }
.sw-note { background: #fff; }
.sw-note span { background: #66ff33; padding: 1px 3px; font-size: .72rem; vertical-align: super; }
.sw-bold { font-weight: 800; }
.sw-link { color: #1f5fbf; text-decoration: underline; }
.sw-clean { background: var(--paper-3); color: var(--ink-2); }

.shots {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 28px);
  margin-top: clamp(36px, 5vw, 56px);
}
.shot { margin: 0; }
.shot .frame {
  display: block;
  background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 8px;
  box-shadow: var(--shadow-sheet); aspect-ratio: 4 / 3; overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot figcaption { margin-top: 12px; font-size: .93rem; color: var(--ink-2); }
.shot figcaption strong { color: var(--ink); font-weight: 600; display: block; font-size: 1rem; }

@media (max-width: 900px) {
  .legend { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .shot .frame { aspect-ratio: auto; max-height: 360px; }
}

/* Opzioni */
.options { border-top: 1px solid var(--line); }
.opt {
  display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.opt dt { font-weight: 600; color: var(--ink); }
.opt dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block; padding: .28em .8em; border-radius: 999px;
  border: 1px solid var(--line-2); background: #fff; font-size: .93rem; color: var(--ink-2);
}
.services {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  margin-top: clamp(36px, 5vw, 56px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.service { padding: 24px 26px; }
.service + .service { border-left: 1px solid var(--line); }
.service h3 { font-size: 1.15rem; font-weight: 600; color: var(--brand-deep); margin-bottom: .45em; }
.service p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.service .when { display: block; margin-top: .8em; font-weight: 600; color: var(--brand); font-size: .95rem; }

@media (max-width: 900px) {
  .opt { grid-template-columns: 1fr; gap: 8px; }
  .services { grid-template-columns: 1fr; }
  .service + .service { border-left: 0; border-top: 1px solid var(--line); }
}

/* Aggiornamenti */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--brand-200); }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: .45em; width: 12px; height: 12px;
  border-radius: 50%; background: #fff; border: 2px solid var(--brand);
}
.timeline li:first-child::before { background: var(--brand); }
.timeline time { display: block; font-weight: 600; color: var(--brand); font-size: .95rem; font-variant-numeric: tabular-nums; }
.timeline p { margin: .15em 0 0; color: var(--ink-2); max-width: 52rem; }
.upd-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.upd-grid .section-head { position: sticky; top: calc(var(--hh) + 32px); }
@media (max-width: 900px) { .upd-grid { grid-template-columns: 1fr; } .upd-grid .section-head { position: static; } }

/* Bandi tipo ANAC */
.anac-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 32px); }
.anac-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(22px, 3vw, 34px); border-radius: var(--radius);
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  position: relative; transition: border-color .15s, box-shadow .15s;
}
.anac-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sheet); color: var(--ink); }
.anac-card .tag { font-size: .9rem; font-weight: 600; color: var(--brand); }
.anac-card h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 650; color: var(--brand-deep); }
.anac-card p { margin: 0; color: var(--ink-2); }
.anac-card .go { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--brand-ink); display: inline-flex; align-items: center; gap: .4em; }
.anac-card .go svg { width: 18px; height: 18px; }
.anac-card .sample { font-family: var(--ff-serif); color: var(--ink); font-size: 1.02rem; line-height: 1.55; margin: 6px 0; }
.anac-card .sample mark { background: linear-gradient(transparent 55%, var(--hl) 55%); color: inherit; padding: 0 .08em; }
@media (max-width: 800px) { .anac-grid { grid-template-columns: 1fr; } }

/* Abbonamento */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 28px); max-width: 920px; }
.plan {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column;
}
.plan-best { border: 2px solid var(--brand); position: relative; }
.plan-best .ribbon {
  position: absolute; top: -14px; left: 24px; background: var(--brand); color: #fff;
  font-size: .85rem; font-weight: 600; padding: .25em .8em; border-radius: 999px;
}
.plan h3 { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.plan .price { margin: .5em 0 .1em; font-size: clamp(2.4rem, 4vw, 3.1rem); font-weight: 650; color: var(--brand-deep); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: .95rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.plan .per { color: var(--ink-2); font-size: .95rem; margin: 0 0 1.2em; }
.plan ul { list-style: none; margin: 0 0 1.4em; padding: 0; }
.plan li { padding: .45em 0 .45em 1.7em; position: relative; border-top: 1px solid var(--line); font-size: .97rem; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .78em; width: 1em; height: .55em;
  border-left: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(-45deg);
}
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-notes { margin-top: 24px; font-size: .93rem; color: var(--ink-2); max-width: 920px; }
.plan-notes p { margin: .3em 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 52rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 44px 18px 0; position: relative;
  font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 11px; height: 11px; margin-top: -8px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); max-width: 46rem; }

/* Contatti */
.contact {
  background: var(--brand-deep); color: #fff; padding: clamp(56px, 8vw, 96px) 0;
}
.contact-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.contact h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 650; letter-spacing: -.025em; color: #fff; }
.contact p { color: rgba(255, 255, 255, .82); font-size: 1.1rem; margin: .9em 0 0; max-width: 34em; }
.contact .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.contact-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: 24px 26px; }
.contact-card .big-tel { display: block; font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 650; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.contact-card .big-tel:hover { color: var(--brand-200); }
.contact-card dl { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .97rem; }
.contact-card dt { color: rgba(255, 255, 255, .6); }
.contact-card dd { margin: 0; }
.contact-card a { color: #fff; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   Piè di pagina
   --------------------------------------------------------- */
.site-footer { background: var(--brand-night); color: rgba(255, 255, 255, .78); padding: 48px 0 32px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 32px; }
.footer-logo { display: inline-block; background: #fff; padding: 12px 14px; border-radius: 4px; }
.footer-logo img { width: 230px; }
.site-footer p { margin: .5em 0; }
.site-footer h2 { font-size: .98rem; font-weight: 600; color: #fff; margin: 0 0 .7em; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35em 0; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, .35); }
.site-footer a:hover { color: var(--brand-200); }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: rgba(255, 255, 255, .55); font-size: .86rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   Pagine dei bandi tipo
   --------------------------------------------------------- */
.bando-head { max-width: 46rem; margin: 0 auto 2.2rem; }
.crumbs { font-size: .9rem; color: var(--ink-3); margin: 0 0 12px; }
.crumbs a { color: var(--ink-2); }
.bando-head h1 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); font-weight: 650; color: var(--brand-deep); letter-spacing: -.022em; text-wrap: balance; }
.bando-sub { margin: .7em 0 0; color: var(--ink-2); font-size: 1.05rem; }
.bando-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.bando-meta .legend-ann { font-size: .95rem; color: var(--ink-2); }
.no-ann .bando-meta .legend-ann { display: none; }
/* il testo si restringe quando si apre il pannello: niente compensazioni automatiche dello scorrimento */
body.p-bt1, body.p-bt2 { overflow-anchor: none; }
.bando-meta .sample-ann { white-space: nowrap; margin-right: .3em; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tool {
  display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: .35em .9em;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink);
  font: 500 .92rem var(--ff-sans); cursor: pointer; text-decoration: none;
}
.tool:hover { border-color: var(--brand-300); color: var(--brand-ink); }
.tool svg { width: 17px; height: 17px; }
.tool[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); color: var(--brand-ink); }
.promo-inline {
  margin: 20px 0 0; padding: 12px 16px; border-radius: var(--radius);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  font-size: .95rem; color: var(--ink-2);
}
.promo-inline strong { color: var(--brand-deep); }
.promo-inline a { font-weight: 600; white-space: nowrap; }

.doc .frontispiece {
  text-align: center; hyphens: manual; margin: 0 0 2.6em; padding: 1.6em 1.4em 1.2em;
  border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 4px; background: #fff;
}
.doc .frontispiece p { margin: 0 0 .55em; }
.doc .frontispiece p:first-child { font-size: 1.12em; }
.doc .frontispiece p:last-child { color: var(--ink-2); margin-bottom: 0; }

.bando-layout {
  display: grid;
  grid-template-columns: clamp(220px, 23vw, 300px) minmax(0, 1fr);
  align-items: start;
  width: 100%;
}

/* Indice laterale */
.toc {
  position: sticky; top: var(--hh);
  height: calc(100vh - var(--hh));
  height: calc(100dvh - var(--hh));
  overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 18px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.toc-head { padding: 0 16px 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.toc-title { font-size: .95rem; font-weight: 600; color: var(--ink); margin: 0; }
.toc-close { display: none; }
.toc-search { padding: 0 14px 12px 18px; }
.toc-search label { display: block; font-size: .85rem; color: var(--ink-2); margin-bottom: 4px; }
.search-row { display: flex; gap: 4px; align-items: center; }
.toc-search input {
  flex: 1; min-width: 0; height: 38px; padding: 0 10px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); font: 400 .95rem var(--ff-sans); color: var(--ink);
}
.toc-search input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.icon-btn {
  width: 34px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--line-2); border-radius: var(--radius); background: #fff; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { border-color: var(--brand-300); color: var(--brand); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }
.search-status { font-size: .82rem; color: var(--ink-3); margin: 6px 0 0; }
.search-status:empty { margin: 0; }

.toc-list, .toc-list ol { list-style: none; margin: 0; padding: 0; }
.toc-group { margin-top: 6px; }
.toc-group > .toc-gl {
  display: block; padding: 10px 16px 6px 20px; font-size: .8rem; font-weight: 600; color: var(--ink-3);
  text-decoration: none; letter-spacing: .01em;
}
.toc-group > .toc-gl:hover { color: var(--brand); }
.toc-group.in-path > .toc-gl { color: var(--brand); }
.toc-group > .toc-gl[aria-current="true"] { color: var(--brand-deep); background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.toc a.toc-l {
  display: flex; gap: 10px; align-items: baseline;
  padding: 6px 14px 6px 17px; border-left: 3px solid transparent;
  color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.3;
}
.toc a.toc-l:hover { background: var(--brand-50); color: var(--brand-ink); }
.toc a.toc-l .n { flex: none; min-width: 1.6em; font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: .85rem; }
.toc .sub a.toc-l { padding-left: 34px; font-size: .9rem; color: var(--ink-2); }
.toc a.toc-l.nn { padding-left: 17px; }
.toc .sub a.toc-l .n { min-width: 2.3em; }
.toc .sub { display: none; }
.toc li.open > .sub, .toc li:focus-within > .sub { display: block; }
.toc a.toc-l[aria-current="true"] {
  border-left-color: var(--brand); background: var(--brand-50); color: var(--brand-deep); font-weight: 600;
}
.toc a.toc-l[aria-current="true"] .n { color: var(--brand); }
.toc li.in-path > a.toc-l { color: var(--brand-deep); font-weight: 600; }
.toc li.in-path > a.toc-l .n { color: var(--brand); }

/* barra indice su schermi piccoli */
.toc-bar { display: none; }
.toc-backdrop { display: none; }

/* Testo del documento */
.doc-wrap { min-width: 0; padding: clamp(24px, 3.5vw, 48px) clamp(16px, 4vw, 56px) 96px; }
.doc {
  --k: 1;
  max-width: 46rem; margin: 0 auto;
  font-family: var(--ff-serif); font-size: 1.075rem; line-height: 1.7; color: var(--ink);
  font-variant-numeric: oldstyle-nums proportional-nums;
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.doc p { margin: 0 0 .75em; }
.doc a { color: var(--brand-ink); overflow-wrap: anywhere; }
.doc .c { text-align: center; }
.doc .r { text-align: right; }
.doc .ind { padding-left: calc(var(--l) * var(--k)); }
.doc .fl { text-indent: calc(var(--f) * var(--k)); }
.doc .li { padding-left: calc(var(--l) * var(--k)); text-indent: calc(-1 * var(--h) * var(--k)); }
.doc .li .lbl { display: inline-block; box-sizing: border-box; min-width: calc(var(--h) * var(--k)); padding-right: .4em; text-indent: 0; font-variant-numeric: lining-nums; }
.doc .tab { display: inline-block; width: 1.6em; }
.doc .caps { text-transform: uppercase; }
.doc .sc { font-variant: small-caps; }
.doc em { font-style: italic; }
.doc strong { font-weight: 650; }
.doc sup, .doc sub { line-height: 0; }

.doc .dh {
  font-family: var(--ff-sans); text-align: left; hyphens: manual;
  scroll-margin-top: 20px;
}
.doc .dh:focus { outline: none; }
.doc .dh:focus-visible { outline: 3px solid var(--brand); }
.doc .dh1 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 650; color: var(--brand-deep);
  letter-spacing: .01em; margin: 2.4em 0 1em; padding-top: 1em; border-top: 2px solid var(--brand);
}
.doc > .dh1:first-child, .doc > section:first-child > .dh1:first-child { margin-top: 0; }
.doc .dh2 {
  font-size: 1.22rem; font-weight: 650; color: var(--ink); letter-spacing: .005em; line-height: 1.25;
  margin: 2.2em 0 .8em; padding-top: .9em; border-top: 1px solid var(--line);
}
.doc .dh3 { font-size: 1.04rem; font-weight: 600; color: var(--ink); margin: 1.8em 0 .6em; line-height: 1.3; }
.doc .hn { color: var(--brand); font-variant-numeric: lining-nums tabular-nums; margin-right: .2em; }
.doc .dh-form .hsub { display: block; font-size: .7em; font-weight: 400; color: var(--ink-2); margin-top: .4em; letter-spacing: 0; }

.doc .nb, .doc .box {
  margin: 1.3em 0; padding: .95em 1.15em .3em; border-radius: 4px;
  background: var(--paper-2); border: 1px solid var(--line); border-left: 4px solid var(--brand-300);
  font-size: .98rem;
}
.doc .box { border-left-color: var(--line-2); }
.doc .nb p, .doc .box p { margin-bottom: .7em; }

.doc .tbl { margin: 1.3em 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.doc .tbl:focus-visible { outline: 3px solid var(--brand); }
.doc table { border-collapse: collapse; width: 100%; font-family: var(--ff-sans); font-size: .9rem; line-height: 1.45; text-align: left; hyphens: manual; }
.doc td, .doc th { border: 1px solid var(--line); padding: .5em .65em; vertical-align: top; min-width: 3.2em; }
.doc tr:first-child > * { border-top: 0; }
.doc tr > *:first-child { border-left: 0; }
.doc tr > *:last-child { border-right: 0; }
.doc tr:last-child > * { border-bottom: 0; }
.doc td p, .doc th p { margin: 0 0 .35em; }
.doc td p:last-child, .doc th p:last-child { margin-bottom: 0; }
.doc .sh { background: var(--paper-3); }
.doc .sh-d { background: var(--brand-deep); color: #fff; }
.doc .sh-d a { color: #fff; }
.doc td .li, .doc th .li { --k: .7; }

.doc .fx math { font-size: 1.08em; }
.doc .fx-b { display: block; margin: .9em 0; overflow-x: auto; text-align: center; text-indent: 0; }
.doc .fx-b math { display: block; margin: 0 auto; }

.doc .fnref a { text-decoration: none; font-family: var(--ff-sans); font-weight: 600; font-size: .78em; padding: 0 .15em; }
.doc .footnotes { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); font-size: .93rem; }
.doc .footnotes h3 { font-size: 1rem; margin-bottom: .6em; }
.doc .footnotes ol { padding-left: 1.4em; margin: 0; }
.doc .footnotes li { margin-bottom: .5em; }

/* richiami agli approfondimenti */
.doc a.ann {
  color: inherit; text-decoration: none; cursor: pointer; border-radius: 2px;
  background-image: linear-gradient(transparent 56%, var(--hl) 56%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .06em; transition: background-color .12s;
}
/* segno del richiamo: spazio stretto non separabile + pallino, così non va mai a capo da solo */
.doc a.ann::after, .sample-ann::after {
  content: "\202F\2022"; font-family: var(--ff-sans); font-style: normal; font-weight: 700;
  font-size: 1.3em; line-height: 0; color: var(--brand); vertical-align: .2em;
}
.doc a.ann:hover, .doc a.ann:focus-visible { background-image: none; background-color: var(--hl-strong); color: var(--ink); }
.doc a.ann[aria-expanded="true"] { background-image: none; background-color: var(--brand-200); outline: 2px solid var(--brand); outline-offset: 1px; }
.no-ann .doc a.ann { background-image: none; padding: 0; cursor: text; }
.no-ann .doc a.ann::after { display: none; }

mark.hit { background: #ffe58a; color: inherit; border-radius: 2px; padding: 0 .04em; }
mark.hit.cur { background: #ffbf3f; outline: 2px solid #c27c00; }

.end-promo {
  margin: 3em 0 0; padding: 1.4em 1.5em; border-radius: var(--radius);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  font-family: var(--ff-sans); text-align: left; hyphens: manual; font-size: 1rem; color: var(--ink-2);
}
.doc .btn-primary, .doc .btn-primary:hover { color: #fff; text-decoration: none; }
.end-promo h2 { font-size: 1.25rem; color: var(--brand-deep); margin-bottom: .4em; letter-spacing: -.01em; }
.end-promo p { margin: 0 0 1em; }


.sample-ann {
  font-family: var(--ff-serif); color: var(--ink); padding: 0 .06em;
  background-image: linear-gradient(transparent 56%, var(--hl) 56%);
}
.doc .appendix { margin-top: 3.5em; }

/* Pannello degli approfondimenti */
.ann-panel {
  position: fixed; top: var(--hh); right: 0; bottom: 0; z-index: 45;
  width: 50vw;
  display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid var(--line);
  box-shadow: -24px 0 48px -28px rgba(69, 16, 42, .55);
  transform: translateX(102%); visibility: hidden;
  transition: transform .34s cubic-bezier(.22, .8, .24, 1), visibility 0s linear .34s;
}
.ann-panel.open { transform: translateX(0); visibility: visible; transition: transform .34s cubic-bezier(.22, .8, .24, 1), visibility 0s; }
.ann-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px 12px 24px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.ann-kind { font-size: .9rem; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: .5em; }
.ann-kind svg { width: 18px; height: 18px; }
.ann-close {
  display: inline-flex; align-items: center; gap: .4em; min-height: 40px; padding: 0 .9em;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink);
  font: 500 .92rem var(--ff-sans); cursor: pointer;
}
.ann-close:hover { border-color: var(--brand); color: var(--brand); }
.ann-close svg { width: 16px; height: 16px; }
.ann-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px clamp(18px, 3vw, 36px) 28px; }
.ann-title { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 650; color: var(--brand-deep); letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .25em; }
.ann-title:focus { outline: none; }
.ann-where { font-size: .9rem; color: var(--ink-3); margin: 0 0 1.2em; }
.ann-where a { color: var(--ink-2); }
.ann-text { font-family: var(--ff-serif); font-size: 1.04rem; line-height: 1.65; color: var(--ink); }
.ann-text p { margin: 0 0 .85em; }
.ann-text.norma p { padding-left: .9em; border-left: 2px solid var(--brand-200); }
.ann-note { font-size: .9rem; color: var(--ink-2); background: var(--paper-2); border-radius: 4px; padding: .6em .8em; margin: 0 0 1em; }
.ann-src { font-size: .9rem; color: var(--ink-2); margin: 1.1em 0 0; padding-top: .9em; border-top: 1px solid var(--line); }
.ann-src a { font-weight: 600; }
.ann-rel { margin-top: 1.6em; border: 1px solid var(--brand-100); border-radius: var(--radius); background: var(--brand-50); padding: 16px 18px; }
.ann-rel h3 { font-size: 1rem; font-weight: 600; color: var(--brand-deep); margin: 0 0 .2em; }
.ann-rel .meta { font-size: .85rem; color: var(--ink-3); margin: 0 0 .7em; }
.ann-rel .q { font-family: var(--ff-serif); font-style: italic; color: var(--ink-2); font-size: .97rem; margin: 0 0 .7em; }
.ann-rel .a { font-family: var(--ff-serif); font-size: .99rem; margin: 0 0 .6em; }
.ann-rel a { font-weight: 600; font-size: .92rem; }
.ann-promo { margin-top: 1.6em; font-size: .95rem; color: var(--ink-2); }
.ann-promo a { font-weight: 600; }
.ann-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fff; }
.ann-nav button {
  display: inline-flex; align-items: center; gap: .4em; min-height: 40px; padding: 0 .9em;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font: 500 .92rem var(--ff-sans); cursor: pointer;
}
.ann-nav button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.ann-nav button:disabled { opacity: .45; cursor: default; }
.ann-nav button svg { width: 16px; height: 16px; }
.ann-count { font-size: .88rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Schermi larghi: a pannello aperto il testo scorre nello spazio visibile tra indice e pannello */
@media (min-width: 861px) {
  .ann-open .doc-wrap { padding-left: clamp(16px, 2vw, 28px); padding-right: calc(50vw + clamp(16px, 2vw, 28px)); }
  .ann-open .bando-head, .ann-open .doc { margin-left: 0; margin-right: 0; }
  .ann-open .bando-head h1 { font-size: clamp(1.4rem, 1.9vw, 1.75rem); }
  .ann-open .doc { --k: .6; font-size: 1rem; line-height: 1.62; text-align: left; hyphens: manual; -webkit-hyphens: manual; }
}

/* ---- adattamento alle larghezze ---- */
@media (max-width: 1200px) {
  .doc { font-size: 1.05rem; }
}
@media (max-width: 1120px) {
  .toc a.toc-l { font-size: .9rem; gap: 8px; padding-left: 14px; padding-right: 10px; }
  .toc a.toc-l .n { min-width: 1.5em; }
  .toc .sub a.toc-l { padding-left: 26px; font-size: .86rem; }
  .toc-search { padding-left: 14px; padding-right: 10px; }
  .toc-head { padding-left: 16px; }
}
@media (max-width: 860px) {
  .bando-layout { grid-template-columns: 1fr; }
  .toc-bar {
    display: flex; align-items: center; gap: 10px;
    position: fixed; top: var(--hh); left: 0; right: 0; z-index: 30; height: var(--bar); box-sizing: border-box;
    padding: 8px var(--gutter); background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line);
  }
  .toc-bar button {
    display: inline-flex; align-items: center; gap: .5em; min-height: 40px; padding: 0 .9em; flex: none;
    border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font: 600 .92rem var(--ff-sans); cursor: pointer;
  }
  .toc-bar button svg { width: 18px; height: 18px; }
  .toc-bar .cur { min-width: 0; font-size: .92rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .toc-bar .cur b { color: var(--brand); font-weight: 600; margin-right: .3em; }
  .toc {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; height: auto;
    width: min(88vw, 360px); border-right: 1px solid var(--line);
    transform: translateX(-102%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
    box-shadow: 24px 0 48px -28px rgba(69, 16, 42, .6);
  }
  .toc.open { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  .toc-close {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    border: 1.5px solid var(--line-2); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
  }
  .toc-close svg { width: 16px; height: 16px; }
  .toc-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(44, 10, 27, .4); }
  .toc-backdrop.show { display: block; }
  .ann-panel { left: 0; right: 0; width: auto; }
  .doc { --k: .72; text-align: left; hyphens: manual; }
  :root { --bar: 57px; }
  .bando-main { padding-top: var(--bar); }
  html { scroll-padding-top: calc(var(--hh) + var(--bar)); }
  .doc .dh { scroll-margin-top: 12px; }
}
@media (max-width: 600px) {
  .doc { font-size: 1.02rem; line-height: 1.66; --k: .6; }
  .doc .nb, .doc .box { padding: .8em .85em .2em; }
  .doc-wrap { padding-inline: 16px; }
  .ann-top { padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------
   Pagine semplici (privacy, 404)
   --------------------------------------------------------- */
.page-simple { padding: clamp(40px, 6vw, 80px) 0; }
.page-simple .prose { max-width: 46rem; }
.prose h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); color: var(--brand-deep); font-weight: 650; margin-bottom: .6em; }
.prose h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; color: var(--ink); }
.prose p, .prose li { color: var(--ink-2); }

/* ---------------------------------------------------------
   Stampa
   --------------------------------------------------------- */
@media print {
  @page { margin: 18mm 16mm; }
  .site-header, .toc, .toc-bar, .toc-backdrop, .ann-panel, .tools, .promo-inline, .end-promo,
  .site-footer, .skip, .contact, .hero-cta, .menu-btn, .search-status { display: none !important; }
  body { font-size: 11pt; background: #fff; padding-top: 0; }
  .bando-main { padding-top: 0; }
  .bando-layout { display: block; }
  .bando-head .bando-meta, .bando-head .crumbs { display: none !important; }
  .doc-wrap { padding: 0; }
  .doc { max-width: none; font-size: 10.5pt; line-height: 1.45; text-align: justify; }
  .doc a.ann { background: none !important; padding: 0; }
  .doc a.ann::after { display: none; }
  .doc .dh1, .doc .dh2 { break-after: avoid; page-break-after: avoid; }
  .doc .dh3 { break-after: avoid; page-break-after: avoid; }
  .doc .nb, .doc .box, .doc table, .doc tr { break-inside: avoid; page-break-inside: avoid; }
  .doc .tbl { overflow: visible; border: 0; }
  mark.hit { background: none; outline: 0; }
  a { color: inherit; }
}
