/* Cornice e palette condivise con la Redazione; lettura pratica per capitoli. */
:root { --guide-offset: calc(88px + env(safe-area-inset-top, 0px)); }
html { scroll-padding-top: var(--guide-offset); }
.guide-page [hidden] { display: none !important; }
.guide-page a { color: var(--fb-blue-ink); }
.guide-page :focus-visible { outline: 3px solid var(--fb-blue); outline-offset: 4px; border-radius: 4px; }
.guide-home:focus, .guide-chapter:focus, .guide-paragraph:focus, .guide-reference:focus, .guide-reader-top:focus { outline: none; }
.guide-skip { position: fixed; top: -5rem; left: 1rem; z-index: 100; padding: .8rem 1rem; background: white; font-weight: 700; }
.guide-skip:focus { top: 1rem; }
/* Icone a tratto, come lo sprite della home: niente simboli di testo. */
.guide-icon { width: 1em; height: 1em; flex: none; vertical-align: -.14em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.guide-icon.is-filled { fill: currentColor; stroke: none; }
.guide-wrap { max-width: 1140px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-left)) 0 max(24px, env(safe-area-inset-right)); }
.guide-page .red-hero-inner { max-width: 1140px; padding-left: 24px; padding-right: 24px; }
.guide-page .red-tab, .guide-page .red-hero-logo-link { color: rgba(255, 255, 255, .72); }
.guide-page .red-tab.active { color: #7ea8ff; }
.guide-intro { padding: 38px 0 30px; border-bottom: 1px solid var(--rule); }
.guide-eyebrow { margin: 0 0 12px; color: var(--fb-blue-ink); font-size: .7rem; font-weight: 750; letter-spacing: .12em; }
.guide-intro h1 { margin: 0; color: var(--fb-navy); font-size: clamp(1.9rem, 4vw, 2.85rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.15; }
.guide-intro h1 span { color: var(--fb-blue); }
.guide-lead { margin: 14px 0 10px; max-width: 670px; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.guide-meta { margin: 0; color: var(--muted); font-size: .72rem; }
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 28px; }
.guide-sidebar { position: sticky; top: var(--guide-offset); max-height: calc(100dvh - var(--guide-offset) - 24px); overflow-y: auto; scrollbar-width: thin; padding: 3px 9px 6px 3px; }
.guide-search label { display: block; margin-bottom: 8px; font-size: .76rem; font-weight: 700; }
.guide-search input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); padding: 11px 12px; font: inherit; font-size: .77rem; }
.guide-search input::placeholder { color: var(--muted); opacity: 1; }
.guide-search-status { color: var(--muted); font-size: .72rem; line-height: 1.55; margin: 10px 0; }
.guide-search-status:empty { display: none; }
.guide-search { margin-bottom: 24px; }
.guide-results { list-style: none; margin: 12px 0 0; padding: 0; border-bottom: 1px solid var(--rule); }
.guide-results li { border-top: 1px solid var(--rule); }
.guide-results a { display: block; padding: 11px 0; font-size: .79rem; line-height: 1.5; text-decoration: none; }
.guide-results small { display: block; margin-bottom: 3px; color: var(--muted); font-size: .65rem; }
.guide-results span { display: block; }
.guide-index > summary { display: flex; align-items: center; justify-content: space-between; min-height: 28px; padding: 0 0 12px; font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; list-style: none; }
.guide-index > summary::-webkit-details-marker { display: none; }
.guide-index > summary span { color: var(--fb-blue-ink); }
.guide-index:not([open]) > summary span { transform: rotate(-90deg); }
.guide-part-title { margin: 18px 0 8px; color: var(--muted); font-size: .69rem; font-weight: 750; letter-spacing: .02em; }
.guide-index-part:first-child .guide-part-title { margin-top: 3px; }
.guide-chapter-list { list-style: none; margin: 0; padding: 0; }
.guide-index-item { padding: 7px 0; border-top: 1px solid var(--rule); }
.guide-chapter-link { display: flex; align-items: baseline; gap: 9px; min-height: 24px; color: var(--ink-soft) !important; font-size: .78rem; font-weight: 550; line-height: 1.55; text-decoration: none; }
.guide-chapter-link span { min-width: 19px; color: var(--muted); font-size: .67rem; font-variant-numeric: tabular-nums; }
.guide-chapter-link:hover, .guide-chapter-link[aria-current="location"] { color: var(--fb-blue-ink) !important; }
.guide-chapter-link[aria-current="location"] { font-weight: 750; }
.guide-index-item details { margin: 1px 0 0 28px; }
/* Gli argomenti compaiono solo sotto il capitolo aperto (guida.js). */
.guide-index-item details > summary { display: none; }
.guide-index-item summary { width: fit-content; padding: 3px 0; color: var(--muted); font-size: .67rem; cursor: pointer; }
.guide-paragraph-list { list-style: none; margin: 6px 0; padding: 0; }
.guide-paragraph-list a { display: block; padding: 5px 0; font-size: .72rem; line-height: 1.5; text-decoration: none; }
.guide-reference-link { display: block; margin-top: 16px; font-size: .75rem; font-weight: 650; line-height: 1.6; text-decoration: none; }
.guide-full-link { margin-top: 9px; color: var(--muted) !important; font-weight: 500; }
.guide-sidebar-back { display: block; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: .75rem; font-weight: 650; text-decoration: none; }
.guide-content { min-width: 0; max-width: 720px; padding-bottom: 40px; }
.guide-content p, .guide-content li, .guide-content dd { font-size: .97rem; line-height: 1.75; }
.guide-content p { margin: 0 0 14px; color: var(--ink-soft); }
.guide-content strong { color: var(--ink); font-weight: 700; }
.guide-home > h2, .guide-reference > h2 { margin: 0 0 12px; color: var(--fb-navy); font-size: 1.75rem; letter-spacing: -.035em; line-height: 1.25; }
.guide-home > p { color: var(--muted); font-size: .92rem; }
.guide-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0 32px; }
.guide-routes a { position: relative; display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 20px 20px 19px; border: 1px solid var(--rule); border-radius: 10px; background: white; color: var(--ink-soft); text-decoration: none; }
.guide-routes a:first-child { border-color: #c7d9ff; background: #f6f8ff; }
.guide-routes a:hover { border-color: var(--fb-blue); }
.guide-routes .guide-route-tag { color: var(--fb-blue-ink); font-size: .63rem; font-weight: 750; letter-spacing: .07em; padding-right: 15px; }
.guide-routes strong { max-width: 240px; font-size: 1.02rem; letter-spacing: -.02em; line-height: 1.4; }
.guide-routes a > span:not(.guide-route-tag, .guide-route-arrow) { color: var(--muted); font-size: .79rem; line-height: 1.55; }
.guide-routes .guide-route-arrow { position: absolute; top: 17px; right: 18px; color: var(--fb-blue-ink); font-size: 1.1rem; }
.guide-first-game { margin: 28px 0; }
.guide-first-game h3 { margin: 0 0 18px; color: var(--fb-navy); font-size: 1.05rem; letter-spacing: -.02em; }
.guide-first-game ol { list-style: none; counter-reset: guide-step; padding: 0; margin: 0; }
.guide-first-game li { position: relative; padding: 0 0 19px 43px; counter-increment: guide-step; }
.guide-first-game li::before { content: counter(guide-step); position: absolute; top: 1px; left: 0; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #dbe6ff; border-radius: 50%; background: #f6f8ff; color: var(--fb-blue-ink); font-size: .75rem; font-weight: 700; }
.guide-first-game li a { font-size: .89rem; font-weight: 700; text-decoration: none; }
.guide-first-game li a:hover { text-decoration: underline; }
.guide-first-game li > span { display: block; color: var(--muted); font-size: .83rem; line-height: 1.65; }
.guide-note { padding: 19px 21px; border: 1px solid #dbe6ff; border-left: 3px solid var(--fb-blue); border-radius: 0 8px 8px 0; background: #f6f8ff; margin: 22px 0; }
.guide-note > strong { display: block; margin-bottom: 6px; font-size: .86rem; }
.guide-note p { margin: 0; font-size: .87rem; }
.guide-home-reference { font-size: .84rem !important; }
.guide-reader-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 26px; padding: 0 0 14px; border-bottom: 1px solid var(--rule); }
.guide-reader-top > a { flex: none; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-decoration: none; }
.guide-reader-top > span { color: var(--muted); font-size: .72rem; text-align: right; line-height: 1.5; }
.guide-chapter, .guide-reference { padding-bottom: 24px; margin-bottom: 32px; }
.guide-chapter-number { margin-bottom: 9px !important; color: var(--fb-blue-ink) !important; font-size: .66rem !important; font-weight: 750; letter-spacing: .1em; }
.guide-chapter h2 { margin: 0 0 13px; color: var(--fb-navy); font-size: clamp(1.65rem, 3vw, 2rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.25; }
.guide-chapter-intro { color: var(--muted) !important; font-size: .96rem !important; }
.guide-paragraph { margin-top: 27px; }
.guide-paragraph h3 { margin: 0 0 11px; color: var(--ink); font-size: 1.05rem; letter-spacing: -.015em; line-height: 1.45; font-weight: 700; }
.guide-content ol:not(.guide-first-game ol), .guide-content ul { margin: 0 0 16px; padding-left: 24px; color: var(--ink-soft); }
.guide-content li + li { margin-top: 7px; }
.guide-local-toc { margin: 22px 0 28px; padding: 15px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.guide-local-toc p { margin: 0 0 8px; color: var(--muted); font-size: .7rem; font-weight: 650; }
.guide-local-toc ul { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0; padding: 0; }
.guide-local-toc li, .guide-local-toc li + li { margin: 0; line-height: 1.5; }
.guide-local-toc a { display: inline-block; padding: 4px 0; font-size: .76rem; text-decoration: none; }
.guide-local-toc a:hover { text-decoration: underline; }
.guide-practice { margin: 22px 0; padding: 18px 20px; background: #f6f8ff; border: 1px solid #dbe6ff; border-radius: 9px; }
.guide-practice > p { margin: 0 0 13px; color: var(--fb-blue-ink); font-size: .73rem; font-weight: 750; }
.guide-content .guide-practice ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; counter-reset: practice-step; padding: 0; margin: 0; }
.guide-practice li { counter-increment: practice-step; line-height: 1.5; }
.guide-practice li::before { content: counter(practice-step) ". "; color: var(--fb-blue-ink); font-size: .79rem; font-weight: 700; }
.guide-practice li + li { margin: 0; }
.guide-practice strong { font-size: .86rem; }
.guide-practice li > span { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.guide-extra { border: 1px solid var(--rule); border-radius: 8px; background: white; }
.guide-extra > summary { display: flex; flex-direction: column; padding: 15px 18px; cursor: pointer; list-style: none; }
.guide-extra > summary::-webkit-details-marker { display: none; }
.guide-extra > summary h3 { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; margin: 0; font-size: .94rem; font-weight: 650; }
.guide-extra-label { display: block; grid-column: 1 / -1; margin-top: 5px; color: var(--muted); font-size: .69rem; font-weight: 400; line-height: 1.5; }
.guide-extra-mark { flex: none; margin-left: auto; color: var(--fb-blue-ink); font-size: 1rem; font-weight: 500; }
.guide-extra[open] > summary { border-bottom: 1px solid var(--rule); background: var(--surface); border-radius: 8px 8px 0 0; }
.guide-extra[open] > summary .guide-extra-mark { transform: rotate(45deg); }
.guide-extra-content { padding: 18px; }
.guide-extra-content > :last-child { margin-bottom: 0; }
.guide-extra-inline { margin: 18px 0; }
.guide-extra-inline > summary { flex-direction: row; align-items: center; gap: 12px; color: var(--fb-blue-ink); font-size: .82rem; font-weight: 650; }
.guide-definitions { margin: 0 0 20px; }
.guide-definitions dt { margin: 15px 0 3px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.guide-definitions dd { margin: 0; color: var(--ink-soft); }
.guide-wallets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.guide-wallets > div { padding: 16px 17px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.guide-wallets strong { display: block; margin-bottom: 6px; font-size: .95rem; }
.guide-wallets p { margin: 0; font-size: .87rem; }
.guide-score-example { display: grid; grid-template-columns: 1fr auto 1.7fr auto 1fr; gap: 10px; align-items: center; padding: 22px 15px; margin: 21px 0 12px; background: #f6f8ff; border: 1px solid #dbe6ff; border-radius: 9px; text-align: center; }
.guide-score-example > div > span { display: block; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.guide-score-example strong { display: block; margin-top: 7px; color: var(--fb-navy); font-size: 1.7rem; }
.guide-score-example > div:last-child strong { color: var(--fb-blue-ink); }
.guide-score-symbol { color: var(--muted); font-size: 1.25rem; }
.guide-caption { color: var(--muted) !important; font-size: .77rem !important; }
.guide-goal-bands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.guide-goal-bands > div { padding: 14px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); text-align: center; }
.guide-goal-bands strong { display: block; color: var(--fb-blue-ink); font-size: .95rem; }
.guide-goal-bands span { display: block; margin-top: 5px; color: var(--muted); font-size: .71rem; line-height: 1.6; }
.guide-goal-bands.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-goal-bands.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Moduli e altri valori brevi in fila. */
.guide-content .guide-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 18px; padding: 0; }
.guide-content .guide-chips li { margin: 0; padding: 5px 11px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .8rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.guide-default { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e8efff; color: var(--fb-blue-ink); font-size: .62rem; font-weight: 750; letter-spacing: .04em; vertical-align: 1px; white-space: nowrap; }
.guide-table-wrap .guide-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.guide-table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--rule); border-radius: 8px; }
.guide-table-wrap table { width: 100%; border-collapse: collapse; font-size: .82rem; line-height: 1.65; }
.guide-table-wrap caption { padding: 12px 16px; text-align: left; color: var(--muted); font-size: .72rem; background: var(--surface); }
.guide-table-wrap th, .guide-table-wrap td { padding: 10px 14px; border-top: 1px solid var(--rule); text-align: left; vertical-align: top; }
.guide-table-wrap thead th { color: var(--ink); background: var(--surface); font-size: .73rem; }
.guide-table-wrap tbody th { font-weight: 600; }
.guide-table-wrap td { color: var(--ink-soft); }
.guide-reader-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border-top: 1px solid var(--rule); padding-top: 24px; }
.guide-reader-bottom a { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 8px; text-decoration: none; }
.guide-reader-bottom a:hover { border-color: var(--fb-blue); }
.guide-reader-bottom a > span:first-child { color: var(--muted); font-size: .7rem; }
.guide-reader-bottom strong { font-size: .88rem; line-height: 1.5; }
.guide-reader-bottom #guide-reader-next { background: #f6f8ff; border-color: #dbe6ff; }
.guide-reader-bottom .guide-next-arrow { position: absolute; top: 15px; right: 16px; }
/* Catture dell'app: a destra del testo su schermi larghi, centrate su mobile. */
.guide-shot { margin: 6px 0 24px; text-align: center; }
.guide-shot img { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; border: 1px solid var(--rule); border-radius: 24px; background: #0a0e2e; box-shadow: 0 12px 30px rgba(10, 14, 46, .14); }
.guide-shot figcaption { margin-top: 10px; color: var(--muted); font-size: .74rem; line-height: 1.5; }
.guide-chapter::after { content: ""; display: block; clear: both; }
@media (min-width: 901px) {
  .guide-shot { float: right; width: 220px; margin: 4px 0 22px 32px; }
}
.guide-app-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 18px; margin-top: 28px; padding: 18px 20px; border: 1px solid #dbe6ff; border-radius: 10px; background: #f6f8ff; }
.guide-app-cta strong { display: block; color: var(--fb-navy); font-size: .95rem; }
.guide-app-cta p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.guide-app-stores { display: flex; flex-wrap: wrap; gap: 10px; }
.guide-page .guide-app-stores a { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 8px; background: var(--fb-navy); color: #fff; font-size: .8rem; font-weight: 700; text-decoration: none; }
.guide-page .guide-app-stores a:hover { background: var(--fb-blue-ink); }
.guide-page .app-footer-links { flex-wrap: wrap; gap: 12px 24px; }
.guide-page .app-footer-copy { opacity: 1; }
.guide-page[data-guide-mode="chapter"] .guide-chapter-number { display: none; }
.guide-page[data-guide-mode="all"] .guide-chapter { padding-bottom: 32px; border-bottom: 1px solid var(--rule); }
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 215px minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 700px) {
  .guide-layout { display: block; padding-top: 20px; }
  .guide-intro { padding-top: 26px; padding-bottom: 22px; }
  .guide-lead { font-size: .93rem; }
  .guide-sidebar { position: static; max-height: none; overflow: visible; padding: 0; margin-bottom: 26px; }
  .guide-search { margin-bottom: 15px; }
  .guide-search input { font-size: 1rem; }
  .guide-index { border: 1px solid var(--rule); border-radius: 8px; padding: 12px 15px; background: var(--surface); }
  .guide-index > summary { padding-bottom: 0; min-height: 28px; }
  .guide-index[open] > summary { padding-bottom: 15px; }
  .guide-chapter-link { font-size: .85rem; padding: 6px 0; }
  .guide-index-item summary { font-size: .74rem; padding: 6px 0; }
  .guide-paragraph-list a { font-size: .8rem; padding: 7px 0; }
  .guide-part-title { font-size: .77rem; }
  .guide-sidebar-back { display: none; }
  .guide-content p, .guide-content li, .guide-content dd { font-size: .94rem; }
  .guide-home > h2 { font-size: 1.5rem; }
  .guide-routes { gap: 10px; margin-top: 20px; }
  .guide-routes a { padding: 16px 14px; gap: 8px; }
  .guide-routes strong { font-size: .93rem; }
  .guide-routes .guide-route-tag { font-size: .58rem; letter-spacing: .035em; }
  .guide-routes .guide-route-arrow { top: 11px; right: 12px; }
  .guide-routes a > span:not(.guide-route-tag, .guide-route-arrow) { font-size: .76rem; }
  .guide-first-game { margin: 24px 0; }
  .guide-first-game li > span { font-size: .82rem; }
  .guide-content .guide-first-game ol { padding: 0; }
  .guide-note { padding: 16px 18px; }
  .guide-note p { font-size: .84rem; }
  .guide-goal-bands.is-5 { gap: 6px; }
  .guide-goal-bands.is-5 > div { padding: 10px 4px; }
  .guide-reader-top { margin-bottom: 22px; }
  .guide-reader-top > span { font-size: .68rem; }
  .guide-paragraph { margin-top: 24px; }
  .guide-content .guide-practice ol { grid-template-columns: 1fr; gap: 12px; }
  .guide-practice li > span { display: inline; margin-left: 5px; font-size: .8rem; }
  .guide-extra > summary { padding: 14px 15px; }
  .guide-extra > summary h3 { font-size: .91rem; }
  .guide-extra-content { padding: 15px; }
  .guide-goal-bands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-reader-bottom { gap: 10px; }
  .guide-reader-bottom a { padding: 14px; }
  .guide-reader-bottom strong { font-size: .81rem; }
  .guide-reader-bottom .guide-next-arrow { display: none; }
}
@media (max-width: 640px) {
  :root { --guide-offset: calc(120px + env(safe-area-inset-top, 0px)); }
  .guide-page .red-tabs { justify-content: center; }
  .guide-wrap { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .guide-table-wrap th, .guide-table-wrap td { padding: 9px 10px; }
  .guide-score-example { gap: 6px; padding: 17px 9px; }
  .guide-score-example > div > span { font-size: .65rem; }
  .guide-score-example strong { font-size: 1.4rem; }
}
@media (max-width: 380px) {
  .guide-routes { grid-template-columns: 1fr; }
  .guide-routes a { padding: 16px 17px; }
  .guide-wallets { grid-template-columns: 1fr; }
}
@media print {
  html { scroll-padding-top: 0; }
  .redazione-sticky-stack, .guide-sidebar, .guide-skip, .app-footer, .guide-home,
  .guide-reader-top, .guide-reader-bottom, .guide-local-toc, .guide-app-cta { display: none !important; }
  .guide-page .guide-chapter[hidden], .guide-page .guide-reference[hidden] { display: block !important; }
  .guide-page[data-guide-mode="chapter"] .guide-chapter-number { display: block; }
  .guide-wrap { max-width: none; padding: 0; }
  .guide-intro { padding-top: 0; }
  .guide-intro h1 { font-size: 25pt; }
  .guide-layout { display: block; }
  .guide-content { max-width: none; }
  .guide-content p, .guide-content dd, .guide-content li { font-size: 10pt; line-height: 1.65; }
  .guide-chapter h2, .guide-paragraph h3, .guide-extra summary { break-after: avoid; }
  .guide-note, .guide-practice, .guide-score-example, tr { break-inside: avoid; }
  .guide-table-wrap { overflow: visible; }
  .guide-extra-mark, .guide-extra-label { display: none; }
  .guide-chapter { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
}
