/* RACE 2.13 (14/10) Questionario del sito (templates/questionario.html) nel marchio nuovo di raceapp.it: bianco e blu
   #0000F6, scritta RACE, Inter Tight per i titoli e Inter per il testo (static/site/nuovo/caratteri.css).
   Sopra il Vetro di base.html: qui si cambiano i colori della pagina (sempre chiara, come il sito) e i pezzi del questionario.
   Il foglio cartaceo della console (console_questionario_nuovo.html) resta nel Vetro. */
html:has(.qs), html:has(.qs) body { background: #FFFFFF !important; color-scheme: light; scroll-behavior: auto; }
html .app-shell.qs, html[data-theme="dark"] .app-shell.qs {
  --ink: #1D1D1F; --muted: #6E6E73; --line: rgba(0,0,0,.09); --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F5F5F7; --surface-3: #EDEDF0;
  --accent: #0000F6; --accent-ink: #FFFFFF; --focus: #0000F6; --field: #FFFFFF; --field-line: rgba(0,0,0,.14);
  --qs-blue: #0000F6; --qs-blue-2: #0000C4; --qs-soft: #EEF0FF; --qs-tint: #F5F5F7;
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --shadow-card: none;
  display: block; min-height: 100vh; background: #FFFFFF; color: var(--ink); font-family: var(--font); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
}

/* barra in alto, come quella del sito */
.qs-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.84); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); border-bottom: 1px solid rgba(0,0,0,.06); }
.qs-navin { max-width: 900px; margin: 0 auto; height: 58px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qs-logo { display: inline-flex; align-items: center; height: 40px; }
.qs-wm { display: inline-block; width: 82px; height: 25px; background: var(--qs-blue);
  -webkit-mask: url(/static/brand/race-scritta.svg) center/contain no-repeat; mask: url(/static/brand/race-scritta.svg) center/contain no-repeat; }
.qs .qn-head-end { display: flex; align-items: center; gap: 6px; }
.qs .qn-langs { position: relative; }
.qs .qn-langs > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 500; }
.qs .qn-langs > summary::-webkit-details-marker { display: none; }
.qs .qn-langs > summary svg { width: 17px; height: 17px; }
.qs .qn-langs > summary:hover, .qs .qn-langs[open] > summary { background: var(--qs-tint); }
.qs .qn-langs-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; display: grid; min-width: 160px; padding: 6px; border-radius: 16px; background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 18px 44px -14px rgba(0,0,40,.28); }
.qs .qn-langs-menu a { padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 15px; }
.qs .qn-langs-menu a:hover { background: var(--qs-tint); }
.qs .qn-langs-menu a[aria-current] { color: var(--qs-blue); font-weight: 600; }
.app-shell.qs .qs-back { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; background: var(--qs-blue); color: #FFFFFF; font-size: 14px; font-weight: 500; text-decoration: none; transition: background .2s; }
.app-shell.qs .qs-back:hover { background: var(--qs-blue-2); color: #FFFFFF; }

/* apertura della pagina */
html .app-shell.qs .qn-wrap { max-width: 900px; margin: 0 auto; padding: 56px 22px 40px; }
.app-shell.qs .qn-intro { margin-bottom: 36px; }
.app-shell.qs .qn-intro .eyebrow { margin: 0 0 12px; color: var(--qs-blue); font: 600 17px/1.3 var(--font-display); letter-spacing: -.01em; text-transform: none; }
.app-shell.qs .qn-intro h1 { margin: 0 0 18px; font: 600 clamp(44px, 7vw, 76px)/1.03 var(--font-display); letter-spacing: -.04em; text-wrap: balance; }
.app-shell.qs .qn-lead { margin: 0 0 22px; max-width: 30ch; color: var(--ink); font: 500 clamp(21px, 2.6vw, 26px)/1.3 var(--font-display); letter-spacing: -.02em; }
.app-shell.qs .qn-meta { gap: 8px; }
.app-shell.qs .qn-meta span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--qs-tint); color: var(--ink); font-size: 14px; font-weight: 500; }
.app-shell.qs .qn-meta span:first-child { background: var(--qs-soft); color: var(--qs-blue); }
.app-shell.qs .qn-intro-note { margin: 16px 0 0; max-width: 60ch; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* sezioni: quattro trattini blu */
.app-shell.qs .qn-progress { position: sticky; top: 58px; z-index: 20; margin: 0 -22px 8px; padding: 14px 22px 4px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.app-shell.qs .qn-progress-top { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.app-shell.qs .qn-progress-top [data-qn-position] { color: var(--qs-blue); font-weight: 600; }
.app-shell.qs .qn-steps { gap: 6px; }
.app-shell.qs .qn-steps button { gap: 8px; padding: 0 0 10px; border-bottom: 4px solid #E8E8ED; border-radius: 0; color: var(--muted); font: 500 13px/1.3 var(--font); cursor: pointer; transition: color .2s, border-color .3s; }
.app-shell.qs .qn-steps button[aria-current=step] { border-color: var(--qs-blue); color: var(--ink); font-weight: 600; }
.app-shell.qs .qn-steps button.is-done { border-color: var(--qs-blue); color: var(--muted); }
.app-shell.qs .qn-section { margin: 30px 0 16px; font: 600 clamp(30px, 4vw, 40px)/1.08 var(--font-display); letter-spacing: -.035em; }

/* domande */
.app-shell.qs .qn-question { margin: 12px 0; padding: 24px; border: 1px solid var(--line); border-radius: 24px; background: #FFFFFF; box-shadow: none; }
.app-shell.qs .qn-question legend { font: 600 19px/1.4 var(--font-display); letter-spacing: -.02em; color: var(--ink); }
.app-shell.qs .qn-number { flex: 0 0 34px; height: 26px; margin-top: 0; padding: 0; display: inline-grid; place-items: center; border-radius: 999px; background: var(--qs-soft); color: var(--qs-blue); font: 600 12.5px/1 var(--font); letter-spacing: 0; }
.app-shell.qs .qn-hint { margin: 0 0 16px 46px; color: var(--muted); font-size: 14px; }
.app-shell.qs .qn-options { gap: 8px; }
.app-shell.qs .qn-options .qn-option { min-height: 52px; padding: 12px 16px; border: 1.5px solid transparent; border-radius: 16px; background: var(--qs-tint); color: var(--ink); font-size: 15.5px; font-weight: 450; transition: background .15s, border-color .15s, color .15s; }
.app-shell.qs .qn-options .qn-option:hover { background: #EDEDF2; border-color: transparent; }
.app-shell.qs .qn-options .qn-option:has(input:checked) { border-color: var(--qs-blue); background: var(--qs-soft); color: var(--qs-blue-2); font-weight: 600; }
.app-shell.qs .qn-options .qn-option:has(input:focus-visible) { outline: 2px solid var(--qs-blue); outline-offset: 3px; }
.app-shell.qs .qn-option input { accent-color: var(--qs-blue); }
.app-shell.qs .qn-scale .qn-option { justify-content: center; }
.app-shell.qs .qn-form textarea, .app-shell.qs .qn-form input:not([type=radio]):not([type=checkbox]) { border: 1.5px solid var(--field-line); border-radius: 14px; background: #FFFFFF; color: var(--ink); font: 400 16px/1.45 var(--font); padding: 12px 14px; box-shadow: none; }
.app-shell.qs .qn-form textarea:focus, .app-shell.qs .qn-form input:not([type=radio]):not([type=checkbox]):focus { outline: none; border-color: var(--qs-blue); box-shadow: 0 0 0 4px rgba(0,0,246,.12); }
.app-shell.qs .qn-form label:not(.qn-option):not(.sr-only) { color: var(--ink); font-size: 14px; font-weight: 600; }
.app-shell.qs .qn-context { padding: 20px 22px; border: 0; border-radius: 22px; background: var(--qs-soft); color: #1B1B6B; font-size: 15.5px; line-height: 1.6; }

/* prova gratis in fondo */
.app-shell.qs .qn-trial { margin-top: 18px; padding: 26px 24px; border: 0; border-radius: 26px; background: var(--qs-tint); }
.app-shell.qs .qn-trial h2 { margin: 0 0 8px; font: 600 clamp(26px, 3.4vw, 32px)/1.1 var(--font-display); letter-spacing: -.03em; }
.app-shell.qs .qn-trial .qn-option { align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: #FFFFFF; font-size: 14.5px; line-height: 1.5; }
.app-shell.qs .qn-trial a, .app-shell.qs .qn-intro a { color: var(--qs-blue); }
.app-shell.qs .qn-footer-note { color: var(--muted); font-size: 14px; }

/* pulsanti: pillole come sul sito */
.app-shell.qs .qn-actions { position: sticky; bottom: 0; z-index: 20; margin: 22px -22px 0; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(255,255,255,0), #FFFFFF 38%); }
.app-shell.qs .button { min-height: 50px; padding: 0 26px; border: 0; border-radius: 999px; font: 500 17px/1 var(--font); letter-spacing: -.01em; box-shadow: none; transition: background .2s, transform .2s cubic-bezier(.22,.8,.2,1); }
.app-shell.qs .button:active { transform: scale(.97); }
.app-shell.qs .button-primary { background: var(--qs-blue); color: #FFFFFF; }
.app-shell.qs .button-primary:hover { background: var(--qs-blue-2); }
.app-shell.qs .button-secondary { background: var(--qs-tint); color: var(--ink); }
.app-shell.qs .button-secondary:hover { background: #E8E8ED; }
.app-shell.qs .qn-error { color: #D70015; font-weight: 600; }
.app-shell.qs .notice-error { border-radius: 16px; }

/* grazie */
.app-shell.qs section.card[role=status] { padding: 30px 26px; border: 0; border-radius: 28px; background: var(--qs-soft); }
.app-shell.qs section.card[role=status] h2 { margin: 0 0 8px; color: var(--qs-blue); font: 600 32px/1.1 var(--font-display); letter-spacing: -.03em; }
.app-shell.qs section.card[role=status] a { display: inline-flex; margin-top: 10px; padding: 12px 22px; border-radius: 999px; background: var(--qs-blue); color: #FFFFFF; text-decoration: none; font-weight: 500; }

@media (max-width: 640px) {
  .qs-navin { padding: 0 16px; height: 54px; }
  .qs-wm { width: 70px; height: 21.5px; }
  html .app-shell.qs .qn-wrap { padding: 36px 16px 28px; }
  .app-shell.qs .qn-progress { top: 54px; margin: 0 -16px 8px; padding: 12px 16px 4px; }
  .app-shell.qs .qn-steps button { font-size: 11.5px; }
  .app-shell.qs .qn-question { padding: 18px 16px; border-radius: 22px; }
  .app-shell.qs .qn-question legend { font-size: 18px; }
  .app-shell.qs .qn-hint { margin-left: 46px; }
  .app-shell.qs .qn-actions { margin: 18px -16px 0; padding-left: 16px; padding-right: 16px; }
  .app-shell.qs .qn-trial { padding: 22px 16px; }
}
@media (prefers-reduced-motion: reduce) { .app-shell.qs * { transition: none !important; } }
