/* FIMP Roma e Provincia — one stylesheet, no framework.
   Bright and friendly (a pediatric association), still a professional source of documents:
   warm cream base, the four colours of the FIMP logo (red f, blue i, green m, orange p) as
   accents and pastel tints, flat rounded shapes, no shadows on content.
   Type: Sora (titles) + DM Sans (text), both SIL OFL, self-hosted — nothing from Google. */

@font-face { font-family: 'Sora'; src: url('/assets/fonts/sora-latin-wght.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; src: url('/assets/fonts/sora-latin-ext-wght.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/assets/fonts/dm-sans-700.woff2') format('woff2'); font-weight: 600 800; font-style: normal; font-display: swap; }

:root {
  /* logo colours, brightened; the *-ink variants are for text on white/tints (≥ 4.5:1) */
  --blue: #2f6fe4;   --blue-ink: #1d4fb0;   --blue-tint: #e9f1ff;
  --red: #ef5350;    --red-ink: #bb2a2a;    --red-tint: #ffeceb;
  --green: #43a047;  --green-ink: #2a6e2e;  --green-tint: #e7f6e8;
  --orange: #fb8c00; --orange-ink: #a35200; --orange-tint: #fff1df;
  --yellow: #ffc83d; --yellow-ink: #7f5a00; --yellow-tint: #fff7da;
  --sky: #29b6f6;    --sky-ink: #0b6a96;    --sky-tint: #e3f6fe;
  --grey: #8a93a3;   --grey-ink: #4b5463;   --grey-tint: #f0f1f4;

  --ink: #26313f;
  --ink-soft: #46515f;
  --muted: #5e6877;
  --line: #ece5d8;
  --cream: #fffaf1;
  --paper: #ffffff;
  --r: 22px;
  --r-sm: 14px;
  --display: 'Sora', 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--font); color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--blue-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; color: var(--ink); margin: 0 0 .6em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); font-weight: 650; }
h3 { font-size: 1.12rem; font-weight: 600; }
.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; }
.muted { color: var(--muted); }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.inline { display: inline; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .wrap { padding: 0 1.75rem; } }
.wrap--text { max-width: 860px; }
.wrap--narrow { max-width: 600px; }
.page { padding-top: 2.25rem; padding-bottom: 4rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

/* colour helpers: every coloured component reads --c (accent), --ci (ink), --ct (tint) */
.c-blue, .tile--blue, .pagehead--blue, .quick__link--blue { --c: var(--blue); --ci: var(--blue-ink); --ct: var(--blue-tint); }
.c-red, .tile--red, .pagehead--red, .quick__link--red, .quick__link--member { --c: var(--red); --ci: var(--red-ink); --ct: var(--red-tint); }
.c-green, .tile--green, .pagehead--green, .quick__link--green { --c: var(--green); --ci: var(--green-ink); --ct: var(--green-tint); }
.c-orange, .tile--orange, .pagehead--orange, .quick__link--orange { --c: var(--orange); --ci: var(--orange-ink); --ct: var(--orange-tint); }
.c-yellow, .tile--yellow, .pagehead--yellow, .quick__link--yellow { --c: var(--yellow); --ci: var(--yellow-ink); --ct: var(--yellow-tint); }
.c-sky, .tile--sky, .pagehead--sky, .quick__link--sky { --c: var(--sky); --ci: var(--sky-ink); --ct: var(--sky-tint); }
.c-grey, .tile--grey, .pagehead--grey { --c: var(--grey); --ci: var(--grey-ink); --ct: var(--grey-tint); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .72rem 1.25rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem/1.2 var(--display); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red-ink); color: #fff; }
.btn--primary:hover { background: #962020; color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--blue-ink); background: transparent; }
.btn--ghost:hover { background: var(--blue-tint); color: var(--blue-ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--yellow); color: var(--ink); }
.btn--member { background: var(--red-tint); color: var(--red-ink); padding: .6rem 1.05rem; }
.btn--member:hover { background: var(--red-ink); color: #fff; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- header ---------- */
.rainbow { height: 5px; background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--green) 50% 75%, var(--orange) 75%); }
.topbar { background: var(--cream); color: var(--ink-soft); font-size: .86rem; border-bottom: 1px solid var(--line); }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 2.25rem; flex-wrap: wrap; }
.topbar a { color: var(--ink-soft); text-decoration: none; }
.topbar a:hover { color: var(--red-ink); }
.topbar__contacts { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.topbar__contacts > * { display: inline-flex; align-items: center; gap: .35rem; }
.topbar .icon { color: var(--orange-ink); }
.topbar__member { display: flex; gap: .75rem; align-items: center; }
.topbar__hello { display: inline-flex; gap: .35rem; align-items: center; }
/* on phones the address text is hidden VISUALLY only: the mailto link keeps its accessible name */
@media (max-width: 560px) { .topbar__mail, .topbar__hours { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

.header { background: #fff; position: relative; z-index: 20; }
.header__in { display: flex; align-items: center; gap: 1rem; min-height: 5rem; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 108px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; border-left: 2px solid var(--line); padding-left: .85rem; }
.brand__text strong { font-family: var(--display); font-weight: 700; font-size: 1.02rem; }
.brand__text span { color: var(--muted); font-size: .8rem; }

.nav { display: flex; align-items: center; gap: .9rem; }
.nav__list { list-style: none; display: flex; align-items: center; gap: .1rem; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link { display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .8rem; border-radius: 999px; color: var(--ink);
  text-decoration: none; font: 600 .97rem/1.2 var(--display); background: none; border: 0; cursor: pointer; }
.nav__link:hover, .nav__item.is-open > .nav__link { background: var(--cream); color: var(--ink); }
.nav__link.is-current { background: var(--blue-tint); color: var(--blue-ink); }
.icon--chev { width: .9em; height: .9em; transition: transform .15s; }
.nav__item.is-open .icon--chev { transform: rotate(180deg); }
.nav__sub { list-style: none; margin: 0; padding: .5rem; position: absolute; top: 100%; left: 0; min-width: 17rem; background: #fff;
  border: 2px solid var(--line); border-radius: var(--r-sm); display: none; }
.nav__item.is-open > .nav__sub { display: block; }
@media (hover: hover) and (min-width: 1081px) { .nav__item.has-sub:hover > .nav__sub { display: block; } }
.nav__sub a { display: block; padding: .55rem .8rem; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav__sub a:hover, .nav__sub a[aria-current] { background: var(--cream); color: var(--red-ink); }
.nav__searchlabel { display: none; }
.navtoggle { display: none; background: var(--cream); border: 0; border-radius: 14px; padding: .6rem; color: var(--ink); cursor: pointer; }
.navtoggle .icon { width: 1.5rem; height: 1.5rem; }
.navtoggle .icon--close { display: none; }

@media (max-width: 1080px) {
  .navtoggle { display: inline-flex; }
  .navtoggle[aria-expanded="true"] .icon--open { display: none; }
  .navtoggle[aria-expanded="true"] .icon--close { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); border-bottom: 5px solid var(--yellow);
    flex-direction: column; align-items: stretch; padding: .5rem 1rem 1.1rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__link { width: 100%; justify-content: space-between; padding: .85rem .75rem; font-size: 1.05rem; border-radius: 12px; }
  .nav__sub { position: static; border: 0; padding: 0 0 .4rem .75rem; min-width: 0; }
  .nav__searchlabel { display: inline; }
  .nav__item--search .nav__link { justify-content: flex-start; }
  .btn--member { margin-top: .5rem; padding: .85rem 1rem; }
  .brand__text span { display: none; }
}
@media (max-width: 420px) { .brand__text { display: none; } }

/* ---------- hero (home) ---------- */
.hero { position: relative; overflow: hidden; background: var(--cream); }
.hero__deco span { position: absolute; border-radius: 50%; opacity: .55; }
.hero__deco span:nth-child(1) { width: 26rem; height: 26rem; background: var(--yellow-tint); left: -9rem; top: -11rem; }
.hero__deco span:nth-child(2) { width: 9rem; height: 9rem; background: var(--red-tint); right: 38%; bottom: -3.5rem; }
.hero__deco span:nth-child(3) { width: 30rem; height: 30rem; background: var(--blue-tint); right: -10rem; top: -8rem; opacity: .9; }
.hero__deco span:nth-child(4) { width: 1.4rem; height: 1.4rem; background: var(--green); right: 46%; top: 3rem; opacity: .35; }
.hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-top: 3.25rem; padding-bottom: 3.5rem; }
.eyebrow { display: inline-block; font: 700 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink);
  background: #fff; border-radius: 999px; padding: .5rem .85rem; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.2rem, 1.3rem + 3.6vw, 3.6rem); line-height: 1.05; margin-bottom: .45em; }
.hero__amp { color: var(--orange-ink); font-weight: 500; }
.hero__lead { font-size: 1.15rem; max-width: 38rem; color: var(--ink-soft); margin: 0 0 1.5rem; }
.hero__search { display: flex; align-items: center; gap: .5rem; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: .35rem .35rem .35rem 1.1rem; max-width: 36rem; }
.hero__search:focus-within { border-color: var(--blue); }
.hero__search > .icon { color: var(--muted); }
.hero__search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: .5rem 0; color: var(--ink); }
.hero__search input:focus { outline: none; }
.hero__search .btn { padding: .65rem 1.15rem; }
.quick { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.quick__link { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 999px; background: var(--ct); color: var(--ci);
  font: 600 .9rem/1.2 var(--display); text-decoration: none; }
.quick__link:hover { background: var(--c); color: #fff; }
.hero__art { position: relative; justify-self: center; width: min(100%, 22rem); aspect-ratio: 1; }
.hero__art::before { content: ""; position: absolute; inset: 8%; background: #fff; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; }
.hero__art img { position: absolute; left: 50%; top: 50%; width: 62%; transform: translate(-50%, -50%); }
.bubble { position: absolute; display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; color: #fff; animation: float 6s ease-in-out infinite; }
.bubble .icon { width: 1.6rem; height: 1.6rem; }
.bubble--1 { background: var(--red); left: 4%; top: 16%; }
.bubble--2 { background: var(--blue); right: 2%; top: 6%; animation-delay: -1.5s; }
.bubble--3 { background: var(--green); right: 6%; bottom: 10%; animation-delay: -3s; }
.bubble--4 { background: var(--orange); left: 10%; bottom: 4%; animation-delay: -4.5s; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-4deg); } }
@media (max-width: 860px) {
  .hero__in { grid-template-columns: minmax(0, 1fr); padding-top: 2rem; padding-bottom: 2.5rem; }
  .hero__art { display: none; }
}

/* ---------- blocks ---------- */
.block { padding: 3rem 0; }
.block--cream { background: var(--cream); }
.block--sections { padding-top: 2.75rem; }
.block__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.block__head .title { margin: 0; }
.title { position: relative; padding-left: 1rem; }
.title::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--orange); }
.title--sm { font-size: 1.2rem; margin-top: 2.25rem; }
.more { display: inline-flex; align-items: center; gap: .35rem; font: 600 .95rem var(--display); text-decoration: none; }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 3rem; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; } }
.empty { background: var(--cream); border-radius: var(--r); padding: 1.5rem; color: var(--muted); }

/* tiles: pastel, flat, an icon in a coloured disc */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: 1rem; }
.tile a { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .9rem; align-items: center; height: 100%;
  padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--ct); text-decoration: none; color: var(--ink); transition: background .15s, transform .15s; }
.tile a:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--ct), var(--c) 14%); color: var(--ink); }
.tile__icon { grid-row: span 2; display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; background: var(--c); color: #fff; }
.tile--yellow .tile__icon { color: var(--ink); }
.tile__icon .icon { width: 1.45rem; height: 1.45rem; }
.tile a:hover .tile__icon { animation: wiggle .4s ease; }
@keyframes wiggle { 30% { transform: rotate(-10deg); } 70% { transform: rotate(8deg); } }
.tile__title { font: 650 1.05rem/1.25 var(--display); align-self: end; }
.tile__count { color: var(--ci); font-size: .88rem; font-weight: 600; align-self: start; }
.tile__count .icon { width: .85em; }

/* featured: one spotlight + a list, no card chrome */
.featured { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .featured { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.spot { position: relative; }
.spot__media img, .spot__ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); background: var(--cream); }
.spot__ph { background: radial-gradient(circle at 25% 35%, var(--red-tint) 0 18%, transparent 19%), radial-gradient(circle at 70% 60%, var(--blue-tint) 0 24%, transparent 25%), var(--cream); }
.spot__body { padding: 1.1rem .2rem 0; }
.kicker { margin: 0 0 .35rem; font: 600 .85rem var(--display); color: var(--orange-ink); text-transform: uppercase; letter-spacing: .05em; }
.spot__title { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.75rem); margin: 0 0 .5rem; }
.spot__title a { color: var(--ink); text-decoration: none; }
.spot__title a::after { content: ""; position: absolute; inset: 0; }
.spot:hover .spot__title a { color: var(--red-ink); }
.spot p { color: var(--ink-soft); margin: 0 0 .6rem; }
.spot__more { display: inline-flex; gap: .35rem; align-items: center; font: 600 .95rem var(--display); color: var(--blue-ink) !important; }
.minis { list-style: none; margin: 0; padding: 0; }
.mini { position: relative; display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 2px dashed var(--line); }
.mini:first-child { padding-top: 0; }
.mini__img { width: 6rem; height: 4.5rem; object-fit: cover; border-radius: var(--r-sm); background: var(--cream); }
.mini__img--ph { display: block; background: url("/assets/img/logo-fimp-roma.png") center / 70% auto no-repeat, var(--cream); }
.mini time { font-size: .85rem; color: var(--muted); }
.mini h3 { margin: .1rem 0 0; font-size: 1.02rem; }
.mini h3 a { color: var(--ink); text-decoration: none; }
.mini h3 a::after { content: ""; position: absolute; inset: 0; }
.mini:hover h3 a { color: var(--red-ink); }

/* list rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row { position: relative; padding: 1.15rem 0; border-bottom: 2px dashed var(--line); min-width: 0; }
.row:first-child { padding-top: .35rem; }
.row:last-child { border-bottom: 0; }
.row__date { display: block; font-size: .86rem; color: var(--muted); margin-bottom: .15rem; }
.row__title { margin: 0; font-size: 1.12rem; overflow-wrap: anywhere; }
.row__title a { text-decoration: none; color: var(--ink); }
.row__title a:hover { color: var(--red-ink); text-decoration: underline; }
.row__teaser { margin: .3rem 0 0; color: var(--ink-soft); font-size: .98rem; }
.row__meta { margin: .45rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.rows--timeline .row { padding-left: 1.6rem; border-bottom: 0; }
.rows--timeline .row::before { content: ""; position: absolute; left: .3rem; top: 1.5rem; bottom: -1.2rem; width: 2px; background: var(--line); }
.rows--timeline .row:last-child::before { display: none; }
.rows--timeline .row::after { content: ""; position: absolute; left: 0; top: 1.35rem; width: .8rem; height: .8rem; border-radius: 50%; background: #fff; border: 3px solid var(--orange); }
.rows--timeline .row:first-child::after { top: .55rem; }
.rows--timeline .row:first-child::before { top: .8rem; }
.rows--compact .row { padding: .75rem 0; }
.rows--compact .row__title { font-size: 1rem; }
.rows--compact .row__teaser, .rows--compact .chips { display: none; }
.badge, .tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--grey-tint); color: var(--grey-ink); }
.badge--lock { background: var(--red-tint); color: var(--red-ink); }
.tag { background: var(--blue-tint); color: var(--blue-ink); }

/* download chips under a row */
.chips { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; min-width: 0; }
.chips li { max-width: 100%; min-width: 0; display: flex; }
.chip { min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .4rem .8rem .4rem .6rem; border-radius: 12px; background: var(--cream);
  border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-size: .9rem; line-height: 1.25; }
.chip .icon { color: var(--red-ink); }
.chip:hover { border-color: var(--red); color: var(--ink); background: #fff; }
.chip__t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip__m { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.chip--more { color: var(--blue-ink); font-weight: 600; }
.chip--lock .icon { color: var(--red-ink); }

/* events */
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.ev { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding: .8rem; border-radius: var(--r-sm); background: #fff; border: 2px solid var(--line); }
.block--cream .ev { border-color: transparent; }
.ev__body { min-width: 0; }
.ev__date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--red-tint); color: var(--red-ink); border-radius: 12px; height: 4rem; line-height: 1; }
.ev:nth-child(4n+2) .ev__date { background: var(--blue-tint); color: var(--blue-ink); }
.ev:nth-child(4n+3) .ev__date { background: var(--green-tint); color: var(--green-ink); }
.ev:nth-child(4n+4) .ev__date { background: var(--orange-tint); color: var(--orange-ink); }
.ev--past .ev__date { background: var(--grey-tint) !important; color: var(--grey-ink) !important; }
.ev__day { font: 700 1.5rem var(--display); }
.ev__mon { font: 600 .72rem var(--display); text-transform: uppercase; letter-spacing: .04em; margin-top: .25rem; }
.ev__title { margin: 0 0 .25rem; font-size: 1rem; overflow-wrap: anywhere; }
.ev__title a { text-decoration: none; color: var(--ink); }
.ev__title a::after { content: ""; position: absolute; inset: 0; }
.ev:hover .ev__title a { color: var(--red-ink); }
.ev__meta { margin: .1rem 0 0; font-size: .88rem; color: var(--muted); display: flex; gap: .35rem; align-items: flex-start; }
.ev__meta .icon { margin-top: .22rem; }
.evs--wide { gap: .8rem; }
.past details { border-top: 2px dashed var(--line); }
.past summary { cursor: pointer; padding: 1rem 0; font: 650 1.15rem var(--display); }
.past summary + .evs { margin-bottom: 1.25rem; }

/* ---------- page heads ---------- */
.pagehead { position: relative; overflow: hidden; background: var(--ct, var(--blue-tint)); padding: 1.5rem 0 2rem; }
.pagehead::before { content: ""; position: absolute; width: 22rem; height: 22rem; border-radius: 50%; right: -6rem; top: -11rem; background: #fff; opacity: .45; }
.pagehead::after { content: ""; position: absolute; width: 5rem; height: 5rem; border-radius: 50%; right: 22%; bottom: -2.8rem; background: var(--c, var(--blue)); opacity: .18; }
.pagehead .wrap { position: relative; }
.pagehead__in { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; }
.pagehead__text { min-width: 0; }
.pagehead h1 { margin: .5rem 0 .45rem; overflow-wrap: anywhere; }
.pagehead .lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 46rem; }
.pagehead .lead p { margin: .3rem 0; }
.pagehead__icon { flex: none; display: grid; place-items: center; width: 5.5rem; height: 5.5rem; border-radius: 50%; background: var(--c, var(--blue)); color: #fff; transform: rotate(-6deg); }
.pagehead--yellow .pagehead__icon { color: var(--ink); }
.pagehead__icon .icon { width: 2.6rem; height: 2.6rem; }
@media (max-width: 640px) { .pagehead__icon { display: none; } }
.pagehead__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; align-items: center; color: var(--ink-soft); margin: .4rem 0 0; font-size: .95rem; }
.pagehead__meta > * { display: inline-flex; gap: .35rem; align-items: center; }
.pagehead__count { display: inline-block; margin: .6rem 0 0; padding: .25rem .75rem; border-radius: 999px; background: #fff; color: var(--ci, var(--blue-ink)); font: 600 .85rem var(--display); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .88rem; color: var(--ink-soft); }
.crumbs li + li::before { content: "›"; margin-right: .3rem; }
.crumbs a { color: var(--ink-soft); }

.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.toc a { display: inline-flex; gap: .4rem; align-items: center; padding: .45rem .9rem; border-radius: 999px; background: var(--cream); border: 2px solid var(--line);
  color: var(--ink); text-decoration: none; font: 600 .9rem var(--display); }
.toc a:hover { border-color: var(--orange); }
.toc a span { background: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .78rem; color: var(--muted); }
.group { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.group > h2 { display: flex; align-items: center; gap: .6rem; }
.group > h2::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; background: var(--orange); flex: none; }
.group:nth-of-type(4n+2) > h2::before { background: var(--blue); }
.group:nth-of-type(4n+3) > h2::before { background: var(--green); }
.group:nth-of-type(4n+4) > h2::before { background: var(--red); }
.group__intro { color: var(--ink-soft); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- article ---------- */
.cover { display: block; width: 100%; border-radius: var(--r); margin-bottom: 1.75rem; }
.prose { overflow-wrap: break-word; }
.prose h2 { margin-top: 1.8em; font-size: 1.35rem; }
.prose h3 { margin-top: 1.5em; }
.prose img { border-radius: 10px; }
.prose img[style*="float: right"], .prose img[style*="float:right"] { margin: 0 0 1rem 1.25rem; }
.prose img[style*="float: left"], .prose img[style*="float:left"] { margin: 0 1.25rem 1rem 0; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .25rem 0; }
.prose li::marker { color: var(--orange-ink); }
.prose blockquote { margin: 1rem 0; padding: .75rem 1.1rem; border-radius: var(--r-sm); background: var(--cream); color: var(--ink-soft); }
.prose a { word-break: break-word; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
.prose table, .table-scroll table { border-collapse: collapse; min-width: 100%; font-size: .95rem; }
.prose td, .prose th, .table-scroll td, .table-scroll th { border: 1px solid var(--line); padding: .5rem .65rem; vertical-align: top; text-align: left; }
.prose th, .table-scroll th { background: var(--cream); }
/* migrated tables carry fixed pixel widths from the old editor: let the text wrap instead */
.prose table[style*="width"], .prose td[style*="width"], .prose th[style*="width"], .prose col { width: auto !important; }
.prose td, .prose th { white-space: normal !important; }
.prose p:empty { display: none; }
.docs { margin-top: 2.25rem; padding: 1.4rem; background: var(--cream); border-radius: var(--r); }
.docs h2 { font-size: 1.2rem; display: flex; gap: .5rem; align-items: center; }
.docs h2 .icon { color: var(--red-ink); }
.docs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.doc { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .9rem; align-items: center; padding: .75rem .9rem; background: #fff; border: 2px solid transparent;
  border-radius: var(--r-sm); text-decoration: none; color: var(--ink); }
.doc:hover { border-color: var(--red); color: var(--ink); }
.doc__ext { grid-row: span 2; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: var(--red-tint); color: var(--red-ink); font: 700 .75rem var(--display); }
.doc__ext--doc, .doc__ext--docx, .doc__ext--odt { background: var(--blue-tint); color: var(--blue-ink); }
.doc__ext--xls, .doc__ext--xlsx, .doc__ext--ods, .doc__ext--csv { background: var(--green-tint); color: var(--green-ink); }
.doc__ext--ppt, .doc__ext--pptx, .doc__ext--pps { background: var(--orange-tint); color: var(--orange-ink); }
.doc__title { font-weight: 700; overflow-wrap: anywhere; }
.doc__meta { font-size: .85rem; color: var(--muted); }
.back { margin-top: 2.5rem; }
.back a { font: 600 1rem var(--display); text-decoration: none; }
.related { padding-bottom: 3.5rem; }
.related h2 { font-size: 1.2rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1rem; margin: 0 0 1.75rem; }
.facts > div { padding: 1rem 1.15rem; background: var(--cream); border-radius: var(--r-sm); }
.facts dt { font: 650 .95rem var(--display); display: flex; gap: .4rem; align-items: center; color: var(--ink); }
.facts dt .icon { color: var(--orange-ink); }
.facts dd { margin: .3rem 0 0; }

/* ---------- contacts, members, forms ---------- */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.contact__card { border-radius: var(--r); padding: 1.4rem; background: var(--blue-tint); }
.contact__card:nth-child(2) { background: var(--green-tint); }
.contact__card:nth-child(3) { background: var(--orange-tint); }
.contact__card h2 { font-size: 1.15rem; display: flex; gap: .45rem; align-items: center; }
.big { font: 700 1.4rem var(--display); text-decoration: none; }
.legal-line { margin-top: 2rem; color: var(--muted); font-size: .92rem; }
.members-login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.note { background: var(--cream); border-radius: var(--r); padding: 1.4rem; }
@media (max-width: 760px) { .members-login { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.form input[type=text], .form input[type=email], .form input[type=password], .searchform input {
  width: 100%; padding: .75rem .95rem; border: 2px solid var(--line); border-radius: 14px; font: inherit; background: #fff; }
.form input:focus, .searchform input:focus { border-color: var(--blue); outline: none; }
.hp { position: absolute; left: -9999px; }
.alert { padding: .95rem 1.15rem; border-radius: var(--r-sm); }
.alert--error { background: var(--red-tint); color: #7d0f16; }
.alert--ok { background: var(--green-tint); color: #1f5419; }
.searchform { display: flex; gap: .6rem; margin-top: 1rem; max-width: 40rem; flex-wrap: wrap; }
.searchform input { flex: 1 1 14rem; }
.searchform label:not(.sr-only) { flex-basis: 100%; font-weight: 700; }
.sitemap section { margin-bottom: 2rem; }
.sitemap ul { columns: 2 22rem; }
.sitemap li { break-inside: avoid; margin: .2rem 0; }

/* ---------- "the segreteria is here" band + footer ---------- */
.hello { padding: 0 0 3rem; background: linear-gradient(var(--paper) 50%, var(--cream) 50%); }
.block--cream + .hello { background: var(--cream); }
.hello__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--blue-ink); color: #fff;
  border-radius: 28px; padding: 1.75rem 2rem; position: relative; overflow: hidden; }
.hello__in::after { content: ""; position: absolute; width: 10rem; height: 10rem; border-radius: 50%; background: var(--yellow); opacity: .25; right: -3rem; bottom: -5rem; }
.hello h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.35rem; }
.hello p { margin: 0; color: #dde7ff; }
.hello__actions { display: flex; flex-wrap: wrap; gap: .6rem; position: relative; z-index: 1; }
.footer { background: var(--cream); color: var(--ink-soft); font-size: .95rem; }
.footer a { color: var(--ink); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; padding-top: 2.5rem; padding-bottom: 2rem; }
.footer__brand img { width: 130px; }
.footer__title { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-ink); }
.footer__links { list-style: none; margin: 0; padding: 0; }
.footer__links li { margin: .3rem 0; }
.footer__legal { border-top: 2px dashed var(--line); padding-top: 1rem; padding-bottom: 1.5rem; font-size: .85rem; color: var(--muted);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__legal p { margin: 0; }
.footer__legal a { color: var(--muted); }
.footer::after { content: ""; display: block; height: 6px; background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 25% 50%, var(--green) 50% 75%, var(--orange) 75%); }
@media (max-width: 800px) { .footer__grid { grid-template-columns: 1fr; gap: 1.25rem; } }

.ev > div, .row { min-width: 0; }
.ev__title, .row__title, h1 { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .rainbow, .topbar, .header, .footer, .hello, .related, .back, .toc { display: none; }
  .pagehead { background: none; }
  .pagehead::before, .pagehead::after, .pagehead__icon { display: none; }
}

/* ---------- area associati (logged in) ---------- */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--cream); border-radius: var(--r); padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.welcome p { margin: 0; }
.members-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.members-grid .group:first-child { margin-top: 0; }
@media (max-width: 900px) { .members-grid { grid-template-columns: minmax(0, 1fr); } }
.members-side { display: grid; gap: 1rem; }
.side-card { background: var(--red-tint); border-radius: var(--r); padding: 1.25rem; }
.side-card + .side-card { background: var(--cream); }
.side-card h2 { font-size: 1.1rem; display: flex; gap: .45rem; align-items: center; }
.letters { list-style: none; margin: 0 0 .75rem; padding: 0; }
.letters li { padding: .55rem 0; border-bottom: 2px dashed rgba(0, 0, 0, .08); }
.letters a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.letters a:hover { color: var(--red-ink); text-decoration: underline; }
.letters time { font-size: .85rem; color: var(--muted); }
.switch { display: flex; gap: .6rem; align-items: flex-start; }
.switch input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--red-ink); flex: none; }
.switch > span { min-width: 0; }
.switch__sub { display: block; margin-top: .15rem; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.switch__sub strong { color: var(--ink); }
.small { font-size: .9rem; }
.group--first { margin-top: 0; }
