/* Pagina del simulatore: colori e caratteri vicini al tema Chirpy del sito principale.
   Modalità scura automatica in base alle impostazioni del dispositivo. */
:root {
  --sfondo: #ffffff;
  --testo: #34343c;
  --tenue: #757575;
  --linea: #ececec;
  --testata: #f6f8fa;
  --link: #0056b2;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --sfondo: #1b1b1e; --testo: #afb0b1; --tenue: #868686; --linea: #2c2d2d; --testata: #1e1e20; --link: #8ab4f8; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 17px; line-height: 1.6; color: var(--testo); background: var(--sfondo); }
a { color: var(--link); }
.contenitore { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.testata { background: var(--testata); border-bottom: 1px solid var(--linea); }
.testata-riga { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.marchio { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--testo); text-decoration: none; }
.marchio svg { width: 28px; height: 28px; color: #F4B400; flex: none; }
.indietro { font-weight: 600; text-decoration: none; white-space: nowrap; }
.testata-destra { display: flex; align-items: center; gap: 18px; }
.lingue { display: flex; gap: 2px; font-weight: 600; font-size: 15px; }
.lingue a { color: var(--tenue); text-decoration: none; padding: 4px 7px; border-radius: 6px; }
.lingue a:hover { color: var(--testo); }
.lingue a[aria-current="page"] { color: var(--testo); background: var(--linea); }
@media (max-width: 480px) { .testata-destra { gap: 10px; } .indietro { font-size: 15px; } .marchio span { font-size: 17px; } }
.indietro:hover { text-decoration: underline; }

main h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 600; margin: 36px 0 8px; }
.sottotitolo { color: var(--tenue); max-width: 1100px; margin: 0 auto 24px; }
main h1 { max-width: 1100px; margin-left: auto; margin-right: auto; }
#c3d-calc#c3d-calc { font-family: inherit; margin-bottom: 48px; --c3d-accent: #0d6efd; --c3d-accent-hover: #0b5ed7; }
html #c3d-calc .c3d-drop-title, html #c3d-calc .c3d-dims, html #c3d-calc .c3d-title, html #c3d-calc .c3d-total-value { font-family: inherit; }

/* Simulatore in modalità scura */
@media (prefers-color-scheme: dark) {
  #c3d-calc#c3d-calc { --c3d-ink: #d3d6db; --c3d-muted: #9aa2ad; --c3d-line: #3a3f47; --c3d-soft: #262a31; --c3d-surface: #1f2226; --c3d-accent: #3d8bfd; --c3d-accent-hover: #6ea8fe; }
  html #c3d-calc select, html #c3d-calc input[type=number], html #c3d-calc .c3d-seg label { background: #181b1f; color: var(--c3d-ink); }
  html #c3d-calc .c3d-result { border-top-color: var(--c3d-line); }
  html #c3d-calc .c3d-msg.is-warn, html #c3d-calc .c3d-file-warn { color: #e0b44a; }
  html #c3d-calc .c3d-cta:disabled { background: #3a3f47; color: #9aa2ad; }
}


/* Domande frequenti */
.faq { max-width: 1100px; margin: 0 auto 56px; }
.faq h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 600; margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-of-type { border-top: 1px solid var(--linea); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 2px; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--tenue); border-bottom: 2px solid var(--tenue); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq summary:hover { color: var(--link); }
.faq summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }
.faq-risposta { padding: 0 2px 16px; max-width: 820px; }
.faq-risposta p { margin: 0 0 10px; }
.faq-risposta ul { margin: 0 0 10px; padding-left: 22px; }
.faq-risposta li { margin-bottom: 4px; }
.faq-risposta code { font-size: .9em; background: var(--testata); border: 1px solid var(--linea); border-radius: 4px; padding: 0 4px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
@media (prefers-color-scheme: dark) {
  html #c3d-calc .c3d-xls-msg.is-ok { color: #6fcf97; }
  html #c3d-calc .c3d-xls-msg.is-warn { color: #e0b44a; }
  html #c3d-calc .c3d-xls-msg.is-error { color: #f28b82; }
  html #c3d-calc .c3d-xls-btn:disabled { border-color: #3a3f47; color: #6b7280; }
}
.piede { border-top: 1px solid var(--linea); font-size: 15px; color: var(--tenue); }
.piede-riga { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 20px; padding-bottom: 28px; }
.piede p { margin: 0; }
