/* Guida Telescopi – cielo notturno e ottone. Nessun font esterno, nessuno stile inline (CSP). */
:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #eeebe2;
  --ink: #141a2b;
  --ink-2: #4a5268;
  --line: #ddd8cb;
  --night: #0f1830;
  --night-2: #1a2647;
  --on-night: #e9ecf5;
  --on-night-2: #a9b2cc;
  --brass: #c98a1c;
  --brass-ink: #7a4d00;
  --brass-soft: #f5e6c8;
  --link: #24489c;
  --ok: #1f7a4d;
  --todo-bg: #fff2a8;
  --todo-ink: #5c4500;
  --radius: 14px;
  --radius-s: 8px;
  --shadow: 0 1px 2px rgb(15 24 48 / 6%), 0 8px 24px rgb(15 24 48 / 6%);
  --wrap: 1160px;
  --prose: 720px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1122; --surface: #121a31; --surface-2: #18223d; --ink: #e6e9f2; --ink-2: #a7afc6;
    --line: #26314f; --link: #9db8ff; --brass-soft: #3a2c12; --brass-ink: #f2c46b;
    --todo-bg: #5a4a10; --todo-ink: #fff2a8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1122; --surface: #121a31; --surface-2: #18223d; --ink: #e6e9f2; --ink-2: #a7afc6;
  --line: #26314f; --link: #9db8ff; --brass-soft: #3a2c12; --brass-ink: #f2c46b;
  --todo-bg: #5a4a10; --todo-ink: #fff2a8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.small { font-size: .875rem; }
.muted { color: var(--ink-2); font-weight: 400; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 12px; }
mark.todo { background: var(--todo-bg); color: var(--todo-ink); padding: 0 .25em; border-radius: 4px; font-size: .92em; }
.staging-bar { background: var(--brass); color: #1b1300; text-align: center; font-size: .85rem; padding: 6px 16px; font-weight: 600; }

/* Pulsanti */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: 10px 18px; border-radius: 999px; font-weight: 650; font-size: .95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-buy { background: var(--brass); color: #1b1300; }
.btn-buy:hover { background: #b37813; }
.btn-primary { background: var(--night); color: var(--on-night); }
.btn-primary:hover { background: var(--night-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-quiz { background: var(--brass-soft); color: var(--brass-ink); border-color: var(--brass); }
.btn-lg { min-height: 52px; padding: 12px 24px; font-size: 1.02rem; }
.link-buy { font-weight: 650; white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--night); color: var(--on-night); border-bottom: 1px solid rgb(255 255 255 / 8%); }
.header-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--on-night); text-decoration: none; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.logo-mark { width: 30px; height: 30px; color: var(--brass); }
.nav { display: flex; gap: 2px; flex: 1; }
.menu-group { position: relative; }
.menu-group summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 999px; color: var(--on-night-2); font-weight: 600; font-size: .95rem; }
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group summary::after { content: "▾"; margin-left: 6px; font-size: .75em; }
.menu-group[open] summary, .menu-group summary:hover, .menu-group[data-current] summary { color: var(--on-night); background: rgb(255 255 255 / 8%); }
.menu-group ul { position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px; margin: 0; padding: 8px; list-style: none; background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 16px 40px rgb(0 0 0 / 25%); border: 1px solid var(--line); }
.menu-group li a { display: block; padding: 8px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; }
.menu-group li a:hover, .menu-group li a[aria-current] { background: var(--surface-2); }
.menu-hub a { font-weight: 700; color: var(--brass-ink) !important; }
.menu-toggle { display: none; margin-left: auto; background: transparent; color: var(--on-night); border: 1px solid rgb(255 255 255 / 25%); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; min-height: 44px; }
.site-header .btn-quiz { white-space: nowrap; }

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; }
  .js .menu-toggle { display: inline-flex; }
  .js .nav { display: none; }
  .js .nav.is-open { display: flex; }
  .nav { order: 5; flex-basis: 100%; flex-direction: column; gap: 0; padding: 8px 0; }
  .menu-group summary { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid rgb(255 255 255 / 8%); }
  .menu-group ul { position: static; box-shadow: none; min-width: 0; margin: 4px 0 8px; }
  .site-header .btn-quiz { display: none; }
}

/* Hero e intestazione pagina */
.hero { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: var(--on-night); padding: 28px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 18%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 62%, #ffe8b8 50%, transparent 51%), radial-gradient(1px 1px at 40% 80%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 44%, #cfd8ff 50%, transparent 51%); opacity: .55; pointer-events: none; }
.hero.has-photo { padding: 56px 0 64px; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero.has-photo::before { display: none; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero.has-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgb(8 13 30 / 88%) 0%, rgb(8 13 30 / 70%) 45%, rgb(8 13 30 / 35%) 100%), linear-gradient(0deg, rgb(8 13 30 / 70%) 0%, rgb(8 13 30 / 0%) 45%); }
.hero.has-photo .hero-inner { z-index: 2; width: 100%; }
.hero.has-photo h1, .hero.has-photo .lead { text-shadow: 0 1px 12px rgb(0 0 0 / 45%); }
.hero-credit { position: absolute; right: 12px; bottom: 6px; z-index: 2; margin: 0; font-size: .7rem; color: rgb(255 255 255 / 70%); }
.hero-credit a { color: inherit; }
@media (max-width: 640px) { .hero.has-photo { min-height: 300px; padding: 40px 0 44px; } .hero.has-photo::after { background: linear-gradient(0deg, rgb(8 13 30 / 92%) 0%, rgb(8 13 30 / 72%) 55%, rgb(8 13 30 / 45%) 100%); } }
.hero-home.has-photo { min-height: 520px; }
.hero-inner { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.hero h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.12; margin: 10px 0 14px; max-width: 22ch; letter-spacing: -.01em; }
.hero-home { padding: 48px 0 64px; }
.hero-aside { background: rgb(255 255 255 / 6%); border: 1px solid rgb(255 255 255 / 14%); border-radius: var(--radius); padding: 22px; margin-top: 24px; backdrop-filter: blur(2px); }
.hero-aside-title { margin: 0 0 12px; font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: #ffd88a; }
.hero-aside .btn { width: 100%; }
.hero-aside ul { list-style: none; margin: 14px 0 0; padding: 0; }
.hero-aside li a { display: block; padding: 10px 2px; border-bottom: 1px solid rgb(255 255 255 / 10%); color: var(--on-night); text-decoration: none; font-weight: 600; }
.hero-aside li a::after { content: " →"; color: #ffd88a; }
.hero-aside li:last-child a { border-bottom: 0; }
@media (min-width: 960px) { .hero-home .hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: center; } .hero-aside { margin-top: 0; } }
.hero-home h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); max-width: 18ch; }
.lead { font-size: 1.12rem; color: var(--on-night-2); max-width: 62ch; }
.lead p { margin: 0 0 .8em; }
.lead strong { color: var(--on-night); }
.lead a { color: #ffd88a; }
.hero .btn-ghost { color: var(--on-night); border-color: rgb(255 255 255 / 30%); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--on-night-2); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: var(--on-night-2); }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--on-night-2); margin: 16px 0 0; }
.page-meta a { color: var(--on-night); }

.disclosure { margin: -18px 0 0; position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--radius-s); padding: 10px 16px; font-size: .88rem; color: var(--ink-2); box-shadow: var(--shadow); }
.disclosure p { margin: 0; }

/* Layout lettura con indice laterale */
.layout { display: block; padding-top: 28px; padding-bottom: 32px; }
.layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1040px) {
  .layout.has-toc { grid-template-columns: 240px minmax(0, var(--prose)); justify-content: center; }
  .toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
}
.prose { max-width: var(--prose); margin: 0 auto; min-width: 0; }
.t-home .prose, .t-hub .prose, .t-quiz .prose { max-width: 900px; }
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.toc summary { font-weight: 700; cursor: pointer; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.toc ol { margin: 10px 0 0; padding-left: 20px; font-size: .92rem; }
.toc li { margin: 6px 0; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--brass-ink); text-decoration: underline; }

.prose h2 { font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 1.85rem); line-height: 1.2; margin: 2.2em 0 .6em; letter-spacing: -.005em; }
.prose h2:first-child { margin-top: .4em; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.05em; }
.prose li { margin: .3em 0; }
.prose strong { font-weight: 700; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--brass); background: var(--surface); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.prose a.ext::after { content: " ↗"; font-size: .8em; }
.prose h2 + p { font-size: 1.04rem; }

/* Tabelle: tabella su desktop, schede etichettate su mobile */
.table-wrap { margin: 1.2em 0 1.6em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th[scope="row"] { font-weight: 650; }
@media (max-width: 760px) {
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  table.cards-on-mobile, .cards-on-mobile tbody, .cards-on-mobile tr, .cards-on-mobile td, .cards-on-mobile th { display: block; width: 100%; }
  .cards-on-mobile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cards-on-mobile tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 12px; padding: 6px 0; }
  .cards-on-mobile td, .cards-on-mobile th { border: 0; padding: 6px 14px; display: grid; grid-template-columns: 42% 1fr; gap: 10px; }
  .cards-on-mobile td::before, .cards-on-mobile th::before { content: attr(data-label); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 650; }
  .cards-on-mobile tr > :first-child { font-weight: 700; font-size: 1.02rem; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 4px; }
  .cards-on-mobile tr > :first-child::before { display: none; }
}

/* Schede prodotto */
.product { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 1em 0 1.8em; box-shadow: var(--shadow); }
.product .figure { margin: 0; }
.product-name { font-weight: 750; font-size: 1.1rem; margin: 0 0 8px; }
.specs { margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: .9rem; }
.specs div { border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.specs dt { color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.specs dd { margin: 0; font-weight: 600; }
.price { margin: 8px 0 12px; }
.product-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .product { grid-template-columns: 1fr; } .specs { grid-template-columns: 1fr; } }

/* Segnaposto immagini (nessuna immagine in questa versione) */
.figure { margin: 1.4em 0; }
.img-ph { aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; padding: 16px; border-radius: var(--radius-s); border: 2px dashed var(--line); background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px); color: var(--ink-2); font-size: .8rem; }
.prose > .figure .img-ph { aspect-ratio: 16 / 9; }
.img-ph-label { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.img-ph code { background: var(--surface); padding: 2px 6px; border-radius: 4px; color: var(--ink); word-break: break-all; }
.img-ph-alt { font-style: italic; max-width: 40ch; }
figcaption { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }

/* Griglie di card (hub, correlati) */
.card-grid { list-style: none; margin: 1em 0 1.6em; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.card a:hover { border-color: var(--brass); transform: translateY(-2px); }
.card-kicker { font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--brass-ink); }
.card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.card-text { font-size: .88rem; color: var(--ink-2); }
.related { border-top: 1px solid var(--line); padding: 24px 0 8px; max-width: 900px; margin: 0 auto; }
.related-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin: 0; }

/* FAQ */
.faq { margin-top: 2.4em; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); margin: 0 0 10px; }
.faq-item summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 650; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--brass-ink); }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { padding: 0 16px 6px; color: var(--ink-2); }

/* CTA finale */
.cta { margin: 2.6em 0 1em; padding: 26px 24px; border-radius: var(--radius); background: var(--night); color: var(--on-night); position: relative; overflow: hidden; }
.cta h2 { margin-top: 0 !important; color: #fff; }
.cta .cta-text { color: var(--on-night-2); }
.cta a:not(.btn) { color: #ffd88a; }
.cta .btn-ghost { color: var(--on-night); border-color: rgb(255 255 255 / 30%); }
.cta .muted { color: var(--on-night-2); }

/* Quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.quiz fieldset { border: 0; margin: 0 0 18px; padding: 0; }
.quiz legend { font-weight: 750; font-size: 1.05rem; margin-bottom: 8px; }
.quiz label { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 6px 0; border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.quiz label:has(input:checked) { border-color: var(--brass); background: var(--brass-soft); }
.quiz input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brass); }
.quiz-result { margin-top: 18px; padding: 18px; border-radius: var(--radius-s); background: var(--surface-2); }
.quiz-result h3 { margin-top: 0; }

/* Modulo contatti */
.contact-form { display: grid; gap: 14px; max-width: 560px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; }
.field input, .field textarea { font: inherit; padding: 10px 12px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-weight: 600; }

/* Footer */
.site-footer { background: var(--night); color: var(--on-night-2); margin-top: 48px; padding: 40px 0 96px; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; display: grid; gap: 28px; }
.footer-logo { font-family: var(--serif); font-size: 1.3rem; color: var(--on-night); font-weight: 700; margin: 0 0 6px; }
.footer-brand p { margin: 0 0 8px; max-width: 70ch; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.footer-title { color: var(--on-night); font-weight: 700; margin: 0 0 8px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.footer-cols li { margin: 5px 0; }
.site-footer a { color: var(--on-night-2); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; border-top: 1px solid rgb(255 255 255 / 10%); padding-top: 18px; }
@media (min-width: 900px) { .site-footer { padding-bottom: 40px; } }

.mobile-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / 8%); font-weight: 650; font-size: .92rem; }
.t-quiz .mobile-cta { display: none; }
@media (min-width: 900px) { .mobile-cta { display: none; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .mobile-cta, .site-footer, .toc, .staging-bar { display: none; } .hero { background: none; color: #000; } .hero-bg, .hero-credit { display: none; } .hero.has-photo::after { display: none; } }
