/* =========================================================
   Pagine "Strumenti"
   ========================================================= */

/* ---------- Hero degli strumenti ---------- */
.tool-hero { position: relative; background: var(--navy); color: var(--white); overflow: hidden; }
.tool-hero-rings {
  position: absolute; right: -160px; top: -180px; width: 600px; height: 600px; pointer-events: none;
  transform: rotate(calc(var(--p) * 40deg)) translate3d(0, calc(var(--p) * 120px), 0);
}
.tool-hero-inner {
  position: relative; display: flex; flex-direction: column; gap: 22px;
  padding-top: clamp(56px, 7vw, 96px); padding-bottom: clamp(56px, 7vw, 96px);
  opacity: calc(1 - var(--p) * 1.2);
  transform: translate3d(0, calc(var(--p) * 90px), 0);
}
.crumbs { display: flex; gap: 10px; font-size: 14px; font-weight: 600; color: var(--on-dark-2); }
.crumbs a { color: var(--on-dark-2); }
.crumbs a:hover { color: var(--white); }
.tool-hero-head { display: flex; align-items: center; gap: 14px; }
.tool-hero-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); display: grid; place-items: center; }
.tool-h1 {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 6.2vw, 84px);
  line-height: 1.02; letter-spacing: -.035em; max-width: 1000px;
}
.tool-h1 .ser { color: var(--accent-soft); }
.tool-hero .hand { align-self: flex-start; }

/* ---------- Hub ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.tool-card {
  display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 26px; padding: clamp(26px, 3vw, 34px); min-height: 280px;
}
.tool-card:hover { color: var(--ink); }
.tool-card--big { grid-column: 1 / -1; background: var(--navy); color: var(--white); border-color: var(--navy); min-height: 300px; }
.tool-card--big:hover { color: var(--white); }
.tool-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tool-card-ico { width: 60px; height: 60px; border-radius: 16px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.tool-card--big .tool-card-ico { background: var(--accent); color: var(--white); }
.tool-card-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.02em; margin-top: auto; }
.tool-card--big .tool-card-title { font-size: clamp(30px, 3.6vw, 48px); max-width: 700px; }
.tool-card-text { color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 620px; }
.tool-card--big .tool-card-text { color: var(--on-dark); }
.tool-card-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.tool-card--big .tool-card-go { color: var(--sun); }
.tool-card-go svg { transition: transform .3s var(--ease); }
.tool-card:hover .tool-card-go svg { transform: translateX(6px); }

/* ---------- Layout simulatori ---------- */
.sim-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
@media (max-width: 999px) { .sim-layout { grid-template-columns: 1fr; } }
.sim-panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 28px; }
.sim-panel fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.sim-panel legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sim-panel .field label, .sim-panel .label { font-size: 15px; font-weight: 700; }
.sim-panel .field-box input { font-size: 22px; padding: 12px 0; }
.sim-out { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hint { font-size: 13px; line-height: 1.45; color: var(--muted); }

.field--range { gap: 8px; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-head output { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
input[type="range"] {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--fill), #D5DDEA var(--fill));
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: #D5DDEA; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(14, 31, 61, .2);
  transition: transform .15s ease;
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 3px solid var(--accent); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(31, 79, 209, .25); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; background: var(--white); border: 2px solid #C9D3E3; border-radius: 14px; padding: 4px; }
.seg button {
  flex: 1 1 auto; min-height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 15px; color: var(--muted); padding: 8px 12px;
  transition: background-color .2s ease, color .2s ease;
}
.seg button[aria-checked="true"] { background: var(--accent); color: var(--white); }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex: none; }

.sim-out .result { margin: 0; }
.sim-out .chart { margin-top: 28px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--on-dark); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend--col { flex-direction: column; margin-top: 0; gap: 8px; }
.age-note { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin-bottom: 20px; padding: 14px 18px; border-radius: 14px; background: var(--navy-2); }
.age-note p { font-size: 15px; color: var(--on-dark); flex: 1 1 260px; }

.tax {
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 36px); display: flex; flex-direction: column; gap: 14px;
}
.tax-head { display: flex; flex-direction: column; gap: 10px; }
.tax .h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.015em; }
.tax-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.tax-cell { background: var(--white); border: 1px solid var(--paper-line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.tax-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.tax-v { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.2vw, 28px); font-variant-numeric: tabular-nums; }
.breakdown { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.bars { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: #E9E1D2; }
.bars span { display: block; height: 100%; transition: flex-grow .6s var(--ease); }
.bars-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.bars-legend span { display: inline-flex; align-items: center; gap: 8px; }
.bars-legend b { color: var(--ink); font-variant-numeric: tabular-nums; }

.human { display: flex; flex-direction: column; gap: 6px; }
.human-v { font-family: var(--font-display); font-weight: 800; font-size: clamp(42px, 5.4vw, 72px); line-height: 1; letter-spacing: -.03em; color: var(--white); font-variant-numeric: tabular-nums; }
.muted-dark { color: var(--on-dark); font-size: 16px; line-height: 1.55; max-width: 560px; }
.gap-bar { display: flex; height: 20px; border-radius: 10px; overflow: hidden; background: var(--navy-2); margin-top: 24px; }
.gap-cov { background: var(--accent-soft); transition: flex-grow .6s var(--ease); }
.gap-unc { background: var(--sun); transition: flex-grow .6s var(--ease); }

.house-viz { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.house-viz svg { width: clamp(120px, 16vw, 170px); height: auto; flex: none; }
.house-fill, .house-ant, .house-sp { transition: y .7s var(--ease); }

/* ---------- Segreto "puoi recuperarne una parte" ---------- */
.secret {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 64px); align-items: center;
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: 32px; padding: clamp(28px, 5vw, 64px);
}
@media (max-width: 860px) { .secret { grid-template-columns: 1fr; } }
.secret-card {
  position: relative; aspect-ratio: 4 / 3; border-radius: 22px; background: var(--white); border: 1px solid var(--paper-line);
  padding: 28px; overflow: hidden; box-shadow: 0 24px 50px rgba(14, 31, 61, .1);
}
.secret-lines { display: flex; flex-direction: column; gap: 16px; filter: blur(5px); }
.secret-lines span { height: 14px; border-radius: 7px; background: #CBD5E6; }
.secret-lines span:nth-child(1) { width: 60%; height: 22px; background: var(--accent); }
.secret-lines span:nth-child(2) { width: 92%; } .secret-lines span:nth-child(3) { width: 78%; }
.secret-lines span:nth-child(4) { width: 86%; } .secret-lines span:nth-child(5) { width: 50%; background: var(--sun); }
.secret-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--navy); font-family: var(--font-hand); font-weight: 700; font-size: 28px; text-align: center;
  background: rgba(255, 255, 255, calc(.25 + var(--p) * .45));
}
.secret-lock svg { width: 64px; height: 64px; padding: 12px; border-radius: 50%; background: var(--navy); color: var(--sun); transform: scale(calc(.5 + var(--p) * .5)) rotate(calc((1 - var(--p)) * -30deg)); }

/* ---------- Check-up ---------- */
.quiz { background: var(--bg); border: 1px solid var(--line); border-radius: 32px; overflow: hidden; }
.quiz-bar { height: 6px; background: var(--line); }
.quiz-fill { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.quiz-body { padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 56px) 8px; min-height: 420px; }
.q { border: 0; margin: 0; padding: 0; }
.q legend { padding: 0; display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.q-n { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.q-t { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 18px; text-align: left; cursor: pointer;
  background: var(--white); border: 2px solid #D5DDEA; border-radius: 16px;
  font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--ink);
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, translate .25s var(--ease);
}
.opt:hover { border-color: var(--accent); translate: 0 -2px; }
.opt-k { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-size: 14px; background: var(--accent-tint); color: var(--accent); }
.opt.sel { background: var(--accent); border-color: var(--accent); color: var(--white); }
.opt.sel .opt-k { background: rgba(255, 255, 255, .2); color: var(--white); }
@keyframes qIn { from { opacity: 0; transform: translate3d(40px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes qInBack { from { opacity: 0; transform: translate3d(-40px, 0, 0); } to { opacity: 1; transform: none; } }
.q.enter { animation: qIn .45s var(--ease) both; }
.q.enter-back { animation: qInBack .45s var(--ease) both; }
.q.enter .opt { animation: qIn .45s var(--ease) both; }
.q.enter .opt:nth-child(2) { animation-delay: .05s; } .q.enter .opt:nth-child(3) { animation-delay: .1s; } .q.enter .opt:nth-child(4) { animation-delay: .15s; }
.quiz-nav { display: flex; justify-content: space-between; padding: 8px clamp(20px, 5vw, 56px) 28px; min-height: 76px; }

.checkup-result { display: flex; flex-direction: column; gap: 28px; }
@keyframes resIn { from { opacity: 0; transform: translate3d(0, 40px, 0); } to { opacity: 1; transform: none; } }
.checkup-result.show > * { animation: resIn .6s var(--ease) both; }
.checkup-result.show > *:nth-child(2) { animation-delay: .1s; } .checkup-result.show > *:nth-child(3) { animation-delay: .2s; }
.score { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; position: relative; }
.score-ring { width: 150px; height: 150px; grid-row: 1; grid-column: 1; }
.score-arc { transition: stroke-dashoffset 1.2s var(--ease); }
.score-text { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.score-num { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; }
.score-cap { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.score > .stack { grid-row: 1; grid-column: 2; }
@media (max-width: 560px) { .score { grid-template-columns: 1fr; } .score > .stack { grid-row: 2; grid-column: 1; } .score-ring, .score-text { justify-self: start; width: 150px; } }
.areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.area { display: flex; flex-direction: column; gap: 10px; border-radius: 20px; padding: 22px; background: var(--bg); border: 1px solid var(--line); border-top: 6px solid var(--c); }
.area[data-s="ok"] { --c: var(--accent); }
.area[data-s="warn"] { --c: var(--sun); }
.area[data-s="bad"] { --c: #D2552B; }
.area-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.area-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.area-badge { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--c); color: var(--white); }
.area[data-s="warn"] .area-badge { color: var(--navy); }
.area p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.area a { font-weight: 700; font-size: 15px; color: var(--accent); }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- CTA finale ---------- */
.tool-cta .h2 { color: var(--white); }
.tool-cta .h2 .ser { color: var(--sun); }

.sim-out .stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.sim-out .stat-v { font-size: clamp(24px, 2.3vw, 32px); white-space: nowrap; }
.checkup-result h2:focus { outline: none; }
.quiz-body { min-height: 320px; }

/* =========================================================
   Pagine tema
   ========================================================= */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.fact { background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: clamp(26px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; }
.fact-n { font-family: var(--font-serif); font-style: italic; font-size: 54px; line-height: .8; color: var(--accent); }
.fact p { color: var(--muted); font-size: 17px; line-height: 1.6; }

.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how-step { display: flex; gap: 20px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 24px 26px; }
.how-n { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--white); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.how-step strong { font-family: var(--font-display); font-size: 21px; display: block; margin-bottom: 4px; }
.how-step p { color: var(--muted); font-size: 17px; line-height: 1.55; }

.teaser {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: 32px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(14, 31, 61, .16); border: 1px solid var(--line);
}
@media (max-width: 860px) { .teaser { grid-template-columns: 1fr; } }
.teaser-in { background: var(--bg); padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 22px; }
.teaser-tag { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-tint); padding: 8px 14px; border-radius: 999px; }
.teaser-form { display: flex; flex-direction: column; gap: 18px; }
.teaser-form .field label { font-size: 16px; font-weight: 700; }
.teaser-res { background: var(--navy); color: var(--white); padding: clamp(26px, 4vw, 44px); display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.teaser-out { display: flex; flex-direction: column; gap: 4px; }
.teaser-v { font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.teaser-out + .teaser-out .teaser-v { font-size: clamp(26px, 2.8vw, 34px); color: var(--sun); }
.teaser-note { color: var(--on-dark); font-size: 15px; line-height: 1.55; }
.teaser-go { align-self: flex-start; }

.checkup-nudge {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: 20px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--paper-line); color: var(--ink); font-size: 17px;
  transition: border-color .2s ease, translate .3s var(--ease);
}
.checkup-nudge:hover { color: var(--ink); border-color: var(--accent); translate: 0 -3px; }
.checkup-nudge > span:nth-child(2) { flex: 1; }
.checkup-nudge > svg { flex: none; color: var(--accent); }

/* Vantaggio fiscale semplificato */
.tax--simple { gap: 18px; }
.tax-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.tax-pair > div { background: var(--white); border: 1px solid var(--paper-line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.tax-big { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 3.4vw, 46px); line-height: 1.05; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tax-big--sun { color: var(--ink); }
.infl-src { color: var(--accent); font-weight: 600; }
.teaser-out b { color: var(--sun); }

/* Esempio "scontrino" del vantaggio fiscale */
.receipt { gap: 18px; }
.rc-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rc-compare > div { background: var(--white); border: 1px solid var(--paper-line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.rc-v { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.4vw, 30px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-v--accent { color: var(--accent); }
.rc-list { list-style: none; margin: 0; padding: 0; border-top: 2px dashed var(--paper-line); }
.rc-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--paper-line); }
.rc-list strong { display: block; font-family: var(--font-display); font-size: 18px; }
.rc-list small { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); margin-top: 2px; }
.rc-list b, .rc-total b { flex: none; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2vw, 24px); color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-total {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--navy); color: var(--white); border-radius: 18px; padding: 20px 22px;
}
.rc-total > span { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.rc-total small { display: block; font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--on-dark-2); margin-top: 2px; }
.rc-total b { color: var(--sun); font-size: clamp(28px, 3vw, 40px); }
.rc-note { font-size: 15px; line-height: 1.6; }

/* =========================================================
   Home: sezione check-up
   ========================================================= */
.hc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 899px) { .hc-grid { grid-template-columns: 1fr; } }
.hc-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hc-area {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); font-weight: 700; font-size: 15px;
  opacity: var(--p); transform: translate3d(0, calc((1 - var(--p)) * 24px), 0) scale(calc(.9 + var(--p) * .1));
}
.hc-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.hc-area[data-s="ok"] { --c: var(--accent); }
.hc-area[data-s="warn"] { --c: var(--sun); }
.hc-area[data-s="bad"] { --c: #D2552B; }
.hc-card { background: var(--white); border: 1px solid var(--line); border-radius: 32px; overflow: hidden; box-shadow: 0 30px 70px rgba(14, 31, 61, .14); }
.hc-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.hc-body .q-t { font-size: clamp(26px, 2.8vw, 36px); margin-bottom: 10px; }
.hc-body .opts { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.hc-body .opt { text-decoration: none; }
.hc-body .opt:hover { color: var(--ink); background: var(--accent-tint); }
.hc-start { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; color: var(--accent); text-decoration: none; align-self: flex-start; }
.hc-start svg { transition: transform .3s var(--ease); }
.hc-start:hover svg { transform: translateX(6px); }
.hint--warn { color: #A8431F; font-weight: 600; }
.hint--good { color: var(--accent); font-size: 14px; line-height: 1.5; background: var(--accent-tint); padding: 10px 12px; border-radius: 10px; }
.hint--good strong { color: var(--ink); }
.rc-list li.rc-sub { padding: 10px 0 14px 18px; border-left: 3px solid var(--sun); margin: -6px 0 6px; border-bottom: 1px dashed var(--paper-line); }
.rc-list li.rc-sub strong { font-size: 15px; font-weight: 700; }
.rc-list li.rc-sub b { font-size: 18px; color: var(--muted); }

/* ===== Rifiniture per tutti i telefoni ===== */
@media (max-width: 860px) {
  .teaser { grid-template-columns: minmax(0, 1fr); }
  .teaser-tag { white-space: normal; line-height: 1.4; }
  .hc-grid > * { min-width: 0; }
}
@media (max-width: 600px) {
  .legal-table { border: 0; }
  .legal-table table, .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; min-width: 0; }
  .legal-table thead { display: none; }
  .legal-table tr { border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; }
  .legal-table td { border: 0; padding: 8px 16px; }
  .legal-table td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .rc-list li, .rc-total { flex-wrap: wrap; }
}

/* Mutuo oltre l'80%: cornice e avviso ben visibili */
.ltv-frame { border: 3px solid transparent; border-radius: 36px; padding: 0; transition: border-color .3s ease, background-color .3s ease, padding .3s ease; }
.ltv-frame.is-over { border-color: #D2552B; background: #FFF6F1; padding: clamp(14px, 2.4vw, 26px); box-shadow: 0 0 0 6px rgba(210, 85, 43, .12); }
@keyframes ltvFlash { 0% { box-shadow: 0 0 0 0 rgba(210, 85, 43, .5); } 100% { box-shadow: 0 0 0 22px rgba(210, 85, 43, 0); } }
.ltv-frame.flash { animation: ltvFlash .9s ease-out 2; }
.ltv-alert { background: #D2552B; color: var(--white); border-radius: 22px; padding: clamp(18px, 3vw, 28px); margin-bottom: clamp(16px, 2.4vw, 24px); display: flex; flex-direction: column; gap: 16px; }
.ltv-alert-head { display: flex; gap: 14px; align-items: flex-start; }
.ltv-ico { flex: none; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.ltv-title { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.25; }
.ltv-sub { margin-top: 6px; font-size: 16px; line-height: 1.55; color: #FFE7DC; }
.ltv-sub b, .ltv-list b { color: var(--white); }
.ltv-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.ltv-list li { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.55; color: #FFE7DC; }
.ltv-list strong { display: block; color: var(--white); font-size: 16px; margin-bottom: 2px; }
.ltv-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* Punti interrogativi con spiegazione */
.label-q { display: inline-flex; align-items: center; gap: 8px; }
.qmark {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; display: inline-grid; place-items: center;
  background: var(--accent-tint); color: var(--accent); padding: 0; position: relative;
}
.qmark::after { content: ""; position: absolute; inset: -10px; }   /* area di tocco più grande */
.qmark[aria-expanded="true"] { background: var(--accent); color: var(--white); }
.tip { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--white); border: 1px solid #C9D3E3; border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; }
.check-row--strong { align-items: center; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--white); border: 2px solid #C9D3E3; border-radius: 14px; padding: 12px 14px; }
.check-row--strong .qmark { margin-left: auto; }

/* Versamenti tramite RAL: blocco che si apre con la casella */
.ral-box { display: flex; flex-direction: column; gap: 18px; background: var(--white); border: 2px solid var(--accent); border-radius: 16px; padding: 16px 16px 18px; margin-top: -8px; }
.ral-box-title { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
@keyframes ralIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ral-box:not([hidden]) { animation: ralIn .35s var(--ease) both; }
.sim-panel, .sim-panel fieldset { min-width: 0; }
.range-head { flex-wrap: wrap; row-gap: 4px; }
.label-q { min-width: 0; flex-wrap: wrap; }
/* Imposta di bollo: avviso chiaro */
.bollo-note { font-size: 15px; line-height: 1.55; color: var(--muted); background: var(--white); border: 1px solid var(--paper-line); border-radius: 14px; padding: 12px 14px; }
.bollo-note.on { color: #7A2E12; background: #FFF1EA; border: 2px solid #D2552B; }
.bollo-note.on strong { color: #A8431F; }
.reset-link { align-self: flex-start; background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Modalità notte: dettagli degli strumenti */
:root[data-theme="dark"] .ltv-frame.is-over { background: #24130C; }
:root[data-theme="dark"] .bollo-note.on { background: #24130C; color: #FFD9C9; }
:root[data-theme="dark"] .bollo-note.on strong { color: #FF9C78; }
:root[data-theme="dark"] .secret-lines span { background: #2A4677; }
:root[data-theme="dark"] .secret-lines span:nth-child(1) { background: var(--accent); }
:root[data-theme="dark"] .secret-lines span:nth-child(5) { background: var(--sun); }
:root[data-theme="dark"] .secret-lock { background: rgba(11, 22, 40, calc(.25 + var(--p) * .45)); color: var(--ink); }
:root[data-theme="dark"] .score-ring circle:first-child { stroke: #22385F; }
:root[data-theme="dark"] .score-arc { stroke: var(--accent-soft); }
:root[data-theme="dark"] .quiz-bar { background: #22385F; }
:root[data-theme="dark"] .quiz-fill { background: var(--accent-soft); }
:root[data-theme="dark"] .bars { background: #22385F; }
:root[data-theme="dark"] .hint--warn { color: #FF9C78; }
:root[data-theme="dark"] .qmark { background: var(--accent-tint); color: var(--accent-soft); }
:root[data-theme="dark"] .qmark[aria-expanded="true"] { background: var(--accent-soft); color: var(--navy); }
:root[data-theme="dark"] .seg button[aria-checked="true"] { background: var(--accent); }
:root[data-theme="dark"] .hc-card { box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }

/* =========================================================
   Ti chiamo io (richiesta di chiamata)
   ========================================================= */
.callback { max-width: 760px; display: flex; flex-direction: column; gap: 40px; }
.callback-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 28px; }
.callback-steps li { display: flex; gap: 18px; align-items: flex-start; }
.callback-n { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--sun); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.callback-steps h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.callback-steps p { margin-top: 6px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.callback-alt { font-size: 16px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }

/* modulo */
.cb-form { display: flex; flex-direction: column; gap: 24px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 36px); }
.cb-form .field { display: flex; flex-direction: column; gap: 8px; }
.cb-form .field label, .cb-group legend { font-size: 16px; font-weight: 700; color: var(--ink); }
.cb-form .field-box input { font-size: 18px; padding: 12px 0; width: 100%; }
.cb-form textarea { font: inherit; font-size: 17px; line-height: 1.5; padding: 12px 14px; border: 2px solid #C9D3E3; border-radius: 14px; background: var(--white); color: var(--ink); resize: vertical; min-height: 92px; }
.cb-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 79, 209, .15); }
.cb-opt { font-weight: 500; font-size: 14px; color: var(--muted); }
.cb-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cb-group legend { padding: 0; margin-bottom: 10px; }
.cb-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-pick { position: relative; cursor: pointer; }
.cb-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cb-pick span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 2px solid #C9D3E3; border-radius: 999px; background: var(--white); font-weight: 700; font-size: 15px; color: var(--muted); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.cb-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--white); }
.cb-pick input:focus-visible + span { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.cb-privacy { font-size: 15px; }
.cb-privacy a { color: var(--accent); }
.cb-submit { align-self: stretch; justify-content: center; gap: 10px; }
.cb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cb-after { display: flex; flex-direction: column; gap: 22px; }
.cb-after-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.01em; }

/* link "Preferisci che ti chiami io?" sotto i pulsanti di prenotazione */
.callback-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-size: 16px; color: var(--white); text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 2px; text-underline-offset: 5px; align-self: flex-start; }
.callback-link:hover { color: var(--sun); }

:root[data-theme="dark"] .callback-n { background: var(--accent-tint); }
:root[data-theme="dark"] :is(.callback-alt a, .cb-privacy a) { color: var(--accent-soft); }
:root[data-theme="dark"] .cb-form { background: var(--surface); }
:root[data-theme="dark"] :is(.cb-pick span, .cb-form textarea) { background: var(--bg); border-color: #2A4677; color: var(--ink); }
:root[data-theme="dark"] .cb-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--white); }
.cb-inline { color: var(--accent); font-weight: 700; }
:root[data-theme="dark"] .cb-inline { color: var(--accent-soft); }

/* fine simulazione: le tre strade per parlarne (ti chiamo io, call, WhatsApp) */
.sim-end { display: flex; flex-direction: column; gap: 8px; background: var(--accent-tint); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.sim-end-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.sim-end-sub { font-size: 16px; color: var(--muted); }
.sim-end-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sim-end-actions .btn { justify-content: center; gap: 10px; min-height: 52px; text-align: center; white-space: normal; line-height: 1.3; }
.sim-end-actions .btn svg { flex: none; }
.sim-end-note { font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 4px; }

/* =========================================================
   Articoli
   ========================================================= */
.art-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.art-head .h3 { max-width: 620px; }
.art-all { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--accent); text-decoration: none; }
.art-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.art-cards--all { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 980px; }
@media (max-width: 899px) { .art-cards, .art-cards--all { grid-template-columns: 1fr; } }
.art-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .3s var(--ease); }
.art-card:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.art-card-tema { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.art-card-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
.art-card-text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.art-card-meta { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; font-size: 14px; font-weight: 700; color: var(--accent); }

.art-h1 { font-size: clamp(32px, 4.4vw, 56px); max-width: 900px; }
.art-meta { font-size: 15px; font-weight: 600; color: var(--on-dark-2); }
.article { max-width: 720px; }
.article .art-lead { font-size: 19px; line-height: 1.6; color: var(--ink); }
.art-tool { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 18px 20px; border: 2px solid var(--accent); border-radius: var(--radius); color: var(--accent); text-decoration: none; font-weight: 700; }
.art-tool span { display: flex; flex-direction: column; gap: 4px; }
.art-tool strong { color: var(--ink); font-size: 16px; }
.art-tool svg { flex: none; }
.legal .sim-end { margin-top: 12px; }
.art-disclaimer { font-size: 14px !important; color: var(--muted) !important; margin-top: 12px; }
.art-back a { font-weight: 700; }

:root[data-theme="dark"] .art-card { background: var(--surface); border-color: #2A4677; }
:root[data-theme="dark"] :is(.art-card-tema, .art-card-meta, .art-all, .art-tool) { color: var(--accent-soft); }
:root[data-theme="dark"] .art-tool { border-color: var(--accent-soft); }
:root[data-theme="dark"] .article .art-lead { color: var(--ink); }
/* in home, su telefono, schede compatte: solo tema, titolo e minuti */
/* in home: l'ultimo articolo in grande, gli altri due accanto */
.art-feature { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.art-side { display: grid; gap: 16px; }
@media (max-width: 899px) { .art-feature { grid-template-columns: 1fr; } }
.art-card--big { background: var(--navy); border-color: var(--navy); color: var(--white); padding: clamp(24px, 4vw, 40px); gap: 14px; justify-content: flex-end; min-height: 300px; position: relative; overflow: hidden; }
.art-card--big::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 2px dashed rgba(157, 184, 255, .35); }
.art-card--big:hover { color: var(--white); border-color: var(--accent-soft); }
.art-card--big .art-card-tema { color: var(--sun); }
.art-card--big .art-card-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.art-card--big .art-card-text { color: #DCE5F3; font-size: 17px; }
.art-card--big .art-card-meta { color: var(--white); background: var(--accent); padding: 12px 18px; border-radius: 12px; align-self: flex-start; }
@media (max-width: 599px) {
  .art-card--big { min-height: 0; }
  .art-side .art-card { padding: 16px 18px; gap: 6px; }
  .art-side .art-card-text { display: none; }
  .art-side .art-card-title { font-size: 18px; }
}
:root[data-theme="dark"] .art-card--big { background: #070F1E; border-color: #2A4677; }
:root[data-theme="dark"] .art-card--big .art-card-meta { color: var(--white); }
/* negli articoli i link prendono il colore blu: i pulsanti tengono i loro colori */
.legal a.btn--primary, .legal a.btn--wa, .legal a.btn--primary:hover, .legal a.btn--wa:hover { color: var(--white); }
.legal a.btn--outline, .legal a.btn--outline:hover { color: var(--ink); }

/* ---------- Articoli: elementi per tenere l'attenzione ---------- */
.article { gap: 18px; }
.article h2 { margin-top: 36px; }
.article mark { background: linear-gradient(transparent 55%, rgba(242, 182, 64, .55) 55%); color: inherit; padding: 0 2px; }

/* "In 30 secondi" */
.art-tldr { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 22px 22px 20px; margin: 8px 0 4px; }
.art-tldr-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); margin-bottom: 10px; }
.art-tldr ul { list-style: none; padding: 0; margin: 0; gap: 10px; }
.legal .art-tldr li { position: relative; padding-left: 26px; color: #DCE5F3; font-size: 16px; line-height: 1.55; }
.art-tldr li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--sun); }
.art-tldr strong { color: var(--white); }

/* numeri grandi */
.art-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0; }
.art-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 559px) { .art-stats { grid-template-columns: 1fr; } }
.art-stat { background: var(--accent-tint); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.art-stat-n { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; color: var(--accent); }
.art-stat-l { font-size: 14px; line-height: 1.45; color: var(--ink); }

/* box colorati */
.art-callout { display: flex; gap: 14px; align-items: flex-start; border-radius: 16px; padding: 18px 18px 16px; margin: 6px 0; background: var(--accent-tint); }
.art-callout-ico { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--white); font-weight: 800; font-family: var(--font-display); }
.art-callout-t { display: block; font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.legal .art-callout p { font-size: 16px; line-height: 1.6; margin: 0; color: var(--ink); }
.art-callout--warn { background: #FFF3D6; }
.art-callout--warn .art-callout-ico { background: var(--sun); color: var(--navy); }
.art-callout--ok { background: #E3F4EA; }
.art-callout--ok .art-callout-ico { background: var(--green); }
.art-callout--big .art-callout-t { font-size: 20px; line-height: 1.3; }

/* confronto affiancato */
.art-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 6px 0; }
@media (max-width: 599px) { .art-compare { grid-template-columns: 1fr; } }
.art-col { border: 2px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.art-col--accent { border-color: var(--accent); }
.art-col-h { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.art-col-h::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.art-col--accent .art-col-h::before { background: var(--accent); }
.art-col ul { list-style: none; padding: 0; margin: 0; gap: 10px; }
.legal .art-col li { font-size: 15px; line-height: 1.55; padding-left: 0; }

/* tabella con icone */
.art-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin: 6px 0; font-size: 15px; }
.art-table th, .art-table td { text-align: left; vertical-align: top; padding: 12px 12px; border-bottom: 1px solid var(--line); line-height: 1.45; color: var(--ink); }
.art-table th { background: var(--accent-tint); font-weight: 800; font-family: var(--font-display); font-size: 14px; }
.art-table tr:last-child td { border-bottom: 0; }
.art-table td:first-child { font-weight: 700; width: 28%; }
.ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; font-weight: 800; margin-right: 6px; vertical-align: -3px; color: var(--white); }
.ic--si { background: var(--green); } .ic--no { background: #D2483B; } .ic--forse { background: var(--sun); color: var(--navy); }

/* passaggi numerati */
.art-steps { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 10px; counter-reset: s; }
.legal .art-steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; border: 1px solid var(--line); border-radius: 16px; font-size: 16px; }
.art-steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--sun); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }

/* lista di controllo */
.art-check { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 8px; }
.legal .art-check li { position: relative; padding: 10px 14px 10px 46px; background: var(--accent-tint); border-radius: 12px; font-size: 16px; }
.art-check li::before { content: "✓"; position: absolute; left: 14px; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 800; }

/* illustrazioni */
.art-fig { margin: 10px 0; padding: 18px 16px 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.art-fig svg { display: block; width: 100%; height: auto; }
.art-fig figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.art-svg text { font-family: var(--font-body); fill: var(--ink); }
.art-svg .tb { font-weight: 800; font-family: var(--font-display); }
.art-svg .tw { fill: #FFFFFF; }
.art-svg .tm { fill: var(--muted); }
.art-svg .f-ink { fill: var(--navy); }
.art-svg .f-acc { fill: var(--accent); }
.art-svg .f-sun { fill: var(--sun); }
.art-svg .f-soft { fill: var(--accent-tint); }
.art-svg .f-mut { fill: #B8C4D8; }
.art-svg .s-sun { stroke: var(--sun); fill: none; }
.art-svg .s-line { stroke: var(--muted); fill: none; }

/* firma con foto */
.art-author { display: flex; gap: 16px; align-items: center; margin-top: 28px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); }
.art-author img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: var(--navy); }
.legal .art-author p { font-size: 15px; line-height: 1.55; margin: 0; color: var(--muted); }
.art-author strong { display: block; font-family: var(--font-display); font-size: 17px; color: var(--ink); }

:root[data-theme="dark"] .art-tldr { background: #070F1E; border: 1px solid #2A4677; }
:root[data-theme="dark"] .art-callout--warn { background: #3A2F14; }
:root[data-theme="dark"] .art-callout--ok { background: #12301F; }
:root[data-theme="dark"] :is(.art-col, .art-table, .art-table th, .art-table td, .art-steps li, .art-author, .art-fig) { border-color: #2A4677; }
:root[data-theme="dark"] .art-fig { background: #0B1628; }
:root[data-theme="dark"] .art-stat-n { color: var(--accent-soft); }
:root[data-theme="dark"] .art-svg .f-ink { fill: #24406F; }
:root[data-theme="dark"] .art-svg .f-mut { fill: #3A5078; }
:root[data-theme="dark"] .art-steps li::before { background: #24406F; }
.art-fig svg { max-width: 460px; margin: 0 auto; }
.art-svg .tn { fill: #0E1F3D; }
/* firma degli articoli: solo il nome, senza foto */
.legal .art-byline { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.art-byline a { font-weight: 700; }
:root[data-theme="dark"] .legal .art-byline { border-color: #2A4677; }

/* TFR: rivalutazione con inflazione al 2% (obiettivo BCE) */
.reval { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.reval-t { margin: 0; font-size: 15px; line-height: 1.55; color: var(--on-dark); }
.reval-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 2px; }
.reval-t strong { color: var(--white); }
.qmark--i { margin-left: 8px; vertical-align: -5px; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 15px; background: var(--accent-soft); color: var(--navy); }

/* TFR: vantaggio del fondo pensione, leggibile a colpo d'occhio */
.adv { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3.4vw, 34px); display: flex; flex-direction: column; gap: 18px; }
.adv-head { display: flex; flex-direction: column; gap: 8px; }
.adv .h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.015em; }
.adv-total { background: var(--navy); color: var(--white); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.adv-total-k { font-size: 14px; font-weight: 700; color: var(--on-dark); }
.adv-total b { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 6vw, 54px); line-height: 1.05; letter-spacing: -.02em; color: var(--sun); font-variant-numeric: tabular-nums; }
.adv-total small { font-size: 13px; color: var(--on-dark-2); }
.adv-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line); }
.adv-seg { display: block; height: 100%; width: 0; transition: width .6s var(--ease); }
.adv-seg--int { background: var(--accent); }
.adv-seg--tax { background: var(--green); }
.adv-seg--dat { background: var(--sun); }
.adv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adv-item, .adv-sub { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.adv-item b, .adv-sub b { margin-left: auto; flex: none; font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 2.2vw, 24px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adv-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; }
.adv-item--int .adv-dot { background: var(--accent); } .adv-item--int b { color: var(--accent); }
.adv-item--tax .adv-dot { background: var(--green); } .adv-item--tax b { color: var(--green); }
.adv-item--dat .adv-dot { background: var(--sun); } .adv-item--dat b { color: #A97400; }
.adv-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adv-txt strong { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.adv-txt small { font-size: 13px; line-height: 1.45; color: var(--muted); }
.adv-sub { margin-left: 26px; background: transparent; border-left: 3px solid var(--green); border-radius: 0 12px 12px 0; padding: 8px 12px; }
.adv-sub strong { font-size: 14px; }
.adv-sub b { font-size: 17px; color: var(--muted); }
.adv-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.adv-compare > div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.adv-compare b { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adv-compare--acc b { color: var(--accent); }
.adv-note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
@media (max-width: 599px) {
  /* su telefono: niente pallino, una banda colorata a sinistra e la cifra sotto il titolo */
  .adv-item, .adv-sub { flex-wrap: wrap; row-gap: 4px; }
  .adv-item { border-left: 5px solid var(--c, var(--accent)); }
  .adv-item--int { --c: var(--accent); } .adv-item--tax { --c: var(--green); } .adv-item--dat { --c: var(--sun); }
  .adv-item .adv-dot { display: none; }
  .adv-item b, .adv-sub b { margin-left: 0; flex-basis: 100%; font-size: 26px; }
  .adv-sub b { font-size: 18px; }
  .adv-compare b { font-size: 18px; }
}
:root[data-theme="dark"] .adv { background: var(--surface); border-color: #2A4677; }
:root[data-theme="dark"] :is(.adv-item, .adv-sub) { background: var(--bg); }
:root[data-theme="dark"] .adv-total { background: #070F1E; }
:root[data-theme="dark"] .adv-bar { background: #2A4677; }
:root[data-theme="dark"] .adv-item--int b { color: var(--accent-soft); }
:root[data-theme="dark"] .adv-item--tax b { color: #4CC489; }
:root[data-theme="dark"] .adv-item--dat b { color: var(--sun); }
:root[data-theme="dark"] .adv-compare > div { border-color: #2A4677; }
:root[data-theme="dark"] .adv-compare--acc b { color: var(--accent-soft); }

/* Mutuo: spese nascoste */
.costs { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3.4vw, 34px); display: flex; flex-direction: column; gap: 16px; }
.costs .h3 { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.015em; }
.costs-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--line); }
.costs-seg { display: block; height: 100%; width: 0; transition: width .6s var(--ease); }
.costs-seg--ant { background: var(--sun); }
.costs-seg--sp { background: #E8704A; }
.costs-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.costs-legend > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; background: var(--bg); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 700; color: var(--muted); }
.costs-legend b { flex-basis: 100%; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.6vw, 28px); color: var(--ink); font-variant-numeric: tabular-nums; }
.costs-dot--ant { background: var(--sun); } .costs-dot--sp { background: #E8704A; }
.costs-list { list-style: none; margin: 0; padding: 0; }
.costs-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.costs-list strong { display: block; font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.costs-list small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.costs-list b { flex: none; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.costs-list .costs-tot { border-bottom: 0; padding-top: 14px; }
.costs-list .costs-tot b { color: var(--accent); font-size: 22px; }
.costs-short { margin: 0; padding: 12px 14px; border-radius: 12px; background: #FDE7E3; color: #8A2A1B; font-size: 15px; }
.costs-more { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.costs-more strong { color: var(--ink); }
.costs .art-callout p { font-size: 15px; line-height: 1.55; color: var(--ink); }
:root[data-theme="dark"] .costs { background: var(--surface); border-color: #2A4677; }
:root[data-theme="dark"] .costs-legend > div { background: var(--bg); }
:root[data-theme="dark"] .costs-bar { background: #2A4677; }
:root[data-theme="dark"] .costs-list li { border-color: #2A4677; }
:root[data-theme="dark"] .costs-list .costs-tot b { color: var(--accent-soft); }
:root[data-theme="dark"] .costs-short { background: #3A1E19; color: #FFB4A6; }

/* home: schede con la sola domanda */
@media (min-width: 600px) { .art-card--big { min-height: 240px; } }
@media (max-width: 599px) { .art-card--big { min-height: 0; gap: 22px; } }
.art-card--q { justify-content: space-between; gap: 14px; }
.art-card--q .art-card-title { font-size: 21px; }
/* pagina Articoli: ricerca rapida e categorie */
.art-find { max-width: 980px; margin-bottom: 8px; }
.art-search { display: flex; align-items: center; gap: 12px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 22px; color: var(--accent); transition: border-color .2s, box-shadow .2s; }
.art-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.art-search svg { flex: none; }
.art-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 600 17px/1.3 var(--font-body); color: var(--ink); padding: 12px 0; outline: none; }
.art-search input::placeholder { color: var(--muted); font-weight: 500; opacity: .8; }
.art-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.art-chip { border: 1.5px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 14px/1 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.art-chip span { color: var(--muted); font-weight: 600; margin-left: 2px; }
.art-chip:hover { border-color: var(--accent); }
.art-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.art-chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .75); }
.art-count { min-height: 1.4em; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--muted); }
.art-group { margin-top: 36px; }
.art-group-t { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.01em; margin-bottom: 16px; }
.art-none { max-width: 980px; margin-top: 40px; }
@media (min-width: 700px) { .art-none .sim-end-actions { flex-direction: row; } .art-none .sim-end-actions .btn { flex: 1; } }
.art-card[hidden], .art-group[hidden], .art-none[hidden] { display: none; }
/* Su computer i risultati sono alti quanto la scheda dei campi: quello che avanza scorre dentro il riquadro.
   contain: size fa sì che l'altezza della riga la decida solo la scheda dei campi. */
@media (min-width: 1000px) {
  .sim-layout { align-items: stretch; }
  .sim-out { contain: size; overflow-y: auto; padding: 0 10px 4px 0; margin-right: -10px; scrollbar-width: thin; scrollbar-color: #C9D3E3 transparent; }
}
/* strumento "Quanto costa davvero comprare casa" */
.costs-seg--casa { background: var(--accent); }
.costs-dot--casa { background: var(--accent); }
@media (min-width: 600px) { .costs-legend--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.costs-legend--3 b { font-size: clamp(19px, 2vw, 24px); }
.costs-legend > div[hidden] { display: none; }
.field-opt { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Stima della RAL dalla busta paga */
.ral-est { margin-top: -6px; }
mark.lordo { background: var(--sun); color: var(--navy); font-weight: 800; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; }
.ral-est-out { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.ral-est-out strong { color: var(--accent); font-size: 17px; }
.field-box.is-estimated { background: var(--accent-tint); border-style: dashed; }
.field-box.is-estimated input { color: var(--accent); }
:root[data-theme="dark"] .ral-est-out strong, :root[data-theme="dark"] .field-box.is-estimated input { color: var(--accent-soft); }
