/* HypeFox, i tre strumenti gratis (/tools/ e /it/strumenti/, 26/10/2026). Si carica dopo stile.css e confronti.css
   (testa .vs-testa, sezioni .vs-sez, .vs-punti, .domande, .finale). Le pagine sono generate da ../strumenti/genera.py,
   lo script è strumenti.js. */

/* ---------- la carta dello strumento ---------- */
.st-carta { max-width: 920px; margin: 56px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 34px 36px 30px; box-shadow: 0 30px 70px rgba(70, 45, 20, .08); }
.st-etichetta { display: block; font-size: 13.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.st-campo { display: block; width: 100%; margin-top: 12px; min-height: 124px; resize: vertical; font: inherit; font-size: 21px; line-height: 1.4; font-weight: 600; color: var(--text); padding: 18px 20px; border: 1.5px solid var(--line2); border-radius: 20px; background: var(--card2); transition: border-color .2s, box-shadow .2s; }
.st-campo::placeholder { color: var(--faint); font-weight: 500; }
.st-campo:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--card); }
.st-sotto { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 8px; min-height: 20px; }
.st-conta { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
/* il gancio che arriva dal generatore di ganci, per la prima riga dello script */
.st-scelto { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 14.5px; line-height: 1.35; }
.st-scelto small { font-weight: 800; color: var(--accent); white-space: nowrap; }
.st-scelto b { font-weight: 700; }
.st-togli { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--card); color: var(--muted); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.st-togli:hover { color: var(--accent); }

/* ---------- le opzioni: pastiglie ---------- */
.st-opzioni { display: flex; flex-wrap: wrap; gap: 20px 36px; margin-top: 20px; }
.st-gruppo { border: 0; min-width: 0; }
.st-gruppo legend { padding: 0; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.st-chips label { position: relative; }
.st-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-chips span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line2); background: var(--card); font-size: 14.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s, color .2s; user-select: none; }
.st-chips span:hover { border-color: var(--text); color: var(--text); }
.st-chips input:checked + span { background: var(--text); border-color: var(--text); color: #fff; }
.st-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- il tasto ---------- */
.st-azione { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-top: 28px; }
button.btn { border: 0; font-family: inherit; cursor: pointer; transition: background .2s, transform .15s, opacity .2s; }
button.btn-a:hover { background: var(--accent-dark); }
button.btn:active { transform: translateY(1px); }
button.btn:disabled { opacity: .75; cursor: progress; transform: none; }
.st-vai { height: 58px; padding: 0 34px; font-size: 17px; }
.st-nota { font-size: 14px; font-weight: 600; color: var(--muted); }
.st-nota b { color: var(--text); }
.st-gira { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: st-gira .8s linear infinite; }
@keyframes st-gira { to { transform: rotate(360deg); } }

/* ---------- errori e attesa ---------- */
.st-errore { margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: #fdebe5; color: var(--accent-dark); font-size: 15.5px; font-weight: 700; }
.st-errore[hidden], .st-video[hidden], .st-resto[hidden], .st-scelto[hidden] { display: none; }
.st-scheletro { height: 92px; border-radius: 20px; background: linear-gradient(100deg, var(--bg) 30%, var(--bg2) 50%, var(--bg) 70%) 0 0 / 300% 100%; animation: st-luce 1.4s ease-in-out infinite; }
@keyframes st-luce { from { background-position: 100% 0; } to { background-position: 0 0; } }
.st-attesa { text-align: center; font-size: 14px; font-weight: 600; color: var(--faint); }

/* ---------- i risultati ---------- */
.st-risultati { display: grid; gap: 12px; margin-top: 28px; }
.st-risultati:empty { display: none; }
.st-voce { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px 16px; }
.st-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.st-tag-g { background: var(--bg2); color: var(--muted); }
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-frase { margin-top: 10px; font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.st-perche { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: var(--muted); font-weight: 500; }
.st-az { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-mini { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 99px; border: 1.5px solid var(--line2); background: var(--card); font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.st-mini:hover { border-color: var(--text); }
.st-mini.fatto { background: #2f9e62; border-color: #2f9e62; color: #fff; }
.st-verso { color: var(--accent); border-color: transparent; background: transparent; padding: 0 8px; }
.st-verso:hover { border-color: transparent; color: var(--accent-dark); }
/* lo script */
.st-titolo { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; }
.st-righe { margin-top: 16px; display: grid; gap: 0; list-style: none; counter-reset: riga; }
.st-righe li { position: relative; padding: 12px 0 12px 46px; border-top: 1px solid var(--line); counter-increment: riga; }
.st-righe li::before { content: counter(riga); position: absolute; left: 0; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--card); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--muted); }
.st-righe li:first-child::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.st-dice { font-size: 18px; line-height: 1.4; font-weight: 700; }
.st-mostra { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--muted); font-weight: 500; }
.st-mostra small { margin-right: 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
/* caption e hashtag */
.st-caption { margin-top: 10px; font-size: 17px; line-height: 1.5; font-weight: 600; white-space: pre-line; }
.st-hash-riga { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.st-hash { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-hash span { padding: 7px 13px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 14.5px; font-weight: 700; }
.st-resto { margin-top: 14px; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--faint); }

/* ---------- fallo diventare un video ---------- */
.st-video { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: 24px; padding: 26px 28px; border-radius: 24px; background: var(--text); color: #fff; }
.st-video h3 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.st-video p { margin-top: 6px; font-size: 15.5px; line-height: 1.5; color: rgba(255, 255, 255, .72); font-weight: 500; max-width: 520px; }
.st-video .btn { flex: none; }
.st-privacy { margin-top: 20px; font-size: 13px; line-height: 1.5; color: var(--faint); font-weight: 600; }
.st-privacy a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- i modelli (i tipi di gancio, i finali) ---------- */
.st-modelli { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
.st-modello { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 20px 18px; }
.st-modello b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.st-modello p { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--muted); font-weight: 600; }
.st-modello p i { font-style: normal; color: var(--accent); }
.st-col { max-width: 1000px; margin: 48px auto 0; }
.st-testo { max-width: 760px; margin: 40px auto 0; font-size: 18.5px; line-height: 1.6; color: var(--muted); font-weight: 500; text-align: center; text-wrap: pretty; }
.st-testo b { color: var(--text); }
.st-tabella { max-width: 760px; margin: 36px auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-tabella div { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 16px; text-align: center; }
.st-tabella b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.st-tabella span { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--muted); }

/* ---------- i fatti dello strumento (come /about/) ---------- */
.st-fatti { max-width: 1000px; margin: 48px auto 0; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 8px 32px; }
.st-fatti div { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.st-fatti div:first-child { border-top: 0; }
.st-fatti dt { font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding-top: 3px; }
.st-fatti dd { font-size: 17px; line-height: 1.5; font-weight: 500; }
.st-fatti a { color: var(--accent); font-weight: 700; }

/* ---------- gli strumenti (indice e «altri strumenti») ---------- */
.st-elenco { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.st-scheda { display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 28px 26px 24px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.st-scheda:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 18px 40px var(--shadow); }
.st-scheda .st-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.st-scheda .st-ic svg { width: 24px; height: 24px; }
.st-scheda b { margin-top: 6px; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; }
.st-scheda p { font-size: 15.5px; line-height: 1.5; color: var(--muted); font-weight: 500; }
.st-scheda span { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 800; color: var(--accent); }
.st-due { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; margin-left: auto; margin-right: auto; }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .st-modelli { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .st-elenco { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* ---------- telefono ---------- */
@media (max-width: 720px) {
  .st-carta { margin-top: 36px; padding: 22px 16px 20px; border-radius: 26px; }
  .st-campo { font-size: 18px; min-height: 112px; padding: 14px 16px; border-radius: 16px; }
  .st-opzioni { gap: 16px; }
  .st-chips span { height: 38px; padding: 0 14px; font-size: 14px; }
  .st-vai { width: 100%; }
  .st-nota { width: 100%; text-align: center; }
  .st-voce { padding: 16px 16px 14px; border-radius: 18px; }
  .st-frase { font-size: 19px; }
  .st-righe li { padding-left: 40px; }
  .st-righe li::before { width: 28px; height: 28px; }
  .st-dice { font-size: 17px; }
  .st-video { flex-direction: column; align-items: stretch; padding: 22px 20px; }
  .st-video h3 { font-size: 23px; }
  .st-video .btn { width: 100%; }
  .st-modelli { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
  .st-testo { font-size: 17px; text-align: left; }
  .st-tabella { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-fatti { padding: 4px 20px; }
  .st-fatti div { grid-template-columns: 1fr; gap: 6px; }
  .st-elenco, .st-due { grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-scheletro, .st-gira { animation: none; }
}
