/* conto-costo-it: tool-specific styles (base tokens in shared/css/base.css) */
h2 { font-size: 1.25rem; margin: 0 0 4px; }
h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.unofficial { margin-top: -4px; }
small.muted { display: block; margin-top: 4px; }
.row-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .row-4 { grid-template-columns: 1fr 1fr; } }
form details { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 16px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 12px 0; }
legend { font-weight: 600; padding: 0 4px; }
label.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 8px 0; }
label.check input { width: auto; margin-top: 4px; flex: none; }

/* result */
.result .big, #result .big { font-size: 2.2rem; font-weight: 700; margin: 8px 0 0; line-height: 1.1; }
#result .per { font-size: 1rem; font-weight: 400; color: var(--muted); }
.totals { margin: 16px 0 8px; }
.trow { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 8px; align-items: center; margin: 6px 0; font-size: .95rem; }
.tb { background: var(--bg); border-radius: 6px; height: 18px; overflow: hidden; display: block; }
.tb .bar { height: 100%; }
.bar { display: block; height: 10px; border-radius: 6px; }
.bar-cur { background: var(--accent); }
.bar-alt { background: var(--muted); opacity: .6; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.save { font-size: 1.1rem; font-weight: 600; padding: 10px 12px; border-radius: 8px; background: var(--bg); }
.save.pos { border-left: 4px solid var(--accent); }
.tbl-wrap { overflow-x: auto; }
.breakdown { font-size: .92rem; margin: 12px 0; }
.breakdown th[scope="row"] { font-weight: 400; }
.breakdown td { width: 34%; }
.breakdown .cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.breakdown tfoot th, .breakdown tfoot td { font-weight: 700; border-bottom: 0; }
#result details p, #result details li { font-size: .92rem; }

/* premium */
.ticks { padding-left: 20px; }
.ticks li { margin: 4px 0; }
.timeline { padding-left: 20px; }
.timeline li { margin: 6px 0; }
.checklist { padding-left: 20px; }
.checklist li { margin: 2px 0; }
.letter { width: 100%; font: .9rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }
.actions button { margin: 4px 6px 4px 0; }
.print-only { display: none; }

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --border: #bbb; --accent: #1f6f5c; }
  body { background: #fff; color: #000; }
  header.site, footer.site, .no-print, .fd-overlay, details:not([open]) > *:not(summary) { display: none !important; }
  .print-only { display: block !important; }
  .letter { display: none !important; }
  .letter-print { white-space: pre-wrap; font: 10pt/1.4 Georgia, serif; border: 1px solid #bbb; padding: 10mm; break-inside: avoid; }
  .card { border: 0; padding: 0; margin: 0 0 8mm; }
  h1 { margin-top: 0; font-size: 18pt; }
  .lead, .unofficial { display: none; }
  .bar, .tb { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #plan h3 { break-after: avoid; }
  a { color: #000; }
}
#planOut .btn-secondary { white-space: normal; text-align: left; max-width: 100%; }
