:root{--editorial-paper:#f1f3f1;--editorial-ink:#243c53;--editorial-accent:#304e67;--editorial-surface:#fafbf9;--editorial-hover:#e5ebee;--editorial-muted:#4d5d65;--editorial-line:#c8d0d3;--editorial-width:2000px;--editorial-gutter:clamp(16px,3.5vw,64px);--editorial-serif:Georgia,"Times New Roman",serif}
.editorial-header{background:var(--editorial-paper);border-top:4px solid var(--editorial-ink);border-bottom:1px solid var(--editorial-line);box-shadow:none}
.editorial-header .header-inner{width:min(calc(100% - var(--editorial-gutter) * 2),var(--editorial-width));margin-inline:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:auto;gap:14px 25px;align-items:center;min-height:clamp(68px,6vw,92px);padding:6px 0}
.editorial-header .identity-controls{display:contents}
.editorial-header .header-logo{grid-area:1/1;width:clamp(58px,4.3vw,78px);height:clamp(55px,4.1vw,74px);min-height:0;align-self:center;border:0;border-radius:0;background:none;box-shadow:none}
.editorial-header .header-logo img{width:100%;height:100%;min-height:0;padding:0;object-fit:contain;border-radius:0;background:none}
.editorial-header .header-actions{grid-area:1/3;margin:0;justify-content:flex-end}
.editorial-header .member.button,.editorial-header .menubtn{margin:0;min-height:42px;padding:8px 13px;border:1px solid var(--editorial-ink);border-radius:0;box-shadow:none;background:transparent;color:var(--editorial-ink);font-size:clamp(14px,1.15vw,21px);line-height:1.4;white-space:nowrap}
.editorial-header .member.button:hover,.editorial-header .menubtn:hover{background:var(--editorial-ink);color:white}
.editorial-header .menubtn{display:none}
.editorial-header #nav{grid-area:1/2;display:flex;justify-content:flex-start;align-items:center;gap:3px clamp(10px,1.2vw,24px);margin:0;padding:0}
.editorial-header #nav a,.editorial-header #nav a.nav-active{font-size:clamp(14px,1.15vw,21px);line-height:1.25;color:var(--editorial-ink);background:none;border:0;padding:9px 3px;box-shadow:none;white-space:nowrap}
.editorial-header #nav a.nav-active,.editorial-header #nav a:hover{text-decoration:underline;text-underline-offset:5px}
#home.editorial-home{width:min(100%,calc(100vw - var(--editorial-gutter) * 2),var(--editorial-width));margin-inline:auto;padding:0 0 clamp(33px,4vw,66px);color:var(--editorial-ink)}
.editorial-home a{color:var(--editorial-ink);text-underline-offset:.2em}
.editorial-intro{text-align:center;padding:clamp(30px,4.5vw,60px) 0 clamp(24px,3.3vw,43px)}
.editorial-intro p{margin:0 0 12px;text-transform:uppercase;letter-spacing:.16em;font-size:clamp(.76rem,1.05vw,1.26rem);font-weight:650;color:var(--editorial-muted)}
.editorial-intro h1,.editorial-home .editorial-links h2,.editorial-home .social h2{font-family:var(--editorial-serif);font-weight:400;line-height:1.02;letter-spacing:-.055em;margin:0;color:var(--editorial-ink)}
.editorial-intro h1{font-size:clamp(2.6rem,7vw,9.5rem)}
.editorial-intro h1 span{display:block}
.editorial-hero{margin:0}
.editorial-hero img{display:block;width:100%;height:auto;aspect-ratio:2.65;object-fit:cover;object-position:50% 51%}
.editorial-hero figcaption{margin-top:8px;font-size:clamp(.8rem,1vw,1.15rem);color:var(--editorial-muted)}
.editorial-notice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center;border-block:1px solid var(--editorial-line);margin-top:24px;padding:15px 0}
.editorial-notice h2{margin:0;text-transform:uppercase;letter-spacing:.1em;font-size:clamp(.75rem,.9vw,1.05rem);color:var(--editorial-muted)}
.editorial-home .editorial-notice .notice-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 13px;margin:0;padding:0;border:0;color:var(--editorial-ink)}
.editorial-notice .notice-card :is(h3,p,.preview-label){grid-column:1;margin:0}
.editorial-notice .notice-card h3{font:400 clamp(1.13rem,2.1vw,2.15rem)/1.16 var(--editorial-serif)}
.editorial-notice .notice-card p{font-size:clamp(.85rem,1.05vw,1.2rem);color:var(--editorial-muted)}
.editorial-notice .notice-card .notice-thumb{display:none}
.editorial-notice #notice-open{grid-column:2;grid-row:1/4;margin:0}
.editorial-notice #notice-open,.editorial-notice .all-notices{padding:8px 5px;background:none;color:var(--editorial-ink);border:0;border-radius:0;box-shadow:none;font-size:clamp(.86rem,1vw,1.16rem);font-weight:600;white-space:nowrap;text-decoration:underline;text-underline-offset:4px}
.editorial-links{display:grid;grid-template-columns:1fr 1fr;gap:24px 48px;padding:clamp(30px,5vw,57px) 0}
.editorial-home .editorial-links h2,.editorial-home .social h2{font-size:clamp(1.75rem,3.5vw,2.9rem)}
.editorial-links p{margin:10px 0;color:var(--editorial-muted)}
.editorial-links a{font-size:clamp(.94rem,1.05vw,1.2rem);font-weight:600}
.editorial-home .social.panel{padding:23px 0 5px;margin:0;border:0;border-top:1px solid var(--editorial-line);border-radius:0;background:none;box-shadow:none}
.editorial-home .social .socialtop{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px 22px;margin-bottom:14px}
.editorial-home .social .tabs{display:flex;flex-wrap:wrap;gap:7px 17px;width:auto;border:0;margin:0;padding:0}
.editorial-home .social .tabs button{display:inline-flex;align-items:center;gap:6px;justify-content:center;min-height:42px;padding:6px 1px;border:0;border-bottom:1px solid transparent;border-radius:0;box-shadow:none;background:none;color:var(--editorial-ink);font-size:clamp(.9rem,1.05vw,1.2rem)}
.editorial-home .social .tabs button[aria-selected=true]{border-bottom-color:var(--editorial-ink);font-weight:700}
.editorial-home .social .tabs button svg{width:16px;height:16px}
.editorial-home .social .feed article{border:1px solid var(--editorial-line);border-radius:0;background:transparent;box-shadow:none}
.editorial-home .social .feed .copy{padding:12px 15px}
.editorial-home .social .feed article img{display:block;width:100%;height:auto;max-height:36rem;aspect-ratio:auto;object-fit:contain;object-position:center;border-radius:0;background:var(--editorial-surface)}
.editorial-home .social .feedactions button{min-height:42px;border-radius:0;background:transparent;box-shadow:none}
@media(max-width:1090px){
 .editorial-header .header-inner{grid-template-columns:auto minmax(0,1fr) auto}
 .editorial-header .menubtn{display:inline-flex;align-items:center}
 .editorial-header #nav{display:none;grid-area:2/1/3/-1;padding-bottom:7px}
 .editorial-header #nav.open{display:flex}
}
@media(max-width:720px){
 .editorial-header .header-inner{width:calc(100% - 32px);min-height:62px;column-gap:8px}
 .editorial-header .header-actions{gap:6px}
 .editorial-header .member.button,.editorial-header .menubtn{padding-inline:9px}
 .editorial-header .header-logo{width:44px;height:44px}
 .editorial-intro p{font-size:clamp(.64rem,2.65vw,.8rem);letter-spacing:.08em;white-space:nowrap}
 .editorial-intro h1{font-size:clamp(2.4rem,8vw,4rem)}
 .editorial-hero img{aspect-ratio:1.85}
 .editorial-notice{grid-template-columns:minmax(0,1fr) auto;gap:5px 9px}
 .editorial-notice .notice-card{grid-column:1/-1;grid-row:2}
 .editorial-notice .all-notices{grid-column:2;grid-row:1}
}
@media(max-width:510px){.editorial-links{grid-template-columns:1fr}}

/* The inner pages retain their existing geometry and use the home palette. */
body{background:var(--editorial-paper);color:var(--editorial-ink)}
main>.section{--ink:var(--editorial-ink);--navy:var(--editorial-ink);--blue:var(--editorial-ink);--muted:var(--editorial-muted);--line:var(--editorial-line);color:var(--editorial-ink);border-color:var(--editorial-line)}
main>.section>h2,main>.section>.eyebrow,main>.section .sectiontop h2,main>.section .sectiontop p,main>.section .sectionnote,
.school .school-intro :is(h2,p),.school .school-paths :is(h3,p),.school .school-phone a,
#scuola .school-intro>.school-lead,#scuola .school-intro>.band-purpose,#scuola .school-intro>p strong,#scuola .school-paths>.fine,
.school .school-contact a:not(.button),.school .school-intro .textlink,
.contact .contact-intro :is(h2,p),.contact .contact-intro .contact-callout,
.history-section .history-overview :is(h2,p),main>.section .board :is(h3,dt,dd){color:var(--editorial-ink)}
main>.section :is(.notice-list>article,.people article,.partner-card,.address,.contact-form-panel){background:var(--editorial-surface);border-color:var(--editorial-line);color:var(--editorial-ink)}
main>.section :is(button,.button):not(.school-crop-button):not(.gallery button){color:var(--editorial-ink);background:var(--editorial-surface);border-color:var(--editorial-line)}
main>.section :is(button,.button):not(.school-crop-button):not(.gallery button):hover{color:var(--editorial-ink);background:var(--editorial-hover)}
#contatti .address a.route-button{background:var(--editorial-ink);border-color:var(--editorial-ink);color:var(--editorial-surface)}
footer{color:var(--editorial-ink);border-top:1px solid var(--editorial-line)}
footer a{color:var(--editorial-ink)}
footer>p span,footer small{color:var(--editorial-muted)}
@media(min-width:721px){
 .editorial-header .menubtn{order:1}
 .editorial-links p{font-size:clamp(1rem,1.32vw,1.5rem)}
}
@media(min-width:1800px){
 .editorial-notice{padding-block:20px}
 .editorial-home .social .feed article img{max-height:42rem}
}

html{scroll-padding-top:calc(var(--site-header-height, 72px) + 12px)}
main>#home[hidden],main>.section[hidden]{display:none!important}
.editorial-header #nav .nav-home,.editorial-back-home{display:none}
@media(max-width:720px){
 .editorial-header #nav.open{position:absolute;top:100%;left:0;right:0;display:grid;grid-template-columns:minmax(0,1fr);gap:0;align-content:start;padding:6px 16px 10px;background:var(--editorial-paper);border-bottom:1px solid var(--editorial-line);box-shadow:0 8px 18px #243c5320;max-height:calc(100dvh - var(--site-header-height, 72px));overflow-y:auto;overscroll-behavior:contain}
 .editorial-header #nav a,.editorial-header #nav a.nav-active,.editorial-header #nav .nav-home{display:flex;align-items:center;min-height:44px;padding:8px 12px;border-bottom:1px solid var(--editorial-line);border-radius:0}
 .editorial-header #nav a:last-child{border-bottom:0}
 .editorial-header #nav a.nav-active{background:var(--editorial-hover)}
 body[data-view]:not([data-view="home"]) .editorial-back-home{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;color:var(--editorial-ink);font-size:.92rem;font-weight:650;text-underline-offset:4px}
 .editorial-back-home + .section:not([hidden]),body[data-view]:not([data-view="home"]) main>.section:not([hidden]){padding-top:15px}
 body[data-view="bacheca"] .public-board .sectiontop .button[href="#home"]{display:none}
}

/* Route containers receive focus for navigation, while links and buttons keep their focus indicators. */
main > #home[tabindex="-1"]:focus,
main > .section[tabindex="-1"]:focus{outline:none}

/* Slate links and neutral surfaces carry the home palette across sections and dialogs. */
:root{--ink:var(--editorial-ink);--navy:var(--editorial-ink);--blue:var(--editorial-accent);--muted:var(--editorial-muted);--line:var(--editorial-line);--paper:var(--editorial-paper)}
:focus-visible{outline-color:var(--editorial-accent)}
.editorial-header{border-top-color:var(--editorial-accent)}
.editorial-header #nav a,.editorial-header #nav a.nav-active,.editorial-home a,
.editorial-notice #notice-open,.editorial-notice .all-notices,.editorial-back-home,
.editorial-home .social .tabs button,footer a{color:var(--editorial-accent)}
.editorial-header .member.button,.editorial-header .menubtn{color:var(--editorial-accent);border-color:var(--editorial-accent)}
.editorial-header .member.button:hover,.editorial-header .menubtn:hover{color:white;background:var(--editorial-accent)}
.editorial-home .social .tabs button[aria-selected="true"]{border-bottom-color:var(--editorial-accent)}
main>.section :is(.people h3,.partner-card h3,.notice-list h3,.address h3,.contact-form-panel h3),
#school-poster-dialog h2,#notice-dialog h2,.cookie-banner h2,.policy-toolbar h2,.policy-content h3{color:var(--editorial-ink)}
main>.section :is(.partner-visit,.notice-list a,.address a,.contact-form-panel a) , .policy-content a{color:var(--editorial-accent)}
#contatti .address a.route-button{background:var(--editorial-accent);border-color:var(--editorial-accent);color:var(--editorial-surface)}
.cookie-banner,#cookie-dialog,#policy-dialog,.policy-toolbar,#notice-dialog,#school-poster-dialog,.newspaper{background:var(--editorial-surface);color:var(--editorial-ink);border-color:var(--editorial-line)}
.notice-dialog-toolbar,.location-panorama figcaption{background:var(--editorial-hover);color:var(--editorial-ink)}
.newspaper h2,.newspaper h3,.newspaper .history-chapter h3{color:var(--editorial-ink)}
.newspaper button,.policy-content button,.policy-toolbar button{background:var(--editorial-hover);color:var(--editorial-accent);border-color:var(--editorial-line)}

.gallery .gallery-preview{position:relative;aspect-ratio:1;background:var(--editorial-hover)}
.gallery .gallery-preview img{height:100%;opacity:0}
.gallery .gallery-preview.is-ready img{opacity:1}
.gallery-preview-fallback{position:absolute;inset:0;display:grid!important;place-items:center;color:var(--editorial-accent)}

@media (min-width: 721px) {
  #foto .gallery button > span {
    font-size: clamp(.9rem, 1vw, 1.2rem);
    line-height: 1.45;
  }
}
@media (min-width: 1091px) {
  .editorial-header #nav a,
  .editorial-header #nav a.nav-active,
  .editorial-header .member.button {
    font-size: clamp(1.05rem, 1.36vw, 1.56rem);
  }
}
