body { /*This handles the page properties*/
	font-family: Verdana, Arial, Helvetica, Sans-Serif;
	margin: 0px;
	font-size: 16px;
}

p, ul {
	font-size: .95em;
}

a.anchor_blue:link, a.anchor_blue:visited, a.anchor_blue:hover, a.anchor_blue:active {
	color: blue;
	text-decoration:none;
}

div.success {
	margin: 0.3em 0 0 0;
	border: 2px solid;
	border-color: #00FF00;
	background-color: #f0fff0;
	background-image: url('/images/s_success.png');
	background-repeat: no-repeat;
	background-position: 5px 50%;
	padding: 0.2em 0.2em 0.2em 25px;
}

div.error {
	margin: 0.3em 0 0 0;
	border: 2px solid;
	border-color: orange;
	background-color: #fcf6df;
	background-image: url('/images/s_error.png');
	background-repeat: no-repeat;
	background-position: 5px 50%;
	color: red;
	padding: 0.2em 0.2em 0.2em 25px;
}

.data {
	font-size: 0.8em;
}

a.datalink:link {
	color: blue;
}

a.datalink:visited {
	color: blue;
}

a.datalink:hover {
	color: blue;
}

a.datalink:active {
	color: blue;
}

/* ===== Layout semantico nuovo (compatibile col vecchio) ===== */
:root {
  --fg: #111;
  --bg: #fff;
  --muted: #666;
  --brand-bg: rgb(11, 25, 70); /* riprende il tuo blu header */
  --brand-fg: #ffd700;         /* giallo caldo per contrasto */
}

html, body { color: var(--fg); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; height: auto; }

/* Contenitore fluido */
.container { width: min(1100px, 92%); margin-inline: auto; }

/* Header/nav (sostituisce .mainT + tr.header) */
.site-header {
  background: var(--brand-bg);
  color: var(--brand-fg);
}
.site-header .brand {
  font-weight: 700; font-size: 1.1rem; padding: 12px 0;
}
.site-header .brand a {
  color: var(--brand-fg); text-decoration: none;
}

/* Menu principale */
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.site-nav a {
  display: block;
  color: var(--brand-fg); text-decoration: none;
  padding: 8px 10px; border-radius: 6px;
}
.site-nav a:hover { background: rgba(255,255,255,.08); }

.site-nav a.active, .site-nav a[aria-current="page"] {
  background: rgba(255,255,255,.18); text-decoration: none;
}

.site-nav a:focus {
  outline: 2px dashed #ffd700;
  outline-offset: 2px;
}

/* Corpo pagina (sostituisce .mainB) */
.site-main { padding: 20px 0; }

/* Footer (sostituisce .mainF) */
.site-footer {
  text-align: center; font-size: .9em; color: var(--muted);
  border-top: 1px solid #eee; padding: 20px 0;
}

/* Componenti utili */
.hero-figure { text-align: center; }
.hero-figure img { border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.hero-figure figcaption { color: var(--muted); margin-top: .5rem; }

blockquote {
  margin: 1.5rem auto; padding: 1rem 1.25rem;
  border-left: 4px solid rgb(11,25,70);
  background: #f5f7ff;
  max-width: 900px;
}

blockquote footer { margin-top:.5rem; color:#555; font-weight:600; text-align:left; }

/* Stato messaggi coerente con il tuo stile */
div.success, div.error { border-radius: 6px; }

/* Mobile tweaks */
@media (max-width: 640px) {
  .site-nav a { padding: 8px 8px; font-size: .95rem; }
}

.honors { list-style: none; margin: 1rem 0; padding: 0; }
.honors li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eee; }
.honors li:last-child { border-bottom: 0; }
.honors .year {
  display: inline-block; min-width: 64px; text-align: center; font-weight: 700;
  background: rgba(11,25,70,.08); color: rgb(11,25,70); border-radius: 999px; padding: 6px 10px;
}
blockquote.note {
  margin: .5rem 0 0 0; padding: .6rem .8rem; background: #f7f9ff; border-left: 4px solid rgb(11,25,70); color: #333;
}
@media (max-width: 640px) {
  .honors li { grid-template-columns: 70px 1fr; }
}

.lead { font-size: 1.05rem; line-height: 1.7; }

.badge {
  display:inline-block; padding:.1rem .4rem; border-radius:.4rem;
  background: rgba(11,25,70,.08); color: rgb(11,25,70); font-weight:600;
}

.site-main ul { margin: .6rem 0 1.2rem 1.2rem; }
.site-main li  { margin: .15rem 0; }

/* Archivio documenti */
.doc-list { display: grid; gap: 16px; margin: 1rem 0; }
.doc {
  background:#fff; border:1px solid #eef1f7; border-radius:10px; padding:14px 16px;
  box-shadow:0 1px 6px rgba(0,0,0,.04);
}
.doc-title { margin:0 0 .4rem 0; font-size:1.05rem; }
.doc-desc { margin:.25rem 0 .6rem 0; }
.doc-actions { margin:0; }

.btn-download {
  display:inline-block; background:rgb(11,25,70); color:#ffd700;
  padding:8px 12px; border-radius:6px; font-weight:600; text-decoration:none;
}
.btn-download:hover { background:rgb(20,40,100); text-decoration:none; }
.btn-download span { text-decoration: underline; }

/* Cards scelte iniziali */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin: 1rem 0 1.5rem;
}
.card-link { text-decoration: none; color: inherit; }
.card {
  margin: 0; background: #fff; border: 1px solid #eef1f7; border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.04); transition: transform .15s ease;
  text-align: center;
}
.card img { width: 100%; height: auto; display: block; }
.card figcaption { padding: 10px 12px; font-weight: 600; }
.card-link:hover .card { transform: translateY(-2px); }

/* Tabs categoria */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: .5rem 0 1rem; }
.tab {
  display: inline-block; padding: 8px 12px; border-radius: 999px;
  background: #f3f5fc; color: #0b1946; text-decoration: none; font-weight: 600;
}
.tab.active { background: rgba(11,25,70,.18); }
.tab.ghost { background: transparent; border: 1px solid #e3e7f5; color: #444; }

/* Lista risultati */
.records { display: grid; gap: 14px; margin-top: .5rem; }
.record {
  background: #fff; border: 1px solid #eef1f7; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}
.record-title { margin: 0 0 .35rem 0; font-size: 1.02rem; }
.record-title a { text-decoration: none; }
.record-title a:hover { text-decoration: underline; }
.record-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: .95em; color: #333; }
.record-meta .key { color: #666; font-weight: 600; }

/* Notice vuoto */
.notice {
  padding: 12px 14px; background: #f7f9ff; border-left: 4px solid rgb(11,25,70);
  border-radius: 6px; color: #333;
}

/* --- Patch consigliata -------------------------------------------------- */

/* 1) Box sizing globale */
*, *::before, *::after { box-sizing: border-box; }

/* 2) Tipografia base */
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem 0; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

/* 3) Focus visibile su tutti i link */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px dashed #ffd700;
  outline-offset: 2px;
}

/* 4) Riduzione animazioni per chi lo richiede */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* 5) Versione unica e definitiva di .btn-download (rimuovi i duplicati) */
.btn-download {
  display: inline-block;
  background: rgb(11, 25, 70);
  color: #ffd700;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
}
.btn-download:hover { background: rgb(20, 40, 100); text-decoration: none; }
.btn-download span { text-decoration: underline; }

/* 6) Paginazione (se usi la paginazione server-side nelle Pubblicazioni) */
.pager { display:flex; gap:6px; align-items:center; margin:16px 0; flex-wrap:wrap; }
.pager .pg {
  padding:6px 10px; border:1px solid #e3e7f5; border-radius:6px; text-decoration:none; background:#fff;
}
.pager .pg.current { background:rgba(11,25,70,.12); font-weight:700; }

/* 7) Finezze per contenuto principale */
.site-main p { margin: 0 0 .8rem 0; }
.site-main ul { margin: .6rem 0 1.2rem 1.2rem; }
.site-main li { margin: .15rem 0; }

.press { background:#fff; border:1px solid #eef1f7; border-radius:10px; padding:14px 16px; box-shadow:0 1px 6px rgba(0,0,0,.04); margin:1rem 0; }
.press-title { margin:0 0 .5rem 0; font-size:1.15rem; }
.press-meta { list-style:none; padding:0; margin:0 0 .8rem 0; display:flex; gap:10px 18px; flex-wrap:wrap; font-size:.95em; color:#333; }
.press-meta .key { color:#666; font-weight:600; }
.press-figure { margin:0 0 .8rem 0; text-align:center; }
.press-figure img { max-width:100%; height:auto; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,.08); }
.press-excerpt { margin-top:.6rem; background:#f7f9ff; border-left:4px solid rgb(11,25,70); padding:.6rem .8rem; }
