/* C-A-R-T-A - sito di presentazione. Generato da costruisci.py: non modificare a mano. */
@font-face {
  font-family: "Josefin Sans";
  src: url("/fonts/josefin-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #1c2130;
  --muted: #5b6475;
  --border: #dde1e8;
  --accent: #a4161a;
  --accent-hover: #861115;
  --accent-text: #ffffff;
  --evidenza: #fbeeee;
  --ok: #18794a;
  --ok-bg: #e5f4ec;
  --bad: #c0281b;
  --bad-bg: #fde8e6;
  --warn: #8f5a00;
  --warn-bg: #fdf1dc;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 4px 16px rgb(16 24 40 / 0.08);
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1d22;
    --surface: #24272e;
    --surface-2: #2c3038;
    --text: #e7e9ee;
    --muted: #a2a9b7;
    --border: #383c46;
    --accent: #ec5a5f;
    --accent-hover: #f07378;
    --accent-text: #2a0b0c;
    --evidenza: #2e1b1d;
    --ok: #5fd39a;
    --ok-bg: #173527;
    --bad: #ff8a7d;
    --bad-bg: #401c19;
    --warn: #f2bd5c;
    --warn-bg: #3a2d14;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 20px rgb(0 0 0 / 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.contenitore { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 16px; }

h1, h2, h3, h4, .marchio-nome, .btn, .numero {
  font-family: "Josefin Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; margin: 1.8em 0 0.5em; scroll-margin-top: 1rem; }
h1 { font-size: clamp(2rem, 1.2rem + 3.6vw, 3rem); margin-top: 0.4em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p, ul, ol, pre, aside, figure, hr { margin-block: 0 1.1em; }
:target { scroll-margin-top: 1rem; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.salta {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--accent); color: var(--accent-text); padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.salta:focus { left: 0; }
.solo-lettori {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---- testata ---- */
.testata { background: var(--surface); border-bottom: 1px solid var(--border); }
.testata-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-block: 12px; }
.marchio {
  display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 10.5rem;
  color: var(--text); text-decoration: none;
}
.marchio { order: 1; }
.marchio img { width: 44px; height: 44px; flex: none; }
.marchio-testo { display: flex; flex-direction: column; min-width: 0; }
.marchio-nome { font-size: 1.45rem; font-weight: 700; line-height: 1.1; letter-spacing: 0.02em; color: var(--accent); }
.marchio-sotto { font-size: 0.74rem; line-height: 1.25; color: var(--muted); }
.testata .btn { padding: 0 16px; min-height: 42px; font-size: 1rem; order: 2; }
.menu { flex: 1 1 100%; order: 3; }
.menu ul { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; margin: 0 -0.2rem; padding: 0; }
.menu a {
  display: inline-block; padding: 0.4rem 0.6rem; min-height: 38px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 0.97rem; border-bottom: 3px solid transparent;
}
.menu a:hover { background: var(--surface-2); color: var(--text); }
.menu a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--accent); border-radius: 8px 8px 0 0; }

@media (min-width: 700px) {
  .marchio-sotto { font-size: 0.8rem; }
}
/* abbastanza larga: marchio, menu e pulsante stanno su una riga sola */
@media (min-width: 70rem) {
  .marchio { flex: 0 0 auto; }
  .menu { flex: 1 1 auto; order: 2; }
  .menu ul { justify-content: center; }
  .testata .btn { order: 3; }
}

/* ---- pulsanti ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.15rem 24px 0; margin: 0.25rem 0.5rem 0.25rem 0;
  background: var(--accent); color: var(--accent-text); border: 2px solid var(--accent); border-radius: var(--radius);
  font-size: 1.08rem; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn.secondario { background: transparent; color: var(--accent); }
.btn.secondario:hover { background: var(--evidenza); color: var(--accent-hover); border-color: var(--accent-hover); }
.testata .btn { margin: 0; }

/* ---- contenuto ---- */
main { flex: 1 0 auto; padding-block: 1.5rem 3.5rem; }
.pagina > :where(p, ul, ol, h2, h3, h4, aside, pre, hr) { max-width: 46rem; }
.pagina > h1 { max-width: 46rem; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.3em 0; }
li::marker { color: var(--accent); }
li > ul, li > ol { margin-block: 0.3em 0; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code {
  font: 0.9em ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.08em 0.35em;
}
pre {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.9rem 1rem; white-space: pre-wrap; word-break: break-word;
}
pre code { background: none; border: 0; padding: 0; }

aside.nota {
  max-width: 46rem; background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--accent); border-radius: var(--radius); padding: 0.8rem 1.1rem; margin-block: 1.4rem;
}
aside.nota > :last-child { margin-bottom: 0; }
aside.nota > :first-child { margin-top: 0; }

figure { margin: 1.8rem 0; }
figure img, .pagina > img {
  display: block; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
}
figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.93rem; max-width: 46rem; }
video, audio { display: block; width: 100%; max-width: 100%; margin-block: 1.4rem; }
video { height: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #000; }
details { max-width: 46rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.2rem 1rem; margin-block: 0.7rem; }
summary { cursor: pointer; font-weight: 600; padding: 0.6rem 0; }

.galleria, .schede { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin-block: 1.5rem; }
.galleria figure { margin: 0; }
.galleria img { width: 100%; }
.schede > .scheda {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.15rem; box-shadow: var(--shadow);
}
.scheda > :first-child { margin-top: 0; }
.scheda > :last-child { margin-bottom: 0; }
.scheda h3 { font-size: 1.2rem; }
/* «Quattro cose da sapere»: 2x2 da 700 a 1100 px, quattro in fila sopra 1100 (prima a 1280 px erano 3+1) */
.schede { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .schede { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.due-colonne { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-block: 1.5rem; }
.centrato { text-align: center; margin-inline: auto; }
@media (max-width: 699.98px) {
  .galleria, .schede, .due-colonne { grid-template-columns: 1fr; }
}

/* ---- tabelle (scheda per riga sotto i 700 px) ---- */
.tabella { margin-block: 1.5rem; }
@media (min-width: 700px) { .tabella { overflow-x: auto; } }
.tabella table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.95rem;
}
.tabella th, .tabella td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.tabella tbody tr:last-child > * { border-bottom: 0; }
.tabella thead th { background: var(--surface-2); font-family: "Josefin Sans", system-ui, sans-serif; font-size: 1rem; }
.tabella tbody th { font-weight: 600; }
.tabella .esito { text-align: center; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.esito.ok { color: var(--ok); background: var(--ok-bg); }
.esito.no { color: var(--bad); background: var(--bad-bg); }
.esito.nd { color: var(--muted); }
.modo { display: inline-block; padding: 0.05rem 0.6rem; border-radius: 999px; font-size: 0.82rem; border: 1px solid var(--border); background: var(--surface-2); }
.modo.reale { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.nota-data { display: block; color: var(--muted); font-size: 0.82rem; }
.legenda { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; color: var(--muted); font-size: 0.93rem; margin-top: 0.8rem; }
.legenda .esito { padding: 0 0.35rem; border-radius: 4px; }

/* ---- pagina Versioni ---- */
.salti { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; max-width: 46rem; }
.salti-titolo { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.93rem; }
.salti a { display: inline-block; padding: 0.25rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 0.93rem; }
.versioni { max-width: 46rem; }
.scheda-versione {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.25rem 0.8rem; margin: 1.2rem 0; box-shadow: var(--shadow); scroll-margin-top: 1rem;
}
.scheda-versione.pietra { background: var(--evidenza); border-color: var(--accent); border-width: 2px; }
.scheda-versione .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.9rem; color: var(--muted); font-size: 0.95rem; }
.scheda-versione .numero { font-size: 1.1rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.scheda-versione h2 { margin: 0.2em 0 0.4em; font-size: 1.45rem; }
.etichetta { display: inline-block; padding: 0.05rem 0.7rem; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 0.82rem; font-weight: 700; }
.novita { margin-bottom: 0.8rem; }
.azioni { margin-bottom: 0.4rem; }
.azioni .btn { min-height: 42px; font-size: 1rem; padding-inline: 18px; }

/* ---- piede ---- */
.piede { background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.93rem; padding-block: 1.4rem; }
.piede p { margin: 0.2em 0; }
.piede a { color: var(--accent); }

@media print {
  .testata .menu, .testata .btn, .salta, .piede { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* ---- tabelle a schede ---- */
@media (max-width: 699.98px) {
  .tabella table, .tabella tbody, .tabella tr, .tabella th, .tabella td { display: block; }
  .tabella table { border: 0; background: none; }
  .tabella thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tabella tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
  .tabella tbody th { background: var(--surface-2); }
  .tabella td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-align: right; }
  .tabella td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .tabella .esito { font-size: 1.05rem; }
  .tabella tbody tr:last-child > * { border-bottom: 1px solid var(--border); }
  .tabella tr > :last-child { border-bottom: 0 !important; }
}
@media (max-width: 999.98px) {
  .tabella.dispositivi table, .tabella.dispositivi tbody, .tabella.dispositivi tr, .tabella.dispositivi th, .tabella.dispositivi td { display: block; }
  .tabella.dispositivi table { border: 0; background: none; }
  .tabella.dispositivi thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tabella.dispositivi tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1rem; overflow: hidden; }
  .tabella.dispositivi tbody th { background: var(--surface-2); }
  .tabella.dispositivi td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-align: right; }
  .tabella.dispositivi td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; }
  .tabella.dispositivi .esito { font-size: 1.05rem; }
  .tabella.dispositivi tbody tr:last-child > * { border-bottom: 1px solid var(--border); }
  .tabella.dispositivi tr > :last-child { border-bottom: 0 !important; }
  .tabella.dispositivi { overflow-x: visible; }
}
