:root {
  --bg: #f3f3f0;
  --surface: #e9e9e5;
  --ink: #111b40;
  --ink-soft: #3d4668;
  --line: rgba(17, 27, 64, .2);
  --accent: #1b3fa0;
  --accent-ink: #ffffff;
  --accent-hover: #142f7d;
  --green: #148a49;
  --red: #c8283a;
  --band: #0f1d4f;
  --band-ink: #f2f4fb;
  --band-soft: #bcc6e6;
  --paper: #d8d8d7;
  --field: #f7f7f5;
  --focus: #1b3fa0;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1128;
    --surface: #111a3a;
    --ink: #eaeefb;
    --ink-soft: #b3bddf;
    --line: rgba(234, 238, 251, .22);
    --accent: #93adff;
    --accent-ink: #0a1128;
    --accent-hover: #b4c6ff;
    --green: #3fc07a;
    --red: #ff6b7a;
    --band: #14245c;
    --focus: #93adff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1128;
  --surface: #111a3a;
  --ink: #eaeefb;
  --ink-soft: #b3bddf;
  --line: rgba(234, 238, 251, .22);
  --accent: #93adff;
  --accent-ink: #0a1128;
  --accent-hover: #b4c6ff;
  --green: #3fc07a;
  --red: #ff6b7a;
  --band: #14245c;
  --focus: #93adff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 84px); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
h1, h2, h3 { font-family: var(--head); font-stretch: 112%; margin: 0; line-height: 1.08; letter-spacing: -.015em; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
h2 { font-weight: 760; font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-weight: 700; font-size: 1.15rem; font-stretch: 105%; letter-spacing: -.005em; line-height: 1.25; }
p { margin: 0 0 1em; }
.lead { font-size: 1.28rem; color: var(--ink-soft); max-width: 36em; }

/* Header */
.flagbar { height: 4px; background: linear-gradient(90deg, var(--green) 0 33.34%, #fff 33.34% 66.67%, var(--red) 66.67% 100%); }
header.site {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: auto; border-radius: 6px; background: var(--paper); }
.brand b { font-family: var(--head); font-stretch: 118%; font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; display: block; line-height: 1.1; }
.brand small { font-family: var(--head); font-size: .78rem; color: var(--ink-soft); display: block; font-weight: 500; }
nav.main ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
nav.main a { font-family: var(--head); font-weight: 560; font-size: .95rem; text-decoration: none; color: var(--ink); padding: .4rem 0; border-bottom: 2px solid transparent; }
nav.main a:hover { border-bottom-color: var(--accent); color: var(--ink); }
.btn {
  display: inline-block; font-family: var(--head); font-weight: 650; font-size: 1rem; font-stretch: 105%;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 2px solid var(--accent);
  padding: .8rem 1.4rem; border-radius: 4px; cursor: pointer; line-height: 1.2;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
nav.main .btn { padding: .55rem 1rem; font-size: .92rem; color: var(--accent-ink); border-bottom: 2px solid var(--accent); }
nav.main .btn:hover { color: var(--accent-ink); border-bottom-color: var(--accent-hover); }
.menu-btn { display: none; background: none; border: 2px solid var(--ink); color: var(--ink); font-family: var(--head); font-weight: 650; padding: .45rem .8rem; border-radius: 4px; cursor: pointer; }

/* Hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.logo-plate { background: var(--paper); border-radius: 10px; padding: clamp(.6rem, 2vw, 1.2rem); box-shadow: 0 0 0 1px var(--line); animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.logo-plate img { width: 100%; height: auto; border-radius: 4px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.2rem 2rem; margin: clamp(2rem, 5vw, 3.5rem) 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }
dl.facts dt { font-family: var(--head); font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .15rem; }
dl.facts dd { margin: 0; font-family: var(--head); font-stretch: 105%; font-weight: 650; font-size: 1.1rem; line-height: 1.3; }

/* Sections */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.prose { max-width: 40em; }
.pull { font-family: var(--head); font-stretch: 108%; font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.25; border-left: 5px solid var(--green); padding-left: 1.1rem; margin: 2rem 0 0; max-width: 24em; }

.activities { background: var(--surface); }
.activities header { max-width: 42em; margin-bottom: 2.5rem; }
.activities header p { color: var(--ink-soft); margin: 1rem 0 0; }
.act-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.2rem 2.5rem; list-style: none; margin: 0; padding: 0; }
.act-list li { border-top: 2px solid var(--ink); padding-top: 1rem; display: flex; flex-direction: column; }
.act-list li:nth-child(3n+2) { border-top-color: var(--accent); }
.act-list li:nth-child(3n+3) { border-top-color: var(--red); }
.act-list p { margin: .55rem 0 .8rem; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.55; }
.act-list a { font-family: var(--head); font-weight: 600; font-size: .92rem; margin-top: auto; }

/* Associarsi */
.steps { list-style: none; counter-reset: s; margin: 0 0 2rem; padding: 0; display: grid; gap: 1.4rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.steps li::before { content: counter(s); font-family: var(--head); font-weight: 800; font-size: 1.15rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.steps p { margin: .2rem 0 0; color: var(--ink-soft); }
.quota { border: 2px solid var(--ink); border-radius: 6px; padding: 1.2rem 1.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.2rem; margin-bottom: 1.6rem; }
.quota strong { font-family: var(--head); font-stretch: 112%; font-weight: 800; font-size: 2.1rem; line-height: 1; }
.quota span { color: var(--ink-soft); }
.note { font-size: 1rem; color: var(--ink-soft); }

/* Statuto */
.statuto { background: var(--surface); }
.acc { margin-top: 2rem; border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative; font-family: var(--head); font-stretch: 108%; font-weight: 700; font-size: 1.15rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: 1.7rem; font-weight: 500; color: var(--accent); transition: transform .2s; }
.acc details[open] summary::after { content: "–"; }
.acc summary small { display: block; font-weight: 500; font-size: .88rem; color: var(--ink-soft); font-stretch: 100%; margin-top: .15rem; }
.acc .body { padding: 0 0 1.4rem; max-width: 46em; }
.acc .body li { margin-bottom: .5rem; }
.acc .body ul { padding-left: 1.2rem; margin: 0; }

/* Direttivo */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem 2.5rem; margin-top: 2.2rem; list-style: none; padding: 0; }
.board li { border-left: 4px solid var(--accent); padding-left: 1rem; }
.board li:nth-child(2) { border-left-color: var(--green); }
.board li:nth-child(3) { border-left-color: var(--red); }
.board .role { font-family: var(--head); font-size: .9rem; color: var(--ink-soft); font-weight: 560; }
.board .name { font-family: var(--head); font-stretch: 108%; font-weight: 750; font-size: 1.3rem; line-height: 1.2; }
.board p { margin: .35rem 0 0; font-size: 1rem; color: var(--ink-soft); }

/* Contatti */
.contact { background: var(--band); color: var(--band-ink); }
.contact h2, .contact h3 { color: var(--band-ink); }
.contact a { color: #fff; }
.contact .info p { color: var(--band-soft); }
.contact address { font-style: normal; margin: 1.6rem 0 0; display: grid; gap: 1.1rem; }
.contact address div b { display: block; font-family: var(--head); font-size: .88rem; font-weight: 600; color: var(--band-soft); }
.contact address div span, .contact address div a { font-family: var(--head); font-stretch: 105%; font-weight: 600; font-size: 1.12rem; overflow-wrap: anywhere; }
form.req { background: var(--bg); color: var(--ink); border-radius: 10px; padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
form.req h3 { color: var(--ink); font-size: 1.35rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { display: block; font-family: var(--head); font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field label i { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: var(--field);
  border: 1.5px solid var(--line); border-radius: 4px; padding: .7rem .8rem;
}
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea { background: #0a1128; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field input, :root:not([data-theme="light"]) .field select, :root:not([data-theme="light"]) .field textarea { background: #0a1128; } }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
.field .err { color: var(--red); font-family: var(--head); font-size: .88rem; margin-top: .3rem; display: none; }
.field.bad .err { display: block; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--red); }
.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; }
.consent input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; flex: none; accent-color: var(--accent); }
.consent.bad { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { display: none; border: 2px solid var(--green); border-radius: 6px; padding: 1rem 1.1rem; font-size: 1rem; }
.status.show { display: block; }
.status h4 { margin: 0 0 .4rem; font-family: var(--head); font-size: 1.05rem; }
.status pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .95rem; background: var(--surface); border-radius: 4px; padding: .8rem; margin: .7rem 0; max-height: 220px; overflow: auto; }
.status .acts { display: flex; flex-wrap: wrap; gap: .6rem; }
.status .btn { padding: .55rem 1rem; font-size: .92rem; }

footer.site { background: var(--band); color: var(--band-soft); border-top: 1px solid rgba(255,255,255,.15); padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom, 0px)); font-size: .98rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
footer.site h3 { color: var(--band-ink); font-size: 1rem; margin-bottom: .7rem; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
footer.site a { color: var(--band-ink); }
footer.site .brandline { display: flex; gap: .8rem; align-items: center; margin-bottom: .8rem; color: var(--band-ink); font-family: var(--head); font-stretch: 118%; font-weight: 800; }
footer.site .brandline img { width: 56px; border-radius: 6px; background: var(--paper); }
footer.site .legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.18); font-size: .9rem; }

@media (max-width: 880px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .logo-plate { order: -1; }
  footer.site .cols { grid-template-columns: 1fr; }
  .menu-btn { display: inline-block; }
  nav.main { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; align-items: stretch; gap: 0; }
  nav.main li a { display: block; padding: .8rem 0; border-bottom: 1px solid var(--line); }
  nav.main li:last-child a { margin-top: .8rem; text-align: center; border-bottom: 2px solid var(--accent); }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-plate { animation: none; }
}

/* Footer: elenco link legali */
footer.site .legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; align-items: center; }
footer.site .legal.solo { margin-top: 0; border-top: 0; padding-top: 0; }
.linklike { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
footer.site .linklike { color: var(--band-ink); }

/* Pagine legali */
.doc { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.doc h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .6rem; }
.doc h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; font-stretch: 108%; }
.doc .prose { max-width: 46em; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .4rem; }
.doc .tablewrap { overflow-x: auto; margin: 1rem 0; }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .98rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .65rem .8rem; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--head); font-size: .9rem; font-weight: 650; border-bottom: 2px solid var(--ink); }

/* Banner e preferenze cookie */
.cc { position: fixed; z-index: 60; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); max-width: 580px; background: var(--bg); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 1.2rem 1.3rem; box-shadow: 0 12px 40px rgba(0,0,0,.28); font-size: 1rem; line-height: 1.5; }
.cc[hidden] { display: none; }
.cc h2 { font-size: 1.15rem; margin-bottom: .5rem; }
.cc p { margin: 0 0 1rem; color: var(--ink-soft); }
.cc-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.cc-actions .btn, .cc-dlg .btn { padding: .6rem 1.05rem; font-size: .95rem; }
dialog.cc-dlg { border: 2px solid var(--ink); border-radius: 10px; background: var(--bg); color: var(--ink); width: min(580px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; padding: 1.4rem 1.5rem; font-size: 1rem; line-height: 1.5; }
dialog.cc-dlg::backdrop { background: rgba(8, 14, 38, .6); }
.cc-dlg h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.cc-dlg > p { color: var(--ink-soft); margin: 0 0 1rem; }
.cc-opt { border-top: 1px solid var(--line); padding: .9rem 0; display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: start; }
.cc-opt b { font-family: var(--head); font-weight: 650; font-size: 1rem; }
.cc-opt span { grid-column: 1; color: var(--ink-soft); font-size: .95rem; }
.cc-opt input { grid-column: 2; grid-row: 1 / span 2; width: 1.4rem; height: 1.4rem; accent-color: var(--accent); }
.cc-dlg .cc-actions { border-top: 1px solid var(--line); padding-top: 1rem; }

