:root {
  --navy: #0c1c3e;
  --ring: #222f52;
  --accent: #28b7fb;
  --text: #f4f7f6;
  --muted: rgba(244,247,246,0.78);
  --faint: rgba(244,247,246,0.45);
  --line: rgba(244,247,246,0.14);
  --pad: clamp(24px, 6.5vw, 96px);
  --S: max(100vmin, 62vw);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

.rings {
  position: fixed; z-index: 0; pointer-events: none;
  width: calc(var(--S) * 4.6296); height: calc(var(--S) * 4.6296);
  right: calc(var(--S) * 0.0972 - var(--S) * 2.3148);
  bottom: calc(var(--S) * -0.0944 - var(--S) * 2.3148);
}
.rings circle { fill: none; stroke: var(--ring); stroke-width: 3; }

header.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(28px, 5vh, 64px) var(--pad) 0;
}
.logo { font-weight: 700; font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -0.5px; line-height: 1; color: var(--text); text-decoration: none; }
nav.top a {
  font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none;
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, color .2s;
}
nav.top a:hover, nav.top a:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }

/* home */
main.home {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 40px var(--pad);
}
.label { font-size: clamp(13px, 1.6vw, 16px); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(40,183,251,0.55); }
  70% { box-shadow: 0 0 0 11px rgba(40,183,251,0); }
  100% { box-shadow: 0 0 0 0 rgba(40,183,251,0); }
}
h1.big { margin-top: 22px; font-weight: 700; font-size: clamp(50px, 11vw, 120px); line-height: 1.02; letter-spacing: -1.5px; }
h1.big span { color: var(--accent); }
.sub { margin-top: 26px; max-width: 30ch; font-size: clamp(18px, 2.6vw, 26px); line-height: 1.45; color: var(--muted); }
.actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 30px; border-radius: 999px;
  background: var(--accent); color: var(--navy); font-family: inherit; font-weight: 600; font-size: 17px; text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cta:hover, .cta:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(40,183,251,0.35); outline: none; }
.cta svg { width: 21px; height: 21px; }
.ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px 28px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 17px; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.ghost:hover, .ghost:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }

/* pagine domande */
main.page { position: relative; z-index: 1; flex: 1; padding: clamp(32px, 6vh, 72px) var(--pad) 40px; max-width: calc(780px + var(--pad) * 2); width: 100%; }
.crumbs { font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
h1.title { margin-top: 18px; font-weight: 700; font-size: clamp(30px, 5.4vw, 52px); line-height: 1.1; letter-spacing: -1px; }
.lead { margin-top: 16px; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.55; color: var(--muted); max-width: 52ch; }
.upd { margin-top: 12px; font-size: 13px; color: var(--faint); }

.faq { margin-top: 36px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 0; font-weight: 600; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-top: 8px;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg); transition: transform .25s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: 14px; }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.answer { padding: 0 0 26px; font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 68ch; }
.answer p + p, .answer p + .tw, .answer .tw + p { margin-top: 16px; }
.answer ul { margin-top: 4px; padding-left: 22px; }
.answer li { margin-top: 8px; }
.tw { overflow-x: auto; margin-top: 16px; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; line-height: 1.5; }
th, td { text-align: left; padding: 12px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }

.more { margin-top: 48px; }
.more h2 { font-size: 15px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
.cards { margin-top: 18px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: block; padding: 20px 22px; border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--text);
  background: rgba(12,28,62,0.6); transition: border-color .2s, transform .2s;
}
.card:hover, .card:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.card b { display: block; font-size: 17px; line-height: 1.35; }
.card span { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.note { margin-top: 36px; font-size: 13px; line-height: 1.6; color: var(--faint); max-width: 68ch; }

/* sezioni domande */
.toc { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.toc a {
  font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none;
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, color .2s;
}
.toc a:hover, .toc a:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.sec { margin-top: 64px; scroll-margin-top: 24px; }
.sec .num { display: block; font-size: 13px; font-weight: 600; letter-spacing: 3px; color: var(--accent); }
.sec h2 { margin-top: 8px; font-weight: 700; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.2; letter-spacing: -0.5px; }
.sec .faq { margin-top: 20px; }
.answer p + ul { margin-top: 12px; }

/* pagine domanda */
.lead.qa { color: var(--text); padding-left: 18px; border-left: 3px solid var(--accent); max-width: 62ch; }
.lead a, .prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 40px; font-weight: 700; font-size: clamp(21px, 3vw, 26px); line-height: 1.25; letter-spacing: -0.3px; }
.prose p, .prose li { font-size: 17px; line-height: 1.75; color: var(--muted); }
.prose p { margin-top: 14px; }
.prose ul { margin-top: 12px; padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose .tw { margin-top: 20px; }
.prose td:first-child { color: var(--text); }
.sources { margin-top: 44px; }
.sources h2, .more h2 { font-size: 15px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); }
.sources ul { margin-top: 12px; padding-left: 20px; }
.sources li { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.allq { display: inline-block; margin-top: 22px; font-weight: 600; font-size: 16px; text-decoration: none; }
.allq::after { content: " →"; }
.allq:hover { text-decoration: underline; }

/* elenco domande */
.qlist { list-style: none; margin-top: 20px; border-top: 1px solid var(--line); }
.qlist a { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.qlist b { display: block; font-weight: 600; font-size: clamp(17px, 2.2vw, 20px); line-height: 1.35; transition: color .2s; }
.qlist .d { display: block; margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.qlist a::after { content: ""; flex: none; width: 10px; height: 10px; margin-top: 9px; margin-right: 4px; border-right: 2.5px solid var(--accent); border-top: 2.5px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.qlist a:hover b, .qlist a:focus-visible b { color: var(--accent); }
.qlist a:hover::after { transform: translateX(3px) rotate(45deg); }
.qlist a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

footer.bottom { position: relative; z-index: 1; padding: 20px var(--pad) calc(26px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; } * { transition: none !important; scroll-behavior: auto !important; }
}
