/* Introduzione statica: il canvas viene creato soltanto entrando nell'app. */
html:has(body.home-active) { overflow: auto; }
body.home-active { height: auto; min-height: 100%; overflow: visible; }
.home-active > .sidebar, .home-active > .timebar, .home-active > #app-main { display: none; }
body:not(.home-active) #home { display: none; }
#home { position: static; max-width: 1240px; margin: 0 auto; padding: 0 48px; }
.home-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.home-wordmark { text-decoration: none; font-weight: 600; letter-spacing: .24em; color: var(--text); }
.home-wordmark span { display: block; font-size: 11px; letter-spacing: .16em; color: var(--muted); margin-top: 3px; }
.home-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 80px 0 70px; }
.home-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--cyan); margin: 0 0 22px; }
.home-intro h1 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.08; letter-spacing: -.045em; font-weight: 500; margin: 0 0 24px; max-width: 620px; }
.home-lead { font-size: 18px; color: var(--muted); line-height: 1.7; max-width: 520px; }
.home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
#home .btn { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 20px; }
.home-guide-link { font-size: 14px; color: var(--muted); text-underline-offset: 5px; }
.home-orbit { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.home-moon { width: 71%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(ellipse at 30% 28%, #b3bdc9 0, #677786 30%, #293849 58%, #080f1b 74%); box-shadow: inset -24px -8px 35px #02040bc9, 0 0 70px #36668a12; }
.home-orbit-line { position: absolute; width: 97%; height: 40%; border: 1px solid #4fd8ff66; border-radius: 50%; transform: rotate(-28deg); }
.home-orbit-line::after { content: ''; position: absolute; width: 8px; height: 8px; background: var(--cyan); border-radius: 50%; top: 19%; right: 7%; box-shadow: 0 0 12px #4fd8ff70; }
.home-coord { position: absolute; bottom: 5%; right: 8%; font: 10px 'IBM Plex Mono', monospace; color: #728ea9; letter-spacing: .12em; }
.home-paths { border-top: 1px solid var(--line); padding-top: 30px; }
.home-paths h2, .home-footer h2 { font-size: 15px; font-weight: 500; margin: 0 0 22px; }
.home-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.home-path { position: relative; display: block; text-decoration: none; color: var(--text); padding: 10px 22px 24px 0; border-bottom: 1px solid var(--line); }
.home-path small { font: 11px 'IBM Plex Mono', monospace; color: var(--cyan); letter-spacing: .08em; }
.home-path h3 { font-size: 21px; font-weight: 500; margin: 18px 0 10px; }
.home-path p { color: var(--muted); margin: 0; line-height: 1.7; }
.home-path-arrow { position: absolute; top: 4px; right: 0; font-size: 22px; color: var(--muted); }
.home-path:hover { border-color: var(--cyan); }
.home-guide { margin: 44px 0; scroll-margin-top: 20px; }
.home-guide details { border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; background: #07101e; }
.home-guide summary { cursor: pointer; font-size: 18px; }
.home-guide ol { padding-left: 24px; max-width: 800px; color: var(--muted); }
.home-guide li { padding: 6px 0 6px 8px; }
.home-guide li::marker { color: var(--cyan); font-family: 'IBM Plex Mono', monospace; }
.home-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; display: flex; justify-content: space-between; gap: 40px; font-size: 13px; color: var(--muted); }
.home-footer > div { max-width: 700px; }
.home-footer h2 { color: var(--text); margin-bottom: 12px; }
.home-footer p { margin: 6px 0; }
.home-footer a { color: var(--cyan); white-space: nowrap; text-underline-offset: 4px; }
#home a:focus-visible, .app-home-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 5px; }
.app-home-link { color: var(--muted); display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 20px 16px; flex-shrink: 0; font-size: 13px; }
.app-home-link > span:first-child { font-size: 20px; }
.sidebar-compact .app-home-link { justify-content: center; padding: 0 0 12px; }
.sidebar-compact .app-home-link > span:last-child { display: none; }
#loading.done .ld-orbit { animation-play-state: paused; }
@media (max-width: 760px) {
  #home { padding: 0 24px; }
  .home-header { padding: 20px 0; }
  .home-hero { grid-template-columns: 1fr; padding: 44px 0 36px; gap: 4px; }
  .home-orbit { width: 220px; justify-self: center; }
  .home-intro h1 { font-size: 42px; }
  .home-lead { font-size: 16px; }
  .home-path-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-path h3 { margin-top: 10px; }
  .home-footer { flex-direction: column; gap: 18px; }
  .home-guide details { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #loading { transition: none; }
  .ld-orbit { animation: none; }
}
