/* =========================================================
   Refcruiting — design system
   Nero come base, giallo solo per i dettagli.
   Proprietà logiche (inline-start/end) per supportare l'arabo (RTL).
   ========================================================= */

:root {
  --bg: #07080a;
  --bg-2: #0b0c0f;
  --surface: #111317;
  --surface-2: #171a1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3f5;
  --muted: #9aa1ab;
  --dim: #6b727c;
  --yellow: #ffd400;
  --yellow-ink: #0a0b0d;
  --yellow-soft: rgba(255, 212, 0, 0.1);
  --yellow-line: rgba(255, 212, 0, 0.35);
  --ok: #3ddc97;

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --h-lh: 1;

  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1180px;
  --gutter: 24px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}
html[lang="ru"] { --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif; --h-lh: 1.08; }
html[lang="ar"] {
  --font-display: "Cairo", system-ui, sans-serif;
  --font-body: "Cairo", system-ui, sans-serif;
  --font-mono: "Cairo", system-ui, sans-serif;
  --h-lh: 1.35;
}
@media (max-width: 640px) { :root { --gutter: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--yellow); color: var(--yellow-ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

/* Le lettere arabe si staccano con la spaziatura: niente letter-spacing in RTL */
[dir="rtl"] * { letter-spacing: 0 !important; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--yellow); color: var(--yellow-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 700; line-height: var(--h-lh);
  letter-spacing: -0.01em; text-transform: uppercase; margin: 0; overflow-wrap: break-word; hyphens: auto;
}
h1 { font-size: clamp(2.6rem, 7.4vw, 6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.8vw, 3.6rem); }
h3 { font-size: 1.5rem; letter-spacing: 0; }
html[lang="ru"] h1 { font-size: clamp(2rem, 6.4vw, 5.2rem); }
/* Long Russian/French words must never widen the page on phones */
html[lang="ru"] :is(h1, h2, h3), .chapter b { overflow-wrap: anywhere; }
.chapters > *, .legal > *, .article-layout > * { min-width: 0; }
html[lang="ar"] h1 { font-size: clamp(2.3rem, 6vw, 4.8rem); }
html[lang="ar"] h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
p { margin: 0; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 62ch; }
.hl { color: var(--yellow); }
.outline-text { -webkit-text-stroke: 1.5px var(--text); color: transparent; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow::before {
  content: ""; flex-shrink: 0; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow);
  box-shadow: 0 0 0 4px var(--yellow-soft);
}
html[lang="ar"] .eyebrow { font-size: .85rem; }
.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.98rem; border: 1px solid transparent; text-align: center;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
[dir="rtl"] .btn svg, [dir="rtl"] .arrow svg { transform: scaleX(-1); }
[dir="rtl"] .btn:hover svg { transform: scaleX(-1) translateX(3px); }
.btn-primary { background: var(--yellow); color: var(--yellow-ink); }
.btn-primary:hover { transform: translateY(-2px); background: #ffe14d; }
.btn-ghost { border-color: var(--line-strong); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--text); }
.btn-block { width: 100%; }

/* ---------- Background textures ---------- */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  opacity: .55;
}
.glow { position: absolute; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, rgba(255,212,0,0.12), transparent 65%); filter: blur(10px); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 10, 0.78);
  backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 16px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; direction: ltr; }
.logo-mark { width: 34px; height: 34px; }
.logo-word { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 800; font-size: 1.45rem; letter-spacing: 0.02em; line-height: 1; }
.logo-word span { color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav a { white-space: nowrap; }
.nav a:not(.btn) { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--text); }
.nav .btn { min-height: 42px; padding: 0 18px; font-size: 0.9rem; }
.switch-link {
  font-family: var(--font-mono); font-size: 0.72rem !important; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); padding: 7px 12px; border-radius: 999px;
}
.switch-link:hover { border-color: var(--yellow-line); }

/* Language switcher */
.lang { position: relative; flex-shrink: 0; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; color: var(--muted);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang[open] summary, .lang summary:hover { color: var(--text); border-color: var(--yellow-line); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 180px; z-index: 60;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: var(--shadow);
  display: grid;
}
.lang-menu a { display: flex; justify-content: space-between; gap: 16px; padding: 10px 12px; border-radius: 10px; font-size: .92rem; color: var(--muted); }
.lang-menu a:hover { background: var(--bg); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--yellow); }
.lang-menu a span { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--dim); text-transform: uppercase; }

.menu-btn {
  display: none; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--line-strong); background: transparent; align-items: center; justify-content: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; transition: transform .25s, background .25s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1140px) {
  .menu-btn { display: inline-flex; }
  .lang { margin-inline-start: auto; }
  .nav {
    position: fixed; top: 72px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px var(--gutter) 24px; max-height: calc(100vh - 72px); overflow-y: auto;
    background: rgba(7, 8, 10, 0.98); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .25s ease;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 12px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav .switch-link { border: 1px solid var(--line-strong) !important; text-align: center; margin: 12px 0 4px; padding: 12px !important; }
  .nav .btn { min-height: 50px; margin-top: 8px; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 140px) 0; }
.section-sm { padding: clamp(56px, 8vw, 90px) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 780px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-foot { display: flex; justify-content: center; margin-top: 36px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(70px, 9vw, 120px); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-copy { display: grid; gap: 26px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.hero-stats div { display: grid; gap: 2px; padding-top: 18px; }
.hero-stats strong { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; font-weight: 700; }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: 1fr; } }

.pitch-lines { position: absolute; inset-inline-end: -180px; top: 50%; transform: translateY(-50%); width: 760px; opacity: .06; pointer-events: none; }
@media (max-width: 980px) { .pitch-lines { display: none; } }

/* ---------- Scouting card ---------- */
.scout { position: relative; }
.scout-card {
  position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); overflow: hidden;
}
.scout-card::after {
  content: ""; position: absolute; left: 0; right: 0; height: 80px; top: -80px;
  background: linear-gradient(180deg, transparent, rgba(255,212,0,0.08), transparent);
  border-bottom: 1px solid var(--yellow-line); animation: scan 4.5s ease-in-out infinite;
}
@keyframes scan { 0% { top: -80px; } 60% { top: 100%; } 100% { top: 100%; } }
.scout-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,212,0,.5); } 50% { box-shadow: 0 0 0 6px rgba(255,212,0,0); } }
.scout-profile { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.avatar { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; flex-shrink: 0; background: var(--bg); border: 1px solid var(--line-strong); }
.avatar svg { width: 30px; height: 30px; color: var(--muted); }
.scout-profile h4 { font-size: 1.35rem; }
.scout-profile p { color: var(--muted); font-size: 0.85rem; }
.match { margin-inline-start: auto; text-align: end; }
.match strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; display: block; }
.match span { font-family: var(--font-mono); font-size: .65rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.skills { display: grid; gap: 14px; padding: 20px 0; }
.skill { display: grid; gap: 7px; }
.skill-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; }
.skill-row span:last-child { font-family: var(--font-mono); color: var(--muted); font-size: .8rem; }
.bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #5d6470, var(--text)); transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.bar i.y { background: linear-gradient(90deg, #a68a00, var(--yellow)); }
.scout-foot { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }
.scout-foot svg { width: 18px; height: 18px; color: var(--yellow); flex-shrink: 0; }
.scout-foot span { color: var(--muted); }
.lens { position: absolute; width: 120px; height: 120px; inset-inline-end: -26px; bottom: -34px; z-index: 2; pointer-events: none; animation: float 6s ease-in-out infinite; }
[dir="rtl"] .lens { transform: scaleX(-1); animation: none; }
@keyframes float { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(-10px, -12px) rotate(-4deg); } }
@media (max-width: 640px) { .lens { width: 86px; height: 86px; inset-inline-end: -8px; bottom: -26px; } .scout-card { padding: 18px; } }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; display: grid; gap: 14px; align-content: start; overflow: hidden;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); background: var(--surface-2); }
.card::before {
  content: ""; position: absolute; inset-inline-start: 30px; top: 0; width: 36px; height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
[dir="rtl"] .card::before { transform-origin: right; }
.card:hover::before { transform: scaleX(1); }
.card p { color: var(--muted); font-size: 0.96rem; }
.card .num { position: absolute; top: 24px; inset-inline-end: 26px; font-family: var(--font-mono); font-size: .72rem; color: var(--dim); }
.icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line-strong); margin-bottom: 6px; }
.icon svg { width: 24px; height: 24px; color: var(--yellow); }
.card-feature { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 980px) { .card-feature { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .card-feature { grid-column: span 1; } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 8px 12px; border-radius: 10px; font-size: .85rem; border: 1px solid var(--line-strong); background: var(--bg); }
.tag::before { content: "+ "; color: var(--yellow); font-family: "JetBrains Mono", monospace; }

.ladder { display: grid; gap: 10px; }
.rung { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; font-size: .95rem; }
.rung .mono { font-size: .7rem; color: var(--dim); letter-spacing: .1em; }
.rung:last-child { border-color: var(--yellow-line); }
.rung:last-child .mono { color: var(--yellow); }

/* ---------- Steps / chapters ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: 3rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line-strong);
}
.step h3 { font-size: 1.35rem; }
.step p { color: var(--muted); font-size: .94rem; }
.step.is-ext { border-style: dashed; }
.step .badge { position: absolute; top: 24px; inset-inline-end: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--muted);
}
.badge.y { border-color: var(--yellow-line); color: var(--yellow); }

.chapters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 44px; }
@media (max-width: 980px) { .chapters { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .chapters { grid-template-columns: repeat(2, 1fr); } }
.chapter { position: relative; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; min-height: 104px; align-content: space-between; }
.chapter .mono { font-size: .66rem; color: var(--dim); letter-spacing: .1em; display: flex; justify-content: space-between; align-items: center; }
.chapter b { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.chapter svg { width: 14px; height: 14px; }
.chapter.done .mono { color: var(--ok); }
.chapter.now { border-color: var(--yellow-line); background: linear-gradient(180deg, var(--yellow-soft), transparent); }
.chapter.now .mono { color: var(--yellow); }
.chapter.locked b { color: var(--dim); }
.chapter.bonus { border-style: dashed; }

/* ---------- Exam ---------- */
.exam {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-lg); border: 1px solid var(--line-strong);
  background: linear-gradient(135deg, var(--surface-2), var(--bg));
}
@media (max-width: 900px) { .exam { grid-template-columns: 1fr; } }
.exam-copy { display: grid; gap: 14px; }
.exam-copy p { color: var(--muted); }
.exam-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.exam-stat { padding: 18px 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); text-align: center; }
.exam-stat strong { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 2.4rem; line-height: 1; }
.exam-stat span { font-size: .78rem; color: var(--muted); }
.timer { position: relative; width: 56px; height: 56px; margin: 0 auto 8px; }
.timer svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer .track { stroke: rgba(255,255,255,0.08); }
.timer .prog { stroke: var(--yellow); stroke-linecap: round; stroke-dasharray: 151; animation: countdown 30s linear infinite; }
.timer b { position: absolute; inset: 0; display: grid; place-items: center; font-family: "JetBrains Mono", monospace; font-size: .85rem; }
@keyframes countdown { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 151; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .2s, background .2s; }
.faq details[open] { border-color: var(--line-strong); background: var(--surface-2); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 18px; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: linear-gradient(var(--yellow), var(--yellow)) center / 10px 2px no-repeat, linear-gradient(var(--yellow), var(--yellow)) center / 2px 10px no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 24px; color: var(--muted); display: grid; gap: 10px; }
.faq .answer a, .link { color: var(--text); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }

/* ---------- Forms ---------- */
.cta-box {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--line-strong);
  background: var(--surface); display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: clamp(24px, 5vw, 64px);
}
@media (max-width: 900px) { .cta-box { grid-template-columns: 1fr; gap: 32px; } }
.cta-box .copy { display: grid; gap: 18px; align-content: start; position: relative; }
.checklist { display: grid; gap: 12px; padding: 0; margin: 8px 0 0; list-style: none; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.checklist li::before {
  content: ""; flex-shrink: 0; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; border: 1px solid var(--yellow-line);
  background: var(--yellow-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFD400' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.form { display: grid; gap: 14px; position: relative; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; padding-inline-end: 40px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa1ab' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
}
[dir="rtl"] .field select { background-position: left 14px center; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input[readonly] { color: var(--yellow); border-style: dashed; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .82rem; color: var(--muted); }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--yellow); flex-shrink: 0; }
.consent a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.form-note { font-size: .78rem; color: var(--dim); text-align: center; }
.form-success { display: none; padding: 32px; border-radius: 18px; border: 1px solid var(--yellow-line); background: var(--yellow-soft); text-align: center; gap: 10px; }
.form-success h3 { font-size: 1.8rem; }
.form-success p { color: var(--muted); }
.form.sent > :not(.form-success) { display: none; }
.form.sent .form-success { display: grid; }
/* honeypot: off-screen, not reachable by people */
.form .hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 99, 99, .45); background: rgba(255, 99, 99, .08); color: var(--text); font-size: .9rem; }
.form-error a { color: var(--text); text-decoration: underline; }
.form button[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 36px; color: var(--muted); font-size: .88rem; }
.footer-top { display: grid; grid-template-columns: 1.1fr 2fr; gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr; } }
.footer-top p { max-width: 34ch; margin-top: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
.footer-cols h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; color: var(--dim); font-weight: 500; margin-bottom: 14px; }
.footer-cols a, .footer-cols button { display: block; padding: 4px 0; transition: color .2s; background: none; border: 0; text-align: start; font-size: .88rem; color: var(--muted); }
.footer-cols a:hover, .footer-cols button:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: .8rem; color: var(--dim); }
.footer-langs { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-langs a:hover, .footer-langs a[aria-current="true"] { color: var(--yellow); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Coccarda "Soddisfatti o rimborsati"
   ========================================================= */
.rosette { width: 150px; flex-shrink: 0; filter: drop-shadow(0 16px 30px rgba(0,0,0,.6)); }
.rosette svg { width: 100%; height: auto; overflow: visible; }
.rosette .ring { transform-origin: 100px 100px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rosette-lg { width: 210px; }
.rosette-sm { width: 112px; }
.rosette-float { position: absolute; z-index: 3; }
.dash-wrap { position: relative; }
.dash-wrap .rosette-float { top: -78px; inset-inline-end: -34px; width: 132px; }
@media (max-width: 640px) { .dash-wrap .rosette-float { top: -62px; inset-inline-end: -4px; width: 100px; } }
.dash-wrap { margin-top: 40px; }
.calc-out .rosette-float { top: 18px; inset-inline-end: 18px; width: 92px; }
@media (max-width: 520px) { .calc-out .rosette-float { width: 74px; top: 14px; inset-inline-end: 12px; } }

.refund-banner {
  display: flex; align-items: center; gap: 28px; padding: 26px 30px; border-radius: var(--radius-lg);
  border: 1px solid var(--yellow-line); background: linear-gradient(90deg, var(--yellow-soft), transparent 70%);
}
[dir="rtl"] .refund-banner { background: linear-gradient(270deg, var(--yellow-soft), transparent 70%); }
.refund-banner div { display: grid; gap: 6px; }
.refund-banner h3 { font-size: 1.6rem; }
.refund-banner p { color: var(--muted); }
@media (max-width: 640px) { .refund-banner { flex-direction: column; text-align: center; } }

/* =========================================================
   Pagina di scelta (home lingua)
   ========================================================= */
.gate { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
.gate-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 24px; position: relative; z-index: 5; }
.gate-main { flex: 1; display: grid; align-content: center; gap: 48px; padding-block: 24px 48px; position: relative; }
.gate-head { text-align: center; display: grid; gap: 18px; justify-items: center; }
.gate-head h1 { font-size: clamp(2.5rem, 7vw, 5.4rem); }
.gate-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 980px; width: 100%; margin: 0 auto; }
@media (max-width: 760px) { .gate-choices { grid-template-columns: 1fr; } }
.choice {
  position: relative; overflow: hidden; display: grid; gap: 18px; align-content: space-between; min-height: 330px;
  padding: 32px; border-radius: 26px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
@media (max-width: 520px) { .choice { padding: 24px; min-height: 0; } }
.choice:hover { transform: translateY(-6px); border-color: var(--yellow-line); background: var(--surface-2); }
.choice .tagline { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.choice h2 { font-size: clamp(2rem, 4vw, 3rem); }
.choice p { color: var(--muted); max-width: 38ch; }
.choice .go { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); font-weight: 600; }
.choice .arrow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); transition: background .3s, color .3s, border-color .3s, transform .3s; }
.choice .arrow svg { width: 20px; height: 20px; }
.choice:hover .arrow { background: var(--yellow); color: var(--yellow-ink); border-color: var(--yellow); transform: rotate(-45deg); }
[dir="rtl"] .choice:hover .arrow { transform: rotate(45deg); }
.choice .big-icon { position: absolute; inset-inline-end: -20px; top: -20px; width: 180px; height: 180px; opacity: .06; transition: opacity .3s, transform .3s; }
.choice:hover .big-icon { opacity: .12; transform: scale(1.05); }
.choice .icon { margin: 0; }
.choice .mini-badge { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--yellow); }
.choice .mini-badge svg { width: 16px; height: 16px; }
.gate-guides { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .85rem; color: var(--dim); max-width: 980px; margin: 0 auto; }
.gate-guides a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.gate-guides a:hover { color: var(--text); text-decoration-color: var(--yellow); }
.gate-foot { text-align: center; color: var(--dim); font-size: .82rem; padding-bottom: 28px; }
.gate-foot a:hover { color: var(--text); }

/* Root language picker */
.langpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 720px; width: 100%; margin: 0 auto; }
@media (max-width: 560px) { .langpick { grid-template-columns: repeat(2, 1fr); } }
.langpick a { display: grid; gap: 4px; padding: 20px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); transition: border-color .2s, transform .2s; }
.langpick a:hover { border-color: var(--yellow-line); transform: translateY(-3px); }
.langpick b { font-size: 1.1rem; }
.langpick span { font-family: "JetBrains Mono", monospace; font-size: .72rem; color: var(--dim); text-transform: uppercase; }

/* =========================================================
   Federazioni
   ========================================================= */
.dash { position: relative; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-inline-end: 70px; }
.dash-head h4 { font-size: 1.2rem; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 2px; }
.kpi strong { font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; line-height: 1; }
.kpi span { font-size: .72rem; color: var(--muted); }
.funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 12px; font-size: .8rem; color: var(--muted); }
.funnel-row b { font-family: "JetBrains Mono", monospace; font-weight: 500; color: var(--text); text-align: end; font-size: .78rem; }
.dash-list { display: grid; gap: 8px; }
.ref-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }
.ref-row .ini { width: 32px; height: 32px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); font-family: "JetBrains Mono", monospace; font-size: .72rem; }
.ref-row .meta { color: var(--muted); font-size: .76rem; }
.ref-row .badge { margin-inline-start: auto; }
@media (max-width: 480px) { .funnel-row { grid-template-columns: 96px 1fr 36px; } .dash { padding: 18px; } .ref-row .badge { display: none; } }

.problem { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 820px) { .problem { grid-template-columns: 1fr; } }
.problem > div { background: var(--surface); padding: 32px; display: grid; gap: 10px; align-content: start; }
.problem h3 { font-size: 1.4rem; }
.problem p { color: var(--muted); font-size: .95rem; }
.problem .mono { font-size: .7rem; letter-spacing: .12em; color: var(--dim); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1.05fr 0.95fr; border-radius: 28px; border: 1px solid var(--line-strong); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.calc-in { padding: clamp(22px, 4vw, 48px); display: grid; gap: 28px; align-content: start; min-width: 0; }
.calc-out { position: relative; padding: clamp(22px, 4vw, 48px); background: var(--bg); border-inline-start: 1px solid var(--line); display: grid; gap: 22px; align-content: start; min-width: 0; }
@media (max-width: 900px) { .calc-out { border-inline-start: 0; border-top: 1px solid var(--line); } }
.budget-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.budget-label label { font-size: .85rem; color: var(--muted); }
.budget-value { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: clamp(3rem, 7vw, 4.6rem); line-height: 1; }
.budget-value small { font-family: var(--font-display); font-size: 1.5rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: rgba(255,255,255,0.08); outline: none; cursor: pointer; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--text); border: 6px solid var(--yellow); box-shadow: 0 0 0 6px var(--yellow-soft); cursor: grab; }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 6px solid var(--yellow); box-shadow: 0 0 0 6px var(--yellow-soft); cursor: grab; }
.range-scale { display: flex; justify-content: space-between; font-family: "JetBrains Mono", monospace; font-size: .7rem; color: var(--dim); margin-top: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: .82rem; font-family: "JetBrains Mono", monospace; transition: border-color .2s, color .2s; }
.preset:hover, .preset.active { border-color: var(--yellow); color: var(--yellow); }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .tiers { grid-template-columns: repeat(2, 1fr); } }
.tier { padding: 12px; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: 2px; transition: border-color .25s, background .25s; }
.tier b { font-size: .85rem; display: flex; justify-content: space-between; gap: 8px; }
.tier b em { font-style: normal; font-family: "JetBrains Mono", monospace; color: var(--text); }
.tier span { font-family: "JetBrains Mono", monospace; font-size: .7rem; color: var(--muted); }
.tier.active { border-color: var(--yellow-line); background: var(--yellow-soft); }
.tier.active b, .tier.active b em { color: var(--yellow); }
.result-main { display: grid; gap: 6px; padding-inline-end: 100px; }
@media (max-width: 520px) { .result-main { padding-inline-end: 80px; } }
.result-main .mono { font-size: .72rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.result-num strong { display: block; font-family: "Barlow Condensed", sans-serif; font-weight: 800; font-size: clamp(3.4rem, 8vw, 5.6rem); line-height: .95; direction: ltr; text-align: start; }
[dir="rtl"] .result-num strong { text-align: end; }
.result-num span { font-size: .85rem; color: var(--muted); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-cell { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 4px; }
.result-cell span { font-size: .74rem; color: var(--muted); }
.result-cell b { font-size: 1.02rem; }
.result-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--yellow-line); font-size: .84rem; color: var(--muted); }
.result-note svg { width: 18px; height: 18px; color: var(--yellow); flex-shrink: 0; margin-top: 2px; }
.calc-disclaimer { font-size: .75rem; color: var(--dim); }

/* Refund timeline */
.guarantee { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .guarantee { grid-template-columns: 1fr; } }
.guarantee-copy { display: grid; gap: 18px; position: sticky; top: 110px; }
@media (max-width: 900px) { .guarantee-copy { position: static; } }
.timeline { position: relative; display: grid; gap: 14px; padding-inline-start: 38px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 13px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--line-strong), var(--yellow-line), var(--line-strong)); }
.tl { position: relative; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 8px; }
.tl::before { content: ""; position: absolute; inset-inline-start: -32px; top: 26px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.tl.key { border-color: var(--yellow-line); }
.tl.key::before { border-color: var(--yellow); background: var(--yellow); box-shadow: 0 0 0 5px var(--yellow-soft); }
.tl .mono { font-size: .7rem; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.tl.key .mono { color: var(--yellow); }
.tl h3 { font-size: 1.3rem; }
.tl p { color: var(--muted); font-size: .93rem; }
.conditions { margin-top: 18px; padding: 22px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); display: grid; gap: 10px; }
.conditions h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.conditions ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: .9rem; display: grid; gap: 6px; }
.conditions a { color: var(--text); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; font-size: .93rem; }
.compare th, .compare td { padding: 18px 20px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface); }
.compare thead th.us { color: var(--yellow); }
.compare td { color: var(--muted); background: var(--bg); }
.compare td:first-child { color: var(--text); font-weight: 500; }
.compare td.us { color: var(--text); background: var(--surface); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); }
.table-scroll .compare { min-width: 640px; }

/* =========================================================
   Guide (articoli SEO)
   ========================================================= */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .82rem; color: var(--dim); list-style: none; padding: 0; margin: 0; }
.crumbs li { display: inline-flex; gap: 8px; align-items: center; }
.crumbs li + li::before { content: "/"; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.article-hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 6vw, 64px); border-bottom: 1px solid var(--line); }
.article-hero .wrap { position: relative; display: grid; gap: 22px; }
.article-hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); max-width: 20ch; }
html[lang="ru"] .article-hero h1, html[lang="ar"] .article-hero h1 { font-size: clamp(2rem, 4.8vw, 3.6rem); max-width: 24ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.prose { display: grid; gap: 22px; font-size: 1.06rem; line-height: 1.75; color: #c9ced6; max-width: 72ch; }
.prose > .intro { font-size: 1.2rem; color: var(--text); line-height: 1.65; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--text); margin-top: 26px; scroll-margin-top: 100px; }
.prose h3 { font-size: 1.25rem; color: var(--text); margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-inline-start: 22px; display: grid; gap: 10px; }
.prose li::marker { color: var(--yellow); }
.prose strong { color: var(--text); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.prose .callout { padding: 22px 24px; border-radius: 16px; border: 1px solid var(--yellow-line); background: var(--yellow-soft); color: var(--text); font-size: 1rem; }
.prose .callout b { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
@media (max-width: 640px) { :is(.prose, .legal-body) table { display: block; overflow-x: auto; } :is(.prose, .legal-body) :is(th, td) { min-width: 110px; } }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.aside { position: sticky; top: 100px; display: grid; gap: 16px; }
@media (max-width: 980px) { .aside { position: static; } }
.toc-box, .aside-cta { padding: 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; }
.toc-box h4, .aside-cta h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; color: var(--dim); font-weight: 500; }
.toc-box ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc-box a { display: flex; gap: 10px; padding: 6px 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.toc-box a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-family: "JetBrains Mono", monospace; font-size: .7rem; color: var(--dim); padding-top: 3px; }
.toc-box a:hover { color: var(--text); }
.aside-cta { border-color: var(--yellow-line); background: linear-gradient(180deg, var(--yellow-soft), var(--surface) 60%); }
.aside-cta h3 { font-size: 1.5rem; }
.aside-cta p { color: var(--muted); font-size: .92rem; }
.article-faq { margin-top: 56px; display: grid; gap: 20px; }
.article-faq .faq { margin: 0; max-width: none; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .related { grid-template-columns: 1fr; } }
.guide-card { display: grid; gap: 12px; align-content: start; padding: 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); transition: border-color .25s, transform .25s; }
.guide-card:hover { border-color: var(--yellow-line); transform: translateY(-3px); }
.guide-card h3 { font-size: 1.35rem; }
.guide-card p { color: var(--muted); font-size: .92rem; }
.guide-card .more { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; color: var(--yellow); }
.guide-card .more svg { width: 16px; height: 16px; }
[dir="rtl"] .guide-card .more svg { transform: scaleX(-1); }

/* =========================================================
   Pagine legali
   ========================================================= */
.legal { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .legal { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; font-size: .88rem; }
@media (max-width: 900px) { .toc { position: static; } }
.toc a { color: var(--muted); padding: 6px 0; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--text); border-color: var(--yellow); }
.legal-body { display: grid; gap: 44px; max-width: 780px; }
.legal-body section { display: grid; gap: 14px; scroll-margin-top: 100px; }
.legal-body h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.legal-body h3 { font-size: 1.2rem; margin-top: 8px; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body ol, .legal-body ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--text); text-decoration: underline; text-decoration-color: var(--yellow); text-underline-offset: 3px; }
.legal-body .box { padding: 22px 24px; border-radius: 16px; border: 1px solid var(--yellow-line); background: var(--yellow-soft); }
.legal-body .box p { color: var(--text); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.legal-body th, .legal-body td { padding: 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; color: var(--muted); }
.legal-body th { color: var(--text); background: var(--surface); font-weight: 600; }
.draft-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: .85rem; }
.draft-note svg { width: 18px; height: 18px; color: var(--yellow); flex-shrink: 0; margin-top: 2px; }

/* =========================================================
   Cookie
   ========================================================= */
.cookie-bar {
  position: fixed; z-index: 90; inset-inline: 16px; bottom: 16px; max-width: 560px; margin-inline-start: auto;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
  display: none; gap: 14px;
}
.cookie-bar.show { display: grid; }
.cookie-bar p { color: var(--muted); font-size: .88rem; }
.cookie-bar p a { color: var(--text); text-decoration: underline; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { min-height: 42px; padding: 0 16px; font-size: .88rem; flex: 1; }
.cookie-panel { border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); color: var(--text); padding: 0; max-width: 520px; width: calc(100% - 32px); }
.cookie-panel::backdrop { background: rgba(0,0,0,.7); }
.cookie-panel form { padding: 26px; display: grid; gap: 16px; }
.cookie-panel h2 { font-size: 1.8rem; }
.cookie-panel p { color: var(--muted); font-size: .9rem; }
.cookie-opt { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); }
.cookie-opt b { display: block; font-size: .95rem; }
.cookie-opt small { color: var(--muted); font-size: .8rem; }
.cookie-opt input { width: 20px; height: 20px; accent-color: var(--yellow); flex-shrink: 0; margin-top: 2px; }

/* Referee form in 2 steps (without JS: a single form, both steps visible) */
.form .fstep { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 16px; }
.form .fstep + .fstep { margin-top: 16px; }
.step-label { padding: 0; font: 600 .74rem/1.4 var(--font-mono, ui-monospace, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 6px; }
.step-next, .step-back { display: none; }
.js .form.form-steps .fstep + .fstep { margin-top: 0; }
.js .form.form-steps .step-next { display: inline-flex; }
.js .form.form-steps .step-back { display: block; justify-self: center; background: none; border: 0; padding: 6px 10px; color: var(--muted); font: inherit; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.js .form.form-steps .step-back:hover { color: var(--text); }
.js .form.form-steps:not(.at-2) .fstep[data-step="2"], .js .form.form-steps.at-2 .fstep[data-step="1"] { display: none; }
.js .form.form-steps.at-2 .fstep[data-step="2"] { animation: stepin .35s ease; }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .form.form-steps.at-2 .fstep[data-step="2"] { animation: none; } }

/* ---------- Rules quiz pop-up (lead generation, page for aspiring referees) ---------- */
html.qz-lock { overflow: hidden; }
.qz-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(3, 4, 6, .78); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.qz-overlay.in { opacity: 1; }
.qz-box { position: relative; width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 30px 26px 24px; border-radius: var(--radius-lg); border: 1px solid var(--yellow-line);
  background: radial-gradient(120% 70% at 100% 0%, rgba(255, 212, 0, .14), transparent 60%), var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); transform: translateY(14px) scale(.98); transition: transform .3s ease; }
.qz-overlay.in .qz-box { transform: none; }
.qz-close { position: absolute; inset-inline-end: 12px; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.qz-close:hover { color: var(--text); border-color: var(--line-strong); }
.qz-hero { text-align: center; display: grid; justify-items: center; gap: 10px; margin-bottom: 18px; }
.qz-hero h2 { hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; font-family: var(--font-display); font-size: clamp(30px, 6vw, 40px); line-height: 1.02; text-transform: uppercase; letter-spacing: .5px; margin: 0; }
.qz-hero h2 em { font-style: normal; color: var(--yellow); }
.qz-hero p { color: var(--muted); margin: 0; max-width: 38ch; }
.qz-eyebrow { font: 700 11px/1 var(--font-mono); letter-spacing: 2px; text-transform: uppercase; color: var(--yellow); }
.qz-whistle { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--yellow-ink); box-shadow: 0 0 0 10px var(--yellow-soft), 0 0 50px rgba(255, 212, 0, .35); margin-bottom: 6px; }
.qz-whistle svg { width: 34px; height: 34px; } .qz-whistle.ok { background: var(--ok); box-shadow: 0 0 0 10px rgba(61, 220, 151, .12); }
.qz-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qz-points li { text-align: center; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; background: var(--surface-2); }
.qz-points b { display: block; font: 800 24px/1.1 var(--font-display); color: var(--text); }
.qz-later { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--dim); font-size: 14px; cursor: pointer; text-decoration: underline; }
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 40px 16px 0; }
.qz-count { font: 600 12px/1 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); } .qz-count b { color: var(--yellow); }
.qz-steps { display: flex; gap: 4px; } .qz-steps i { width: 14px; height: 6px; border-radius: 3px; background: var(--line-strong); }
.qz-steps i.done { background: var(--yellow); } .qz-steps i.now { background: var(--yellow); opacity: .5; animation: qz-pulse 1s ease-in-out infinite alternate; }
@keyframes qz-pulse { to { opacity: 1; } }
.qz-q { hyphens: none; -webkit-hyphens: none; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 18px; line-height: 1.45; font-weight: 600; margin: 0 0 16px; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { hyphens: none; -webkit-hyphens: none; display: flex; gap: 12px; align-items: flex-start; text-align: start; width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px; line-height: 1.4; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.qz-opt:hover { border-color: var(--yellow-line); background: rgba(255, 212, 0, .05); }
.qz-opt.picked { border-color: var(--yellow); background: var(--yellow-soft); transform: scale(.99); }
.qz-letter { flex: 0 0 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 13px/1 var(--font-mono); background: var(--bg); color: var(--yellow); border: 1px solid var(--line); }
.qz-opt.picked .qz-letter { background: var(--yellow); color: var(--yellow-ink); }
.locked .qz-opt:not(.picked) { opacity: .45; }
.qz-loading { display: flex; gap: 8px; justify-content: center; padding: 60px 0; }
.qz-loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); animation: qz-pulse .6s ease-in-out infinite alternate; }
.qz-loading span:nth-child(2) { animation-delay: .2s; } .qz-loading span:nth-child(3) { animation-delay: .4s; }
.qz-score { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 18px; border-radius: 16px; border: 1px dashed var(--yellow-line); background: var(--surface-2); }
.qz-score-n { font: 800 46px/1 var(--font-display); color: var(--yellow); filter: blur(1.5px); text-shadow: 0 0 18px rgba(255, 212, 0, .6); }
.qz-score-n small { font-size: 22px; color: var(--muted); }
.qz-score-txt { display: grid; gap: 3px; flex: 1; font-size: 13px; color: var(--muted); } .qz-score-txt b { color: var(--text); font-size: 15px; }
.qz-score svg { width: 24px; height: 24px; color: var(--yellow); flex-shrink: 0; }
.qz-form { display: grid; gap: 12px; }
.qz-form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.qz-form input[name=name], .qz-form input[type=email] { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.qz-form input:focus { outline: none; border-color: var(--yellow); }
.qz-form .qz-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.qz-check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--yellow); flex-shrink: 0; }
.qz-check a { color: var(--yellow); }
.qz-hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.qz-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 92, 92, .1); border: 1px solid rgba(255, 92, 92, .35); color: #ffb3b3; font-size: 14px; }
.qz-pill { position: fixed; z-index: 900; inset-inline-start: 16px; bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--yellow-line); background: var(--surface); color: var(--text); font: 600 14px/1.2 var(--font-body); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); cursor: pointer; animation: qz-in .4s ease both; }
.qz-pill b { color: var(--yellow); } .qz-pill[hidden] { display: none; }
@keyframes qz-in { from { transform: translateY(20px); opacity: 0; } }
@media (max-width: 520px) { .qz-box { padding: 26px 18px 20px; } .qz-steps i { width: 8px; } .qz-pill { inset-inline-end: 16px; justify-content: center; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .qz-overlay, .qz-box, .qz-pill { transition: none; animation: none; } }
