/* Analizzatore di testo avanzato: raccordo grafico con lo stile comune degli strumenti (sf-tools.css).
   Solo CSS: il markup e il JavaScript dell'Analizzatore restano quelli di Codice personalizzato.
   Le regole sono scoperte solo quando la "Modalità scura" dello strumento e' spenta. */

/* ---- Scheda ---- */
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme){max-width:900px!important;margin:0 auto!important;padding:32px!important;background:#fff!important;border:1px solid #e3eaee!important;border-radius:18px!important;box-shadow:0 8px 30px rgba(10,62,80,.08)!important;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif!important;color:#0a3e50!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .analyzer-header{text-align:left!important;margin-bottom:24px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .analyzer-header::before{content:"Strumento gratuito";display:inline-block;font-family:"League Spartan",system-ui,sans-serif;font-weight:700;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#f87a11;margin-bottom:8px}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .analyzer-header h2{font-family:"Bebas Neue",Impact,sans-serif!important;font-weight:400!important;font-size:34px!important;line-height:1.05!important;letter-spacing:.3px!important;color:#12262c!important;margin:0 0 8px!important;text-align:left!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .analyzer-header p{font-size:15px!important;color:#4a5b63!important;margin:0!important;max-width:600px}

/* ---- Campi ---- */
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group{margin-bottom:18px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group label{font-size:14px!important;font-weight:600!important;color:#0a3e50!important;margin-bottom:7px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group textarea,
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group input[type="text"],
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group select{border:1.5px solid #cfd9de!important;border-radius:10px!important;font-size:16px!important;color:#12262c!important;background:#fff!important;padding:12px 14px!important;box-shadow:none!important;outline:none!important;transition:border-color .15s,box-shadow .15s}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group input[type="text"],
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group select{height:48px!important;padding:0 14px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group textarea:focus,
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group input[type="text"]:focus,
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .input-group select:focus{border-color:#f87a11!important;box-shadow:0 0 0 4px rgba(248,122,17,.16)!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .checkbox-group{padding:4px 0;margin-bottom:6px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .checkbox-group input[type="checkbox"]{accent-color:#f87a11;width:18px!important;height:18px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .checkbox-group label{font-size:14.5px!important;color:#0a3e50!important;cursor:pointer}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) #live-counter{font-size:12.5px!important;color:#7a8a91!important}

/* ---- Pulsanti ---- */
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn-group{gap:12px!important;margin:22px 0!important;flex-wrap:wrap}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn{display:inline-flex!important;align-items:center;justify-content:center;height:48px!important;padding:0 26px!important;border-radius:999px!important;font-family:"League Spartan",system-ui,sans-serif!important;font-weight:700!important;font-size:15px!important;letter-spacing:.02em!important;text-transform:uppercase!important;line-height:1!important;border:2px solid transparent!important;transition:background .15s,color .15s,transform .05s!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn-primary{background:#f87a11!important;color:#fff!important;box-shadow:0 6px 16px rgba(248,122,17,.28)!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn-primary:hover{background:#e46a05!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn-secondary{background:#fff!important;color:#0a3e50!important;border-color:#0a3e50!important;box-shadow:none!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn-secondary:hover{background:#0a3e50!important;color:#fff!important}

/* ---- Risultati ---- */
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .results-section{background:#f4f8fa!important;border:1px solid #dfe8ec!important;border-left:5px solid #f87a11!important;border-radius:14px!important;padding:22px 24px!important;margin-top:26px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .results-section>h3{font-family:"Bebas Neue",Impact,sans-serif!important;font-weight:400!important;font-size:24px!important;letter-spacing:.4px!important;color:#12262c!important;margin:0 0 14px!important;text-align:left!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .results-tabs{gap:6px;border-bottom:1px solid #e3eaee!important;padding-bottom:12px;margin-bottom:16px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .tab-button{font-family:inherit!important;font-size:14px!important;font-weight:600!important;color:#0a3e50!important;background:#eef3f5!important;border:none!important;border-radius:999px!important;padding:9px 16px!important;margin:0!important;text-transform:none!important;line-height:1.2!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .tab-button:hover{background:#dfe8ec!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .tab-button.active{background:#0a3e50!important;color:#fff!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-summary{gap:12px!important;margin-bottom:16px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-card{background:#fff!important;border:1px solid #e3eaee!important;border-radius:12px!important;padding:14px 16px!important;box-shadow:none!important;text-align:left!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-title{order:2;font-size:12px!important;letter-spacing:.08em;text-transform:uppercase;color:#7a8a91!important;font-weight:600;margin:6px 0 0!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-card{display:flex;flex-direction:column}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-value{order:1;font-family:"Bebas Neue",Impact,sans-serif!important;font-weight:400!important;font-size:32px!important;line-height:1!important;color:#0a3e50!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-card:last-child .summary-value{color:#f87a11!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .summary-subvalue{order:3;font-size:11px!important;color:#a3b0b6!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-card{background:#fff!important;border:1px solid #e3eaee!important;border-radius:12px!important;padding:16px 18px!important;box-shadow:none!important;margin-bottom:12px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-title{font-size:15px!important;font-weight:700!important;color:#12262c!important;margin-bottom:10px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-value{font-size:14.5px!important;color:#4a5b63!important;line-height:1.55}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-value p{margin:0 0 6px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-value h4,
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .result-value h5{font-family:inherit!important;font-size:14px!important;font-weight:700!important;color:#0a3e50!important;text-transform:none!important;letter-spacing:0!important;margin:12px 0 6px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .progress-container{background:#e3eaee!important;border-radius:999px!important;margin:6px 0 10px!important;overflow:hidden}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .progress-bar{height:22px!important;border-radius:999px!important;font-size:12px!important;font-weight:600}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .progress-short,
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .dialog-progress{background:linear-gradient(90deg,#f87a11,#ffb066)!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .progress-medium{background:#0a3e50!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .word-item{background:#eef3f5!important;color:#0a3e50!important;border-radius:999px!important;font-size:13.5px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .word-count{background:#f87a11!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .suggestion-card{background:#fff7f1!important;border-left:4px solid #f87a11!important;border-radius:0 10px 10px 0!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .synonym-group{background:#eef3f5!important;border-radius:10px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .adv-metrics-box{background:#fff!important;border:1px solid #e3eaee!important;border-radius:12px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .adv-metric{border-radius:10px!important;border-color:#e3eaee!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .adv-metric .adv-metric-value{font-family:"Bebas Neue",Impact,sans-serif!important;font-weight:400!important;font-size:26px!important;color:#0a3e50!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .loading-container{background:#f4f8fa!important;border-radius:12px!important}
body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .loading-bar{background:#f87a11!important}

@media (max-width:640px){
  body:not(.dark-theme) .text-analyzer-container:not(.dark-theme){padding:22px 18px!important;border-radius:14px!important;margin:0!important}
  body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .analyzer-header h2{font-size:28px!important}
  body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .btn{width:100%}
  body:not(.dark-theme) .text-analyzer-container:not(.dark-theme) .results-section{padding:16px!important}
}

/* ---- Modalita' scura dello strumento: titoli leggibili sullo sfondo scuro ---- */
body.dark-theme .text-analyzer-container .results-section h3,
body.dark-theme .text-analyzer-container .results-section h2,
body.dark-theme .text-analyzer-container .analyzer-header h2{color:#f0f0f0!important}
