/* =====================================================
   VARIABILI DI COLORE
===================================================== */
:root {
  --accent-color: #0f4c81;     /* Blu acciaio istituzionale */
  --text-color: #222222;
  --muted-color: #555555;
  --light-gray: #f4f4f4;
  --table-gray: #fafafa;
}

/* =====================================================
   IMPOSTAZIONI GENERALI
===================================================== */
body {
  font-family: "Inter", "Source Sans Pro", "Roboto", Arial, sans-serif;
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-color);
}

p {
  margin-bottom: 0.8em;
}

/* =====================================================
   TITOLI
===================================================== */

/* H1 – neutro (banner gestito da Quarto) */
h1 {
  background-color: transparent;
  color: var(--text-color);
  padding: 0;
  margin-top: 3em;
  margin-bottom: 0.8em;
  font-weight: 600;
}

/* H2 – sezione principale */
h2 {
  font-weight: 600;
  font-size: 1.4em;
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.8em;
  padding-bottom: 0.25em;
  border-bottom: 3px solid var(--accent-color);
}

/* H3 – sottosezione */
h3 {
  font-weight: 600;
  font-size: 1.2em;
  line-height: 1.3;
  margin-top: 2em;
  background-color: var(--accent-color);
  color: white; 
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  padding-left: 0.5em;
}

/* H4 – sottosezione dettagliata */
h4 {
  font-weight: 600;
  font-size: 1.1em;
  line-height: 1.3;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
  color: #2a2a2a;
  border-left: 3px solid var(--accent-color);
  padding-left: 0.5em;
}

/* =====================================================
   LINK
===================================================== */
a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =====================================================
   TABELLE (VALIDAZIONE)
===================================================== */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
  font-size: 0.95em;
}

thead th {
  border-bottom: 2px solid #000000;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #d9d9d9;
}

td.num,
td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr:nth-child(even) {
  background-color: var(--table-gray);
}

/* =====================================================
   CALLOUT / BOX SEMANTICI
===================================================== */
.callout {
  border-left: 4px solid #999999;
  background-color: var(--light-gray);
  padding: 0.8em 1em;
  margin: 1.4em 0;
}

.callout-note {
  border-left-color: var(--accent-color);
}

.callout-important {
  border-left-color: #666666;
}

.callout-tip {
  border-left-color: var(--accent-color);
  background-color: #f6f6f6; /* più chiaro per leggibilità */
}

/* =====================================================
   CODICE (SE PRESENTE)
===================================================== */
pre, code {
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.9em;
}

/* =====================================================
   FIGURE
===================================================== */
figure {
  margin: 1.6em auto;
}

figcaption {
  font-size: 0.85em;
  color: var(--muted-color);
  text-align: center;
}

/* =====================================================
   INDICE (TOC)
===================================================== */
#TOC {
  font-size: 0.9em;
}

#TOC a {
  color: #333333;
}

/* =====================================================
   HEADER / FOOTER (PAGED HTML)
===================================================== */
header, footer {
  font-size: 0.8em;
  color: var(--muted-color);
}

/* =====================================================
   CHECKBOX NON CLICCABILI
===================================================== */
input[type="checkbox"] {
  pointer-events: none;
  accent-color: var(--accent-color);
  opacity: 1;
  transform: scale(1.2);
  vertical-align: middle;
}
