/* Manuale online di MGAS Tool (si aggiunge a style.css) */
body.manual header, body.manual footer { max-width: 1180px; }
/* intestazione fissa in alto: resta visibile mentre si scorre il manuale */
body.manual header { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 40px; }
.layout main { max-width: none; margin: 0; padding: 0; min-width: 0; }
.toc { position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; padding: 16px 0 24px; font-size: 14px; }
.toc-title { font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 2px 0; line-height: 1.35; }
.toc li.l0 { margin-top: 10px; font-weight: 600; }
.toc li.l1 { padding-left: 14px; }
.toc a { color: var(--ink); text-decoration: none; display: block; padding: 2px 0; }
.toc a:hover { color: var(--accent); }
h2.chapter { font-size: 26px; border-bottom: 2px solid var(--accent); padding-bottom: 6px; margin-top: 48px; scroll-margin-top: 100px; }
h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 100px; }
h4 { color: var(--accent); font-size: 16px; margin: 20px 0 6px; }
.small { font-size: 14px; color: var(--muted); }
.button { display: inline-block; background: var(--accent); color: #fff; padding: 3px 12px; border-radius: 4px; text-decoration: none; font-size: 14px; }
.box { border-left: 4px solid var(--accent); background: var(--note); padding: 12px 16px; border-radius: 4px; margin: 16px 0; }
.box.warn { border-left-color: #b3261e; background: #fcf1ef; }
.box-title { font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.box.warn .box-title { color: #b3261e; }
.table-wrap { overflow-x: auto; margin: 12px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { background: var(--navy); color: #fff; text-align: left; padding: 7px 10px; font-weight: 600; }
td { padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:nth-child(even) td { background: var(--soft); }
td.key { font-weight: 600; color: var(--navy); }
figure { margin: 18px 0; }
figure img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 4px; display: block; }
figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
pre { background: var(--soft); padding: 10px 12px; border-radius: 4px; overflow-x: auto; font-size: 13px; }
.up { color: #1e8e3e; }
.down { color: #c62828; }
.cta { margin-top: 48px; border-left: 4px solid var(--accent); }
.cta h2 { margin-top: 0; }
@media (prefers-color-scheme: dark) {
  th { background: #26405f; }
  .box.warn { background: #2a1a19; }
  .box.warn .box-title { color: #f08a80; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { position: static; max-height: none; border-bottom: 1px solid var(--rule); }
  /* su telefono intestazione fissa ma piu' bassa */
  body.manual header { flex-direction: row; align-items: center; padding-top: 10px; padding-bottom: 10px; }
  body.manual header .logo { height: 36px; }
  body.manual header .tag { text-align: right; font-size: 13px; }
  h2.chapter, h3 { scroll-margin-top: 70px; }
}
