/* Guida all'uso: stessa carta e stesso inchiostro del sito, testo grande e passi numerati. */

.g-main { padding-top: 16px; padding-bottom: 48px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 0.95em; border-radius: 6px; padding: 1px 9px 2px; white-space: nowrap; }

.g-intro h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.05; margin: 0 0 12px; }
.g-lead { font-size: 1.15rem; max-width: 56ch; margin-bottom: 20px; }
.g-h { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 8px; }

.g-choose { display: grid; gap: 12px; margin: 8px 0 24px; }
.g-choose a { display: grid; gap: 4px; padding: 18px 20px; border: 2px solid var(--rule); border-radius: 12px; background: var(--paper); text-decoration: none; color: var(--text); }
.g-choose a b { font-family: var(--display); font-size: 1.35rem; color: var(--ink); }
.g-choose a[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.g-choose a[aria-current="true"] b { color: var(--paper); }
@media (min-width: 720px) { .g-choose { grid-template-columns: 1fr 1fr; } }

/* Ricerca */
.g-search { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; margin-bottom: 8px; }
.g-search label { font-family: var(--display); font-size: 1.2rem; color: var(--ink); }
.g-search-row { display: flex; gap: 8px; margin-top: 6px; }
.g-search input { flex: 1; min-width: 0; font-size: 1.1rem; min-height: 52px; }
.g-found { margin: 10px 0 0; color: var(--muted); }
.g-found:empty { display: none; }
.g-searching .g-step:not(.g-hit), .g-searching .g-problems details:not(.g-hit), .g-searching .g-words > div:not(.g-hit),
.g-searching .g-empty, .g-searching .g-toc, .g-searching .g-part-head, .g-searching .g-up { display: none; }
.g-searching .g-part { border-top: 0; padding-top: 0; }

/* Parti */
.g-part { padding-top: 40px; margin-top: 24px; border-top: 1px solid var(--rule); }
.g-ib { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.g-ib li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: start; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.g-ib-n { grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; background: var(--wood); color: var(--text); display: grid; place-items: center; font: 700 1.1rem var(--display); }
.g-ib b { font-family: var(--display); font-size: 1.15rem; color: var(--ink); }
.g-ib span:last-child { color: var(--muted); }
@media (min-width: 900px) { .g-ib { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-ib li { grid-template-columns: 1fr; } .g-ib-n { grid-row: auto; margin-bottom: 6px; } }

.g-toc { margin: 28px 0 8px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; }
.g-toc h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 8px; }
.g-toc ol { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: 24px; }
.g-toc li { break-inside: avoid; }
.g-toc a { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--text); font-weight: 700; }
.g-toc a span { min-width: 3.2em; color: var(--wood-text); font-variant-numeric: tabular-nums; }
.g-pdf { display: inline-block; margin-top: 14px; font-weight: 700; }

/* Capitoli e passi */
.g-chap { scroll-margin-top: 80px; }
.g-chap > h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); padding-bottom: 8px; margin: 36px 0 8px; border-bottom: 4px solid var(--ink); }
.g-steps { list-style: none; margin: 0; padding: 0; }
.g-step { display: grid; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 80px; }
.g-step:target { background: var(--ink-tint); border-radius: 10px; padding-left: 12px; padding-right: 12px; }
.g-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 1.3rem var(--display); margin-bottom: 10px; }
.g-step h3 { font-family: var(--display); font-size: 1.5rem; margin-bottom: 10px; }
.g-step p { font-size: 1.08rem; max-width: 60ch; }
.g-tip { background: #f3e6d4; border-radius: 10px; padding: 12px 16px; margin-top: 12px; max-width: 60ch; color: #24180f; }
.g-tip b { display: block; font-family: var(--display); color: var(--wood-text); margin-bottom: 2px; }
.g-tip p { margin: 0; }
.g-pics { display: flex; gap: 12px; justify-content: center; }
.g-phone { margin: 0; width: min(240px, 70vw); border: 7px solid var(--text); border-radius: 26px; overflow: hidden; background: #fff; }
.g-step.two .g-phone { width: min(200px, 44vw); }
.g-phone img { display: block; width: 100%; height: auto; }
@media (min-width: 800px) {
  .g-step { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 40px; }
  .g-pics { justify-content: flex-end; }
}

.g-wa { margin: 0; width: min(260px, 80vw); background: #e9e2d6; border-radius: 16px; padding: 14px; color: #24180f; }
.g-wa-head { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 10px; }
.g-wa-head span { width: 26px; height: 26px; border-radius: 50%; background: #4a3020; }
.g-wa-msg { position: relative; margin: 0; background: #fff; border-radius: 0 12px 12px 12px; padding: 10px 12px 22px; font-size: 0.95rem; }
.g-wa-msg u { color: #1a5fb4; }
.g-wa-msg small { position: absolute; right: 10px; bottom: 4px; color: #6b5f54; }
.g-wa figcaption { font-size: 0.82rem; color: #6b5f54; margin-top: 8px; }

.g-up { margin: 16px 0 0; }
.g-up a { font-weight: 700; }
.g-problems .faq { margin-top: 8px; }
.g-extra { margin-top: 48px; }
.g-extra details { border-top: 1px solid var(--rule); padding: 6px 0; }
.g-extra summary { font-family: var(--display); font-size: 1.3rem; }
.g-words { margin: 8px 0 16px; }
.g-words div { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.g-words dt { font-weight: 700; color: var(--ink); }
.g-words dd { margin: 2px 0 0; }
.g-news { padding-left: 20px; }

.g-hit { animation: g-flash .6s ease-out; }
@keyframes g-flash { from { background: var(--ink-tint); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .g-hit { animation: none; } }
.g-search input::-webkit-search-cancel-button { display: none; }
