/* ============================================================
   Scheda di analisi AI — stile del nuovo sito (ott 2026)
   Base: foglio di stile originale della scheda (pensato per il telefono: testo grande,
   opzioni a tutta larghezza), limitato al contenitore .scheda e riallineato ai colori del design.
   ============================================================ */
.scheda {
  --bg: #0B0D12;
  --surface: #141722;
  --surface-2: #1B1F2E;
  --line: #2A3045;
  --ink: #F5F6FA;
  --ink-2: #C4C9D8;
  --muted: #9AA1B5;
  --accent: #533AFD;
  --accent-hover: #6852FF;
  --accent-soft: rgba(83,58,253,.16);
  --cyan: #4CC9F0;
  --good: #3DD68C;
  --warn: #F2A382;
  --warn-soft: rgba(204,120,92,.14);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
.scheda *, .scheda *::before, .scheda *::after { box-sizing: border-box; }
.scheda { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.scheda { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.scheda h1, .scheda h2, .scheda h3, .scheda p, .scheda ul, .scheda ol, .scheda dl, .scheda dd { margin: 0; padding: 0; }
.scheda h1, .scheda h2, .scheda h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.2; text-wrap: balance; }
.scheda button, .scheda input, .scheda select, .scheda textarea { font: inherit; color: inherit; }
.scheda :focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 10px; }
.scheda /* testata */
.top { position: sticky; top: 0; z-index: 10; background: rgba(11,13,18,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.scheda .top-in { max-width: 680px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.scheda .logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; }
.scheda .logo img { width: 36px; height: 36px; object-fit: contain; }
.scheda .logo em { font-style: normal; color: var(--cyan); }
.scheda .stepnote { font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.scheda .prog { height: 4px; background: var(--line); }
.scheda .prog i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .3s ease; }
.scheda .page { max-width: 680px; margin: 0 auto; padding: 32px 20px 40px; }
.scheda .step { font-size: 15px; font-weight: 600; color: var(--cyan); margin-bottom: 10px; }
.scheda h1 { font-size: clamp(28px, 7vw, 40px); }
.scheda h2 { font-size: clamp(22px, 5vw, 28px); }
.scheda h3 { font-size: 20px; }
.scheda .lead { color: var(--ink-2); margin-top: 14px; }
.scheda .stack { display: flex; flex-direction: column; gap: 32px; margin-top: 28px; }
.scheda /* campi */
.field, .scheda .group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.scheda .field > label, .scheda .q { font-size: 18px; font-weight: 600; line-height: 1.35; }
.scheda .hint { color: var(--muted); font-size: 16px; font-weight: 400; }
.scheda .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.scheda input[type="text"], .scheda input[type="email"], .scheda select, .scheda textarea { width: 100%; min-height: 56px; padding: 14px 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.scheda select { appearance: none; -webkit-appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%239AA1B5' stroke-width='2'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.scheda option { background: var(--surface); color: var(--ink); }
.scheda textarea { min-height: 120px; resize: vertical; }
.scheda input:focus, .scheda select:focus, .scheda textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.scheda ::placeholder { color: var(--muted); opacity: .85; }
.scheda /* opzioni: una sotto l'altra, .scheda grandi */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scheda .tiles.one-col { grid-template-columns: 1fr; }
.scheda .tile { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px; min-height: 60px; min-width: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.scheda .tile:hover { border-color: #3A4262; }
.scheda .tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scheda .tile:focus-within { outline: 3px solid var(--cyan); outline-offset: 3px; }
.scheda .tile.on { border-color: var(--accent); background: var(--accent-soft); }
.scheda .tile .box { flex: none; width: 26px; height: 26px; margin-top: 1px; border: 2px solid var(--muted); border-radius: 7px; display: grid; place-items: center; }
.scheda .tile input[type="radio"] ~ .box { border-radius: 50%; }
.scheda .tile.on .box { background: var(--accent); border-color: var(--accent); }
.scheda .tile.on .box::after { content: ""; width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.scheda .tile .tt { font-weight: 600; line-height: 1.35; }
.scheda .tile .td { display: block; margin-top: 4px; font-size: 16px; font-weight: 400; color: var(--muted); }
.scheda .group > h3, .scheda .sub { font-size: 16px; font-weight: 600; color: var(--muted); }
.scheda /* passo "Tempo" */
.area { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.scheda .area h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 20px; }
.scheda .area.done h3::after { content: "Risposto"; flex: none; font-size: 14px; font-weight: 600; color: var(--good); }
.scheda .area.missing { background: var(--warn-soft); border: 2px solid var(--warn); border-radius: 16px; padding: 18px; }
.scheda .area.missing .req { color: var(--warn); }
.scheda .req { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.scheda .area.done .req { display: none; }
.scheda .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scheda .seg .tile { padding: 12px 14px; min-height: 56px; align-items: center; }
.scheda .seg .tile .box { display: none; }
.scheda .seg .tile .tt { font-size: 17px; }
.scheda .seg .tile.on { background: var(--accent); border-color: var(--accent); }
.scheda .seg .tile.on .tt { color: #fff; }
.scheda .mainpick .tile { min-height: 0; padding: 12px 14px; }
.scheda .mainpick .tile .tt { font-weight: 500; font-size: 17px; }
.scheda .count { margin-top: 18px; font-size: 16px; color: var(--ink-2); }
.scheda .count b { color: var(--cyan); }
.scheda /* barra Indietro / Continua sempre visibile */
.navbar { position: sticky; bottom: 0; z-index: 5; margin: 32px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(11,13,18,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.scheda .nav { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.scheda .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 22px; border-radius: 14px; border: 2px solid var(--accent); background: var(--accent); color: #fff; font-weight: 700; font-size: 18px; cursor: pointer; text-decoration: none; text-align: center; }
.scheda .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.scheda .btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.scheda .btn.ghost:hover { border-color: var(--muted); background: transparent; }
.scheda .btn.link { border: 0; background: none; color: var(--ink-2); min-height: 48px; text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.scheda .btn.link:hover { background: none; color: #fff; }
.scheda .err { color: var(--warn); font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.scheda .err:empty { display: none; }
.scheda .foot { margin-top: 18px; font-size: 16px; color: var(--muted); }
.scheda .acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.scheda .acts .btn { flex: 1 1 200px; }
.scheda .ok { color: var(--good); font-weight: 600; font-size: 16px; }
.scheda .nav-end { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.scheda /* prima pagina */
.how { list-style: none; counter-reset: h; display: grid; gap: 12px; margin-top: 28px; }
.scheda .how li { counter-increment: h; display: grid; grid-template-columns: 40px 1fr; gap: 4px 14px; align-items: start; padding: 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; }
.scheda .how li::before { content: counter(h); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--cyan); background: var(--surface-2); }
.scheda .how b { font-size: 18px; }
.scheda .how span { color: var(--ink-2); font-size: 17px; }
.scheda .explain { margin-top: 24px; padding: 20px; background: var(--accent-soft); border: 2px solid rgba(83,58,253,.5); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.scheda .explain h3 { font-size: 19px; }
.scheda .explain p { color: var(--ink-2); }
.scheda .start { margin-top: 28px; }
.scheda .start .btn { width: 100%; }
.scheda .start .btn + .btn { margin-top: 12px; }
.scheda /* risultato */
.sum { margin-top: 24px; padding: 24px 20px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; }
.scheda .sum .k { font-size: 16px; font-weight: 600; color: var(--cyan); }
.scheda .sum .big { margin-top: 6px; font-size: clamp(44px, 14vw, 68px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.scheda .sum .big small { font-size: .38em; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }
.scheda .sum p { margin-top: 12px; color: var(--ink-2); }
.scheda .sec { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 80px; }
.scheda .sec > p { color: var(--ink-2); }
.scheda .opp { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; min-width: 0; }
.scheda .opp.first { border-color: var(--accent); }
.scheda .opp h3 { font-size: 21px; }
.scheda .rank { font-size: 15px; font-weight: 700; color: var(--cyan); }
.scheda .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.scheda .tag { padding: 5px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.scheda .tag.ai { color: var(--cyan); background: rgba(76,201,240,.12); }
.scheda .tag.auto { color: var(--good); background: rgba(61,214,140,.12); }
.scheda .opp .why { font-size: 16px; color: var(--muted); }
.scheda .opp .row { display: flex; flex-direction: column; gap: 2px; }
.scheda .lbl { font-size: 15px; font-weight: 700; color: var(--muted); }
.scheda .opp .row.dopo { padding: 14px; border-radius: 12px; background: var(--accent-soft); }
.scheda .opp .row.dopo .lbl { color: var(--cyan); }
.scheda .opp .row p { color: var(--ink-2); }
.scheda .opp .row.es p { color: var(--ink); }
.scheda .diag { padding: 20px; border-radius: 16px; background: var(--warn-soft); border: 2px solid rgba(204,120,92,.5); display: flex; flex-direction: column; gap: 10px; }
.scheda .diag .lbl { color: var(--warn); }
.scheda .diag p { color: var(--ink-2); }
.scheda .diag p b { color: #fff; }
.scheda .ai-line { color: var(--cyan) !important; font-weight: 600; }
.scheda .bars { display: grid; gap: 22px; }
.scheda .bar { display: grid; gap: 8px; }
.scheda .bar-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.scheda .bar-h b { font-weight: 600; }
.scheda .bar-h span { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 16px; }
.scheda .bar-t { height: 10px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.scheda .bar-t i { display: block; height: 100%; border-radius: 10px; background: var(--accent); }
.scheda .bar p { color: var(--muted); font-size: 16px; }
.scheda /* sezioni apribili */
.acc { border: 2px solid var(--line); border-radius: 16px; background: var(--surface); }
.scheda .acc > summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; font-size: 19px; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; }
.scheda .acc > summary::-webkit-details-marker { display: none; }
.scheda .acc > summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--cyan); font-size: 22px; font-weight: 600; }
.scheda .acc[open] > summary::after { content: "–"; }
.scheda .acc-in { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.scheda .acc-in > p { color: var(--ink-2); }
.scheda .abil { display: grid; gap: 12px; }
.scheda .ab { padding: 16px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.scheda .ab-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.scheda .ab-h b { font-size: 19px; }
.scheda .ab p { color: var(--ink-2); }
.scheda .ab .es { font-size: 16px; color: var(--muted); }
.scheda .nofa { list-style: none; display: grid; gap: 10px; }
.scheda .nofa li { padding-left: 22px; position: relative; color: var(--ink-2); }
.scheda .nofa li::before { content: "–"; position: absolute; left: 4px; color: var(--warn); font-weight: 700; }
.scheda .plan { list-style: none; counter-reset: p; display: grid; gap: 14px; }
.scheda .plan li { counter-increment: p; display: grid; grid-template-columns: 36px 1fr; gap: 2px 14px; }
.scheda .plan li::before { content: counter(p); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--cyan); background: var(--surface-2); }
.scheda .plan span { color: var(--ink-2); }
.scheda .qa { display: grid; gap: 16px; }
.scheda .qa b { display: block; }
.scheda .qa span { color: var(--ink-2); }
.scheda .faq { display: grid; gap: 0; }
.scheda .faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.scheda .faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.scheda .faq summary::-webkit-details-marker { display: none; }
.scheda .faq summary::after { content: "+"; color: var(--cyan); font-weight: 700; }
.scheda .faq details[open] summary::after { content: "–"; }
.scheda .faq details p { margin-top: 8px; color: var(--ink-2); font-size: 17px; }
.scheda .prep { list-style: none; display: grid; gap: 12px; }
.scheda .prep li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.scheda .prep li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 4px; border: 2px solid var(--cyan); border-radius: 6px; }
.scheda .prep b { color: #fff; font-weight: 600; }
.scheda .send { display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; }
.scheda .send > p { color: var(--ink-2); }
.scheda .send textarea { min-height: 200px; font-size: 15px; line-height: 1.5; }
.scheda .cta { padding: 24px 20px; background: var(--accent-soft); border: 2px solid rgba(83,58,253,.5); border-radius: 16px; }
.scheda .cta p { color: var(--ink-2); }
.scheda .disc { margin-top: 24px; font-size: 16px; color: var(--muted); }
.scheda /* telefono */
@media (max-width: 600px) {
  body { font-size: 18px; }
  .page { padding: 24px 16px 32px; }
  .top-in { padding: 8px 16px; }
  .navbar { margin-inline: -16px; padding-inline: 16px; }
  .row2, .tiles { grid-template-columns: 1fr; }
  .seg { grid-template-columns: 1fr 1fr; }
  .nav { grid-template-columns: 1fr 1.6fr; }
  .logo span { font-size: 16px; }
  .opp, .send, .cta, .diag, .sum { padding-inline: 16px; }
  .acc > summary { padding-inline: 16px; }
  .acc-in { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
.scheda * { transition: none !important; scroll-behavior: auto !important; }
}
.scheda /* stato dell'invio automatico */
.sendstatus { padding: 14px 16px; border-radius: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.scheda .sendstatus.ok { color: var(--good); background: rgba(61,214,140,.12); }
.scheda .sendstatus.fail { color: var(--warn); background: var(--warn-soft); }
.scheda .send .acc { background: var(--surface-2); }
.scheda .send .acc .acc-in .acts { margin-top: 4px; }
/* ---------- Stile nuovo ---------- */
.scheda {
  --bg: #08090d;
  --surface: #11131a;
  --surface-2: #171a24;
  --line: #262a3a;
  --accent: #533afd;
  --accent-hover: #6852ff;
  --accent-soft: rgba(83, 58, 253, 0.16);
  --violet: #a99bff;
  --font: var(--font-inter), "Inter", system-ui, -apple-system, sans-serif;
  position: relative;
  background: radial-gradient(ellipse at 80% 0%, rgba(83, 58, 253, 0.22), transparent 55%), radial-gradient(ellipse at 0% 100%, rgba(76, 201, 240, 0.08), transparent 50%), var(--bg);
  background-attachment: fixed;
}
.scheda .btn {
  white-space: normal;
  gap: 8px;
  border-radius: 100px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 30px rgba(83, 58, 253, 0.35);
  transition: background 0.2s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.scheda .btn.ghost,
.scheda .btn.link {
  box-shadow: none;
}
.scheda .btn.ghost {
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.2);
}
.scheda .tile,
.scheda .how li,
.scheda .opp,
.scheda .sum,
.scheda .send,
.scheda .acc,
.scheda input[type="text"],
.scheda input[type="email"],
.scheda select,
.scheda textarea {
  border-width: 1px;
  border-radius: 16px;
}
.scheda .tile.on {
  border-color: #7b66ff;
  background: rgba(83, 58, 253, 0.18);
}
.scheda .step {
  font: 500 12px var(--font-jetbrains), ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}
.scheda h1 {
  font-size: clamp(34px, 8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}
.scheda h2 {
  font-weight: 600;
  letter-spacing: -0.03em;
}
.scheda .prog i {
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}

/* Testata */
.scheda .top {
  background: rgba(8, 9, 13, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}
.scheda .top-in {
  max-width: 760px;
}
.scheda .logo em {
  color: var(--cyan);
}
.scheda .stepnote {
  font: 500 12px var(--font-jetbrains), ui-monospace, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.scheda .page {
  max-width: 760px;
}

/* Prima schermata, come nel design */
.scheda .intro-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 24px 0 8px;
}
.scheda .intro-icon {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: rgba(83, 58, 253, 0.16);
  box-shadow: inset 0 0 0 1px rgba(83, 58, 253, 0.5), 0 30px 80px rgba(83, 58, 253, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: schedaFloat 6s ease-in-out infinite;
}
.scheda .intro-icon img {
  width: 56%;
  height: auto;
}
@keyframes schedaFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.scheda .intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(83, 58, 253, 0.14);
  box-shadow: inset 0 0 0 1px rgba(83, 58, 253, 0.4);
  font: 500 11px var(--font-jetbrains), ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}
.scheda .intro-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}
.scheda .intro-hero h1 {
  font-size: clamp(38px, 9vw, 72px);
}
.scheda .intro-hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--violet);
}
.scheda .intro-hero .lead {
  max-width: 560px;
  margin-top: 0;
}
.scheda .intro-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.scheda .intro-chips span {
  padding: 6px 12px;
  border-radius: 100px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font: 500 12px var(--font-jetbrains), ui-monospace, monospace;
  color: rgba(255, 255, 255, 0.62);
}
.scheda .foot a {
  color: var(--ink);
  text-decoration: underline;
}
.scheda .start {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
