/* ==========================================================================
   Aula.school — sito pubblico
   Linguaggio visivo sobrio e istituzionale (ispirato a Material / Google):
   superfici bianche, un solo colore primario, i 4 colori del logo usati
   solo come accenti.
   ========================================================================== */

:root {
  --g-blue: #1a73e8;
  --g-blue-dark: #1557b0;
  --g-blue-tint: #e8f0fe;
  --g-green: #1e8e3e;
  --g-green-tint: #e6f4ea;
  --g-orange: #e37400;
  --g-orange-tint: #fef3e0;
  --g-red: #d93025;
  --g-red-tint: #fce8e6;

  --ink: #202124;
  --ink-2: #3c4043;
  --muted: #5f6368;
  --line: #dadce0;
  --line-soft: #e8eaed;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #f1f3f4;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-2: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);

  --font-display: 'Google Sans', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 64px;

  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink-2);
  --bs-link-color-rgb: 26, 115, 232;
  --bs-link-hover-color-rgb: 21, 87, 176;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body.site {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
.site h1, .site h2, .site h3, .site h4, .site h5, .site h6 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.site a { color: var(--g-blue); text-decoration: none; }
.site a:hover { color: var(--g-blue-dark); text-decoration: underline; }
.site :focus-visible { outline: 2px solid var(--g-blue); outline-offset: 2px; border-radius: 4px; }

.site-container { max-width: 1200px; padding-left: 24px; padding-right: 24px; }
@media (max-width: 575.98px) { .site-container { padding-left: 16px; padding-right: 16px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--ink); color: #fff !important; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

/* ---------- Bottoni ---------- */
.btn-g-primary, .btn-g-outline, .btn-g-text, .btn-g-tonal {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9375rem;
  border-radius: 999px;
  padding: .55rem 1.35rem;
  line-height: 1.5;
  transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-g-primary { background: var(--g-blue); color: #fff !important; border: 1px solid var(--g-blue); }
.btn-g-primary:hover { background: var(--g-blue-dark); border-color: var(--g-blue-dark); box-shadow: var(--shadow-1); text-decoration: none; }
.btn-g-outline { background: #fff; color: var(--g-blue) !important; border: 1px solid var(--line); }
.btn-g-outline:hover { background: var(--g-blue-tint); border-color: #d2e3fc; text-decoration: none; }
.btn-g-text { background: transparent; color: var(--g-blue) !important; border: 1px solid transparent; }
.btn-g-text:hover { background: var(--g-blue-tint); text-decoration: none; }
.btn-g-tonal { background: var(--g-blue-tint); color: #174ea6 !important; border: 1px solid transparent; }
.btn-g-tonal:hover { background: #d2e3fc; text-decoration: none; }
.btn-lg.btn-g-primary, .btn-lg.btn-g-outline, .btn-lg.btn-g-tonal { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-brand { background: var(--g-blue); color: #fff; border-radius: 999px; border: none; }
.btn-brand:hover { background: var(--g-blue-dark); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-nav { min-height: var(--header-h); padding: 0; }
.site-brand { display: flex; align-items: center; padding: 0; margin-right: 2rem; }
.site-brand img { display: block; }
.site-nav-links .nav-link {
  font-family: var(--font-display);
  font-size: .9375rem;
  color: var(--ink-2) !important;
  padding: .5rem .9rem !important;
  border-radius: 999px;
}
.site-nav-links .nav-link:hover { background: var(--surface-3); text-decoration: none; }
.site-nav-links .nav-link.active { color: var(--g-blue) !important; background: var(--g-blue-tint); }
.site-nav-actions { display: flex; gap: .5rem; align-items: center; }
.site-nav-toggler { border: 0; box-shadow: none !important; color: var(--ink-2); font-size: 1.25rem; padding: .5rem .65rem; border-radius: 999px; }
.site-nav-toggler:hover { background: var(--surface-3); }
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: .5rem 0 1rem; border-top: 1px solid var(--line-soft); margin-top: .25rem; }
  .site-nav-links .nav-link { padding: .65rem .9rem !important; }
  .site-nav-actions { padding-top: .75rem; }
  .site-nav-actions .btn { flex: 1; }
}

/* ---------- Sezioni ---------- */
.s-section { padding: 88px 0; }
.s-section--tight { padding: 64px 0; }
.s-section--gray { background: var(--surface-2); }
.s-section--border { border-top: 1px solid var(--line-soft); }
@media (max-width: 767.98px) { .s-section { padding: 64px 0; } .s-section--tight { padding: 48px 0; } }

.s-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 500;
  color: var(--g-blue);
  margin-bottom: .75rem;
}
.s-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.2; margin-bottom: 1rem; }
.s-lead { font-size: 1.125rem; color: var(--muted); max-width: 640px; }
.s-head { max-width: 720px; margin-bottom: 48px; }
.s-head.text-center { margin-left: auto; margin-right: auto; }
.s-head.text-center .s-lead { margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero-g { padding: 72px 0 88px; overflow: hidden; }
.hero-g h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero-g h1 .accent { color: var(--g-blue); }
.hero-g .s-lead { font-size: 1.2rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2rem; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; }
.hero-facts li { display: flex; align-items: center; gap: .5rem; }
.hero-facts i { color: var(--g-green); }

/* Mock dell'interfaccia (calendario) nell'hero */
.ui-mock {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px -12px rgba(60, 64, 67, .18), var(--shadow-1);
  overflow: hidden;
  font-family: var(--font-display);
}
.ui-mock-bar { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line-soft); }
.ui-mock-dots { display: flex; gap: 6px; }
.ui-mock-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.ui-mock-title { font-size: .95rem; color: var(--ink); font-weight: 500; }
.ui-mock-title small { color: var(--muted); font-weight: 400; margin-left: .35rem; }
.ui-mock-tabs { margin-left: auto; display: flex; gap: 4px; }
.ui-mock-tabs span { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; color: var(--muted); border: 1px solid var(--line-soft); }
.ui-mock-tabs span.on { background: var(--g-blue-tint); color: #174ea6; border-color: transparent; }
.ui-mock-body { display: grid; grid-template-columns: 170px 1fr; min-height: 320px; }
.ui-mock-side { border-right: 1px solid var(--line-soft); padding: 1rem .9rem; font-size: .78rem; white-space: nowrap; color: var(--ink-2); }
.ui-mock-new { display: block; text-align: center; background: var(--g-blue); color: #fff; border-radius: 999px; padding: .35rem; margin-bottom: 1rem; font-size: .8rem; }
.ui-mock-side .cal { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.ui-mock-side .cal i.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ui-mock-side .cal .fa-layer-group { margin-left: auto; color: var(--muted); font-size: .7rem; }
.ui-mock-grid { display: grid; grid-template-columns: 38px repeat(5, 1fr); grid-template-rows: 28px repeat(6, 44px); font-size: .72rem; position: relative; }
.ui-mock-grid .hd { text-align: center; color: var(--muted); padding-top: 6px; border-bottom: 1px solid var(--line-soft); }
.ui-mock-grid .hd.today { color: var(--g-blue); font-weight: 700; }
.ui-mock-grid .hr { color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-7px); font-size: .65rem; }
.ui-mock-grid .cell { border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.ui-ev { position: relative; z-index: 1; margin: 2px 3px; border-radius: 6px; padding: 4px 6px; font-size: .68rem; line-height: 1.25; color: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.ui-ev strong { display: block; font-weight: 500; }
.ui-ev.blue { background: var(--g-blue); }
.ui-ev.green { background: var(--g-green); }
.ui-ev.orange { background: var(--g-orange); }
.ui-ev.ghost { background: #fff; color: var(--g-red); border: 1.5px dashed var(--g-red); box-shadow: none; }
.ui-mock-toast {
  position: absolute; right: 14px; bottom: 14px; max-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: .6rem .75rem; font-size: .72rem; color: var(--ink-2); display: flex; gap: .5rem;
}
.ui-mock-toast i { color: var(--g-red); margin-top: 2px; }
@media (max-width: 575.98px) {
  .ui-mock-body { grid-template-columns: 1fr; }
  .ui-mock-side { display: none; }
  .ui-mock-tabs { display: none; }
}

/* ---------- Feature ---------- */
.feature-g { height: 100%; padding: 4px 0; }
.feature-g .ico {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 1.1rem;
}
.feature-g h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.feature-g p { color: var(--muted); margin-bottom: .75rem; font-size: .975rem; }
.feature-g .more { font-family: var(--font-display); font-weight: 500; font-size: .9375rem; }
.ico-blue { background: var(--g-blue-tint); color: var(--g-blue); }
.ico-green { background: var(--g-green-tint); color: var(--g-green); }
.ico-orange { background: var(--g-orange-tint); color: var(--g-orange); }
.ico-red { background: var(--g-red-tint); color: var(--g-red); }
.ico-gray { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Card generica ---------- */
.card-g {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  height: 100%;
}
.card-g--link { transition: box-shadow .2s ease, border-color .2s ease; color: inherit !important; display: block; }
.card-g--link:hover { box-shadow: var(--shadow-1); border-color: transparent; text-decoration: none !important; }

/* Pubblico (docenti / studenti / segreteria) */
.audience-g h3 { font-size: 1.25rem; margin: 1rem 0 .75rem; }
.audience-g ul { list-style: none; padding: 0; margin: 0; }
.audience-g li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; color: var(--ink-2); }
.audience-g li::before { content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 0; top: 1px; font-size: .85rem; color: var(--g-green); }

/* Spotlight */
.spotlight-g { border-radius: var(--radius-lg); background: var(--g-blue-tint); padding: 56px; }
.spotlight-g .s-lead { color: var(--ink-2); }
.spotlight-steps { list-style: none; counter-reset: st; padding: 0; margin: 1.5rem 0 2rem; }
.spotlight-steps li { counter-increment: st; position: relative; padding-left: 2.75rem; margin-bottom: 1rem; }
.spotlight-steps li::before {
  content: counter(st); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--g-blue);
  font-family: var(--font-display); font-weight: 700; display: grid; place-items: center; font-size: .9rem;
  border: 1px solid #d2e3fc;
}
@media (max-width: 767.98px) { .spotlight-g { padding: 32px 24px; } }

/* Fiducia */
.trust-g { display: flex; gap: 1rem; align-items: flex-start; }
.trust-g i { font-size: 1.25rem; color: var(--g-blue); margin-top: 4px; width: 24px; text-align: center; }
.trust-g h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.trust-g p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Box ricerca guide (home) */
.help-g { text-align: center; }
.help-g form { max-width: 600px; margin: 0 auto; }

/* CTA finale */
.cta-g { text-align: center; }
.cta-g .s-title { margin-bottom: .75rem; }
.cta-g .hero-actions { justify-content: center; }

/* ---------- Campo di ricerca (stile Google) ---------- */
.search-g {
  display: flex; align-items: center; gap: .75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 .5rem 0 1.25rem;
  height: 56px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.search-g:hover, .search-g:focus-within { box-shadow: 0 1px 6px rgba(32, 33, 36, .28); border-color: transparent; }
.search-g > i { color: var(--muted); }
.search-g input { border: 0; outline: 0; flex: 1; font-size: 1.05rem; background: transparent; color: var(--ink); min-width: 0; height: 100%; }
.search-g input::placeholder { color: #80868b; }
.search-g .search-clear { border: 0; background: transparent; color: var(--muted); width: 40px; height: 40px; border-radius: 50%; display: none; }
.search-g .search-clear:hover { background: var(--surface-3); }
.search-g.has-value .search-clear { display: block; }
.search-g--sm { height: 44px; padding-left: 1rem; }
.search-g--sm input { font-size: .95rem; }
.search-g button[type=submit] { flex-shrink: 0; }

.chips-g { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.25rem; }
.chip-g {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: .35rem .85rem; font-size: .875rem; color: var(--ink-2) !important; font-family: var(--font-display);
}
.chip-g:hover { background: var(--surface-2); text-decoration: none !important; }
.chip-g i { color: var(--muted); font-size: .8rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line-soft); padding: 56px 0 24px; font-size: .9rem; }
.site-footer-claim { color: var(--muted); max-width: 320px; }
.site-footer-title { font-size: .875rem; font-weight: 500; color: var(--ink); margin-bottom: 1rem; font-family: var(--font-display); }
.site-footer-list { list-style: none; padding: 0; margin: 0; }
.site-footer-list li { margin-bottom: .55rem; }
.site-footer-list a { color: var(--muted); }
.site-footer-list a:hover { color: var(--ink); }
.site-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer-bottom a { color: var(--muted); }

/* ---------- Pagine interne (legali, about, contatti) ---------- */
.page-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line-soft); margin-bottom: 40px; }
.page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); margin-bottom: .5rem; }
.page-hero p { color: var(--muted); max-width: 760px; margin-bottom: .25rem; }
.page-body { padding-bottom: 80px; }
.page-body .card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  background: #fff;
  color: var(--ink-2);
}
.page-body .card h2 { font-size: 1.3rem !important; }
.page-body .card h2 i, .page-body .card h5 i { display: none; }
.page-body aside .card { background: var(--surface-2); border-color: var(--line-soft); position: sticky; top: calc(var(--header-h) + 24px); }
.page-body .text-body-secondary, .page-body .text-muted { color: var(--muted) !important; }
.page-body .form-control { border-radius: var(--radius-sm); border-color: var(--line); padding: .65rem .85rem; }
.page-body .form-control:focus { border-color: var(--g-blue); box-shadow: 0 0 0 3px rgba(26, 115, 232, .15); }
.page-body .form-label { font-weight: 500; color: var(--ink); font-size: .925rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1080;
  max-width: 560px; margin-left: auto;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: 20px 22px;
  opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease;
}
.cookie-banner--visible { opacity: 1; transform: none; }
.cookie-banner__title { font-size: 1rem; margin-bottom: .35rem; }
.cookie-banner__description { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.cookie-banner__actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- Animazioni (rispettano prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
  .js .reveal.visible { opacity: 1; transform: none; }
}

/* ==========================================================================
   Centro guide
   ========================================================================== */
.help-hero { background: var(--surface-2); border-bottom: 1px solid var(--line-soft); padding: 56px 0 48px; text-align: center; }
.help-hero h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.5rem); margin-bottom: .5rem; }
.help-hero p { color: var(--muted); margin-bottom: 1.75rem; }
.help-hero .search-g { max-width: 640px; margin: 0 auto; }

.help-cats { padding: 56px 0 64px; }
.help-cat { display: flex; flex-direction: column; }
.help-cat-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.help-cat-head .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin: 0; }
.help-cat-head h2 { font-size: 1.15rem; margin: 0; }
.help-cat-head p { font-size: .875rem; color: var(--muted); margin: 0; line-height: 1.4; }
.help-cat ul { list-style: none; padding: 0; margin: 0; }
.help-cat li { border-top: 1px solid var(--line-soft); }
.help-cat li a { display: flex; align-items: center; gap: .5rem; padding: .7rem 0; color: var(--ink-2); font-size: .95rem; }
.help-cat li a:hover { color: var(--g-blue); text-decoration: none; }
.help-cat li a .fa-chevron-right { margin-left: auto; font-size: .7rem; color: #9aa0a6; }
.help-cat li a .badge-new { font-size: .7rem; font-family: var(--font-display); background: var(--g-blue-tint); color: #174ea6; border-radius: 999px; padding: .05rem .5rem; }

.help-featured { padding: 48px 0 0; }
.help-featured .card-g { display: flex; gap: 1.5rem; align-items: center; background: var(--g-blue-tint); border-color: transparent; }
.help-featured .card-g h2 { font-size: 1.35rem; margin-bottom: .35rem; }
.help-featured .card-g p { margin: 0; color: var(--ink-2); }
.help-featured .card-g .ico { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: var(--g-blue); display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
@media (max-width: 767.98px) { .help-featured .card-g { flex-direction: column; align-items: flex-start; } }

.help-contact { padding: 0 0 80px; }

/* Risultati ricerca */
.help-results { padding: 32px 0 64px; display: none; }
.help-results.is-active { display: block; }
.help-results-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }
.help-result { display: block; padding: 18px 0; border-bottom: 1px solid var(--line-soft); color: inherit !important; }
.help-result:hover { text-decoration: none !important; }
.help-result:hover .help-result-title { text-decoration: underline; }
.help-result-path { font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.help-result-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--g-blue); margin-bottom: .25rem; }
.help-result-snippet { font-size: .925rem; color: var(--ink-2); margin: 0; }
.help-result mark { background: #fef7e0; color: inherit; padding: 0 1px; border-radius: 2px; }
.help-empty { padding: 32px 0; color: var(--muted); }
body.is-searching .help-browse { display: none; }

/* Articolo */
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; padding: 32px 0 80px; }
@media (max-width: 1199.98px) { .doc-layout { grid-template-columns: 240px minmax(0, 1fr); } .doc-toc { display: none; } }
@media (max-width: 991.98px) { .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 16px; } }

.doc-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 4px; }
.doc-nav .search-g { margin-bottom: 1.25rem; }
.doc-nav-group { margin-bottom: 1.25rem; }
.doc-nav-group h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .4rem .75rem; font-weight: 500; }
.doc-nav-group ul { list-style: none; padding: 0; margin: 0; }
.doc-nav-group a { display: block; padding: .4rem .75rem; border-radius: 0 999px 999px 0; color: var(--ink-2); font-size: .9rem; line-height: 1.35; border-left: 3px solid transparent; }
.doc-nav-group a:hover { background: var(--surface-3); text-decoration: none; }
.doc-nav-group a.active { background: var(--g-blue-tint); color: #174ea6; border-left-color: var(--g-blue); font-weight: 500; }
.doc-nav-mobile { display: none; }
@media (max-width: 991.98px) {
  .doc-nav { display: none; position: static; max-height: none; }
  .doc-nav.is-open { display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 24px; }
  .doc-nav-mobile { display: flex; gap: .5rem; margin-bottom: 16px; }
}

.doc-breadcrumb { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.doc-breadcrumb a { color: var(--muted); }
.doc-breadcrumb a:hover { color: var(--g-blue); }
.doc-breadcrumb .sep { font-size: .65rem; color: #9aa0a6; }

.doc-article { max-width: 760px; min-width: 0; }
.doc-article > header h1 { font-size: clamp(1.9rem, 1.5rem + 1.5vw, 2.4rem); line-height: 1.2; margin-bottom: .75rem; }
.doc-article > header .doc-summary { font-size: 1.15rem; color: var(--muted); margin-bottom: 1rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .85rem; color: var(--muted); padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line-soft); }
.doc-meta i { margin-right: .3rem; }

.doc-body { font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.doc-body h2 { font-size: 1.55rem; margin: 2.75rem 0 1rem; padding-top: .25rem; }
.doc-body h3 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin-bottom: 1rem; }
.doc-body ul, .doc-body ol { padding-left: 1.4rem; margin-bottom: 1.25rem; }
.doc-body li { margin-bottom: .4rem; }
.doc-body strong { color: var(--ink); font-weight: 500; }
.doc-body code { background: var(--surface-3); color: var(--ink); padding: .1rem .35rem; border-radius: 4px; font-size: .875em; }
.doc-body .heading-anchor { opacity: 0; margin-left: .4rem; font-size: .8em; color: #9aa0a6; }
.doc-body h2:hover .heading-anchor, .doc-body h3:hover .heading-anchor { opacity: 1; }

/* Elementi UI citati nel testo (pulsanti, menu) */
.ui { display: inline-block; font-family: var(--font-display); font-size: .875em; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0 .45rem; line-height: 1.6; white-space: nowrap; }
.ui-path { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.ui-path .fa-chevron-right { font-size: .65em; color: #9aa0a6; margin: 0 .3rem; vertical-align: middle; }

/* Callout */
.callout { display: flex; gap: .9rem; padding: 16px 18px; border-radius: var(--radius); margin: 1.5rem 0; font-size: .95rem; }
.callout > i { margin-top: 4px; font-size: 1rem; flex-shrink: 0; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout strong { color: inherit; }
.callout-title { font-family: var(--font-display); font-weight: 500; display: block; margin-bottom: .2rem; }
.callout-info { background: var(--g-blue-tint); color: #174ea6; }
.callout-tip { background: var(--g-green-tint); color: #0d652d; }
.callout-warn { background: var(--g-orange-tint); color: #8a4600; }
.callout-danger { background: var(--g-red-tint); color: #a50e0e; }
.callout .ink { color: var(--ink-2); }

/* Passaggi numerati */
.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 1.5rem 0 2rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3.25rem; margin: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--g-blue); color: #fff;
  font-family: var(--font-display); font-weight: 500; font-size: .95rem;
  display: grid; place-items: center;
}
.steps > li::after { content: ""; position: absolute; left: 15.5px; top: 38px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps > li > strong:first-child { display: block; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); margin-bottom: .25rem; padding-top: 3px; }

/* Figure illustrative */
.doc-figure { margin: 1.75rem 0; }
.doc-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: .65rem; text-align: center; }
.mock-frame { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; font-family: var(--font-display); }
.mock-frame-head { background: var(--surface-2); border-bottom: 1px solid var(--line-soft); padding: .55rem .9rem; font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }

/* Mini settimana (figura sovrapposizioni) */
.mini-week { display: grid; grid-template-columns: 52px repeat(3, 1fr); grid-template-rows: 30px repeat(5, 40px); position: relative; font-size: .75rem; }
.mini-week .hd { text-align: center; color: var(--muted); border-bottom: 1px solid var(--line-soft); padding-top: 6px; font-weight: 500; }
.mini-week .hr { text-align: right; padding-right: 8px; color: var(--muted); font-size: .7rem; transform: translateY(-8px); }
.mini-week .cell { border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.mini-week .ev { position: relative; z-index: 1; margin: 2px 4px; border-radius: 6px; padding: 4px 7px; font-size: .72rem; line-height: 1.25; color: #fff; overflow: hidden; }
.mini-week .ev.ok { background: var(--g-blue); }
.mini-week .ev.ok2 { background: var(--g-green); }
.mini-week .ev.bad { background: repeating-linear-gradient(-45deg, var(--g-red-tint), var(--g-red-tint) 6px, #fff 6px, #fff 12px); color: var(--g-red); border: 1.5px dashed var(--g-red); }
.mini-week .ev.good { background: var(--g-green-tint); color: #0d652d; border: 1.5px dashed var(--g-green); }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .8rem; color: var(--muted); padding: .65rem .9rem; border-top: 1px solid var(--line-soft); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Mock finestra "Nuovo evento" */
.mock-modal { padding: 1rem 1.1rem; font-size: .85rem; }
.mock-field { margin-bottom: .75rem; }
.mock-field label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.mock-input { border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; color: var(--ink); background: #fff; display: flex; align-items: center; justify-content: space-between; }
.mock-input .fa-chevron-down { font-size: .65rem; color: var(--muted); }
.mock-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .6rem; }
.mock-alert { background: #fff3cd; color: #664d03; border-radius: 6px; padding: .45rem .65rem; font-size: .78rem; margin-bottom: .75rem; }
.mock-actions { display: flex; justify-content: flex-end; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--line-soft); margin-top: .5rem; }
.mock-btn { border-radius: 6px; padding: .3rem .8rem; font-size: .8rem; border: 1px solid var(--line); color: var(--ink-2); }
.mock-btn.primary { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.mock-error { font-family: var(--font-body); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 1rem 1.15rem; font-size: .875rem; color: var(--ink-2); max-width: 520px; margin: 0 auto; }
.mock-error .src { font-size: .75rem; color: var(--muted); margin-bottom: .4rem; }
.mock-error pre { white-space: pre-wrap; font-family: inherit; margin: 0; }

/* Tabelle */
.doc-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 1.25rem 0 1.75rem; font-size: .925rem; }
.doc-table th { background: var(--surface-2); font-family: var(--font-display); font-weight: 500; color: var(--ink); text-align: left; }
.doc-table th, .doc-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table .yes { color: var(--g-green); }
.doc-table .no { color: var(--g-red); }
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .6rem; background: #fff; }
.faq summary { cursor: pointer; padding: .9rem 1.1rem; font-family: var(--font-display); font-weight: 500; color: var(--ink); list-style: none; display: flex; align-items: center; gap: .75rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .75rem; color: var(--muted); margin-left: auto; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > div { padding: 0 1.1rem 1rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* Indice laterale destro */
.doc-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .85rem; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.doc-toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; margin-bottom: .6rem; }
.doc-toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.doc-toc a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--muted); margin-left: -1px; border-left: 2px solid transparent; line-height: 1.35; }
.doc-toc a:hover { color: var(--ink); text-decoration: none; }
.doc-toc a.active { color: var(--g-blue); border-left-color: var(--g-blue); }

/* Fine articolo */
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.doc-pager a { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; color: inherit !important; }
.doc-pager a:hover { border-color: var(--g-blue); text-decoration: none !important; }
.doc-pager small { display: block; color: var(--muted); font-size: .8rem; }
.doc-pager span { font-family: var(--font-display); color: var(--g-blue); font-weight: 500; }
.doc-pager .next { text-align: right; grid-column: 2; }
.doc-help { margin-top: 2rem; background: var(--surface-2); border-radius: var(--radius); padding: 1.25rem 1.4rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.doc-help p { margin: 0; flex: 1; min-width: 220px; color: var(--ink-2); }

@media print {
  .site-header, .site-footer, .doc-nav, .doc-toc, .doc-nav-mobile, .doc-pager, .doc-help, .cookie-banner { display: none !important; }
  .doc-layout { display: block; padding: 0; }
}

.aud-ico { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; }
.ui-mock-grid > .hd, .ui-mock-grid > .hr, .ui-mock-grid > .cell,
.mini-week > .hd, .mini-week > .hr, .mini-week > .cell { z-index: 0; }
.ui-ev strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-ev.ghost { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; background: rgba(255,255,255,.92); }

/* Su schermi stretti il gutter g-5 (3rem) supera il padding laterale di 16px */
@media (max-width: 575.98px) {
  .site-container .row.g-5 { --bs-gutter-x: 2rem; }
}
