@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/onest.woff2") format("woff2");
}

:root {
  --teal: #0F5E6E;
  --teal-dark: #0A4652;
  --teal-deep: #083A44;
  --teal-mid: #177686;
  --coral: #FF8F7A;
  --coral-hover: #FF7C64;
  --coral-ink: #3A120A;
  --coral-tint: #FFE6E0;
  --bg: #F4F8F8;
  --surface: #FFFFFF;
  --ink: #0E2429;
  --muted: #4F6A6F;
  --line: #DCE7E8;
  --line-strong: #C3D5D7;
  --tint: #DCEFF1;
  --light: #C8E6EA;
  --err: #B4452E;
  --err-bg: #FBE9E4;
  --focus: var(--teal);
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(14, 36, 41, .06), 0 2px 6px -2px rgba(14, 36, 41, .06);
  --shadow: 0 1px 2px rgba(14, 36, 41, .05), 0 12px 32px -14px rgba(14, 36, 41, .22);
  --shadow-lg: 0 2px 4px rgba(8, 58, 68, .08), 0 34px 70px -28px rgba(8, 40, 48, .55);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  caret-color: var(--teal);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
::selection { background: var(--coral); color: var(--coral-ink); }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; width: 100%; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--coral); color: var(--coral-ink); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Intestazione ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--teal); color: #fff; --focus: var(--coral); box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.site-header .bar { min-height: 68px; flex-wrap: nowrap; }
.logo { font-weight: 800; font-size: 24px; letter-spacing: -0.035em; color: #fff; text-decoration: none; white-space: nowrap; }
.logo:hover { color: #fff; }
.logo.small { font-size: 20px; }
.logo-mi { color: var(--coral); font-weight: 500; }
.logo-dot { color: var(--coral); font-size: 0.8em; }
.main-nav { display: flex; gap: 4px; font-size: 15px; font-weight: 600; margin-left: auto; }
.main-nav a { color: var(--light); text-decoration: none; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--coral); border-radius: 0; }
.header-cta { margin-left: 8px; }
@media (max-width: 880px) {
  .site-header .bar { flex-wrap: wrap; row-gap: 0; padding-top: 10px; }
  .main-nav { order: 3; width: calc(100% + 32px); margin: 4px -16px 0; padding: 0 8px 6px; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 8px 10px; font-size: 14px; }
  .header-cta { margin-left: auto; }
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 22px;
  border: 0; border-radius: 14px; background: var(--coral); color: var(--coral-ink); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, transform .15s var(--ease-out), box-shadow .15s;
}
.btn:hover { background: var(--coral-hover); color: var(--coral-ink); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(200,230,234,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-line { background: var(--surface); color: var(--teal); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-line:hover { background: var(--surface); color: var(--teal-dark); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn-block { display: flex; width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--teal); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.more::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; transition: transform .2s var(--ease-out); }
.more:hover { text-decoration: underline; }
.more:hover::after { transform: translateX(3px) rotate(45deg); }
.soon { font-size: 14px; font-weight: 600; color: var(--light); }

/* ---------- Testata delle pagine interne ---------- */
.hero { background: var(--teal); color: #fff; padding: 20px 0 56px; --focus: var(--coral); }
.hero h1 {
  margin: 18px 0 0; font-weight: 800; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06;
  letter-spacing: -0.035em; text-wrap: balance; max-width: 860px;
}
.hero .lead { margin: 14px 0 0; font-size: clamp(16px, 1.7vw, 19px); line-height: 1.5; color: var(--light); max-width: 680px; text-wrap: pretty; }
.hero .lead strong { color: #fff; }
.hero .hero-ente { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--light); }
.crumbs { font-size: 14px; color: var(--light); display: flex; flex-wrap: wrap; align-items: center; row-gap: 4px; }
.crumbs a { color: var(--light); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs .sep { margin: 0 8px; opacity: .55; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--light); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .ico { width: 18px; height: 18px; color: var(--coral); }

/* Badge */
.badge { display: inline-block; margin: 18px 0 0; padding: 4px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.badge-aperto { background: var(--coral); color: var(--coral-ink); }
.badge-scaduto { background: var(--err-bg); color: var(--err); }

/* ---------- Contenuto ---------- */
main { flex: 1; }
main.narrow { max-width: 920px; padding-top: 40px; padding-bottom: 72px; }
main.wide { max-width: 1160px; padding-top: 40px; padding-bottom: 80px; }
h2 { margin: 0 0 12px; font-weight: 800; font-size: clamp(22px, 3vw, 30px); line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.block { margin-top: 56px; }
.block:first-child { margin-top: 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; }
.block-head h2 { margin: 0; }
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 40px); }
.card h2 { margin-top: 32px; }
.scheda { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.scheda dt { color: var(--muted); font-weight: 600; }
.scheda dd { margin: 0; }
.req { padding-left: 20px; margin: 0; }
.req li { margin: 4px 0; }
.source { margin: 32px 0 0; }
.empty { color: var(--muted); }
.prose p { margin: 0 0 16px; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }
@media (max-width: 560px) {
  .scheda { grid-template-columns: 1fr; gap: 2px; }
  .scheda dt { margin-top: 12px; }
}

/* ---------- Riga di un bando (elenchi, ricerca, home) ---------- */
.bandi { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bandi > li { display: flex; min-width: 0; }
.bando {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 4px 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  padding: 14px 18px 14px 14px; text-decoration: none; color: var(--ink);
  transition: box-shadow .18s, transform .18s var(--ease-out);
}
a.bando:hover { color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--teal); }
a.bando:hover .bando-titolo { color: var(--teal-dark); text-decoration: underline; text-decoration-thickness: 1px; }
.bando-data {
  grid-row: 1 / span 2; align-self: stretch; display: grid; place-content: center; text-align: center;
  min-height: 64px; border-radius: 12px; background: var(--tint); color: var(--teal); line-height: 1;
}
.bando-data .d { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bando-data .m { margin-top: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bando-data.is-urgente { background: var(--coral); color: var(--coral-ink); }
.bando-data.is-presto { background: var(--coral-tint); color: #8A2E1C; }
.bando.compatta { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 18px; }
.bando.compatta .bando-fine { grid-column: 2; }
@media (max-width: 640px) { .bando.compatta { grid-template-columns: minmax(0, 1fr); } .bando.compatta .bando-fine { grid-column: 1; } }
.bando-data.is-nessuna { background: var(--bg); color: var(--muted); }
.bando-data.is-nessuna .d { font-size: 18px; }
.bando.scaduto .bando-data { background: var(--bg); color: var(--muted); }
.bando-body { min-width: 0; display: grid; gap: 3px; }
.bando-titolo {
  font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty;
}
.bando.scaduto .bando-titolo { color: var(--muted); }
.bando .meta { color: var(--muted); font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.bando .meta.sintesi { color: var(--ink); opacity: .78; -webkit-line-clamp: 2; }
.bando .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.tag-nuovo { background: var(--coral-tint); color: #8A2E1C; box-shadow: none; }
.tag-chiuso { background: var(--err-bg); color: var(--err); box-shadow: none; }
.bando-fine { grid-row: 1 / span 2; grid-column: 3; display: grid; justify-items: end; gap: 2px; text-align: right; white-space: nowrap; }
.bando-posti { font-size: 13px; color: var(--muted); }
.bando-posti strong { display: block; font-size: 20px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bando-left { font-size: 13px; font-weight: 700; color: var(--teal); }
.bando-left.is-urgente { color: #A3361F; }
div.bando { cursor: default; }
@media (max-width: 640px) {
  .bando { grid-template-columns: 52px minmax(0, 1fr); padding: 12px 14px 12px 12px; gap: 2px 14px; }
  .bando-data { min-height: 56px; }
  .bando-data .d { font-size: 20px; }
  .bando-titolo { font-size: 16px; }
  .bando-fine { grid-row: auto; grid-column: 2; display: flex; justify-items: start; gap: 10px; align-items: baseline; margin-top: 2px; }
  .bando-posti strong { display: inline; font-size: 13px; }
}

/* chip di navigazione (regioni, lauree, archivio) */
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.chips a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 16px;
  background: var(--surface); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-weight: 600; color: var(--ink);
}
.chips a:hover { box-shadow: inset 0 0 0 1.5px var(--teal); color: var(--teal-dark); }
.chips span { color: var(--muted); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--bg); border-radius: 999px; padding: 1px 9px; }

/* ---------- Riquadro app (fondo delle pagine) ---------- */
.cta {
  margin-top: 64px; background: var(--teal); color: #fff; border-radius: var(--radius-lg); --focus: var(--coral);
  padding: clamp(24px, 4vw, 44px); display: flex; flex-wrap: wrap; align-items: center; gap: 24px; justify-content: space-between;
  position: relative; overflow: hidden;
}
.cta::after { content: ""; position: absolute; right: -60px; bottom: -120px; width: 280px; height: 280px; border-radius: 50%; background: var(--teal-mid); opacity: .5; pointer-events: none; }
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; margin: 0; }
.cta p { margin: 8px 0 0; color: var(--light); max-width: 540px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: var(--light); font-size: 14px; --focus: var(--coral); }
.site-footer a { color: var(--light); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; padding-top: 56px; padding-bottom: 40px; }
.foot-brand p { margin: 14px 0 20px; max-width: 320px; line-height: 1.55; color: #A9C7CC; }
.site-footer .logo { color: #fff; }
.site-footer .btn, .site-footer .btn:hover { color: var(--coral-ink); text-decoration: none; }
.foot-h { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #fff; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(200,230,234,.14); font-size: 13px; color: #A9C7CC; }
.foot-note span:last-child { max-width: 640px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }

/* ---------- Home ---------- */
.home-hero { background: var(--teal); color: #fff; position: relative; --focus: var(--coral); }
.home-hero .inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; padding-top: 64px; padding-bottom: 72px; }
.home-hero h1 { margin: 0; font-weight: 800; font-size: clamp(40px, 5.4vw, 66px); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.home-hero h1 em { font-style: normal; color: var(--coral); }
.home-hero .lead { margin: 22px 0 0; font-size: clamp(17px, 1.8vw, 20px); line-height: 1.5; color: var(--light); max-width: 540px; text-wrap: pretty; }
.hero-search { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg); max-width: 580px; --focus: var(--teal); }
.hero-search .field { display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.hero-search input::placeholder { color: #6B8388; }
.hero-search .btn { height: 52px; }
.hero-search:focus-within { box-shadow: var(--shadow-lg), 0 0 0 3px var(--coral); }
.hero-quick { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--light); }
.hero-quick a { color: #fff; text-decoration: none; padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(200,230,234,.4); font-weight: 600; }
.hero-quick a:hover { background: rgba(255,255,255,.1); }
.hero-app { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.hero-app .soon { font-weight: 500; }

/* scheda dal vivo */
.live { position: relative; }
.live-card { background: var(--surface); color: var(--ink); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; --focus: var(--teal); }
.live-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.live-state { display: inline-flex; align-items: center; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--tint); }
.live-card.is-off .live-dot { background: var(--muted); }
.live-card.is-off .live-deadline, .live-card.is-off .letti-h, .live-card.is-off .letti { display: none; }
.stamp { display: inline-flex; align-items: center; padding: 3px 9px; border: 1.5px solid var(--teal); border-radius: 4px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.stamp .ico { width: 15px; height: 15px; }
.live-body { padding: 22px 22px 8px; }
.live-ente { margin: 0; font-size: 14px; color: var(--muted); }
.live-titolo { margin: 6px 0 0; font-size: clamp(21px, 2.2vw, 26px); line-height: 1.18; letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
.live-sintesi { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--muted); text-wrap: pretty; }
.live-deadline { margin: 18px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.live-deadline small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.live-deadline strong { display: block; font-size: 20px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.left-pill { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--teal); font-size: 14px; font-weight: 700; }
.left-pill.is-urgente { background: var(--coral); color: var(--coral-ink); }
.letti-h { margin: 22px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.letti { list-style: none; margin: 0; padding: 0; }
.letti li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15px; }
.letti li:first-child { border-top: 0; }
.letti .k { color: var(--muted); }
.letti .v { font-weight: 700; text-align: right; }
.tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; }
.tick svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tick.is-warn { background: var(--coral); color: var(--coral-ink); }
.live-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 16px 22px 20px; }
.live-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); max-width: 300px; }
.live-caption { margin: 14px 4px 0; font-size: 13px; color: var(--light); }
.live-card .sk { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--bg) 0%, #E8F0F1 50%, var(--bg) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.live-card.is-loading .live-titolo .sk { height: 26px; margin-top: 6px; }
/* le spunte si accendono una dopo l'altra quando arrivano i dati */
.live-card.is-reading .letti li { animation: leggi .5s var(--ease-out) backwards; animation-delay: calc(var(--i) * 140ms + 120ms); }
@keyframes leggi { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .live-card.is-reading .letti li { animation: none; }
  .live-card .sk { animation: none; }
}

/* striscia delle prove */
.proof { background: var(--surface); border-bottom: 1px solid var(--line); }
.proof ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.proof li { display: flex; gap: 14px; align-items: flex-start; padding: 26px 24px 26px 0; }
.proof li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.proof .ico { width: 24px; height: 24px; color: var(--teal); margin-top: 2px; }
.proof strong { display: block; font-size: 16px; line-height: 1.3; letter-spacing: -0.01em; }
.proof span { display: block; font-size: 14px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
@media (max-width: 960px) {
  .proof ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof li { padding: 20px 16px 20px 0; }
  .proof li + li { padding-left: 0; border-left: 0; }
  .proof li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
  .proof li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .proof ul { grid-template-columns: minmax(0, 1fr); }
  .proof li, .proof li:nth-child(even) { padding: 16px 0; border-left: 0; }
  .proof li + li { border-top: 1px solid var(--line); }
  .live-top { flex-wrap: wrap; }
}

.section { padding-top: 96px; }
.section.last { padding-bottom: 104px; }
.section h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin: 0; letter-spacing: -0.035em; }
.section h3 { margin: 0 0 12px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.sub { margin: 14px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 620px; text-wrap: pretty; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.section-head .sub { margin-top: 10px; }
.home-scadenze .bandi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 860px) { .home-scadenze .bandi { grid-template-columns: minmax(0, 1fr); } }
.home-scadenze .stato { margin: 0; color: var(--muted); }

/* come funziona: passi a sinistra, telefono a destra */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 64px; align-items: center; margin-top: 40px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: passo; }
.step-btn {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 16px; text-align: left; cursor: pointer;
  padding: 18px 20px; border: 0; border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit;
  transition: background-color .2s, box-shadow .2s;
}
.step-btn:hover { background: rgba(255,255,255,.7); }
.step-btn[aria-selected="true"] { background: var(--surface); box-shadow: var(--shadow); }
.step-n { grid-row: 1 / span 2; width: 40px; height: 40px; border-radius: 12px; background: var(--tint); color: var(--teal); font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; transition: background-color .2s, color .2s; }
.step-btn[aria-selected="true"] .step-n { background: var(--teal); color: #fff; }
.step-t { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; line-height: 1.3; align-self: center; }
.step-d { font-size: 15px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.how-cta { margin: 28px 0 0 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.how-cta .soon { color: var(--muted); }
.stage { position: relative; display: flex; justify-content: center; }
.stage::before { content: ""; position: absolute; inset: 8% -4% 8% -4%; border-radius: 40px; background: var(--teal); }
.phone { position: relative; width: 300px; border-radius: 46px; background: var(--ink); padding: 10px; box-shadow: var(--shadow-lg); }
.phone-screens { position: relative; aspect-ratio: 390 / 844; border-radius: 36px; overflow: hidden; background: var(--bg); }
.phone-screens img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .45s var(--ease-out), transform .6s var(--ease-out); transform: scale(1.02); }
.phone-screens img.is-on { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .how { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .stage { order: -1; }
  .phone { width: 250px; }
  .how-cta { margin-left: 0; }
}

/* regioni */
.regioni-foot { margin: 20px 0 0; }

/* domande frequenti */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 48px; align-items: start; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* contatti */
.contact { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 40px; }
.contact-copy { flex: 1 1 280px; }
.contact .alt { margin: 20px 0 0; font-size: 15px; color: var(--muted); }
.contact-form { flex: 1 1 380px; display: flex; flex-direction: column; gap: 12px; }
.contact-form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.contact-form input, .contact-form textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; outline: none; }
.contact-form input { height: 52px; padding: 0 16px; }
.contact-form textarea { padding: 14px 16px; line-height: 1.5; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--teal); background: var(--surface); }
.form-err { font-size: 14px; font-weight: 600; color: var(--err); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-foot span { flex: 1 1 200px; font-size: 13px; line-height: 1.45; color: var(--muted); }

@media (max-width: 900px) {
  .home-hero .inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 48px; }
  .section { padding-top: 72px; }
}
@media (max-width: 480px) {
  .hero-search { grid-template-columns: minmax(0, 1fr); }
  .hero-search .btn { width: 100%; }
}

/* ---------- Ricerca concorsi ---------- */
.search-page { padding-top: 0 !important; }
.search-panel { position: relative; margin-top: -32px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 14px; }
.search-row { display: flex; gap: 10px; }
.search-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); }
.search-input:focus-within { background: var(--surface); box-shadow: inset 0 0 0 2px var(--teal); }
.search-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font: inherit; font-size: 17px; color: var(--ink); }
.search-input input::-webkit-search-cancel-button { cursor: pointer; }
.btn-go { height: 56px; padding: 0 28px; }
.search-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.search-filters label { display: grid; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.search-filters select {
  appearance: none; -webkit-appearance: none; height: 48px; padding: 0 40px 0 14px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230F5E6E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line); outline: none; width: 100%; min-width: 0;
}
.search-filters select:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.search-filters select:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); outline: none; }
.search-filters select.is-set { box-shadow: inset 0 0 0 2px var(--teal); background-color: #F3FAFB; font-weight: 600; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.quick button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 14px; font-weight: 600; color: var(--teal); cursor: pointer; }
.quick button:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.search-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; margin-top: 32px; }
.search-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 0 0 14px; min-height: 28px; }
.search-status { margin: 0; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.search-status.is-error { color: var(--err); font-weight: 600; }
.btn-more { margin-top: 18px; }
.search-more-row { display: flex; justify-content: center; }
.bandi.is-skeleton li { height: 92px; border-radius: var(--radius); background: linear-gradient(90deg, #EAF2F3 0%, #F6FAFA 50%, #EAF2F3 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@media (prefers-reduced-motion: reduce) { .bandi.is-skeleton li { animation: none; } }
.side { display: grid; gap: 16px; position: sticky; top: 92px; }
.side-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); padding: 20px 22px; }
.side-card h2 { font-size: 17px; letter-spacing: -0.015em; margin: 0 0 10px; }
.side-links { list-style: none; margin: 0; padding: 0; display: grid; }
.side-links a { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--ink); }
.side-links li:first-child a { border-top: 0; }
.side-links a:hover { color: var(--teal); }
.side-links .ico { color: var(--teal); }
.side-app2 { background: var(--teal); color: #fff; border-radius: var(--radius-lg); padding: 22px; --focus: var(--coral); }
.side-app2 h2 { color: #fff; font-size: 19px; margin: 0 0 8px; }
.side-app2 p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--light); }
.side-app2 .soon { display: block; margin-top: 10px; font-size: 13px; }
.side-trust { font-size: 13px; line-height: 1.5; color: var(--muted); padding: 0 4px; }
@media (max-width: 960px) {
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
}
@media (max-width: 640px) {
  .search-panel { padding: 12px; margin-top: -24px; }
  .search-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .search-filters label:first-child { grid-column: 1 / -1; }
  .btn-go { padding: 0 18px; }
}
@media (max-width: 420px) { .search-row { flex-direction: column; } .search-input { flex: none; } .btn-go { width: 100%; height: 50px; } }

/* ---------- In scadenza: calendario dei giorni ---------- */
.giorni-nav { margin: 0 0 32px; }
.giorni-strip { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.giorni-strip a {
  flex: none; width: 76px; display: grid; justify-items: center; gap: 2px; padding: 10px 6px 12px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); line-height: 1.1;
}
.giorni-strip a:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.giorni-strip .w { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.giorni-strip .d { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.giorni-strip .n { margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--teal); background: var(--tint); border-radius: 999px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.giorni-strip a.is-urgente .n { background: var(--coral); color: var(--coral-ink); }
.giorni-strip a.is-presto .n { background: var(--coral-tint); color: #8A2E1C; }
.hero .stamp { border-color: var(--light); color: #fff; }
.hero-facts .stamp-li { margin-right: 4px; }
.giorno { margin-top: 36px; scroll-margin-top: 96px; }
.giorno:first-of-type { margin-top: 0; }
.giorno-h { position: sticky; top: 68px; z-index: 5; display: flex; align-items: baseline; gap: 12px; margin: 0 -8px 12px; padding: 12px 8px; background: var(--bg); font-size: 20px; letter-spacing: -0.02em; }
.giorno-h .rel { font-size: 14px; font-weight: 700; color: var(--teal); }
.giorno-h .rel.is-urgente { color: #A3361F; }
.giorno-h .cnt { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 880px) { .giorno-h { top: 104px; } }
.lista-count { margin: 0 0 18px; font-weight: 700; color: var(--muted); }

/* pagine dei singoli bandi */
.allegati { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.allegati a { font-weight: 600; }
.aggiornato { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.card ol.req { margin-top: 8px; }


/* ---------- Pagina del singolo bando ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; }
.pill { display: inline-block; padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; background: rgba(255,255,255,.14); color: #fff; }
.pill-aperto { background: var(--coral); color: var(--coral-ink); }
.pill-nuovo { background: #fff; color: var(--teal); }
.pill-chiuso { background: var(--err-bg); color: var(--err); }

.bando-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.bando-side { order: -1; }                 /* su telefono "In breve" viene prima del testo */
.side-box { background: #fff; border-radius: 24px; box-shadow: 0 1px 0 var(--line); padding: 22px; }
.side-box h2 { font-size: 20px; margin-bottom: 14px; }
.deadline { margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: var(--tint); display: grid; gap: 2px; }
.deadline-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.deadline-date { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--teal); }
.deadline-left { font-size: 14px; font-weight: 600; color: var(--teal-dark); }
.deadline.is-chiuso { background: var(--err-bg); }
.deadline.is-chiuso .deadline-date { color: var(--err); }
.note-warn { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err); font-weight: 600; font-size: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }
.btn-block { display: flex; width: 100%; justify-content: center; align-items: center; text-align: center; }
.btn-link { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 15px; }
.side-app { margin-top: 16px; padding: 18px 22px; border-radius: 20px; background: var(--teal); color: #fff; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.side-app strong { font-size: 16px; }
.side-app span { color: var(--light); }
.side-app a { color: #fff; font-weight: 700; }
.side-app-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.side-app-actions .btn { --focus: var(--coral); }
.hero-notify { margin-top: 22px; max-width: 520px; }
.hero-notify-title { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.hero-notify-lead { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--light); }
.hero-notify-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.bando-main { background: #fff; border-radius: 28px; box-shadow: 0 1px 0 var(--line); padding: clamp(20px, 3.5vw, 40px); min-width: 0; }
.toc { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 8px; padding-bottom: 6px; scrollbar-width: thin; }
.toc a { flex: none; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--teal); background: var(--bg); }
.toc a:hover { border-color: var(--teal); }
.sezione { margin-top: 32px; scroll-margin-top: 20px; }
.sezione:first-of-type { margin-top: 20px; }
.sezione h2 { font-size: clamp(21px, 2.6vw, 26px); }
.sezione h3 { margin: 22px 0 8px; font-size: 17px; letter-spacing: -0.02em; }
.sezione p { margin: 0 0 14px; line-height: 1.6; max-width: 70ch; }
.sezione .nota { font-size: 13px; color: var(--muted); }
.scheda-grid { grid-template-columns: max-content 1fr; }
.tessere { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tessere li { background: var(--bg); border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 16px; display: grid; gap: 2px; }
.tessere span { font-size: 13px; font-weight: 600; color: var(--muted); }
.tessere strong { font-size: 16px; line-height: 1.3; }
.passi { padding-left: 22px; margin: 0 0 16px; line-height: 1.6; }
.passi li { margin: 6px 0; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--bg); }
.doc:hover { border-color: var(--teal); }
.doc-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--teal); color: #fff; }
.doc-txt { display: grid; gap: 2px; min-width: 0; }
.doc-txt strong { overflow-wrap: anywhere; }
.doc-txt small { color: var(--muted); font-size: 13px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1.5px solid var(--line); border-radius: 16px; padding: 4px 18px; background: var(--bg); }
.faq-list summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq-list details p { margin: 0 0 14px; }
.more-row { margin: 8px 0 0; }

.mobile-cta-spacer { height: 84px; }
.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(244,248,248,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }

@media (min-width: 900px) {
  .bando-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
  .bando-side { order: 2; position: sticky; top: 24px; }
  .toc { flex-wrap: wrap; overflow: visible; }
  .scheda-grid { grid-template-columns: max-content 1fr; }
  .mobile-cta, .mobile-cta-spacer { display: none; }
}
@media (max-width: 899px) {
  .facts { display: none; }   /* su telefono i dati completi sono nella scheda più sotto */
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: 10px; }
  .scheda-grid { grid-template-columns: 1fr; gap: 2px; }
  .scheda-grid dt { margin-top: 10px; }
  .tessere { grid-template-columns: 1fr; }
}

/* ---------- Compatibilità: pagine generate col vecchio template, finché non vengono ripubblicate ---------- */
.site-header nav:not(.main-nav) { display: flex; gap: 20px; font-size: 15px; font-weight: 600; flex-wrap: wrap; margin-left: auto; }
.site-header nav:not(.main-nav) a { color: var(--light); text-decoration: none; }
.site-header nav:not(.main-nav) a:hover { color: #fff; }
.site-header .bar:not(:has(.main-nav)) { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.site-footer > .bar { padding-top: 28px; padding-bottom: 12px; }
.foot-links, .foot-social { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.foot-social-row { padding-top: 4px; padding-bottom: 8px; }
.bando:not(:has(.bando-body)) { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; }
.bando:not(:has(.bando-body)) .badge { align-self: flex-start; margin: 4px 0 0; font-size: 13px; padding: 3px 12px; background: var(--tint); color: var(--teal); }
