/* =========================================================================
   DockFM · Strumenti Gratuiti — design system condiviso (prefisso .tool-)
   Coerente con styles.css: Inter, palette cyan/indigo/purple/rose, glass panels
   ========================================================================= */

.tool-main { padding-top: 120px; position: relative; z-index: 1; overflow: hidden; }
.tool-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.tool-section { max-width: 1120px; margin: 0 auto 5rem; padding: 0 1.25rem; position: relative; z-index: 2; }
.tool-section--tight { margin-bottom: 3rem; }

/* ---------- HERO ---------- */
.tool-hero { text-align: center; padding: 1rem 1.25rem 0; position: relative; z-index: 2; }
.tool-eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.35);
  color: #67e8f9; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.72rem; margin-bottom: 1.6rem;
}
.tool-eyebrow .tool-dot { width: 8px; height: 8px; border-radius: 50%; background: #22d3ee; box-shadow: 0 0 12px #22d3ee; animation: toolPulse 1.8s infinite; }
@keyframes toolPulse { 0%,100%{ transform: scale(1); opacity: 1; } 50%{ transform: scale(1.4); opacity: .55; } }

.tool-eyebrow--purple { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.35); color: #d8b4fe; }
.tool-eyebrow--purple .tool-dot { background: #a855f7; box-shadow: 0 0 12px #a855f7; }
.tool-eyebrow--rose { background: rgba(244, 63, 94, 0.1); border-color: rgba(244, 63, 94, 0.35); color: #fda4af; }
.tool-eyebrow--rose .tool-dot { background: #f43f5e; box-shadow: 0 0 12px #f43f5e; }

.tool-title { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 1.2rem; color: #fff; }
.tool-title .grad { background: linear-gradient(120deg, #22d3ee, #a855f7 60%, #f43f5e); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tool-title .grad-cyan { background: linear-gradient(120deg, #22d3ee, #6366f1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tool-sub { max-width: 760px; margin: 0 auto 2.4rem; color: #cbd5e1; font-size: clamp(1.02rem, 2.2vw, 1.22rem); line-height: 1.65; }
.tool-sub strong { color: #f1f5f9; }

/* ---------- BUTTONS ---------- */
.tool-cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.tool-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 1rem 1.9rem;
  border-radius: 14px; font-weight: 800; font-size: 1.02rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: all .25s ease; font-family: inherit;
}
.tool-btn--primary { background: linear-gradient(120deg, #22d3ee, #6366f1); color: #06121e; box-shadow: 0 16px 40px -12px rgba(34, 211, 238, 0.55); }
.tool-btn--primary:hover { transform: translateY(-3px); box-shadow: 0 22px 50px -12px rgba(34, 211, 238, 0.7); }
.tool-btn--purple { background: linear-gradient(120deg, #a855f7, #6366f1); color: #fff; box-shadow: 0 16px 40px -12px rgba(168, 85, 247, 0.55); }
.tool-btn--purple:hover { transform: translateY(-3px); box-shadow: 0 22px 50px -12px rgba(168, 85, 247, 0.7); }
.tool-btn--ghost { background: rgba(255,255,255,0.04); color: #e2e8f0; border-color: rgba(255,255,255,0.18); }
.tool-btn--ghost:hover { border-color: rgba(34, 211, 238, 0.5); transform: translateY(-3px); }
.tool-btn--sm { padding: 0.7rem 1.2rem; font-size: 0.9rem; border-radius: 11px; }
.tool-btn--block { width: 100%; }

/* ---------- HEADINGS ---------- */
.tool-h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; text-align: center; margin: 0 0 0.8rem; letter-spacing: -0.01em; color: #fff; }
.tool-lead { text-align: center; color: #94a3b8; max-width: 720px; margin: 0 auto 2.6rem; line-height: 1.6; font-size: 1.05rem; }

/* ---------- CARD ---------- */
.tool-card {
  background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px; padding: 2.4rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,0.7);
}
.tool-card--accent { border-color: rgba(34,211,238,0.25); }

/* ---------- CALCULATOR / QUIZ LAYOUT ---------- */
.tool-app { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 1.5rem; align-items: start; }
.tool-panel {
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px; padding: 2rem; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tool-panel h3 { margin: 0 0 1.4rem; color: #fff; font-size: 1.15rem; display: flex; align-items: center; gap: 0.6rem; }

.tool-field { margin-bottom: 1.5rem; }
.tool-field:last-child { margin-bottom: 0; }
.tool-field-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.5rem; }
.tool-field label { font-size: 0.9rem; font-weight: 700; color: #cbd5e1; }
.tool-field-val { font-weight: 800; color: #22d3ee; font-size: 1rem; font-variant-numeric: tabular-nums; }
.tool-field-hint { font-size: 0.78rem; color: #64748b; margin-top: 0.4rem; line-height: 1.4; }

.tool-input, .tool-select {
  width: 100%; padding: 0.85rem 1rem; border-radius: 12px; font: inherit; color: #f1f5f9;
  background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255,255,255,0.12); transition: border-color .2s ease;
}
.tool-input:focus, .tool-select:focus { outline: none; border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,0.15); }
.tool-select option { color: #0f172a; }

/* Range slider */
.tool-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); outline: none; margin: 0.2rem 0; }
.tool-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(120deg,#22d3ee,#6366f1); cursor: pointer; box-shadow: 0 0 0 4px rgba(34,211,238,0.18), 0 6px 14px -4px rgba(34,211,238,0.6); transition: transform .15s ease; }
.tool-range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.tool-range::-moz-range-thumb { width: 22px; height: 22px; border: none; border-radius: 50%; background: linear-gradient(120deg,#22d3ee,#6366f1); cursor: pointer; box-shadow: 0 0 0 4px rgba(34,211,238,0.18); }

/* Toggle chips */
.tool-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tool-chip {
  padding: 0.55rem 1rem; border-radius: 999px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12); color: #cbd5e1; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; transition: all .2s ease; user-select: none;
}
.tool-chip:hover { border-color: rgba(34,211,238,0.4); color: #fff; }
.tool-chip.is-active { background: linear-gradient(120deg, rgba(34,211,238,0.18), rgba(99,102,241,0.18)); border-color: #22d3ee; color: #fff; }

/* ---------- RESULT PANEL ---------- */
.tool-result { text-align: center; position: sticky; top: 100px; }
.tool-result-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; color: #94a3b8; margin-bottom: 0.6rem; }
.tool-result-num { font-size: clamp(2.6rem, 8vw, 3.8rem); font-weight: 900; line-height: 1; color: #22d3ee; text-shadow: 0 0 34px rgba(34,211,238,0.4); font-variant-numeric: tabular-nums; }
.tool-result-num .unit { font-size: 1.4rem; color: #64748b; font-weight: 700; }
.tool-result-sub { color: #94a3b8; font-size: 0.92rem; margin-top: 0.7rem; line-height: 1.5; }
.tool-result-range { display: flex; align-items: baseline; justify-content: center; gap: 0.5rem; color: #cbd5e1; font-weight: 700; margin-top: 0.5rem; }

.tool-breakdown { margin-top: 1.6rem; text-align: left; display: grid; gap: 0.7rem; }
.tool-breakdown-row { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.tool-breakdown-row:last-child { border-bottom: none; }
.tool-breakdown-row .k { color: #94a3b8; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.tool-breakdown-row .v { color: #f1f5f9; font-weight: 800; font-variant-numeric: tabular-nums; }
.tool-breakdown-row.total { border-top: 1px solid rgba(255,255,255,0.14); border-bottom: none; margin-top: 0.4rem; padding-top: 1rem; }
.tool-breakdown-row.total .k { color: #fff; font-weight: 800; font-size: 1rem; }
.tool-breakdown-row.total .v { color: #22d3ee; font-size: 1.25rem; }
.tool-breakdown-row.save .v { color: #34d399; }

/* ---------- GAUGE (score) ---------- */
.tool-gauge { position: relative; width: 220px; height: 220px; margin: 0 auto; }
.tool-gauge svg { transform: rotate(-90deg); }
.tool-gauge-track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 16; }
.tool-gauge-fill { fill: none; stroke: url(#toolGaugeGrad); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.tool-gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tool-gauge-num { font-size: 3.4rem; font-weight: 900; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.tool-gauge-of { font-size: 0.8rem; color: #64748b; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.3rem; }
.tool-grade { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding: 0.5rem 1.2rem; border-radius: 999px; font-weight: 900; font-size: 1.1rem; letter-spacing: 0.05em; }
.tool-grade[data-grade="A"] { background: rgba(52,211,153,0.14); border: 1px solid rgba(52,211,153,0.4); color: #6ee7b7; }
.tool-grade[data-grade="B"] { background: rgba(34,211,238,0.14); border: 1px solid rgba(34,211,238,0.4); color: #67e8f9; }
.tool-grade[data-grade="C"] { background: rgba(250,204,21,0.14); border: 1px solid rgba(250,204,21,0.4); color: #fde047; }
.tool-grade[data-grade="D"] { background: rgba(251,146,60,0.14); border: 1px solid rgba(251,146,60,0.4); color: #fdba74; }
.tool-grade[data-grade="E"] { background: rgba(244,63,94,0.14); border: 1px solid rgba(244,63,94,0.4); color: #fda4af; }

/* Score axes */
.tool-axes { display: grid; gap: 1rem; margin-top: 1.6rem; text-align: left; }
.tool-axis-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.tool-axis-head .name { color: #cbd5e1; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.tool-axis-head .pct { color: #22d3ee; font-weight: 800; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.tool-axis-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.tool-axis-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg,#22d3ee,#6366f1); width: 0%; transition: width .9s cubic-bezier(.2,.8,.2,1); }

/* ---------- BADGE / EMBED ---------- */
.tool-badge {
  display: inline-flex; align-items: center; gap: 0.85rem; padding: 0.7rem 1.1rem; border-radius: 14px;
  background: linear-gradient(135deg, #0b1220, #111a2e); border: 1px solid rgba(34,211,238,0.35);
  box-shadow: 0 20px 50px -24px rgba(34,211,238,0.5); text-decoration: none;
}
.tool-badge-logo { display: flex; flex-direction: column; line-height: 1; }
.tool-badge-logo .b1 { font-weight: 800; font-size: 0.95rem; color: #fff; }
.tool-badge-logo .b2 { font-weight: 800; font-size: 0.95rem; color: #22d3ee; }
.tool-badge-sep { width: 1px; height: 34px; background: rgba(255,255,255,0.15); }
.tool-badge-score { display: flex; flex-direction: column; line-height: 1.1; }
.tool-badge-score .s { font-weight: 900; font-size: 1.5rem; color: #fff; font-variant-numeric: tabular-nums; }
.tool-badge-score .l { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #94a3b8; font-weight: 700; }

.tool-embed { position: relative; margin-top: 1rem; }
.tool-embed textarea {
  width: 100%; min-height: 120px; resize: vertical; padding: 1rem; border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem; color: #a5f3fc; background: rgba(2,6,23,0.7); border: 1px solid rgba(255,255,255,0.12); line-height: 1.5;
}
.tool-copy-btn { position: absolute; top: 0.7rem; right: 0.7rem; }
.tool-copied { color: #34d399; font-weight: 800; font-size: 0.85rem; margin-left: 0.5rem; opacity: 0; transition: opacity .2s ease; }
.tool-copied.show { opacity: 1; }

/* ---------- SHARE ROW ---------- */
.tool-share { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin-top: 1.4rem; }
.tool-share a, .tool-share button {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.15rem; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: #e2e8f0; cursor: pointer; transition: all .2s ease; font-family: inherit;
}
.tool-share a:hover, .tool-share button:hover { transform: translateY(-2px); border-color: rgba(34,211,238,0.45); color: #fff; }
.tool-share .sh-wa:hover { border-color: rgba(37,211,102,0.55); box-shadow: 0 6px 20px rgba(37,211,102,0.18); }
.tool-share .sh-x:hover { border-color: rgba(255,255,255,0.55); box-shadow: 0 6px 20px rgba(255,255,255,0.12); }
.tool-share .sh-fb:hover { border-color: rgba(59,89,152,0.7); box-shadow: 0 6px 20px rgba(59,89,152,0.22); }
.tool-share .sh-li:hover { border-color: rgba(10,102,194,0.7); box-shadow: 0 6px 20px rgba(10,102,194,0.22); }
.tool-share .sh-ig:hover { border-color: rgba(225,48,108,0.7); box-shadow: 0 6px 20px rgba(225,48,108,0.2); }
.tool-share .sh-tk:hover { border-color: rgba(255,0,80,0.6); box-shadow: 0 6px 20px rgba(37,244,238,0.18); }

/* ---------- TOAST ---------- */
.tool-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(18px);
  background: rgba(15,23,42,0.97); border: 1px solid rgba(34,211,238,0.4); color: #e2e8f0;
  padding: 0.8rem 1.3rem; border-radius: 12px; font-weight: 700; font-size: 0.9rem;
  z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 12px 44px rgba(0,0,0,0.45); max-width: min(90vw, 420px); text-align: center;
}
.tool-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- QUIZ ---------- */
.tool-quiz-progress { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 2rem; }
.tool-quiz-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg,#a855f7,#6366f1); width: 0%; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.tool-quiz-step { color: #94a3b8; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.8rem; }
.tool-quiz-q { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 800; color: #fff; line-height: 1.35; margin: 0 0 1.6rem; }
.tool-quiz-opts { display: grid; gap: 0.8rem; }
.tool-quiz-opt {
  display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.3rem; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); color: #e2e8f0; font-weight: 600;
  text-align: left; transition: all .18s ease; font-family: inherit; font-size: 1rem; width: 100%;
}
.tool-quiz-opt:hover { border-color: rgba(168,85,247,0.5); background: rgba(168,85,247,0.06); transform: translateX(3px); }
.tool-quiz-opt.is-selected { border-color: #a855f7; background: rgba(168,85,247,0.12); }
.tool-quiz-opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); flex: 0 0 auto; position: relative; transition: all .18s ease; }
.tool-quiz-opt.is-selected .dot { border-color: #a855f7; background: #a855f7; box-shadow: 0 0 0 4px rgba(168,85,247,0.2); }
.tool-quiz-nav { display: flex; justify-content: space-between; margin-top: 1.8rem; gap: 1rem; }

/* ---------- HUB GRID ---------- */
.tool-hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.tool-hub-card {
  position: relative; display: flex; flex-direction: column; padding: 2.2rem; border-radius: 22px;
  background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.08); text-decoration: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; transition: all .25s ease;
}
.tool-hub-card::after { content: ""; position: absolute; inset: 0; border-radius: 22px; padding: 1px; background: linear-gradient(130deg, rgba(34,211,238,0.5), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.tool-hub-card:hover { transform: translateY(-6px); border-color: rgba(34,211,238,0.35); box-shadow: 0 30px 70px -30px rgba(34,211,238,0.35); }
.tool-hub-card:hover::after { opacity: 1; }
.tool-hub-ic { font-size: 2.4rem; margin-bottom: 1.1rem; }
.tool-hub-card h3 { color: #fff; font-size: 1.35rem; margin: 0 0 0.6rem; font-weight: 800; }
.tool-hub-card p { color: #94a3b8; line-height: 1.6; margin: 0 0 1.6rem; font-size: 0.95rem; flex-grow: 1; }
.tool-hub-tag { align-self: flex-start; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.3rem 0.75rem; border-radius: 999px; background: rgba(34,211,238,0.1); border: 1px solid rgba(34,211,238,0.3); color: #67e8f9; margin-bottom: 1.1rem; }
.tool-hub-go { color: #22d3ee; font-weight: 800; display: inline-flex; align-items: center; gap: 0.5rem; transition: gap .2s ease; }
.tool-hub-card:hover .tool-hub-go { gap: 0.85rem; }

/* ---------- CTA BAND ---------- */
.tool-cta-band {
  text-align: center; padding: 3.4rem 2rem; border-radius: 26px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(34,211,238,0.12), transparent 60%), rgba(15,23,42,0.6);
  border: 1px solid rgba(34,211,238,0.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tool-cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 900; color: #fff; margin: 0 0 0.8rem; }
.tool-cta-band p { color: #cbd5e1; max-width: 600px; margin: 0 auto 2rem; line-height: 1.6; }

/* ---------- FAQ ---------- */
.tool-faq-item { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 1.2rem 0; }
.tool-faq-item:last-child { border-bottom: none; }
.tool-faq-q { font-weight: 800; color: #fff; font-size: 1.05rem; margin: 0 0 0.5rem; }
.tool-faq-a { color: #94a3b8; line-height: 1.6; margin: 0; }

/* ---------- MICRO NOTE / DISCLAIMER ---------- */
.tool-note { color: #64748b; font-size: 0.82rem; text-align: center; margin-top: 1.4rem; line-height: 1.5; }
.tool-note a { color: #22d3ee; text-decoration: none; }

/* ---------- BREADCRUMB ---------- */
.tool-crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; justify-content: center; font-size: 0.82rem; color: #64748b; margin-bottom: 1.4rem; }
.tool-crumbs a { color: #94a3b8; text-decoration: none; }
.tool-crumbs a:hover { color: #22d3ee; }
.tool-crumbs .sep { opacity: 0.5; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .tool-app { grid-template-columns: 1fr; }
  .tool-result { position: static; }
}
@media (max-width: 720px) {
  .tool-card, .tool-panel { padding: 1.6rem; }
  .tool-cta-row { flex-direction: column; }
  .tool-cta-row .tool-btn { width: 100%; }
}
