/* /tools/ — stile del cluster strumenti gratuiti.
   Usa i token di styles.css (nessun colore nuovo): l'accent #25E3C2 resta riservato
   alle CTA, i verdetti usano verde/rosso semantici che NON sono l'accent, così un
   "Blocked" non compete visivamente con il bottone che vogliamo far premere. */

.tool {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 3vw, 30px);
}
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.5vw, 28px); }
.tool-field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tool-field label, .tool-label {
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  color: var(--text); text-transform: none;
}
.tool-hint { font-size: .84rem; color: var(--muted); margin: -4px 0 4px; line-height: 1.55; }
.tool-err { color: #FF9E9E; font-size: .88rem; min-height: 1.2em; margin: 10px 0 0; }

.tool textarea, .tool input[type=url], .tool input[type=text], .tool select {
  width: 100%; box-sizing: border-box;
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: .92rem; line-height: 1.55;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.tool textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; resize: vertical; }
.tool textarea:focus, .tool input:focus, .tool select:focus {
  outline: none; border-color: rgba(37,227,194,.5); box-shadow: 0 0 0 3px rgba(37,227,194,.12);
}
.tool select { appearance: none; cursor: pointer; }

.tool-samples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.btn-ghost {
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: .82rem; font-weight: 500; cursor: pointer;
  min-height: 36px; transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease);
}
.btn-ghost:hover { border-color: rgba(147,160,189,.35); transform: translateY(-1px); }
.btn-ghost.is-done { border-color: rgba(37,227,194,.5); color: var(--accent); }

.tool-out-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 8px; }
.tool-code {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 18px; margin: 0; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .84rem; line-height: 1.65; color: var(--text); white-space: pre;
  min-height: 3em;
}

/* ── verdetti del tester ─────────────────────────────────────────────── */
.tool-out { margin-top: 22px; }
.rt-empty, .rt-group, .rt-maps { color: var(--muted); font-size: .88rem; line-height: 1.6; margin: 0 0 12px; }
.rt-maps code { font-size: .82rem; }
.rt-miss { color: #E9C16A; }
.rt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rt-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px;
  align-items: start; padding: 14px 16px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: var(--r-sm);
}
.rt-verdict { grid-row: span 2; font-weight: 700; font-size: .84rem; letter-spacing: .02em; align-self: center; }
.rt-row.is-ok { border-left-color: #3DD68C; } .rt-row.is-ok .rt-verdict { color: #3DD68C; }
.rt-row.is-no { border-left-color: #FF6B6B; } .rt-row.is-no .rt-verdict { color: #FF6B6B; }
.rt-row.is-warn { border-left-color: #E9C16A; } .rt-row.is-warn .rt-verdict { color: #E9C16A; }
.rt-url { font-family: ui-monospace, Menlo, monospace; font-size: .86rem; word-break: break-all; }
.rt-why { font-size: .84rem; color: var(--muted); line-height: 1.6; }
.rt-why code { font-size: .8rem; background: rgba(147,160,189,.1); padding: 1px 5px; border-radius: 4px; }
.rt-errors { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(233,193,106,.3); border-radius: var(--r-sm); background: rgba(233,193,106,.05); font-size: .85rem; }
.rt-errors ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }

/* ── generatore ──────────────────────────────────────────────────────── */
.rg-bots { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.rg-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; padding: 9px 11px; border-radius: var(--r-sm); border: 1px solid transparent; min-height: 44px; box-sizing: border-box; transition: background .18s var(--ease), border-color .18s var(--ease); }
.rg-check:hover { background: var(--bg-elev); border-color: var(--line); }
.rg-check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.rg-check span { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.rg-check i { font-style: normal; color: var(--muted); font-size: .8rem; }

/* ── user agent ──────────────────────────────────────────────────────── */
.ua-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.ua-code { white-space: pre-wrap; word-break: break-word; }
.ua-grid { margin-top: 26px; }
.ua-table { margin: 10px 0 0; }
.ua-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ua-row:last-child { border-bottom: 0; }
.ua-row dt { color: var(--muted); font-size: .85rem; }
.ua-row dd { margin: 0; font-size: .88rem; word-break: break-word; }
.ua-none { color: var(--muted); font-size: .86rem; line-height: 1.6; margin: 10px 0 0; }

/* ── tab del convertitore ────────────────────────────────────────────── */
.cc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cc-tab {
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-size: .84rem; cursor: pointer; min-height: 40px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.cc-tab:hover { color: var(--text); border-color: rgba(147,160,189,.32); }
.cc-tab.is-on { color: var(--text); background: var(--bg-elev); border-color: rgba(37,227,194,.45); }

/* ── hub ─────────────────────────────────────────────────────────────── */
.tools-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tool-card b { font-size: 1.02rem; }
.hero-note { color: var(--muted); font-size: .88rem; margin-top: 14px; }

/* ── prosa e tabelle ─────────────────────────────────────────────────── */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 2.4em; }
.prose h3 { margin-top: 1.8em; font-size: 1.05rem; }
.prose p, .prose li { line-height: 1.75; color: var(--muted); }
.prose b, .prose strong { color: var(--text); }
.prose code { font-size: .86em; background: rgba(147,160,189,.1); padding: 1.5px 6px; border-radius: 5px; }
.prose ol.steps, .prose ul.checks { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 1.4em 0; }
.prose ol.steps { counter-reset: step; }
.prose ol.steps li { position: relative; padding-left: 42px; counter-increment: step; }
.prose ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); font-size: .82rem; font-weight: 600;
}
.prose ul.checks li { position: relative; padding-left: 26px; }
.prose ul.checks li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .75;
}
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 420px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--text); font-weight: 600; }
.tbl td { color: var(--muted); }
.tbl code { font-size: .84em; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .84rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--text); }

/* Le classi con display (flex/grid) vincono sull'attributo hidden dello UA:
   la testata "Markdown · Copy · Download" appariva vuota prima di ogni
   conversione. Qui hidden torna a vincere per tutto ciò che sta in un tool. */
.tool [hidden] { display: none !important; }

/* ── pdf → markdown: dropzone, quota, pannello limite ────────────────── */
.dz {
  display: grid; place-items: center; gap: 6px; text-align: center;
  min-height: 132px; padding: 22px; cursor: pointer; box-sizing: border-box;
  background: var(--bg-elev); border: 1.5px dashed rgba(147,160,189,.4);
  border-radius: var(--r-md); color: var(--muted);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dz b { color: var(--text); font-size: .95rem; }
.dz span { font-size: .82rem; }
.dz:hover, .dz.is-drag { border-color: rgba(37,227,194,.55); background: rgba(37,227,194,.04); }
.dz:focus-visible { outline: none; border-color: rgba(37,227,194,.6); box-shadow: 0 0 0 3px rgba(37,227,194,.12); }
.dz-file {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  margin-top: 12px; padding: 8px 12px; font-size: .86rem;
  background: var(--bg-elev); border: 1px solid rgba(37,227,194,.4); border-radius: 999px;
}
.dz-file b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 300px; }
.dz-file i { font-style: normal; color: var(--muted); font-size: .8rem; flex: none; }
.dz-file button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 4px; }
.dz-file button:hover { color: var(--text); }
.tool-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.tool-or::before, .tool-or::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.quota-note { color: var(--muted); font-size: .84rem; }
.quota-note b { color: var(--text); }

.cta-inline {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  margin-top: 16px; padding: 13px 16px; font-size: .88rem; line-height: 1.55;
  background: rgba(37,227,194,.05); border: 1px solid rgba(37,227,194,.25); border-radius: var(--r-sm);
}
.cta-inline p { margin: 0; color: var(--muted); }
.cta-inline b { color: var(--text); }

/* Quota esaurita: il pannello È la pagina di registrazione in miniatura —
   contatore, quando riprova, cosa sblocca l'account, email precompilata. */
.limit-panel {
  margin-top: 20px; padding: clamp(20px, 3vw, 30px);
  background: var(--bg-elev); border: 1px solid rgba(37,227,194,.45); border-radius: var(--r-md);
}
.limit-panel h3 { margin: 0 0 6px; font-size: 1.16rem; }
.lp-reset { color: var(--muted); font-size: .87rem; margin: 0 0 14px; }
.limit-panel ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.limit-panel li { position: relative; padding-left: 24px; font-size: .9rem; color: var(--muted); line-height: 1.55; }
.limit-panel li b { color: var(--text); }
.limit-panel li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .8;
}
.lp-mail { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-mail input[type=email] {
  flex: 1 1 220px; box-sizing: border-box; min-height: 46px;
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: .92rem;
}
.lp-mail input[type=email]:focus { outline: none; border-color: rgba(37,227,194,.5); box-shadow: 0 0 0 3px rgba(37,227,194,.12); }
.lp-foot { margin: 12px 0 0; font-size: .82rem; color: var(--muted); }
.lp-foot a { color: var(--muted); text-decoration: underline; }
.lp-foot a:hover { color: var(--text); }

.pd-meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .84rem; }
.pd-outline { margin: 12px 0 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-elev); }
.pd-outline summary { cursor: pointer; padding: 11px 14px; font-size: .86rem; font-weight: 600; }
.pd-outline ul { list-style: none; margin: 0; padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 5px; max-height: 260px; overflow-y: auto; }
.pd-outline li { font-size: .84rem; color: var(--muted); line-height: 1.5; }


/* ── AI Visibility Audit ─────────────────────────────────────────────────────
   Stessi verdi/rossi semantici del robots tester (#3DD68C / #E9C16A / #FF6B6B),
   mai l'accent: un "fail" non deve competere col bottone che vogliamo far
   premere. Il punteggio è un numero grande perché è la prima cosa che si
   guarda; i check sotto sono la spiegazione, non il titolo. */
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 18px; }

.av-score {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--r-lg); padding: clamp(16px, 2.5vw, 24px);
}
.av-score.av-good { border-left-color: #3DD68C; }
.av-score.av-warn { border-left-color: #E9C16A; }
.av-score.av-bad  { border-left-color: #FF6B6B; }
.av-score-n { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.av-score-n i { font-size: .9rem; font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.av-score-m { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.av-score-m b { font-size: .92rem; font-weight: 600; word-break: break-all; }
.av-score-m span { font-size: .84rem; color: var(--muted); }

.av-pills { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.av-pill {
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 8px;
}
.av-pill-n { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.av-pill-l { font-size: .74rem; color: var(--muted); line-height: 1.35; }
.av-pill.av-good .av-pill-n { color: #3DD68C; }
.av-pill.av-warn .av-pill-n { color: #E9C16A; }
.av-pill.av-bad  .av-pill-n { color: #FF6B6B; }
.av-pill.av-skip .av-pill-n { color: var(--muted); }

.av-checks { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.av-check {
  background: var(--bg-card); border: 1px solid var(--line); border-left-width: 3px;
  border-radius: var(--r-sm); padding: 14px 16px;
}
.av-check p { margin: 6px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.av-check-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.av-check-h b { font-size: .92rem; font-weight: 600; }
.av-check-h i { font-style: normal; font-size: .74rem; color: var(--muted); margin-left: auto; }
.av-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.av-check.av-pass { border-left-color: #3DD68C; } .av-check.av-pass .av-dot { background: #3DD68C; }
.av-check.av-warn { border-left-color: #E9C16A; } .av-check.av-warn .av-dot { background: #E9C16A; }
.av-check.av-fail { border-left-color: #FF6B6B; } .av-check.av-fail .av-dot { background: #FF6B6B; }
.av-check.av-skip { border-left-color: var(--line); } .av-check.av-skip .av-dot { background: var(--muted); }
.av-fix { color: var(--text) !important; }
.av-fix b { font-weight: 600; }

.av-cite {
  margin-top: 22px; background: var(--bg-card);
  border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-sm);
  padding: 16px 18px;
}
.av-cite b { font-size: .95rem; }
.av-cite p { margin: 6px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.av-cite.av-good { border-left-color: #3DD68C; }
.av-cite.av-bad  { border-left-color: #FF6B6B; }
.av-cite.av-skip { border-left-color: var(--line); }
.av-cite-dom { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem !important; word-break: break-word; }

@media (max-width: 860px) {
  .av-pills { grid-template-columns: repeat(2, 1fr); }
  .av-check-h i { margin-left: 0; width: 100%; }
}

@media (max-width: 860px) {
  .tool-grid { grid-template-columns: 1fr; }
  .rt-row { grid-template-columns: 1fr; }
  .rt-verdict { grid-row: auto; }
  .rg-bots { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-ghost, .cc-tab, .rg-check, .tool textarea, .tool input, .tool select { transition: none; }
  .btn-ghost:hover { transform: none; }
}

/* ── AI visibility: blockers, fix-first, bot table, mentions ─────────────── */
.av-score-m .av-blocked { color: #FF6B6B; }
.av-fixes { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, rgba(255,255,255,.02)); }
.av-fixes > b { font-size: .92rem; font-weight: 600; }
.av-fixes ol { margin: 8px 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }
.av-fixes li { font-size: .88rem; line-height: 1.55; color: var(--text); }
.av-fixes li span { display: block; font-weight: 600; font-size: .84rem; }
.av-fixes li.av-fail span { color: #FF6B6B; }
.av-fixes li.av-warn span { color: #E9C16A; }
.av-bots { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.av-bots summary { cursor: pointer; padding: 12px 0; font-size: .92rem; font-weight: 600; }
.av-botfetch { margin: 0 0 8px; font-size: .86rem; color: var(--muted); }
.av-botfetch.av-warn { color: #E9C16A; }
.av-botfetch.av-pass { color: var(--muted); }
.av-bots-wrap { overflow-x: auto; margin: 0 0 12px; }
.av-bots table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.av-bots th, .av-bots td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
.av-bots th { color: var(--muted); font-weight: 500; border-top: 0; }
.av-bots td:last-child { white-space: normal; }
.av-bots tr.av-fail td:nth-child(4) { color: #FF6B6B; font-weight: 600; }
.av-bots tr.av-pass td:nth-child(4) { color: #3DD68C; }
.av-cite.av-warn { border-left-color: #E9C16A; }
.av-cite-ans { font-style: italic; }

/* branded illustration under the tool form (2026-09-03) */
.tool-figure { margin: 28px 0 0; }
.tool-figure img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid rgba(147,160,189,.18); background: #070B16; }
.tool-figure figcaption { margin: 10px 4px 0; color: var(--muted, #93A0BD); font-size: .9rem; line-height: 1.5; }

/* FAQ delle pagine /tools/ (2026-10-07).
   styles.css fa di .faq.faq-grid una griglia "titolo | lista" larga max 1060px,
   pensata per il markup h2 + .faq-list. Le pagine strumento usavano altre due
   forme: .wrap > (h2 + .qa-list), che finiva intera nella colonna stretta di
   sinistra (~170px su desktop), e h2 + <details> sciolti, con le domande che si
   alternavano tra le due colonne. Ora la lista sta sempre in un contenitore,
   .wrap diventa trasparente e la sezione si allinea alle altre (1240px). */
html.qd-sgl-tools main #faq.faq-grid { max-width: 1240px; display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.6fr); gap: 20px 48px; align-items: start; }
html.qd-sgl-tools main #faq.faq-grid > .wrap { display: contents; }
html.qd-sgl-tools main #faq.faq-grid h2 { margin: 8px 0 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }
html.qd-sgl-tools main #faq :is(.qa-list, .faq-list) { min-width: 0; width: auto; max-width: none; margin: 0; }
html.qd-sgl-tools main #faq .faq-list > details > summary { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; line-height: 1.4; color: var(--sg-ink, #0B1020); }
html.qd-sgl-tools main #faq .faq-list details p { max-width: none; }
@media (max-width: 880px) {
  html.qd-sgl-tools main #faq.faq-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 640px) {
  html.qd-sgl-tools main #faq .faq-list { padding: 2px 16px; }
  html.qd-sgl-tools main #faq .faq-list summary { min-height: 44px; }
}
