/* Annuario — veste diocesi.cloud. I fogli di stampa conservano lo stile originale. */
@media screen {
body{background:#f8fafc;color:#1e293b}
.top,main>:not(#print-source):not(#print-pages),footer,.dc-home{--ink:#1e293b;--green:#7e22ce;--gold:#7e22ce;--paper:#f8fafc;--line:#e2e8f0;--muted:#64748b}
.top{background:#fff;border-color:#e2e8f0}.brand{color:#0f172a}.brand img{border:1px solid #e2e8f0;border-radius:12px;padding:5px;background:white}.top nav a{color:#7e22ce}.top nav a:last-child{border-color:#e2e8f0;border-radius:8px}
h1:not(:where(#print-source *,#print-pages *)),h2:not(:where(#print-source *,#print-pages *)),h3:not(:where(#print-source *,#print-pages *)){font-family:inherit;font-weight:700;letter-spacing:-.035em}
main>:not(#print-source):not(#print-pages) h1{font-size:30px}main>.hero h1{font-size:clamp(34px,4vw,52px)}.hero h1 em{font-weight:700;font-style:normal}
main>.title-row h1{font-size:30px}.narrow h1{font-size:30px}.category h2{font-size:23px}.print-callout h2{font-size:23px}.sheet:not(:where(#print-source *,#print-pages *)) h2{font-size:24px}.sheet:not(:where(#print-source *,#print-pages *)) h3{font-size:21px}
.panel,.category,.record-card,.sheet:not(:where(#print-source *,#print-pages *)){background:#fff;border-color:#e2e8f0;border-radius:16px;box-shadow:0 1px 2px #0f172a03}.narrow{border-top:3px solid #7e22ce}.category:hover{border-color:#c084fc}.record-card>img{background:#f1f5f9}.search{background:#fff;border-color:#e2e8f0;border-radius:12px}.seal{background:#faf5ff}.hero .date{background:#faf5ff;border-color:#e9d5ff;color:#7e22ce}.toolbar{background:#f1f5f9;border-color:#e2e8f0}.admin-list a{border-color:#e2e8f0}
button,.button{background:#7e22ce;border-color:#7e22ce;border-radius:9px;font-weight:650}button:hover,.button:hover{background:#6b21a8}button.secondary{background:white;color:#7e22ce;border-color:#cbd5e1}button.secondary:hover{background:#faf5ff}.toolbar button,.upload-button{background:white;border-color:#cbd5e1;color:#7e22ce}.toolbar button:hover{background:#faf5ff}
input,select,textarea{border-color:#cbd5e1;border-radius:8px;color:#1e293b}input[type=checkbox]{accent-color:#7e22ce}label{color:#475569}.eyebrow,.number,.arrow{color:#7e22ce}.eyebrow{letter-spacing:.08em}
:is(a,button,input,select,textarea):focus-visible,.editor:focus{outline:2px solid #7e22ce;outline-offset:3px}
/* Neutralità dell’anteprima PDF: nessuna variazione di tipografia o impaginazione. */
#print-source,#print-pages{color:#243d3a}
}
.dc-home{box-sizing:border-box;display:flex;justify-content:flex-end;max-width:1250px;margin:0 auto;padding:9px 36px;font:400 12px/1.4 system-ui,sans-serif}.dc-home a{color:#64748b;text-decoration:none}.dc-home a:hover{color:#0f172a;text-decoration:underline}
@media(max-width:760px){.dc-home{padding:10px 18px}.top{flex-wrap:wrap}.top nav{max-width:none}.hero h1{font-size:34px!important}}
@media print{.dc-home{display:none!important}}

/* Smartphone e tablet: anteprima A4 e stampa mantengono gli stili originali. */
@media screen and (max-width:1023px){
 .top{flex-wrap:wrap;gap:14px;padding:18px 20px}
 .top nav{flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px 16px;max-width:none}
 .top nav a{display:inline-flex;align-items:center;min-height:44px;font-size:14px}
 .top nav a:last-child{padding:8px 13px}
 main{padding:22px 20px 40px}
 main>:not(#print-source):not(#print-pages){min-width:0;overflow-wrap:anywhere}
 .title-row>* , .form-grid>* , .filters>* , .admin-list a>span{min-width:0}
 .form-grid{grid-template-columns:1fr}
 .hero{gap:24px;padding:24px 0}
 .hero>div:first-child{min-width:0}
 .seal{flex-shrink:0;width:170px;height:190px;margin-right:0}
 .seal img{width:120px;height:150px}
 .categories,.records{grid-template-columns:repeat(2,minmax(0,1fr))}
 .category,.record-card{min-width:0;overflow-wrap:anywhere}
 .title-row,.filters,.stats{flex-wrap:wrap}
 .filters{gap:14px;align-items:flex-end}
 .filters label{min-width:0;flex:1 1 190px}
 input:not([type=checkbox]):not([type=hidden]),select,textarea{font-size:16px;min-height:44px;max-width:100%}
 button,.button{min-height:44px;max-width:100%;overflow-wrap:anywhere}
 input[type=checkbox]{width:22px;height:22px;flex-shrink:0;vertical-align:middle}
 .checks label{min-height:44px;font-size:14px}
 .actions>a,.filters>a,.stats>a{display:inline-flex;align-items:center;min-height:44px}
 .actions{gap:12px 20px}
 .actions form{max-width:100%}
 .toolbar button{min-height:44px;font-size:14px}
 .upload-button{font-size:14px;max-width:100%}
 .upload-button input{width:100%;font-size:16px}
 .toolbar{position:static}
 .sheet:not(:where(#print-source *,#print-pages *)){padding:20px;max-width:100%;overflow-x:auto}
 .sheet:not(:where(#print-source *,#print-pages *)) table{font-size:14px}
 .editor{font-size:16px}
 .admin-list a{gap:12px;flex-wrap:wrap;overflow-wrap:anywhere}
 .panel{padding:22px}
 .narrow{margin:24px auto}
 details>summary{min-height:44px;cursor:pointer}
 #print-pages{max-width:100%;overflow:auto}
}
@media screen and (max-width:600px){
 .top{padding:16px;gap:12px}
 .top nav{width:100%;gap:8px 16px}
 main{padding:20px 16px 36px}
 .hero{gap:12px}
 .seal{display:none}
 .categories,.records{grid-template-columns:1fr}
 .category{min-height:160px}
 .search div{flex-wrap:wrap}
 .search input{flex:1 1 160px}
 .filters label{flex-basis:100%}
 .title-row{align-items:flex-start;flex-direction:column}
 .panel{padding:18px}
 .sheet:not(:where(#print-source *,#print-pages *)){padding:16px}
 .sheet:not(:where(#print-source *,#print-pages *)) td,
 .sheet:not(:where(#print-source *,#print-pages *)) th{padding:7px 6px}
 .toolbar{padding:8px;gap:8px}
 .toolbar .upload-button{width:100%}
 .print-callout{align-items:flex-start;flex-direction:column}
 .stats{gap:10px 20px}
}

/* L'anteprima si adatta allo schermo dopo l'impaginazione; l'A4 resta invariato. */
@media screen{
 html:not(.printing) #print-pages.preview-ready>.paper{zoom:var(--preview-scale,1)}
}
@media print{
 #print-pages>.paper{zoom:1!important}
}
.printing #print-pages>.paper{zoom:1!important}
