/* QuizPatenteSubito - single stylesheet, no framework, no webfont request. */

:root{
  --blue:#0b5fff; --blue-d:#0842b8; --blue-l:#e8f0ff;
  --green:#0e9f6e; --green-l:#e6f7f1;
  --red:#e02424; --red-l:#fdecec;
  --amber:#d97706; --amber-l:#fef3e2;
  --ink:#0f172a; --body:#374151; --mute:#6b7280;
  --line:#e5e7eb; --bg:#ffffff; --soft:#f7f9fc;
  --radius:14px; --radius-s:9px;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 8px 24px -12px rgba(16,24,40,.18);
  --wrap:1120px;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:var(--font);font-size:17px;line-height:1.65;
  color:var(--body);background:var(--bg);-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{color:var(--ink);line-height:1.25;margin:0 0 .5em;font-weight:700;
  letter-spacing:-.015em}
h1{font-size:clamp(1.75rem,1.2rem + 2.2vw,2.6rem)}
h2{font-size:clamp(1.3rem,1.05rem + 1.1vw,1.75rem);margin-top:1.8em}
h3{font-size:1.12rem;margin-top:1.5em}
p{margin:0 0 1em}
ul,ol{padding-left:1.15em}
.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:18px}
.skip{position:absolute;left:-9999px}
.skip:focus{left:8px;top:8px;z-index:99;background:#fff;padding:10px 14px;
  border-radius:8px;box-shadow:var(--shadow)}
:focus-visible{outline:3px solid var(--blue);outline-offset:2px;border-radius:4px}

/* ---------- header ---------- */
.site-head{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.94);
  backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid var(--line)}
.head-in{display:flex;align-items:center;gap:16px;min-height:62px}
.brand{display:flex;align-items:center;gap:9px;font-size:1.06rem;color:var(--ink);
  font-weight:600;text-decoration:none;flex:0 0 auto}
.brand:hover{text-decoration:none}
.brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;
  background:linear-gradient(135deg,var(--blue),#4f8bff);color:#fff;font-weight:800;
  font-size:.82rem;letter-spacing:.02em}
.brand-txt strong{font-weight:800;color:var(--blue)}
.mainnav{margin-left:auto}
.mainnav ul{display:flex;gap:4px;list-style:none;margin:0;padding:0}
.mainnav a{display:block;padding:8px 12px;border-radius:8px;font-size:.94rem;
  font-weight:500;color:var(--body)}
.mainnav a:hover{background:var(--soft);color:var(--blue);text-decoration:none}
.mainnav a[aria-current]{background:var(--blue-l);color:var(--blue-d);font-weight:600}
.navtog,.burger{display:none}

@media (max-width:900px){
  .burger{display:block;margin-left:auto;width:42px;height:42px;border-radius:9px;
    border:1px solid var(--line);cursor:pointer;position:relative;background:#fff}
  .burger span,.burger span::before,.burger span::after{position:absolute;left:11px;
    width:20px;height:2px;background:var(--ink);border-radius:2px;content:"";
    transition:transform .2s}
  .burger span{top:20px}
  .burger span::before{top:-6px}
  .burger span::after{top:6px}
  .mainnav{position:absolute;top:100%;left:0;right:0;background:#fff;margin:0;
    border-bottom:1px solid var(--line);box-shadow:var(--shadow);display:none}
  .mainnav ul{flex-direction:column;padding:8px;gap:2px}
  .mainnav a{padding:12px 14px;font-size:1rem}
  .navtog:checked ~ .mainnav{display:block}
}

/* ---------- breadcrumbs ---------- */
.crumbs{margin:14px 0 6px;font-size:.84rem;color:var(--mute)}
.crumbs ol{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.crumbs li+li::before{content:"›";margin-right:6px;color:#c3c9d4}
.crumbs a{color:var(--mute)}
.crumbs a:hover{color:var(--blue)}
.crumbs [aria-current]{color:var(--ink);font-weight:500}

/* ---------- hero ---------- */
.hero{background:linear-gradient(170deg,#f2f7ff 0%,#fff 62%);
  border-bottom:1px solid var(--line);padding:38px 0 30px}
.hero h1{margin-bottom:.35em}
.lede{font-size:1.1rem;max-width:64ch;color:var(--body)}
.hero-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
  gap:12px;margin-top:28px;max-width:760px}
.stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  padding:14px 16px;box-shadow:var(--shadow)}
.stat b{display:block;font-size:1.5rem;color:var(--blue);line-height:1.2;
  font-variant-numeric:tabular-nums}
.stat span{font-size:.83rem;color:var(--mute)}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:13px 22px;border-radius:11px;font-weight:600;font-size:1rem;
  border:1px solid transparent;cursor:pointer;font-family:inherit;
  transition:transform .08s,background .15s,box-shadow .15s;text-decoration:none}
.btn:hover{text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn-p{background:var(--blue);color:#fff;box-shadow:0 6px 18px -8px rgba(11,95,255,.8)}
.btn-p:hover{background:var(--blue-d)}
.btn-s{background:#fff;color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}
.btn-s:hover{border-color:var(--blue);color:var(--blue)}
.btn-sm{padding:9px 15px;font-size:.9rem;border-radius:9px}

/* ---------- generic section ---------- */
.sec{padding:34px 0}
.sec-soft{background:var(--soft);border-block:1px solid var(--line)}
.prose{max-width:72ch}
.prose ul li,.prose ol li{margin-bottom:.4em}
.note{background:var(--blue-l);border-left:4px solid var(--blue);padding:13px 16px;
  border-radius:0 var(--radius-s) var(--radius-s) 0;font-size:.95rem;margin:1.2em 0}
.note-warn{background:var(--amber-l);border-left-color:var(--amber)}

/* ---------- cards grid ---------- */
.grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));
  margin:20px 0;list-style:none;padding:0}
.card{display:flex;flex-direction:column;gap:3px;background:#fff;padding:15px 17px;
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);
  transition:border-color .15s,transform .12s,box-shadow .15s;height:100%}
.card:hover{border-color:var(--blue);transform:translateY(-2px);text-decoration:none;
  box-shadow:0 12px 28px -16px rgba(11,95,255,.55)}
.c-title{font-weight:650;color:var(--ink);line-height:1.35}
.c-meta{font-size:.83rem;color:var(--mute)}
.c-note{font-size:.83rem;color:var(--blue);margin-top:5px}

/* compact link chips (sub-topic lists) */
.chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:18px 0}
.chips a{display:inline-block;padding:7px 13px;background:#fff;border:1px solid var(--line);
  border-radius:100px;font-size:.9rem;color:var(--body);box-shadow:var(--shadow)}
.chips a:hover{border-color:var(--blue);color:var(--blue);text-decoration:none}
.chips b{color:var(--mute);font-weight:500;font-size:.82rem}

/* ---------- static question list (SEO content) ---------- */
.qlist{list-style:none;padding:0;margin:18px 0;counter-reset:q}
.qrow{display:flex;gap:14px;align-items:flex-start;padding:14px 16px;background:#fff;
  border:1px solid var(--line);border-radius:var(--radius);margin-bottom:9px}
.qrow img{flex:0 0 auto;width:74px;height:74px;object-fit:contain;
  background:var(--soft);border-radius:9px;padding:5px}
.qtxt{flex:1 1 auto;min-width:0}
.qq{margin:0 0 7px;color:var(--ink);counter-increment:q}
.qq::before{content:counter(q) ". ";color:var(--mute);font-variant-numeric:tabular-nums}
.qa{margin:0}
.appshots{display:flex;gap:14px;overflow-x:auto;padding:4px 0 14px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.appshots img{flex:0 0 auto;width:180px;height:320px;border-radius:14px;border:1px solid var(--line);box-shadow:var(--shadow);scroll-snap-align:start;background:var(--soft)}
.qsay{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:7px 13px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--mute);font:inherit;font-size:.82em;line-height:1.4;cursor:pointer}
.qsay:hover{border-color:var(--blue);color:var(--blue)}
.qsay.is-on{border-color:var(--blue);background:var(--blue-l);color:var(--blue-d)}
.qz-q+.qsay{margin:0 0 14px;margin-left:0}
.qw{margin:8px 0 0;padding:8px 12px;border-left:3px solid var(--blue);background:var(--blue-l);color:var(--body);font-size:.94em;line-height:1.55;border-radius:0 var(--radius-s) var(--radius-s) 0}
.badge{display:inline-block;padding:3px 11px;border-radius:100px;font-size:.79rem;
  font-weight:700;letter-spacing:.03em;text-transform:uppercase}
.badge.vero{background:var(--green-l);color:#046c4e}
.badge.falso{background:var(--red-l);color:#b91c1c}

/* ---------- quiz engine ---------- */
.quizbox{background:var(--soft);border:1px solid var(--line);border-radius:18px;
  padding:20px;margin:26px 0}
.quizbox>h2{margin:0 0 14px;font-size:1.25rem}
.quiz-mount{min-height:220px}

.qz-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.qz-prog{flex:1 1 150px;height:8px;background:#dde3ec;border-radius:100px;overflow:hidden}
.qz-prog i{display:block;height:100%;background:var(--blue);border-radius:100px;
  transition:width .25s}
.qz-count{font-size:.88rem;color:var(--mute);font-variant-numeric:tabular-nums}
.qz-timer{font-variant-numeric:tabular-nums;font-weight:700;color:var(--ink);
  background:#fff;border:1px solid var(--line);border-radius:9px;padding:5px 11px;
  font-size:.95rem}
.qz-timer.warn{background:var(--red-l);color:var(--red);border-color:#f6bcbc}

/* standalone hero figure on a sub-topic page (not part of the quiz card) */
.qz-fig{text-align:center;margin:0 0 18px}
.qz-fig img{width:150px;height:150px;object-fit:contain;background:var(--soft);
  border-radius:12px;padding:10px;border:1px solid var(--line)}
.qz-fig figcaption{margin-top:8px}

/* --- question card -------------------------------------------------------
   Two-column grid: a fixed figure column on the left, question + answers on
   the right. The figure column is reserved for the WHOLE session (quiz.js
   sets .has-media from the pool, not from the current question), so moving
   between a question that has a sign and one that does not never changes the
   card height. The Vero/Falso buttons stay where the thumb left them.
   The question box and the feedback slot reserve their space for the same
   reason: text length and the answer message used to move the buttons too. */
.qz-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  padding:20px;box-shadow:var(--shadow);
  display:grid;grid-template-columns:minmax(0,1fr);gap:14px 22px}

.qz-media{display:none}
.qz-body{min-width:0}

.quizbox.has-media .qz-media{display:flex;align-items:flex-start;
  justify-content:center}
/* an empty slot still occupies the column - that is the whole point */
.quizbox.has-media .qz-media.is-empty{visibility:hidden}
.qz-media img{width:100%;max-width:170px;height:170px;object-fit:contain;
  background:var(--soft);border-radius:10px;padding:8px}

.qz-q{font-size:1.12rem;color:var(--ink);font-weight:600;line-height:1.45;
  margin:0 0 16px;min-height:var(--qz-qmin,4.35em)}  /* JS measures the
     tallest question in the session; the em value is the pre-JS fallback */
.qz-ans{display:flex;gap:12px;flex-wrap:wrap}
.qz-ans button{flex:1 1 130px;padding:15px;font-size:1.02rem;font-weight:700;
  border-radius:11px;border:2px solid var(--line);background:#fff;cursor:pointer;
  font-family:inherit;color:var(--ink);transition:.12s}
.qz-ans button:hover:not(:disabled){border-color:var(--blue);background:var(--blue-l)}
.qz-ans button:disabled{cursor:default;opacity:.95}
.qz-ans button.ok{border-color:var(--green);background:var(--green-l);color:#046c4e}
.qz-ans button.no{border-color:var(--red);background:var(--red-l);color:#b91c1c}

/* reserved even while empty, so revealing the message moves nothing */
.qz-fbslot{min-height:0}
.quizbox.is-practice .qz-fbslot{min-height:var(--qz-fbmin,72px)}
.qz-fb{margin:14px 0 0;padding:12px 15px;border-radius:var(--radius-s);
  font-size:.95rem}
.qz-fb.ok{background:var(--green-l);color:#046c4e}
.qz-fb.no{background:var(--red-l);color:#b91c1c}
.qz-fb.idle{background:var(--soft);color:var(--mute);border:1px dashed var(--line)}

.qz-nav{grid-column:1/-1;display:flex;justify-content:space-between;gap:10px;
  padding-top:14px;border-top:1px solid var(--line)}

/* Tablet and up: the figure sits beside the question. */
@media (min-width:560px){
  .quizbox.has-media .qz-card{grid-template-columns:170px minmax(0,1fr)}
}

/* Phones: stacked, because a 170px sign next to the text would squeeze the
   question into ~22 characters a line. The band stays reserved, so the layout
   is just as stable as the two-column version. */
@media (max-width:559.98px){
  .qz-card{padding:16px;gap:12px}
  .quizbox.has-media .qz-media{min-height:150px}
  .qz-media img{max-width:150px;height:150px}
  .qz-q{font-size:1.05rem;min-height:var(--qz-qmin,5.8em)}
  .qz-ans button{padding:14px;flex:1 1 120px}
}

/* answer sheet: a single row. Cells share the width so 30 of them fit on one
   line on a desktop; on narrow screens they stop at min-width and the strip
   scrolls sideways instead of wrapping into four rows. */
.qz-sheet{position:relative;display:flex;gap:4px;margin-bottom:16px;
  overflow-x:auto;overflow-y:hidden;padding-bottom:6px;
  scroll-behavior:smooth;-webkit-overflow-scrolling:touch}
.qz-sheet button{flex:1 1 26px;min-width:26px;max-width:40px;height:34px;
  border:1px solid var(--line);background:#fff;border-radius:8px;
  font-size:.82rem;font-weight:600;cursor:pointer;color:var(--mute);
  font-family:inherit;padding:0}
.qz-sheet button.done{background:var(--blue-l);border-color:#b9d0ff;color:var(--blue-d)}
.qz-sheet button.cur{outline:2px solid var(--blue);outline-offset:1px;color:var(--blue-d)}
.qz-sheet button.err{background:var(--red-l);border-color:#f6bcbc;color:#b91c1c}
.qz-sheet button.good{background:var(--green-l);border-color:#a7e3cd;color:#046c4e}

/* a thin, unobtrusive scrollbar so it is discoverable that the row scrolls */
.qz-sheet{scrollbar-width:thin;scrollbar-color:#c3c9d4 transparent}
.qz-sheet::-webkit-scrollbar{height:6px}
.qz-sheet::-webkit-scrollbar-track{background:transparent}
.qz-sheet::-webkit-scrollbar-thumb{background:#c3c9d4;border-radius:100px}

/* result */
.qz-res{text-align:center;padding:8px 0}
.qz-res .verdict{font-size:1.7rem;font-weight:800;margin:0 0 6px}
.qz-res.pass .verdict{color:var(--green)}
.qz-res.fail .verdict{color:var(--red)}
.qz-res .score{font-size:1rem;color:var(--mute);margin-bottom:18px}
.qz-res .qz-nav{justify-content:center}
.qz-review{text-align:left;margin-top:22px}

/* ---------- signs gallery ---------- */
.signs{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:12px;
  list-style:none;padding:0;margin:20px 0}
.signs a{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:13px 9px;
  font-size:.8rem;line-height:1.3;color:var(--body)}
.signs a:hover{border-color:var(--blue);color:var(--blue);text-decoration:none}
.signs img{width:72px;height:72px;object-fit:contain}

/* ---------- faq ---------- */
.faq details{background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  margin-bottom:9px;overflow:hidden}
.faq summary{cursor:pointer;padding:15px 17px;font-weight:600;color:var(--ink);
  list-style:none;position:relative;padding-right:44px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";position:absolute;right:17px;top:13px;font-size:1.3rem;
  color:var(--blue);font-weight:400}
.faq details[open] summary::after{content:"−"}
.faq details>div{padding:0 17px 15px;font-size:.96rem}
.faq details>div p:last-child{margin-bottom:0}

/* ---------- tables ---------- */
.tbl-wrap{overflow-x:auto;margin:18px 0}
table{border-collapse:collapse;width:100%;font-size:.94rem;min-width:440px}
th,td{border:1px solid var(--line);padding:10px 13px;text-align:left}
th{background:var(--soft);color:var(--ink);font-weight:650}

/* ---------- footer ---------- */
.site-foot{background:#0d1424;color:#a3adc2;margin-top:46px;font-size:.92rem}
.foot-in{display:grid;gap:26px;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));
  padding-block:38px}
.foot-brand{font-size:1.05rem;color:#fff;font-weight:600;margin-bottom:.5em}
.foot-brand strong{color:#7aa7ff}
.site-foot h2{font-size:.83rem;text-transform:uppercase;letter-spacing:.07em;
  color:#fff;margin:0 0 .9em}
.site-foot ul{list-style:none;padding:0;margin:0}
.site-foot li{margin-bottom:.5em}
.site-foot a{color:#a3adc2}
.site-foot a:hover{color:#fff}
.site-foot ul.foot-social{display:flex;gap:10px;margin-top:16px}
.foot-social li{margin:0}
.foot-social a{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;
  background:#18223a;color:#c5cddd;transition:background .15s,color .15s}
.foot-social a:hover,.foot-social a:focus-visible{background:#0b5fff;color:#fff}
.foot-social svg{display:block}
.foot-legal{border-top:1px solid #1e293b;padding-block:18px;font-size:.83rem;color:#6b7890}
.foot-legal p{margin:0}

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

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
